/* Cart & Checkout page hero */
.kl-page-hero--gold .kl-container {
  text-align: center;
}

.kl-page-hero__subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.6;
  text-align: center;
}

/* ===== Classic WooCommerce Checkout ===== */
.kl-woo-wrap .woocommerce-checkout .form-row {
  margin: 0 0 1.125rem;
  padding: 0;
  display: block;
  width: 100%;
  clear: both;
}

.kl-woo-wrap .woocommerce-checkout .form-row label,
.kl-woo-wrap .woocommerce-checkout .form-row .woocommerce-input-wrapper + label {
  display: block !important;
  position: static !important;
  transform: none !important;
  color: var(--kl-muted) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem !important;
  line-height: 1.4 !important;
  opacity: 1 !important;
  visibility: visible !important;
  float: none !important;
}

.kl-woo-wrap .woocommerce-checkout .form-row .optional {
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.75;
}

.kl-woo-wrap .woocommerce-checkout .form-row input.input-text,
.kl-woo-wrap .woocommerce-checkout .form-row textarea,
.kl-woo-wrap .woocommerce-checkout .form-row select,
.kl-woo-wrap .woocommerce-checkout .select2-container .select2-selection--single {
  width: 100% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--kl-border) !important;
  border-radius: 12px !important;
  color: white !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.9375rem !important;
  min-height: 48px;
  box-sizing: border-box;
}

.kl-woo-wrap .woocommerce-checkout .select2-container .select2-selection__rendered {
  color: white !important;
  line-height: 2 !important;
}

.kl-woo-wrap .woocommerce-checkout .form-row-first,
.kl-woo-wrap .woocommerce-checkout .form-row-last {
  width: 100%;
  float: none;
}

.kl-woo-wrap .woocommerce-checkout #customer_details .col-1,
.kl-woo-wrap .woocommerce-checkout #customer_details .col-2 {
  width: 100%;
  float: none;
}

.kl-woo-wrap .woocommerce-checkout-review-order-table th,
.kl-woo-wrap .woocommerce-checkout-review-order-table td {
  color: var(--kl-muted);
}

.kl-woo-wrap .woocommerce-checkout-review-order-table .product-name {
  color: white;
}

/* ===== WooCommerce Blocks Checkout & Cart ===== */
.kl-woo-wrap .wc-block-checkout,
.kl-woo-wrap .wc-block-cart,
.kl-woo-wrap .wp-block-woocommerce-checkout,
.kl-woo-wrap .wp-block-woocommerce-cart {
  color: var(--kl-muted);
}

.kl-woo-wrap .wc-block-components-title,
.kl-woo-wrap .wc-block-components-checkout-step__title,
.kl-woo-wrap .wc-block-cart__totals-title {
  color: white !important;
}

/* Force labels above inputs (not floating inside) */
.kl-woo-wrap .wc-block-components-text-input,
.kl-woo-wrap .wc-block-components-combobox,
.kl-woo-wrap .wc-block-components-state-input,
.kl-woo-wrap .wc-block-components-country-input {
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
  padding-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
}

.kl-woo-wrap .wc-block-components-text-input label,
.kl-woo-wrap .wc-block-components-combobox label,
.kl-woo-wrap .wc-block-components-state-input label,
.kl-woo-wrap .wc-block-components-country-input label,
.kl-woo-wrap .wc-block-components-checkbox__label {
  position: static !important;
  transform: none !important;
  translate: none !important;
  display: block !important;
  order: 1 !important;
  margin: 0 0 0.375rem !important;
  padding: 0 !important;
  color: var(--kl-muted) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  top: auto !important;
  left: auto !important;
  max-width: none !important;
  line-height: 1.4 !important;
}

/* WC Blocks puts input before label in DOM — force input below label */
.kl-woo-wrap .wc-block-components-text-input input,
.kl-woo-wrap .wc-block-components-combobox .components-base-control,
.kl-woo-wrap .wc-block-components-combobox .components-custom-select-control,
.kl-woo-wrap .wc-block-components-combobox .components-flex,
.kl-woo-wrap .wc-block-components-state-input select,
.kl-woo-wrap .wc-block-components-country-input select {
  order: 2 !important;
}

.kl-woo-wrap .wc-block-components-validation-error {
  order: 3 !important;
}

.kl-woo-wrap .wc-block-components-text-input.is-active label,
.kl-woo-wrap .wc-block-components-text-input.is-filled label,
.kl-woo-wrap .wc-block-components-combobox.is-active label,
.kl-woo-wrap .wc-block-components-combobox.is-filled label {
  transform: none !important;
  font-size: 0.8125rem !important;
}

.kl-woo-wrap .wc-block-components-text-input input[type="email"],
.kl-woo-wrap .wc-block-components-text-input input[type="text"],
.kl-woo-wrap .wc-block-components-text-input input[type="tel"],
.kl-woo-wrap .wc-block-components-text-input input[type="password"],
.kl-woo-wrap .wc-block-components-combobox input,
.kl-woo-wrap .wc-block-components-state-input select,
.kl-woo-wrap .wc-block-components-country-input select {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--kl-border) !important;
  border-radius: 12px !important;
  color: white !important;
  padding: 0.75rem 1rem !important;
  min-height: 48px !important;
  font-size: 0.9375rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
  -webkit-appearance: none;
  appearance: none;
}

/* Combobox / Country / State — unified dark style (fixes white dropdown button) */
.kl-woo-wrap .wc-block-components-combobox .components-custom-select-control__button,
.kl-woo-wrap .wc-block-components-combobox .components-button.components-custom-select-control__button,
.kl-woo-wrap .wc-block-components-form-token-field__input-container,
.kl-woo-wrap .wc-block-components-select .components-select-control__input,
.kl-woo-wrap .wc-block-components-select select,
.kl-woo-wrap select.components-select-control__input {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--kl-border) !important;
  border-radius: 12px !important;
  color: white !important;
  padding: 0.75rem 2.5rem 0.75rem 1rem !important;
  min-height: 48px !important;
  font-size: 0.9375rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  text-align: left !important;
}

/* Dropdown arrow — white + vertically centered with text */
.kl-woo-wrap .components-custom-select-control__button,
.kl-woo-wrap .wc-block-components-combobox .components-custom-select-control__button {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  position: relative !important;
}

.kl-woo-wrap .components-custom-select-control__button-content,
.kl-woo-wrap .wc-block-components-combobox .components-custom-select-control__button-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

.kl-woo-wrap .wc-block-components-combobox .components-custom-select-control__button svg,
.kl-woo-wrap .components-custom-select-control__button svg,
.kl-woo-wrap .wc-block-components-combobox .components-input-control__suffix svg {
  fill: white !important;
  color: white !important;
  stroke: white !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  flex-shrink: 0 !important;
  position: absolute !important;
  right: 1rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  pointer-events: none !important;
}

/* Native select arrow (State etc.) */
.kl-woo-wrap .wc-block-components-state-input select,
.kl-woo-wrap .wc-block-components-country-input select,
.kl-woo-wrap .woocommerce-checkout select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  background-size: 16px 16px !important;
}

/* Combobox container — prevent giant empty white panel */
.kl-woo-wrap .wc-block-components-combobox,
.kl-woo-wrap .wc-block-components-state-input,
.kl-woo-wrap .wc-block-components-country-input {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.kl-woo-wrap .wc-block-components-combobox .components-base-control,
.kl-woo-wrap .wc-block-components-combobox .components-custom-select-control,
.kl-woo-wrap .wc-block-components-combobox .components-flex {
  height: auto !important;
  min-height: 0 !important;
}

.kl-woo-wrap .wc-block-components-combobox .components-custom-select-control__menu {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-height: 220px !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: var(--kl-panel) !important;
  border: 1px solid var(--kl-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
  z-index: 200 !important;
  margin: 0 !important;
  padding: 0.25rem 0 !important;
}

.kl-woo-wrap .components-custom-select-control__menu .components-custom-select-control__item {
  color: white !important;
  background: transparent !important;
  padding: 0.625rem 1rem !important;
  min-height: 0 !important;
  height: auto !important;
  font-size: 0.9375rem !important;
}

.kl-woo-wrap .components-custom-select-control__menu .components-custom-select-control__item.is-highlighted,
.kl-woo-wrap .components-custom-select-control__menu .components-custom-select-control__item:hover {
  background: rgba(26, 92, 90, 0.35) !important;
  color: white !important;
}

.kl-woo-wrap .components-popover.components-custom-select-control__popover {
  position: absolute !important;
  height: auto !important;
  min-height: 0 !important;
}

.kl-woo-wrap .components-popover.components-custom-select-control__popover .components-popover__content {
  background: var(--kl-panel) !important;
  border: 1px solid var(--kl-border) !important;
  border-radius: 12px !important;
  max-height: 220px !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  width: 100% !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

.kl-woo-wrap .components-popover.components-custom-select-control__popover .components-custom-select-control__menu {
  position: static !important;
  max-height: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Native select option colors */
.kl-woo-wrap select option {
  background: var(--kl-panel);
  color: white;
}

.kl-woo-wrap .wc-block-components-text-input input:focus,
.kl-woo-wrap .wc-block-components-combobox input:focus {
  border-color: var(--kl-gold) !important;
  box-shadow: 0 0 0 1px var(--kl-gold) !important;
  outline: none !important;
}

.kl-woo-wrap .wc-block-components-validation-error {
  color: #ff8a8a !important;
  font-size: 0.8125rem !important;
  margin-top: 0.375rem;
}

.kl-woo-wrap .wc-block-components-text-input.has-error input,
.kl-woo-wrap .wc-block-components-combobox.has-error input {
  border-color: #c0392b !important;
}

.kl-woo-wrap .wc-block-components-address-form__address_2-toggle {
  color: var(--kl-gold) !important;
  font-size: 0.875rem;
  margin: 0.5rem 0 1rem;
}

.kl-woo-wrap .wc-block-components-panel__button {
  color: white !important;
}

.kl-woo-wrap .wc-block-components-order-summary-item__product-name {
  color: white !important;
}

.kl-woo-wrap .wc-block-components-product-price,
.kl-woo-wrap .wc-block-components-totals-item__value,
.kl-woo-wrap .wc-block-components-totals-item__label {
  color: var(--kl-muted) !important;
}

.kl-woo-wrap .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.kl-woo-wrap .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: white !important;
  font-weight: 600;
}

.kl-woo-wrap .wc-block-components-button:not(.is-link) {
  background: var(--kl-gold) !important;
  color: white !important;
  border-radius: 9999px !important;
  border: none !important;
  min-height: 48px;
  font-weight: 500;
}

.kl-woo-wrap .wc-block-components-button:not(.is-link):hover {
  background: var(--kl-gold-hover) !important;
}

/* Block checkout layout */
.kl-woo-wrap .wc-block-checkout__main {
  gap: 1.5rem;
}

.kl-woo-wrap .wc-block-components-address-form__row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.kl-woo-wrap .wc-block-components-address-form .wc-block-components-text-input,
.kl-woo-wrap .wc-block-components-address-form .wc-block-components-combobox {
  flex: 1 1 100%;
  width: 100%;
}

/* ===== Classic Cart ===== */
.kl-woo-wrap .woocommerce-cart-form {
  margin-bottom: 2rem;
}

.kl-woo-wrap .cart-collaterals {
  width: 100%;
}

.kl-woo-wrap .cart_totals {
  margin-top: 0;
}

.kl-woo-wrap .cart_totals h2 {
  text-align: center;
}

.kl-woo-wrap .cart_totals table {
  width: 100%;
}

.kl-woo-wrap .actions .coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.kl-woo-wrap .actions .coupon input[type="text"] {
  flex: 1 1 160px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--kl-border);
  border-radius: 9999px;
  color: white;
  padding: 0.625rem 1rem;
}

/* Block cart */
.kl-woo-wrap .wc-block-cart-items__row {
  border-color: var(--kl-border) !important;
}

.kl-woo-wrap .wc-block-cart-item__product-name {
  color: white !important;
}

.kl-woo-wrap .wc-block-components-quantity-selector input {
  background: rgba(255, 255, 255, 0.08) !important;
  color: white !important;
  border-color: var(--kl-border) !important;
}

/* ===== Mobile Responsive ===== */
@media (min-width: 768px) {
  .kl-woo-wrap .woocommerce-checkout .form-row-first,
  .kl-woo-wrap .woocommerce-checkout .form-row-last {
    width: 48%;
    display: inline-block;
    vertical-align: top;
  }

  .kl-woo-wrap .woocommerce-checkout .form-row-first {
    margin-right: 4%;
  }

  .kl-woo-wrap .woocommerce-checkout .col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .kl-woo-wrap .wc-block-components-address-form__row--multiple {
    flex-direction: row;
    gap: 1rem;
  }

  .kl-woo-wrap .wc-block-components-address-form__row--multiple .wc-block-components-text-input,
  .kl-woo-wrap .wc-block-components-address-form__row--multiple .wc-block-components-combobox {
    flex: 1 1 calc(50% - 0.5rem);
    width: auto;
  }

  .kl-woo-wrap .cart-collaterals {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .kl-page-hero--gold {
    padding: 2rem 1rem !important;
  }

  .kl-page-hero--gold h1 {
    font-size: clamp(24px, 6vw, 32px) !important;
  }

  .kl-page-hero__subtitle {
    font-size: 0.9375rem;
    padding: 0 0.25rem;
  }

  .kl-woo-wrap {
    padding: 1.25rem 0.75rem 2rem;
  }

  /* Block cart — clean stacked layout */
  .kl-woo-wrap .wc-block-cart__main,
  .kl-woo-wrap .wc-block-components-sidebar-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .kl-woo-wrap .wc-block-cart-items {
    border: 1px solid var(--kl-border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--kl-panel);
  }

  .kl-woo-wrap .wc-block-cart-items__row {
    display: grid !important;
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem 0.75rem !important;
    padding: 1rem !important;
    align-items: start !important;
  }

  .kl-woo-wrap .wc-block-cart-item__image {
    grid-row: 1 / span 2;
  }

  .kl-woo-wrap .wc-block-cart-item__product {
    grid-column: 2;
  }

  .kl-woo-wrap .wc-block-cart-item__quantity,
  .kl-woo-wrap .wc-block-cart-item__total {
    grid-column: 2;
  }

  .kl-woo-wrap .wc-block-cart__sidebar,
  .kl-woo-wrap .wc-block-components-sidebar {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .kl-woo-wrap .wc-block-components-totals-wrapper,
  .kl-woo-wrap .wp-block-woocommerce-cart-order-summary-block {
    background: var(--kl-panel);
    border: 1px solid var(--kl-border);
    border-radius: 16px;
    padding: 1rem;
  }

  /* Classic cart table → card layout */
  .kl-woo-wrap .woocommerce-cart-form .shop_table thead {
    display: none;
  }

  .kl-woo-wrap .woocommerce-cart-form .shop_table,
  .kl-woo-wrap .woocommerce-cart-form .shop_table tbody,
  .kl-woo-wrap .woocommerce-cart-form .shop_table tr,
  .kl-woo-wrap .woocommerce-cart-form .shop_table td {
    display: block;
    width: 100%;
  }

  .kl-woo-wrap .woocommerce-cart-form .shop_table tr {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--kl-border);
  }

  .kl-woo-wrap .woocommerce-cart-form .shop_table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border: none;
    text-align: right;
  }

  .kl-woo-wrap .woocommerce-cart-form .shop_table td::before {
    content: attr(data-title);
    font-weight: 600;
    color: white;
    text-align: left;
    flex-shrink: 0;
  }

  .kl-woo-wrap .woocommerce-cart-form .shop_table td.product-thumbnail::before {
    display: none;
  }

  .kl-woo-wrap .woocommerce-cart-form .shop_table td.product-thumbnail {
    justify-content: center;
  }

  .kl-woo-wrap .woocommerce-cart-form .shop_table td.actions {
    flex-direction: column;
    align-items: stretch;
  }

  .kl-woo-wrap .woocommerce-cart-form .shop_table td.actions::before {
    display: none;
  }

  .kl-woo-wrap .actions .coupon {
    flex-direction: column;
    align-items: stretch;
  }

  .kl-woo-wrap .actions .coupon input[type="text"],
  .kl-woo-wrap .actions .button {
    width: 100%;
  }

  /* Classic checkout single column */
  .kl-woo-wrap .woocommerce-checkout #order_review_heading,
  .kl-woo-wrap .woocommerce-checkout #order_review {
    margin-top: 1.5rem;
  }

  .kl-woo-wrap .woocommerce-checkout #payment {
    border-radius: 16px;
    overflow: hidden;
  }

  /* Block checkout sidebar stacks */
  .kl-woo-wrap .wc-block-checkout {
    padding: 0 !important;
  }

  .kl-woo-wrap .wc-block-checkout__sidebar {
    margin-top: 1.5rem;
  }

  .kl-woo-wrap .wc-block-components-sidebar-layout {
    flex-direction: column !important;
  }

  .kl-woo-wrap .wc-block-components-sidebar-layout .wc-block-components-main,
  .kl-woo-wrap .wc-block-components-sidebar-layout .wc-block-components-sidebar {
    width: 100% !important;
    padding: 0 !important;
  }

  .kl-woo-wrap .wc-block-cart {
    padding: 0 !important;
  }

  .kl-woo-wrap .wc-block-cart__main {
    flex-direction: column !important;
  }

  .kl-woo-wrap .wc-block-cart__sidebar {
    margin-top: 0;
  }

  /* Extra space so last checkout field isn't cramped */
  .kl-woo-wrap .wc-block-checkout__form,
  .kl-woo-wrap .wc-block-checkout__main {
    padding-bottom: 1.5rem !important;
  }

  .kl-woo-wrap .wc-block-components-address-form__row--address_2 {
    margin-top: 0.5rem;
  }
}

/* ===== Empty Cart Layout ===== */
body.kl-cart-is-empty .kl-woo-wrap--empty-cart {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.kl-empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  padding: 3rem 2rem;
  background: var(--kl-panel);
  border: 1px solid var(--kl-border);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.kl-empty-cart__message {
  margin: 0;
  color: white;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

@media (max-width: 767px) {
  .kl-empty-cart {
    padding: 2.5rem 1.25rem;
  }
}

.wc-blocks-components-select .wc-blocks-components-select__container{
	background:transparent;
}