/* ===========================
   ページコンテナ
   =========================== */
.page-cart {
  background: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===========================
   カートセクション
   =========================== */
.cart-section {
  padding-bottom: 80px;
}

/* ===========================
   テーブルヘッダー
   =========================== */
.cart-table-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  padding-bottom: 8px;
}

.cart-table-header__price {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--navy);
  width: 120px;
  text-align: center;
}

.cart-table-header__qty {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--navy);
  width: 120px;
  text-align: center;
}

.cart-table-header__action {
  width: 80px;
}

/* ===========================
   商品リスト
   =========================== */
.cart-list {
  list-style: none;
  border-top: 1px solid #E5E5E5;
}

/* ===========================
   商品行
   =========================== */
.cart-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #E5E5E5;
}

/* 商品画像ボックス */
.cart-item__image-wrap {
  flex-shrink: 0;
  width: 186px;
  height: 146px;
  background: #F1F3F5;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-item__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
}

/* 商品情報 */
.cart-item__info {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 8px;
}

.cart-item__desc {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: #BEBEBE;
  line-height: 21px;
  max-width: 383px;
}

/* 単価 */
.cart-item__price {
  flex-shrink: 0;
  width: 120px;
  text-align: center;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.cart-item__price-num {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--navy);
}

.cart-item__price-unit {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--navy);
}

/* 数量 */
.cart-item__qty {
  flex-shrink: 0;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cart-item__qty-btn {
  appearance: none;
  background: none;
  border: none;
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--navy);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: opacity 0.2s;
}

.cart-item__qty-btn:hover {
  opacity: 0.6;
}

.cart-item__qty-num {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--navy);
  min-width: 20px;
  text-align: center;
}

/* 削除 */
.cart-item__action {
  flex-shrink: 0;
  width: 80px;
  text-align: center;
}

.cart-item__delete {
  appearance: none;
  background: none;
  border: none;
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--navy);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
}

.cart-item__delete:hover {
  opacity: 0.6;
}

/* ===========================
   合計行
   =========================== */
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F1F3F5;
  height: 63px;
  border-top: 1px solid #E5E5E5;
  border-bottom: 1px solid #E5E5E5;
  padding: 0 20px 0 22px;
  margin-top: -1px;
}

.cart-total__label {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--navy);
}

.cart-total__amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.cart-total__num {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--navy);
}

.cart-total__unit {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--navy);
}

/* ===========================
   フッター（メッセージ・ボタン）
   =========================== */
.cart-footer {
  text-align: center;
  padding-top: 28px;
}

.cart-footer__free-shipping {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 20px;
}

.cart-footer__message {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 28px;
}

.cart-footer__btn-wrap {
  display: flex;
  justify-content: center;
}

/* 購入手続きへボタン */
.cart-checkout-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--cyan);
  border-radius: 400px;
  padding: 4px 60px;
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--cyan);
  background: var(--white);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  min-height: 48px;
}

.cart-checkout-btn:hover {
  background: var(--cyan);
  color: var(--white);
}

.cart-checkout-btn__arrow {
  transform: rotate(90deg);
  flex-shrink: 0;
  transition: filter 0.2s;
}

.cart-checkout-btn:hover .cart-checkout-btn__arrow {
  filter: brightness(0) invert(1);
}

/* ===========================
   レスポンシブ: 1100px以下
   =========================== */
@media (max-width: 1100px) {
  .cart-item__image-wrap {
    width: 140px;
    height: 110px;
  }

  .cart-item__info {
    min-width: 0;
  }

  .cart-item__desc {
    max-width: 100%;
  }
}

/* ===========================
   レスポンシブ: 767px以下
   =========================== */
@media (max-width: 767px) {
  /* ヘッダー行を非表示 */
  .cart-table-header {
    display: none;
  }

  /* 商品行をブロックに変更 */
  .cart-item {
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 0;
  }

  .cart-item__image-wrap {
    width: 100px;
    height: 80px;
    border-radius: 16px;
  }

  .cart-item__image {
    border-radius: 16px;
  }

  .cart-item__info {
    flex: 1 1 calc(100% - 116px);
    min-width: 0;
  }

  .cart-item__name {
    font-size: 16px;
  }

  /* 単価・数量・削除を横並びで下段に配置 */
  .cart-item__price {
    order: 3;
    width: auto;
    flex: 1;
    justify-content: flex-start;
    gap: 4px;
  }

  .cart-item__price::before {
    content: "単価：";
    font-family: 'M PLUS 1', sans-serif;
    font-size: 12px;
    color: var(--navy);
    font-weight: 500;
  }

  .cart-item__qty {
    order: 4;
    width: auto;
    justify-content: flex-start;
  }

  .cart-item__action {
    order: 5;
    width: auto;
    text-align: left;
  }

  .cart-footer__message {
    font-size: 14px;
  }

  .cart-checkout-btn {
    font-size: 16px;
    padding: 4px 40px;
  }
}
