#ce4wp_checkout_consent_checkbox_field {
    display: none;
}

.woocommerce-Price-amount.amount bdi {
  color: black;
}
/* =========================================================
   Two-page checkout summary table (twopage-subtotal)
   - Desktop/Tablet: elegant table card
   - Mobile (<=480px): stacked card layout
   ========================================================= */

/* ---------- Base: Card table ---------- */
.woocommerce-checkout table.twopage-subtotal {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

/* Header */
.woocommerce-checkout table.twopage-subtotal thead th {
  background: rgba(0,0,0,.03);
  font-weight: 800;
  padding: 14px 16px;
  font-size: 14px;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* Body cells */
.woocommerce-checkout table.twopage-subtotal tbody th,
.woocommerce-checkout table.twopage-subtotal tbody td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* Remove bottom border on last row in each tbody */
.woocommerce-checkout table.twopage-subtotal tbody tr:last-child th,
.woocommerce-checkout table.twopage-subtotal tbody tr:last-child td {
  border-bottom: 0;
}

/* Subtotal / shipping background */
.woocommerce-checkout table.twopage-subtotal tr.cart-subtotal th,
.woocommerce-checkout table.twopage-subtotal tr.cart-subtotal td,
.woocommerce-checkout table.twopage-subtotal tr.woocommerce-shipping-totals th,
.woocommerce-checkout table.twopage-subtotal tr.woocommerce-shipping-totals td {
  background: rgba(0,0,0,.015);
}

/* Total row */
.woocommerce-checkout table.twopage-subtotal tr.order-total th,
.woocommerce-checkout table.twopage-subtotal tr.order-total td {
  background: rgba(0,0,0,.04);
  font-weight: 900;
  font-size: 16px;
}

/* Price alignment */
.woocommerce-checkout table.twopage-subtotal td.product-total,
.woocommerce-checkout table.twopage-subtotal tr.cart-subtotal td,
.woocommerce-checkout table.twopage-subtotal tr.order-total td {
  text-align: right;
  white-space: nowrap;
}

/* Product row layout */
.woocommerce-checkout table.twopage-subtotal td.product-name .fusion-product-name-wrapper {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
}

.woocommerce-checkout table.twopage-subtotal td.product-name .product-thumbnail img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.woocommerce-checkout table.twopage-subtotal td.product-name .product-info {
  line-height: 1.35;
  font-size: 14px;
}

.woocommerce-checkout table.twopage-subtotal td.product-name .product-quantity {
  font-weight: 800;
  margin-left: 6px;
}

/* Shipping methods UI */
.woocommerce-checkout table.twopage-subtotal ul#shipping_method {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.woocommerce-checkout table.twopage-subtotal ul#shipping_method li {
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.woocommerce-checkout table.twopage-subtotal ul#shipping_method input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #111; /* 你可以換品牌色 */
}

.woocommerce-checkout table.twopage-subtotal ul#shipping_method label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
}

/* Shipping price */
.woocommerce-checkout table.twopage-subtotal ul#shipping_method .amount {
  font-weight: 800;
}

/* Selected method highlight */
.woocommerce-checkout table.twopage-subtotal ul#shipping_method input[type="radio"]:checked + label {
  font-weight: 900;
}

.woocommerce-checkout table.twopage-subtotal ul#shipping_method li:has(input[type="radio"]:checked) {
  border-color: rgba(0,0,0,.25);
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

/* Destination text */
.woocommerce-checkout table.twopage-subtotal .woocommerce-shipping-destination {
  margin: 10px 0 0;
  font-size: 13px;
  opacity: .75;
}

/* Hide Avada calculate shipping hint if exists */
.woocommerce-checkout table.twopage-subtotal .awb-calc-shipping {
  display: none !important;
}

/* =========================================================
   Tablet polish: keep table layout, better spacing
   ========================================================= */
@media (min-width: 481px) and (max-width: 900px) {

  .woocommerce-checkout table.twopage-subtotal thead th,
  .woocommerce-checkout table.twopage-subtotal tbody th,
  .woocommerce-checkout table.twopage-subtotal tbody td {
    padding: 12px 14px;
  }

  .woocommerce-checkout table.twopage-subtotal td.product-name .fusion-product-name-wrapper {
    grid-template-columns: 52px 1fr;
    gap: 10px;
  }

  .woocommerce-checkout table.twopage-subtotal td.product-name .product-thumbnail img {
    width: 52px;
    height: 52px;
  }
}

/* =========================================================
   Mobile layout (<=480px)
   - Convert table rows into stacked cards
   - Prevent total value clipping
   ========================================================= */
@media (max-width: 480px) {

  /* Make sure desktop/tablet styles don't break layout */
  .woocommerce-checkout table.twopage-subtotal,
  .woocommerce-checkout table.twopage-subtotal tbody,
  .woocommerce-checkout table.twopage-subtotal tr,
  .woocommerce-checkout table.twopage-subtotal td,
  .woocommerce-checkout table.twopage-subtotal th {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .woocommerce-checkout table.twopage-subtotal thead {
    display: none;
  }

  /* Each row becomes a section */
  .woocommerce-checkout table.twopage-subtotal tbody tr {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0,0,0,.06);
  }

  .woocommerce-checkout table.twopage-subtotal tbody tr:last-child {
    border-bottom: 0;
  }

  /* Product item: name top, price bottom */
  .woocommerce-checkout table.twopage-subtotal tr.cart_item td.product-name {
    padding: 0;
    border: 0;
  }

  .woocommerce-checkout table.twopage-subtotal tr.cart_item td.product-total {
    padding: 10px 0 0;
    border: 0;
    text-align: left;
    font-weight: 900;
    font-size: 15px;
  }

  /* Smaller thumbnail */
  .woocommerce-checkout table.twopage-subtotal td.product-name .fusion-product-name-wrapper {
    grid-template-columns: 48px 1fr;
    gap: 10px;
  }

  .woocommerce-checkout table.twopage-subtotal td.product-name .product-thumbnail img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }

  /* Subtotal / shipping / total: title above, content below */
  .woocommerce-checkout table.twopage-subtotal tr.cart-subtotal th,
  .woocommerce-checkout table.twopage-subtotal tr.woocommerce-shipping-totals th,
  .woocommerce-checkout table.twopage-subtotal tr.order-total th {
    padding: 0;
    border: 0;
    margin-bottom: 8px;
    font-weight: 900;
    font-size: 14px;
  }

  .woocommerce-checkout table.twopage-subtotal tr.cart-subtotal td,
  .woocommerce-checkout table.twopage-subtotal tr.woocommerce-shipping-totals td,
  .woocommerce-checkout table.twopage-subtotal tr.order-total td {
    padding: 0;
    border: 0;
    text-align: left;
  }

  /* Total row: card highlight + prevent clipping */
  .woocommerce-checkout table.twopage-subtotal tr.order-total {
    background: rgba(0,0,0,.04);
    border-radius: 12px;
    margin-top: 10px;
    overflow: visible !important;
  }

  .woocommerce-checkout table.twopage-subtotal tr.order-total td {
    padding: 10px 0 6px !important;
    overflow: visible !important;
  }

  .woocommerce-checkout table.twopage-subtotal tr.order-total td strong {
    display: inline-block;
    font-size: 18px;
    line-height: 1.2;
    padding-right: 2px;
    box-sizing: border-box;
  }

  /* Shipping methods: full-width cards */
  .woocommerce-checkout table.twopage-subtotal ul#shipping_method {
    gap: 12px;
  }

  .woocommerce-checkout table.twopage-subtotal ul#shipping_method li {
    padding: 12px 12px;
  }

  .woocommerce-checkout table.twopage-subtotal ul#shipping_method label {
    font-size: 14px;
    line-height: 1.3;
    align-items: flex-start;
  }

  .woocommerce-checkout table.twopage-subtotal ul#shipping_method label .amount {
    margin-left: auto;
    white-space: nowrap;
  }
}

/* =========================================================
   Safety reset: Tablet/Desktop force table layout again
   (prevents Avada weird breakpoints from applying mobile block layout)
   ========================================================= */
@media (min-width: 481px) {
  .woocommerce-checkout table.twopage-subtotal { display: table !important; }
  .woocommerce-checkout table.twopage-subtotal thead { display: table-header-group !important; }
  .woocommerce-checkout table.twopage-subtotal tbody { display: table-row-group !important; }
  .woocommerce-checkout table.twopage-subtotal tr { display: table-row !important; }
  .woocommerce-checkout table.twopage-subtotal th,
  .woocommerce-checkout table.twopage-subtotal td { display: table-cell !important; }
}

@media (max-width: 480px) {
  .woocommerce-checkout table.twopage-subtotal {
    overflow: visible !important;
  }
}