/* ===========================
   ページコンテナ
   =========================== */
.page-order-confirm {
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===========================
   フォーム全体
   =========================== */
.confirm-form {
  gap: 68px;
}

/* ===========================
   リード文
   =========================== */
.confirm-lead {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--navy);
  line-height: 1.8;
}

/* ===========================
   ご注文商品テーブル
   =========================== */
.confirm-cart {
  display: flex;
  flex-direction: column;
}

.confirm-cart__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #E5E5E5;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: var(--white);
  font-family: 'M PLUS 1', sans-serif;
}

.confirm-cart__th,
.confirm-cart__td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #E5E5E5;
  font-weight: 500;
  font-size: 15px;
  color: var(--navy);
}

.confirm-cart__table thead .confirm-cart__th:first-child {
  border-top-left-radius: 12px;
}

.confirm-cart__table thead .confirm-cart__th:last-child {
  border-top-right-radius: 12px;
}

.confirm-cart__th {
  background: #F7FAFC;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
}

.confirm-cart__td--num,
.confirm-cart__th--num {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.confirm-cart__th--image,
.confirm-cart__td--image {
  width: 120px;
}

.confirm-cart__image-wrap {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: #F7FAFC;
  background-image: linear-gradient(135deg, rgba(93, 194, 208, 0.15) 0%, rgba(14, 47, 114, 0.06) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-cart__td--name {
  font-weight: 600;
}

.confirm-cart__table tbody tr:last-child .confirm-cart__td {
  border-bottom: none;
}

/* ===========================
   小計・送料・手数料・合計
   =========================== */
.confirm-totals {
  border: 1px solid #E5E5E5;
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  background: var(--white);
  margin: 0;
}

.confirm-totals__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #E5E5E5;
}

.confirm-totals__row:last-child {
  border-bottom: none;
}

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

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

.confirm-totals__row--grand {
  background: #F7FAFC;
  padding: 18px 20px;
}

.confirm-totals__row--grand .confirm-totals__label {
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}

.confirm-totals__row--grand .confirm-totals__value {
  font-weight: 700;
  font-size: 20px;
  color: var(--cyan);
}

/* ===========================
   詳細項目（ご注文者・お届け先・お支払い方法）
   =========================== */
.confirm-detail {
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
  margin: 0;
}

.confirm-detail__row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid #E5E5E5;
  align-items: center;
}

.confirm-detail__row:last-child {
  border-bottom: none;
}

.confirm-detail__label {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #666;
}

.confirm-detail__value {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--navy);
  margin: 0;
  word-break: break-word;
}

/* ===========================
   注文を確定する（CTAを強調）
   =========================== */
.page-order-confirm .cart-checkout-btn {
  background: var(--cyan);
  color: var(--white);
  border-color: var(--cyan);
}

.page-order-confirm .cart-checkout-btn__arrow {
  filter: brightness(0) invert(1);
}

.page-order-confirm .cart-checkout-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ===========================
   レスポンシブ: 767px以下
   =========================== */
@media (max-width: 767px) {
  .confirm-form {
    gap: 60px;
  }

  .confirm-lead {
    font-size: 14px;
  }

  /* テーブルをカード型に変形 */
  .confirm-cart__table thead {
    display: none;
  }

  .confirm-cart__table,
  .confirm-cart__table tbody,
  .confirm-cart__table tr {
    display: block;
    width: 100%;
  }

  .confirm-cart__table {
    border-radius: 12px 12px 0 0;
  }

  .confirm-cart__table tr {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 16px;
  }

  .confirm-cart__td {
    border-bottom: none;
    padding: 0;
    font-size: 14px;
  }

  .confirm-cart__td--image {
    grid-row: span 4;
    width: auto;
  }

  .confirm-cart__image-wrap {
    width: 96px;
    height: 96px;
  }

  .confirm-cart__td--name {
    font-size: 16px;
  }

  .confirm-cart__td--num {
    text-align: left;
    width: auto;
  }

  .confirm-cart__td--num::before {
    content: attr(data-label);
    color: #666;
    font-size: 12px;
    margin-right: 8px;
  }

  /* 詳細項目を1カラム化 */
  .confirm-detail__row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 18px;
  }

  .confirm-detail__label {
    font-size: 12px;
  }

  .confirm-detail__value {
    font-size: 14px;
  }

  .confirm-totals__row {
    padding: 12px 16px;
  }

  .confirm-totals__row--grand .confirm-totals__value {
    font-size: 18px;
  }
}
