/**
 * LeBron Shirt — WooCommerce Cart & Checkout UI
 * Modern two-column checkout, clear hierarchy, accessible controls
 */

/* ---------- Page shell ---------- */
.lebronshirt-wc {
  color: rgba(255, 255, 255, 0.92);
  -webkit-font-smoothing: antialiased;
}
.lebronshirt-wc a { color: #5BA3D9; text-decoration: none; }
.lebronshirt-wc a:hover { color: #8ec5ef; }

body.woocommerce-cart .sticky-cart,
body.woocommerce-checkout .sticky-cart,
body.woocommerce-account .sticky-cart {
  display: none !important;
}

body.woocommerce-checkout,
body.woocommerce-cart {
  background: #0a0a0a;
}

/* ---------- Typography ---------- */
.woocommerce-checkout h1,
.woocommerce-cart h1,
.lebronshirt-wc h1 {
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.08em;
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 1.5rem;
  font-weight: 400;
}
.woocommerce-checkout h3,
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3,
#order_review_heading {
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.06em;
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0 0 1rem;
  color: #fff;
}

/* ---------- Checkout grid (best-practice: form left, summary right) ---------- */
@media (min-width: 960px) {
  body.woocommerce-checkout .woocommerce {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 2rem;
    align-items: start;
  }
  /* WooCommerce wraps form#checkout; move order review into sticky column feel */
  body.woocommerce-checkout form.checkout {
    display: block;
  }
  body.woocommerce-checkout #customer_details {
    grid-column: 1;
  }
  body.woocommerce-checkout #order_review,
  body.woocommerce-checkout #order_review_heading {
    grid-column: 2;
  }
  body.woocommerce-checkout #order_review_heading {
    position: sticky;
    top: 5.5rem;
    z-index: 2;
    background: #0a0a0a;
    padding-bottom: 0.5rem;
  }
  body.woocommerce-checkout #order_review {
    position: sticky;
    top: 7.5rem;
  }
}

/* Customer details card */
#customer_details,
.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-additional-fields {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}
.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-additional-fields {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

/* ---------- Form fields ---------- */
.woocommerce form .form-row {
  margin-bottom: 0.9rem;
  padding: 0;
}
.woocommerce form .form-row label {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.woocommerce form .form-row label .required {
  color: #ED184C;
  text-decoration: none;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce form .form-row .select2-container .select2-selection--single {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
  background: #0c0c0c !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 0.75rem !important;
  color: #fff !important;
  padding: 0.8rem 1rem !important;
  min-height: 3rem;
  font-size: 0.95rem !important;
  line-height: 1.35 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.woocommerce form .form-row textarea {
  min-height: 5.5rem;
  resize: vertical;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  outline: none !important;
  border-color: rgba(1, 107, 182, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(1, 107, 182, 0.2) !important;
}
.woocommerce-invalid input.input-text,
.woocommerce-invalid select {
  border-color: rgba(237, 24, 76, 0.75) !important;
}
.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
  width: 100%;
}
@media (min-width: 600px) {
  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last {
    width: 48.5%;
  }
  .woocommerce form .form-row-first { float: left; clear: both; }
  .woocommerce form .form-row-last { float: right; }
}
.woocommerce form .form-row-wide { clear: both; width: 100%; }
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #fff !important;
  line-height: 3rem !important;
  padding-left: 1rem !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 3rem !important;
}
.select2-dropdown {
  background: #1a1a1a !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: #fff;
}

/* ---------- Order review card ---------- */
#order_review {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.15rem;
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  vertical-align: middle;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}
.woocommerce-checkout-review-order-table thead th {
  border-top: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  padding-top: 0;
}
.woocommerce-checkout-review-order-table tfoot th {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}
.woocommerce-checkout-review-order-table tfoot tr:last-child th,
.woocommerce-checkout-review-order-table tfoot tr:last-child td {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* Thumbnails in order review */
.woocommerce-checkout-review-order-table .product-name img,
.woocommerce td.product-thumbnail img,
.woocommerce-cart-form .product-thumbnail img {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  object-fit: cover;
  border-radius: 0.5rem;
  vertical-align: middle;
  margin-right: 0.65rem;
  display: inline-block;
  background: #0a0a0a;
}
.woocommerce td.product-name,
.woocommerce-checkout-review-order-table .product-name {
  color: #fff;
  font-weight: 600;
}
.woocommerce td.product-name a {
  color: #fff;
  text-decoration: none;
}
.woocommerce .variation {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Payment box ---------- */
.woocommerce-checkout-payment {
  background: #0f0f0f !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0.85rem !important;
  padding: 1rem 1.1rem !important;
  margin-top: 0.5rem;
}
.woocommerce-checkout-payment .payment_methods {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.woocommerce-checkout-payment .payment_methods > li {
  padding: 0.85rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.woocommerce-checkout-payment .payment_methods > li:last-child {
  border-bottom: none;
}
.woocommerce-checkout-payment .payment_methods label {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}
.woocommerce-checkout-payment .payment_box {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 0.85rem;
  padding: 0.5rem 0 0 !important;
}

/* ---------- Buttons (padding, hit area, hierarchy) ---------- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce .checkout-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  min-height: 3.15rem;
  padding: 0.9rem 1.75rem !important;
  border: none !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ED184C 0%, #b01232 100%) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.01em;
  line-height: 1.2 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  text-decoration: none !important;
  box-shadow: 0 8px 28px rgba(237, 24, 76, 0.28);
  transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.woocommerce #place_order,
.woocommerce .checkout-button {
  width: 100% !important;
  min-height: 3.35rem;
  padding: 1rem 1.5rem !important;
  font-size: 1rem !important;
  margin-top: 0.35rem;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #place_order:hover,
.woocommerce .checkout-button:hover {
  filter: brightness(1.07);
  box-shadow: 0 10px 32px rgba(237, 24, 76, 0.38);
  color: #fff !important;
}
.woocommerce a.button:active,
.woocommerce button.button:active,
.woocommerce #place_order:active {
  transform: scale(0.985);
}
.woocommerce a.button:disabled,
.woocommerce button.button:disabled,
.woocommerce #place_order:disabled {
  opacity: 0.6 !important;
  cursor: wait !important;
  transform: none !important;
}

/* Secondary */
.woocommerce button[name="update_cart"],
.woocommerce button[name="apply_coupon"],
.woocommerce a.button.wc-forward {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
  min-height: 2.85rem;
  padding: 0.7rem 1.25rem !important;
}
.woocommerce button[name="update_cart"]:hover,
.woocommerce button[name="apply_coupon"]:hover {
  border-color: rgba(255, 255, 255, 0.4) !important;
  filter: none;
}

/* ---------- Cart table ---------- */
.woocommerce table.shop_table {
  width: 100%;
  border-collapse: collapse;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 1rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: middle;
  color: rgba(255, 255, 255, 0.88);
}
.woocommerce table.shop_table th {
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  border-top: none;
}
.woocommerce td.product-remove a {
  color: #ED184C !important;
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  padding: 0.35rem;
}
.woocommerce .quantity .qty {
  width: 4.25rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0c0c0c;
  color: #fff;
  text-align: center;
}

/* Cart actions row */
.woocommerce-cart-form .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem !important;
}
.woocommerce-cart-form .coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}
.woocommerce-cart-form .coupon input {
  min-height: 2.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.18);
  background: #0c0c0c;
  color: #fff;
  padding: 0.6rem 0.9rem;
}

/* Cart totals */
.cart_totals {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  margin-top: 1rem;
}
.cart_totals h2 {
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.06em;
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

/* ---------- Notices ---------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-NoticeGroup {
  border-radius: 0.85rem;
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.15rem;
  list-style: none;
  font-size: 0.9rem;
}
.woocommerce-message { background: rgba(13, 122, 79, 0.18); border: 1px solid rgba(13, 122, 79, 0.4); }
.woocommerce-info { background: rgba(1, 107, 182, 0.14); border: 1px solid rgba(1, 107, 182, 0.35); }
.woocommerce-error { background: rgba(237, 24, 76, 0.14); border: 1px solid rgba(237, 24, 76, 0.4); }
.woocommerce-error li { margin: 0.25rem 0; }

/* Privacy text under place order */
.woocommerce-privacy-policy-text {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0.75rem 0 0.5rem;
  line-height: 1.45;
}

/* Mobile */
@media (max-width: 959px) {
  #order_review {
    margin-top: 1.25rem;
  }
  .woocommerce table.shop_table_responsive tr {
    display: block;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}

/* Clear floats from WC form rows */
.woocommerce form .form-row::after,
#customer_details::after {
  content: "";
  display: table;
  clear: both;
}


/* Place order — high-emphasis CTA */
.woocommerce #place_order,
.woocommerce-page #place_order,
.woocommerce button#place_order,
#place_order {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 3.5rem !important;
  padding: 1.1rem 2rem !important;
  margin-top: 0.75rem !important;
  border: none !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ED184C 0%, #9e0f2c 100%) !important;
  color: #ffffff !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.25 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  box-shadow: 0 10px 32px rgba(237, 24, 76, 0.32) !important;
  transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.woocommerce #place_order:hover,
.woocommerce-page #place_order:hover {
  filter: brightness(1.08) !important;
  box-shadow: 0 12px 36px rgba(237, 24, 76, 0.42) !important;
  color: #fff !important;
}
.woocommerce #place_order:active {
  transform: scale(0.985) !important;
}
.woocommerce #place_order:disabled {
  opacity: 0.65 !important;
  cursor: wait !important;
  transform: none !important;
}


/* Ensure checkout form is always visible */
body.woocommerce-checkout form.checkout,
body.woocommerce-checkout .woocommerce form.checkout,
.lebronshirt-checkout-page form.checkout {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 200px;
}
body.woocommerce-checkout .woocommerce {
  display: block !important;
}
@media (min-width: 960px) {
  body.woocommerce-checkout .col2-set {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}
#lebronshirt-react-checkout:empty { display: none !important; }


/* v2 checkout polish */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
  display: block;
}
.woocommerce-checkout #customer_details {
  margin-bottom: 1.5rem;
}
.woocommerce-checkout #order_review {
  margin-top: 0;
}
.woocommerce-checkout .woocommerce-privacy-policy-text,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  margin: 1rem 0;
}
.woocommerce-checkout .blockUI.blockOverlay {
  background: rgba(10,10,10,0.65) !important;
}


/* mobile checkout v2.2 */
@media (max-width: 767px) {
  body.woocommerce-checkout .lebronshirt-wc {
    padding-bottom: 1rem;
  }
  .woocommerce-checkout .col2-set,
  .woocommerce-checkout .col-1,
  .woocommerce-checkout .col-2 {
    width: 100% !important;
    float: none !important;
  }
  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last {
    width: 100% !important;
    float: none !important;
  }
  .woocommerce form .form-row input.input-text,
  .woocommerce form .form-row select,
  .woocommerce form .form-row textarea {
    font-size: 16px !important; /* prevent iOS zoom */
    min-height: 3rem;
  }
  .woocommerce #place_order {
    position: sticky;
    bottom: 0.5rem;
    z-index: 5;
    min-height: 3.5rem !important;
    font-size: 1.05rem !important;
  }
  .woocommerce-checkout-review-order-table .product-name img {
    width: 48px !important;
    height: 48px !important;
  }
}


/* Hide classic WC "Your order" when React checkout is present */
.lebronshirt-checkout-page #lebronshirt-classic-checkout[hidden],
.lebronshirt-checkout-page #lebronshirt-classic-checkout[aria-hidden="true"],
.lebronshirt-checkout-page.react-checkout-active #lebronshirt-classic-checkout {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
}
.lebronshirt-checkout-page #lebronshirt-classic-checkout[hidden] #order_review,
.lebronshirt-checkout-page #lebronshirt-classic-checkout[hidden] #order_review_heading,
.lebronshirt-checkout-page #lebronshirt-classic-checkout[aria-hidden="true"] #order_review,
.lebronshirt-checkout-page #lebronshirt-classic-checkout[aria-hidden="true"] #order_review_heading,
.lebronshirt-checkout-page.react-checkout-active #order_review,
.lebronshirt-checkout-page.react-checkout-active #order_review_heading {
  display: none !important;
}
