/* ============================================
   WooCommerce Cart & Checkout — Academy Theme
   body.woocommerce-cart / body.woocommerce-checkout
   for high specificity without !important.
   ============================================ */

/* ---- Remove focus outline ---- */
body.woocommerce-cart *:focus,
body.woocommerce-cart *:focus-visible,
body.woocommerce-checkout *:focus,
body.woocommerce-checkout *:focus-visible {
  outline: none;
  box-shadow: none;
}

/* ---- Page Background (top darker → bottom lighter) ---- */
body.woocommerce-cart,
body.woocommerce-checkout {
  background: linear-gradient(180deg, #2c343b 0%, #424d59 40%, #6b7785 100%);
  background-attachment: fixed;
  font-family: 'Noto Sans TC', sans-serif;
  color: #fff;
  min-height: 100vh;
}

/* ---- Hide default header/footer ---- */
body.woocommerce-cart .site-header,
body.woocommerce-checkout .site-header,
body.woocommerce-cart .site-footer,
body.woocommerce-checkout .site-footer {
  display: none;
}

body.woocommerce-cart .page-content::after,
body.woocommerce-cart .entry-content::after,
body.woocommerce-cart .woocommerce::after,
body.woocommerce-cart .woocommerce::before,
body.woocommerce-checkout .page-content::after,
body.woocommerce-checkout .entry-content::after,
body.woocommerce-checkout .woocommerce::after,
body.woocommerce-checkout .woocommerce::before,
body.woocommerce-checkout .woocommerce form.checkout::after,
body.woocommerce-checkout .woocommerce form.checkout::before {
  content: none;
  display: none;
}
body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main {
  margin-bottom: 0;
  padding-bottom: 40px;
}
body.woocommerce-cart .page-header,
body.woocommerce-checkout .page-header {
  margin-bottom: 0;
}

/* ---- Page Container ---- */
body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ---- Page Title ---- */
body.woocommerce-cart .entry-title,
body.woocommerce-checkout .entry-title {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}

/* ============================================
   CART PAGE — List-style items (no table borders)
   ============================================ */

/* Hide default table header row */
body.woocommerce-cart table.shop_table.cart thead {
  display: none;
}

/* Turn table into block layout */
body.woocommerce-cart table.shop_table.cart {
  display: block;
  background: rgba(0,0,0,0.1);
  border: none;
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  border-radius: 12px;
  padding: 8px 24px;
}
body.woocommerce-cart table.shop_table.cart tbody {
  display: block;
}
body.woocommerce-cart table.shop_table.cart tr.woocommerce-cart-form__cart-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  border-top: none;
}
body.woocommerce-cart table.shop_table.cart tr.woocommerce-cart-form__cart-item td {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
}

/* Thumbnail — left column, spans all rows, stretches to match content */
body.woocommerce-cart table.shop_table td.product-thumbnail {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: stretch;
  margin-right: 40px;
}
body.woocommerce-cart table.shop_table td.product-thumbnail img {
  width: 180px;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Product name — middle column, row 1 */
body.woocommerce-cart table.shop_table td.product-name {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
body.woocommerce-cart table.shop_table td.product-name a {
  color: #39fff5;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
}
body.woocommerce-cart table.shop_table td.product-name a:hover {
  opacity: 0.8;
}
/* Cart selectors (場次 + 身份優惠): smaller label */
body.woocommerce-cart table.shop_table td.product-name .academy-cart-select-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Session / variation info */
body.woocommerce-cart table.shop_table td.product-name dl.variation {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}
body.woocommerce-cart table.shop_table td.product-name dl.variation dd p {
  margin: 0;
}

/* Hide individual price column */
body.woocommerce-cart table.shop_table td.product-price {
  display: none;
}

/* Quantity — right column, row 1 (top-right) */
body.woocommerce-cart table.shop_table td.product-quantity {
  grid-column: 3;
  grid-row: 1;
}
body.woocommerce-cart table.shop_table td.product-quantity .quantity input.qty {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 8px;
  width: 50px;
  text-align: center;
  font-size: 14px;
}

/* Subtotal — middle+right columns, row 2 */
body.woocommerce-cart table.shop_table td.product-subtotal {
  grid-column: 2 / -1;
  grid-row: 2;
  margin-top: 8px;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  text-align: right;
}
/* Discount: original price smaller */
body.woocommerce-cart table.shop_table td.product-subtotal del {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.5;
  margin-right: 8px;
}
body.woocommerce-cart table.shop_table td.product-subtotal ins {
  text-decoration: none;
}
body.woocommerce-cart table.shop_table td.product-subtotal small {
  font-size: 12px;
  font-weight: 400;
}

/* Remove button — hidden (quantity 1→0 triggers remove) */
body.woocommerce-cart table.shop_table td.product-remove {
  display: none !important;
}

/* ---- Actions row (coupon + update cart) ---- */
body.woocommerce-cart table.shop_table.cart tr td.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px 0 0;
  border: none;
  background: transparent;
}

/* Hide the coupon form inline — we'll show it below */
body.woocommerce-cart table.shop_table.cart .coupon {
  display: none;
}

/* Update cart button — right aligned */
body.woocommerce-cart table.shop_table.cart td.actions > button[name="update_cart"] {
  margin-left: auto;
}

/* ---- Coupon section (separate block below cart) ---- */
body.woocommerce-cart .academy-coupon-toggle {
  margin-top: 20px;
}

/* ---- Buttons (cart page) ---- */
body.woocommerce-cart .woocommerce a.button,
body.woocommerce-cart .woocommerce button.button,
body.woocommerce-cart .woocommerce input.button {
  background-color: transparent;
  color: #39fff5;
  border: 1px solid #39fff5;
  border-radius: 8px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  text-transform: none;
  line-height: 1.4;
  min-width: 160px;
  text-align: center;
}
body.woocommerce-cart .woocommerce a.button:hover,
body.woocommerce-cart .woocommerce button.button:hover,
body.woocommerce-cart .woocommerce input.button:hover {
  background-color: #39fff5;
  color: #1a1a1a;
}

/* ---- Cart Totals ---- */
/* Cart page: two-column layout */
body.woocommerce-cart .woocommerce {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
body.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper {
  width: 100%;
}
body.woocommerce-cart .woocommerce > .woocommerce-cart-form {
  width: 100%;
}
body.woocommerce-cart .woocommerce > .cart-collaterals {
  width: 100%;
  max-width: 100%;
  float: none;
}
body.woocommerce-cart .woocommerce > .cart-collaterals .cart_totals,
body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals {
  width: 100%;
  float: none;
  background: rgba(0,0,0,0.1);
  border: none;
  border-radius: 12px;
  padding: 24px;
  margin-top: 0;
}
body.woocommerce-cart .cart_totals h2 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}
body.woocommerce-cart .cart_totals table.shop_table {
  display: table;
  background: transparent;
  border: none;
}
body.woocommerce-cart .cart_totals table.shop_table thead {
  display: table-header-group;
}
body.woocommerce-cart .cart_totals table.shop_table tbody {
  display: table-row-group;
}
body.woocommerce-cart .cart_totals table.shop_table tr {
  display: table-row;
}
body.woocommerce-cart .cart_totals table.shop_table td,
body.woocommerce-cart .cart_totals table.shop_table th {
  display: table-cell;
  color: #e0e0e0;
  font-size: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: transparent;
}
body.woocommerce-cart .cart_totals .order-total td,
body.woocommerce-cart .cart_totals .order-total td .woocommerce-Price-amount {
  color: #39fff5;
  font-size: 22px;
  font-weight: 700;
}

/* Proceed to checkout */
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout a.checkout-button {
  width: 100%;
  text-align: center;
}

/* ---- Custom Qty +/- Buttons ---- */
.academy-qty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.academy-qty__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  padding: 0;
}
.academy-qty__btn:hover,
.academy-qty__btn:active {
  background-color: #fff;
  color: #1a1a1a;
  border-color: #fff;
}
.academy-qty__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* ---- Custom Remove Button (text) ---- */
.academy-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.academy-remove-btn:hover,
.academy-remove-btn:active {
  background-color: #fff;
  color: #1a1a1a;
  border-color: #fff;
}

/* ---- Cart loading states ---- */

/* Override WooCommerce's blockUI (inline styles via jQuery.blockUI)
   Must use !important here to beat inline styles */
body.woocommerce-cart .blockUI.blockOverlay,
body.woocommerce-checkout .blockUI.blockOverlay {
  background: transparent !important;
  opacity: 0 !important;
}
body.woocommerce-cart .blockUI.blockMsg,
body.woocommerce-checkout .blockUI.blockMsg {
  display: none !important;
}

/* Our custom blur + SVG loader */
body.woocommerce-cart .processing table.shop_table,
body.woocommerce-cart .woocommerce-cart-form.is-updating table.shop_table {
  filter: blur(3px);
  pointer-events: none;
  transition: filter 0.2s;
}
.academy-cart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
  padding-bottom: 200px;
}

/* blockUI on cart totals and checkout */
body.woocommerce-cart .cart_totals .blockUI.blockOverlay,
body.woocommerce-checkout #order_review .blockUI.blockOverlay {
  background: transparent !important;
  opacity: 0 !important;
}
body.woocommerce-cart .cart_totals .blockUI.blockMsg,
body.woocommerce-checkout #order_review .blockUI.blockMsg {
  display: none !important;
}

/* ---- Coupon toggle section ---- */
.academy-coupon-section {
  margin-top: 24px;
}
body.woocommerce-cart button.academy-coupon-toggle {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid #39fff5;
  border-radius: 8px;
  color: #39fff5;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
body.woocommerce-cart button.academy-coupon-toggle:hover,
body.woocommerce-cart button.academy-coupon-toggle.is-active {
  background-color: #39fff5;
  color: #1a1a1a;
  border-color: #39fff5;
}
.academy-coupon-form {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
}
.academy-coupon-form.is-open {
  display: flex;
}
.academy-coupon-form input.input-text {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  flex: 1;
}
.academy-coupon-form input.input-text::placeholder {
  color: rgba(255,255,255,0.4);
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */
body.woocommerce-checkout .woocommerce-billing-fields h3,
body.woocommerce-checkout .woocommerce-shipping-fields h3,
body.woocommerce-checkout .woocommerce-additional-fields h3,
body.woocommerce-checkout #order_review_heading {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Checkout two-column layout */
body.woocommerce-checkout .woocommerce .col2-set {
  float: none;
  width: 100%;
}
body.woocommerce-checkout .woocommerce .col2-set .col-1,
body.woocommerce-checkout .woocommerce .col2-set .col-2 {
  float: none;
  width: 100%;
  max-width: 100%;
}
body.woocommerce-checkout .woocommerce form.checkout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  align-items: start;
}
body.woocommerce-checkout .woocommerce form.checkout .col2-set {
  grid-column: 1;
}
body.woocommerce-checkout .woocommerce form.checkout #order_review,
body.woocommerce-checkout .woocommerce form.checkout #order_review_heading {
  grid-column: 2;
  grid-row: 1;
}
body.woocommerce-checkout .woocommerce form.checkout #order_review {
  grid-row: 1;
  position: static;
}
/* Remove bottom whitespace */
body.woocommerce-checkout .site-main {
  padding-bottom: 40px;
}
body.woocommerce-checkout .site-main::after {
  display: none;
}
body.woocommerce-checkout .entry-content::after,
body.woocommerce-checkout .page-content::after {
  content: none;
}
/* (footer handled in top section) */

/* Hide "您的訂單" heading */
body.woocommerce-checkout #order_review_heading {
  display: none;
}

/* Checkout form fields — all inputs 16px white */
body.woocommerce-checkout .form-row label {
  color: #ccc;
  font-size: 14px;
  font-weight: 500;
}
body.woocommerce-checkout .form-row label .required {
  color: #39fff5;
}
body.woocommerce-checkout .woocommerce-input-wrapper input.input-text,
body.woocommerce-checkout .woocommerce-input-wrapper textarea,
body.woocommerce-checkout .woocommerce-input-wrapper select,
body.woocommerce-checkout input.input-text,
body.woocommerce-checkout textarea,
body.woocommerce-checkout select {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: 'Noto Sans TC', sans-serif;
  width: 100%;
  box-sizing: border-box;
}
body.woocommerce-checkout .woocommerce-input-wrapper input.input-text::placeholder,
body.woocommerce-checkout textarea::placeholder {
  color: rgba(255,255,255,0.4);
}
/* Remove ALL validation borders (green/red) and focus colors */
body.woocommerce-checkout .form-row.woocommerce-validated input.input-text,
body.woocommerce-checkout .form-row.woocommerce-validated select,
body.woocommerce-checkout .form-row.woocommerce-validated textarea,
body.woocommerce-checkout .form-row.woocommerce-validated .select2-container--default .select2-selection--single {
  border-color: rgba(255,255,255,0.2);
}
body.woocommerce-checkout .form-row.woocommerce-invalid input.input-text,
body.woocommerce-checkout .form-row.woocommerce-invalid select,
body.woocommerce-checkout .form-row.woocommerce-invalid textarea {
  border-color: rgba(231,76,60,0.5);
}
/* Focus state — cyan border + label color transition */
body.woocommerce-checkout .form-row input.input-text:focus,
body.woocommerce-checkout .form-row textarea:focus,
body.woocommerce-checkout .form-row select:focus,
body.woocommerce-checkout .woocommerce-input-wrapper input:focus,
body.woocommerce-checkout .woocommerce-input-wrapper textarea:focus,
body.woocommerce-checkout .woocommerce-input-wrapper select:focus {
  border: 1px solid #39fff5 !important;
  box-shadow: none !important;
  transition: border-color 0.3s ease;
}
body.woocommerce-checkout input.input-text,
body.woocommerce-checkout textarea,
body.woocommerce-checkout select {
  transition: border-color 0.3s ease;
}
/* Label turns cyan when sibling input is focused */
body.woocommerce-checkout .form-row label {
  transition: color 0.3s ease;
}
body.woocommerce-checkout .form-row:focus-within > label {
  color: #39fff5;
}
/* Override WC CSS variables globally on checkout */
body.woocommerce-checkout {
  --wc-form-border-color: rgba(255,255,255,0.2);
  --wc-form-color-background: rgba(255,255,255,0.1);
  --wc-form-border-radius: 8px;
  --wc-form-border-width: 1px;
  --wc-green: rgba(255,255,255,0.2);
  --wc-highlight: rgba(255,255,255,0.2);
}
/* Nuclear: kill green validated border everywhere */
body.woocommerce-checkout .form-row.woocommerce-validated .select2-container .select2-selection,
body.woocommerce-checkout .form-row.woocommerce-validated input,
body.woocommerce-checkout .form-row.woocommerce-validated select,
body.woocommerce-checkout .form-row.woocommerce-validated textarea {
  border-color: rgba(255,255,255,0.2);
}

/* Select2 text vertical center */
body.woocommerce-checkout .select2-container--default .select2-selection--single {
  display: flex;
  align-items: center;
}
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1;
  padding-top: 0;
  padding-bottom: 0;
}
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
  height: auto;
}

/* Select2 dropdown: force dark bg everywhere (Select2 uses inline styles) */
.select2-dropdown,
.select2-dropdown *,
.select2-results,
.select2-results__options,
.select2-search--dropdown {
  background-color: #2c343b !important;
}
.select2-results__option {
  background-color: #2c343b !important;
  color: #e0e0e0 !important;
}
.select2-results__option[aria-selected="true"] {
  background-color: rgba(57,255,245,0.2) !important;
  color: #39fff5 !important;
}
.select2-results__option--highlighted,
.select2-results__option--highlighted[aria-selected] {
  background-color: rgba(57,255,245,0.12) !important;
  color: #39fff5 !important;
}
.select2-search--dropdown .select2-search__field {
  background-color: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  color: #fff !important;
}

/* Select2 dropdown — custom dark theme */
body.woocommerce-checkout .select2-container--default .select2-selection--single {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  height: 50px;
  padding: 10px 16px;
}
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #fff;
  font-size: 16px;
  line-height: 28px;
  padding-left: 0;
}
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 12px;
  right: 12px;
}
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: rgba(255,255,255,0.5) transparent transparent transparent;
}
/* Select2 dropdown panel — dark theme (global, select2 renders outside .woocommerce-checkout) */
.select2-container--default .select2-dropdown {
  background: #2c343b;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  overflow: hidden;
}
.select2-container--default .select2-search--dropdown {
  background: #2c343b;
  padding: 8px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  padding: 10px 12px;
}
.select2-container--default .select2-results {
  background: #2c343b;
}
.select2-container--default .select2-results__options {
  background: #2c343b;
}
.select2-container--default .select2-results__option {
  color: #e0e0e0;
  padding: 10px 16px;
  font-size: 15px;
  background: #2c343b;
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: rgba(57,255,245,0.15);
  color: #39fff5;
}
.select2-container--default .select2-results__option--selected,
.select2-container--default .select2-results__option[aria-selected="true"] {
  background: rgba(57,255,245,0.25);
  color: #39fff5;
}
/* Select2 focused state */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #39fff5;
}


/* Checkout order review */
body.woocommerce-checkout .woocommerce-checkout-review-order {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 24px;
}
body.woocommerce-checkout table.shop_table {
  background: transparent;
  border: none;
}
body.woocommerce-checkout table.shop_table th,
body.woocommerce-checkout table.shop_table td {
  color: #e0e0e0;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  font-size: 16px;
}
body.woocommerce-checkout table.shop_table td:last-child,
body.woocommerce-checkout table.shop_table th:last-child {
  text-align: right;
}
body.woocommerce-cart table.shop_table td.product-subtotal {
  text-align: right;
}
body.woocommerce-cart .cart_totals table.shop_table td {
  text-align: right;
}
body.woocommerce-checkout table.shop_table tfoot .order-total td,
body.woocommerce-checkout table.shop_table tfoot .order-total td .woocommerce-Price-amount {
  color: #39fff5;
  font-size: 20px;
  font-weight: 700;
}

/* Payment methods */
body.woocommerce-checkout #payment {
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
  border: none;
}
body.woocommerce-checkout #payment ul.payment_methods {
  list-style: none;
  padding: 0;
  margin: 0;
  border: none;
}
body.woocommerce-checkout #payment ul.payment_methods li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.woocommerce-checkout #payment ul.payment_methods li label {
  color: #e0e0e0;
  font-size: 16px;
}
body.woocommerce-checkout #payment div.payment_box {
  background: rgba(255,255,255,0.05);
  color: #ccc;
  border-radius: 8px;
  padding: 16px;
  margin-top: 8px;
  font-size: 16px;
}
/* TapPay credit card fields inside payment box */
body.woocommerce-checkout #payment div.payment_box input,
body.woocommerce-checkout #payment div.payment_box select,
body.woocommerce-checkout #payment div.payment_box .tpfield,
body.woocommerce-checkout #payment div.payment_box iframe {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  padding: 10px 12px;
}
body.woocommerce-checkout #payment div.payment_box label {
  color: #ccc;
  font-size: 14px;
}
body.woocommerce-checkout #payment div.payment_box p {
  color: #ccc;
  font-size: 14px;
}
/* Payment box — remove gap between arrow and box */
body.woocommerce-checkout #payment div.payment_box {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
body.woocommerce-checkout #payment div.payment_box::before {
  display: none;
}
body.woocommerce-checkout #payment ul.payment_methods li {
  border-bottom: none;
}

/* Privacy policy text */
body.woocommerce-checkout .woocommerce-privacy-policy-text p {
  color: #ccc;
  font-size: 14px;
}
body.woocommerce-checkout .woocommerce-privacy-policy-text a {
  color: #39fff5;
}

/* Terms and conditions */
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  color: #ccc;
  font-size: 14px;
}

/* ECPay invoice section */
body.woocommerce-checkout .ipgw-invoice-wrapper,
body.woocommerce-checkout .ecpay-invoice-wrapper {
  color: #e0e0e0;
  font-size: 16px;
}
body.woocommerce-checkout .ipgw-invoice-wrapper input,
body.woocommerce-checkout .ipgw-invoice-wrapper select,
body.woocommerce-checkout .ecpay-invoice-wrapper input,
body.woocommerce-checkout .ecpay-invoice-wrapper select {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 16px;
}

/* Order notes textarea — dark theme */
body.woocommerce-checkout .woocommerce-additional-fields textarea#order_comments {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  min-height: 100px;
  resize: vertical;
}

/* All text in checkout — baseline 16px */
body.woocommerce-checkout .woocommerce {
  font-size: 16px;
}

/* Checkout coupon toggle — style as button, hide default link */
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 20px;
}
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before {
  display: none;
}
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a.showcoupon {
  display: inline-flex;
  background: transparent;
  border: 1px solid #39fff5;
  border-radius: 8px;
  color: #39fff5;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a.showcoupon:hover {
  background-color: #39fff5;
  color: #1a1a1a;
}
/* Hide the "有折價券嗎?" text, show only the button */
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
  font-size: 0;
  line-height: 0;
}
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a.showcoupon {
  font-size: 14px;
  line-height: 1.4;
}

/* Checkout coupon form */
body.woocommerce-checkout .checkout_coupon.woocommerce-form-coupon {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
body.woocommerce-checkout .checkout_coupon input.input-text {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  flex: 1;
}
body.woocommerce-checkout .checkout_coupon input.input-text::placeholder {
  color: rgba(255,255,255,0.4);
}

/* Checkout buttons */
body.woocommerce-checkout .woocommerce a.button,
body.woocommerce-checkout .woocommerce button.button,
body.woocommerce-checkout .woocommerce input.button,
body.woocommerce-checkout .woocommerce #place_order {
  background-color: transparent;
  color: #39fff5;
  border: 1px solid #39fff5;
  border-radius: 8px;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  text-transform: none;
  width: 100%;
  text-align: center;
}
body.woocommerce-checkout .woocommerce a.button:hover,
body.woocommerce-checkout .woocommerce button.button:hover,
body.woocommerce-checkout .woocommerce input.button:hover,
body.woocommerce-checkout .woocommerce #place_order:hover {
  background-color: #39fff5;
  color: #1a1a1a;
}

/* ============================================
   WC Blocks fallback (if blocks still render)
   ============================================ */
body.woocommerce-checkout .wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button {
  background-color: transparent;
  color: #39fff5;
  border: 1px solid #39fff5;
  border-radius: 8px;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 16px;
  transition: background-color 0.2s, color 0.2s;
}
body.woocommerce-checkout .wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button:hover {
  background-color: #39fff5;
  color: #1a1a1a;
}

/* ============================================
   Notices
   ============================================ */
body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-checkout .woocommerce-info {
  background: rgba(57,255,245,0.1);
  border-top: none;
  border-left: 4px solid #39fff5;
  color: #e0e0e0;
  border-radius: 8px;
  padding: 12px 20px;
}
body.woocommerce-cart .woocommerce-message a,
body.woocommerce-checkout .woocommerce-message a {
  color: #39fff5;
}
body.woocommerce-cart .woocommerce-message::before,
body.woocommerce-cart .woocommerce-info::before,
body.woocommerce-checkout .woocommerce-message::before,
body.woocommerce-checkout .woocommerce-info::before,
body.woocommerce-cart .woocommerce-error::before,
body.woocommerce-checkout .woocommerce-error::before {
  display: none;
}
body.woocommerce-cart .woocommerce-error,
body.woocommerce-checkout .woocommerce-error {
  background: rgba(231,76,60,0.15);
  border-top: none;
  border-left: 4px solid #e74c3c;
  color: #e0e0e0;
  border-radius: 8px;
  padding: 12px 20px;
}

/* Empty Cart */
body.woocommerce-cart .cart-empty {
  color: #ccc;
  font-size: 16px;
}
body.woocommerce-cart .return-to-shop a.button {
  background-color: transparent;
  color: #39fff5;
  border: 1px solid #39fff5;
}
body.woocommerce-cart .return-to-shop a.button:hover {
  background-color: #39fff5;
  color: #1a1a1a;
}

/* Price colors inherit */
body.woocommerce-cart .woocommerce-Price-amount,
body.woocommerce-checkout .woocommerce-Price-amount {
  color: inherit;
}

/* ============================================
   Identity Selector (cart page)
   ============================================ */
.academy-identity-selector {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-sizing: border-box;
  max-width: 100%;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.academy-identity-selector__label {
  color: #ccc;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.academy-identity-selector__select {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.academy-identity-selector__select:focus {
  border-color: #39fff5;
  outline: none;
}
.academy-identity-selector__select option {
  background: #2c343b;
  color: #e0e0e0;
}

/* ---- Cart inline selectors (batch + identity) ---- */
.academy-cart-selects {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}
.academy-cart-select-label {
  display: block;
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}
.academy-batch-select-wrap,
.academy-identity-select-wrap {
  flex: 1;
  min-width: 0;
}
.academy-batch-select,
.academy-identity-select {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 8px 36px 8px 12px;
  font-size: 13px;
  font-family: 'Noto Sans TC', sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  max-width: 280px;
  width: 100%;
}
.academy-batch-select:focus,
.academy-identity-select:focus {
  border-color: #39fff5;
  outline: none;
}
/* Batch validation notice */
.academy-batch-notice {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.6;
}
.academy-batch-notice strong {
  color: #fff;
}

.academy-batch-select option,
.academy-identity-select option {
  background: #2c343b;
  color: #e0e0e0;
}

/* ---- Discount fee rows — green color ---- */
body.woocommerce-cart .cart_totals table.shop_table tr.fee td,
body.woocommerce-checkout table.shop_table tfoot tr.fee td {
  color: #39fff5;
  font-size: 16px;
  font-weight: 600;
}
body.woocommerce-cart .cart_totals table.shop_table tr.fee th,
body.woocommerce-checkout table.shop_table tfoot tr.fee th {
  color: #39fff5;
  font-size: 16px;
}

/* ---- Order Breakdown (cart totals) ---- */
.academy-order-breakdown {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.academy-order-breakdown__title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}
.academy-order-breakdown__item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.academy-order-breakdown__item:last-child {
  border-bottom: none;
}
.academy-order-breakdown__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.academy-order-breakdown__name {
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}
.academy-order-breakdown__price {
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.academy-order-breakdown__discount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-left: 12px;
}
.academy-order-breakdown__discount span:first-child {
  color: #39fff5;
  font-size: 14px;
}
.academy-order-breakdown__discount span:last-child {
  color: #39fff5;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.academy-order-breakdown__price del {
  color: rgba(224, 224, 224, 0.5);
  font-size: 13px;
  text-decoration: line-through;
  margin-right: 6px;
}
.academy-order-breakdown__price ins {
  color: #39fff5;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}

/* Cart item subtotal discount styling */
body.woocommerce-cart .product-subtotal del {
  color: rgba(224, 224, 224, 0.5);
  font-size: 13px;
}
body.woocommerce-cart .product-subtotal ins {
  text-decoration: none;
  font-size: 18px;
}

/* ---- Hide undo/restore notice ---- */
body.woocommerce-cart .woocommerce-message {
  display: none;
}

/* Checkout identity row */
.academy-identity-checkout-row th,
.academy-identity-checkout-row td {
  color: #39fff5;
  font-size: 14px;
}

/* ============================================
   Recommended Products
   ============================================ */
.academy-recommendations {
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 0;
  padding: 32px 0 0;
  margin: 32px 0;
  max-width: 1140px;
}
.academy-recommendations__title {
  color: #39fff5;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.academy-recommendations__title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: #39fff5;
  border-radius: 2px;
  flex-shrink: 0;
}
.academy-recommendations__grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.academy-recommendations__grid::-webkit-scrollbar {
  display: none;
}
.academy-rec-card {
  flex: 1 0 calc((100% - 48px) / 5);
  min-width: calc((100% - 48px) / 5);
  max-width: calc((100% - 24px) / 3);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s;
  scroll-snap-align: start;
}
.academy-rec-card:hover {
  border-color: rgba(57,255,245,0.3);
}
.academy-rec-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}
.academy-rec-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.academy-rec-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #39fff5;
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 30px;
  white-space: nowrap;
}
.academy-rec-card__name {
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
}
.academy-rec-card__price {
  color: #39fff5;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}
.academy-rec-card__btn {
  display: inline-block;
  background: transparent;
  color: #39fff5;
  border: 1px solid #39fff5;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
  margin-top: 20px;
}
.academy-rec-card__btn:hover {
  background-color: #39fff5;
  color: #1a1a1a;
}

/* Already-in-cart state */
.academy-rec-card.is-in-cart {
  opacity: 0.35;
  pointer-events: none;
}
.academy-rec-card.is-in-cart .academy-rec-card__btn {
  display: none;
}

/* ============================================
   Checkout — horizontal recommendation cards
   ============================================ */
body.woocommerce-checkout .academy-recommendations__grid {
  flex-direction: column;
  gap: 10px;
}
body.woocommerce-checkout .academy-rec-card {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  gap: 0;
  overflow: hidden;
  position: relative;
  min-width: 0;
  max-width: 100%;
}
body.woocommerce-checkout .academy-rec-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}
body.woocommerce-checkout .academy-rec-card__img {
  width: 60px;
  height: 60px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 6px;
}
body.woocommerce-checkout .academy-rec-card__badge {
  display: none; /* replaced by __top-badge */
}
/* Top badge: full-width background label at card top */
body.woocommerce-checkout .academy-rec-card__top-badge {
  background: var(--color-accent, #39fff5);
  color: #1a2028;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 6px 12px;
}
body.woocommerce-checkout .academy-rec-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 12px;
}
body.woocommerce-checkout .academy-rec-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  align-items: flex-start;
  text-align: left;
}
body.woocommerce-checkout .academy-rec-card__name {
  font-size: 13px;
  text-align: left;
}
body.woocommerce-checkout .academy-rec-card__price {
  font-size: 14px;
}
body.woocommerce-checkout .academy-rec-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
body.woocommerce-checkout .academy-rec-card__btn {
  margin-top: 0;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  body.woocommerce-cart .site-main,
  body.woocommerce-checkout .site-main {
    padding: 20px 12px;
  }

  /* Cart item: compact grid on mobile */
  body.woocommerce-cart table.shop_table.cart {
    padding: 8px 12px;
  }
  body.woocommerce-cart table.shop_table.cart tr.woocommerce-cart-form__cart-item {
    grid-template-columns: 80px 1fr auto;
    gap: 0 12px;
    padding: 16px 0;
  }
  body.woocommerce-cart table.shop_table td.product-thumbnail img {
    height: 100%;
  }
  body.woocommerce-cart table.shop_table td.product-name a {
    font-size: 16px;
  }

  /* Cart selectors stack on mobile */
  .academy-cart-selects {
    flex-direction: column;
    gap: 8px;
  }
  .academy-batch-select,
  .academy-identity-select {
    max-width: 100%;
  }

  body.woocommerce-cart table.shop_table td.product-subtotal {
    margin-top: 10px;
  }

  /* Cart totals */
  body.woocommerce-cart .cart_totals {
    padding: 16px;
  }
  body.woocommerce-cart .cart_totals .wc-proceed-to-checkout a.checkout-button {
    padding: 14px 20px;
    font-size: 16px;
  }

  /* Coupon section */
  .academy-coupon-form {
    flex-direction: column;
  }

  /* Recommendations */
  .academy-rec-card {
    flex: 0 0 calc((100% - 24px) / 3);
    min-width: 140px;
  }

  /* Checkout: single column */
  body.woocommerce-checkout .woocommerce form.checkout {
    grid-template-columns: 1fr;
  }
  body.woocommerce-checkout .woocommerce form.checkout #order_review,
  body.woocommerce-checkout .woocommerce form.checkout #order_review_heading {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
}

/* ============================================
   WooCommerce My Account — Academy Dark Theme
   body.woocommerce-account
   ============================================ */

html body.woocommerce-account {
  background: #2c343b !important;
  background-image: linear-gradient(180deg, #2c343b 0%, #424d59 40%, #6b7785 100%) !important;
  background-attachment: fixed !important;
  font-family: 'Noto Sans TC', sans-serif !important;
  color: #fff !important;
  min-height: 100vh;
}
html body.woocommerce-account #page,
html body.woocommerce-account .site {
  background: transparent !important;
}

/* Hide default header/footer/sidebar */
html body.woocommerce-account .site-header,
html body.woocommerce-account #site-header,
html body.woocommerce-account .site-footer,
html body.woocommerce-account #site-footer,
html body.woocommerce-account .entry-title,
html body.woocommerce-account .page-header,
html body.woocommerce-account .entry-header,
html body.woocommerce-account .site-branding {
  display: none !important;
}

/* Reset hello-elementor container constraints */
html body.woocommerce-account .site-main,
html body.woocommerce-account.hello-elementor-default .site-main,
html body:not([class*=elementor-page-]).woocommerce-account .site-main {
  max-width: 1140px !important;
  margin: 0 auto !important;
  padding: 60px 20px !important;
  width: 100% !important;
  float: none !important;
  color: #fff !important;
}
html body.woocommerce-account .page-content,
html body.woocommerce-account .entry-content {
  max-width: 100% !important;
  color: #fff !important;
}

/* Override theme link colors */
html body.woocommerce-account a {
  color: var(--color-accent, #39fff5) !important;
  text-decoration: none;
}
html body.woocommerce-account a:hover {
  text-decoration: underline;
}

/* Override site-title / branding color */
html body.woocommerce-account .site-title,
html body.woocommerce-account .site-title a {
  display: none !important;
}

/* WooCommerce notices */
body.woocommerce-account .woocommerce-notices-wrapper .woocommerce-error,
body.woocommerce-account .woocommerce-notices-wrapper .woocommerce-message {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  padding: 12px 16px;
  margin-bottom: 20px;
  list-style: none;
}
body.woocommerce-account .woocommerce-notices-wrapper .woocommerce-error {
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}

/* ---- Login Page: split layout (left logo / right form) ---- */
html body.woocommerce-account:not(.logged-in) .site-main,
html body.woocommerce-account:not(.logged-in).hello-elementor-default .site-main,
html body:not([class*=elementor-page-]).woocommerce-account:not(.logged-in) .site-main {
  max-width: 100% !important;
  padding: 0 !important;
  display: flex !important;
  min-height: 100vh;
}

/* Left panel: dark + logo */
html body.woocommerce-account:not(.logged-in) .site-main::before {
  content: '';
  flex: 0 0 50%;
  background: #1a2028;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('/wp-content/uploads/2026/03/drex_academy_logo.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 240px auto;
}

/* Right panel: form wrapper */
html body.woocommerce-account:not(.logged-in) .page-content,
html body.woocommerce-account:not(.logged-in) .entry-content {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px !important;
  max-width: 50% !important;
}

/* Login Form */
body.woocommerce-account .woocommerce-form-login {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px 28px;
}

body.woocommerce-account .woocommerce-form-login h2,
body.woocommerce-account .woocommerce h2,
body.woocommerce-account h2,
body.woocommerce-account h3 {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 0 24px !important;
}

body.woocommerce-account .woocommerce-form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}
body.woocommerce-account .woocommerce-form-row label .required {
  color: var(--color-accent, #39fff5);
}

html body.woocommerce-account .woocommerce-Input,
html body.woocommerce-account .input-text,
html body.woocommerce-account input[type="text"],
html body.woocommerce-account input[type="password"],
html body.woocommerce-account input[type="email"] {
  width: 100% !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  font-family: 'Noto Sans TC', sans-serif !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  color: #fff !important;
  outline: none !important;
  transition: border-color 0.2s;
  box-sizing: border-box !important;
}
html body.woocommerce-account .woocommerce-Input:focus,
html body.woocommerce-account .input-text:focus,
html body.woocommerce-account input[type="text"]:focus,
html body.woocommerce-account input[type="password"]:focus,
html body.woocommerce-account input[type="email"]:focus {
  border-color: var(--color-accent, #39fff5) !important;
}
html body.woocommerce-account .woocommerce-Input::placeholder,
html body.woocommerce-account input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

body.woocommerce-account .form-row {
  margin-bottom: 16px;
}

/* Remember me checkbox */
body.woocommerce-account .woocommerce-form-login__rememberme {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  cursor: pointer;
}
body.woocommerce-account .woocommerce-form__input-checkbox {
  accent-color: var(--color-accent, #39fff5);
  width: 16px;
  height: 16px;
}

/* Login button */
body.woocommerce-account .woocommerce-form-login__submit {
  width: 100%;
  padding: 14px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  font-family: 'Noto Sans TC', sans-serif !important;
  background: var(--color-accent, #39fff5) !important;
  color: #1a2028 !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: opacity 0.2s;
}
body.woocommerce-account .woocommerce-form-login__submit:hover {
  opacity: 0.9;
}

/* Lost password link */
body.woocommerce-account .woocommerce-LostPassword {
  text-align: center;
  margin-top: 16px;
}
body.woocommerce-account .woocommerce-LostPassword a {
  color: var(--color-accent, #39fff5);
  font-size: 13px;
  text-decoration: none;
}
body.woocommerce-account .woocommerce-LostPassword a:hover {
  text-decoration: underline;
}

/* ---- My Account Dashboard (logged in) ---- */

/* Navigation: horizontal tabs at top */
html body.woocommerce-account .woocommerce-MyAccount-navigation {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 24px;
  width: 100% !important;
  float: none !important;
}
html body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
html body.woocommerce-account .woocommerce-MyAccount-navigation li {
  flex-shrink: 0;
}
html body.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 14px 20px;
  color: rgba(255, 255, 255, 0.6) !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
html body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.04);
}
html body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  color: var(--color-accent, #39fff5) !important;
  border-bottom-color: var(--color-accent, #39fff5);
  background: rgba(57, 255, 245, 0.06);
}

/* Content: full width below nav */
html body.woocommerce-account .woocommerce-MyAccount-content {
  width: 100% !important;
  float: none !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 28px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.6;
}
body.woocommerce-account .woocommerce-MyAccount-content a {
  color: var(--color-accent, #39fff5);
}
body.woocommerce-account .woocommerce-MyAccount-content p {
  margin: 0 0 12px;
}

/* Tables inside my-account */
body.woocommerce-account table {
  width: 100%;
  border-collapse: collapse;
}
body.woocommerce-account table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
body.woocommerce-account table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Buttons in my-account */
html body.woocommerce-account .woocommerce-Button,
html body.woocommerce-account .button,
html body.woocommerce-account a.button {
  display: inline-block;
  margin-top: 40px !important;
  padding: 8px 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Noto Sans TC', sans-serif !important;
  background: var(--color-accent, #39fff5) !important;
  color: #1a2028 !important;
  border: none !important;
  border-radius: 6px !important;
  cursor: pointer;
  text-decoration: none !important;
  transition: opacity 0.2s;
}
html body.woocommerce-account .woocommerce-Button:hover,
html body.woocommerce-account .button:hover,
html body.woocommerce-account a.button:hover {
  background: var(--color-accent, #39fff5) !important;
  color: #1a2028 !important;
  opacity: 0.85;
}

/* WooCommerce info/message/error boxes in my-account */
html body.woocommerce-account .woocommerce-message,
html body.woocommerce-account .woocommerce-info,
html body.woocommerce-account .woocommerce-error {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 8px !important;
  color: rgba(255, 255, 255, 0.8) !important;
  padding: 16px 20px !important;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
html body.woocommerce-account .woocommerce-message::before,
html body.woocommerce-account .woocommerce-info::before {
  color: var(--color-accent, #39fff5) !important;
}
html body.woocommerce-account .woocommerce-error {
  border-color: rgba(248, 113, 113, 0.3) !important;
}
html body.woocommerce-account .woocommerce-error::before {
  color: #f87171 !important;
}
html body.woocommerce-account .woocommerce-message .button,
html body.woocommerce-account .woocommerce-info .button {
  margin-top: 0 !important;
  flex-shrink: 0;
}

/* Fieldset / legend in my-account */
html body.woocommerce-account fieldset {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px;
  padding: 20px !important;
  margin-top: 24px;
}
html body.woocommerce-account legend {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 14px;
  padding: 0 8px;
}

/* ---- My Account Mobile ---- */
@media (max-width: 768px) {
  html body.woocommerce-account .site-main,
  html body.woocommerce-account.hello-elementor-default .site-main,
  html body:not([class*=elementor-page-]).woocommerce-account .site-main {
    padding: 20px 16px !important;
  }

  /* Navigation: horizontal scroll */
  html body.woocommerce-account .woocommerce-MyAccount-navigation {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left: -16px;
    margin-right: -16px;
    margin-bottom: 20px;
  }
  html body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 12px;
  }
  html body.woocommerce-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
    display: none;
  }
  html body.woocommerce-account .woocommerce-MyAccount-navigation li a {
    padding: 12px 16px;
    font-size: 13px;
  }

  /* Content */
  html body.woocommerce-account .woocommerce-MyAccount-content {
    padding: 20px 16px;
    border-radius: 8px;
  }

  /* Login form */
  body.woocommerce-account .woocommerce-form-login {
    padding: 24px 20px;
  }

  /* Login page: stack, hide left logo panel */
  html body.woocommerce-account:not(.logged-in) .site-main {
    flex-direction: column !important;
    min-height: auto !important;
  }
  html body.woocommerce-account:not(.logged-in) .site-main::before {
    flex: 0 0 auto;
    height: 120px;
    background-size: 160px auto;
  }
  html body.woocommerce-account:not(.logged-in) .page-content,
  html body.woocommerce-account:not(.logged-in) .entry-content {
    flex: 1 !important;
    max-width: 100% !important;
    padding: 24px 20px !important;
  }
}
