/**
 * Lets Pop — WooCommerce cart drawer + cart page
 * Color tokens: assets/css/theme-tokens.css
 */

:root {
  /* Above floating WhatsApp (999999) and Astra drawer default (10000) */
  --lp-cart-z-overlay: 1000040;
  --lp-cart-z-drawer: 1000050;
}

/* -------------------------------------------------------------------------
   Side cart drawer (all pages)
   ------------------------------------------------------------------------- */

.astra-mobile-cart-overlay {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(6px);
  z-index: var(--lp-cart-z-overlay) !important;
}

.ast-mobile-cart-active .astra-mobile-cart-overlay {
  z-index: var(--lp-cart-z-overlay) !important;
}

.astra-cart-drawer {
  background: var(--lp-cart-bg) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.45) !important;
  z-index: var(--lp-cart-z-drawer) !important;
}

#astra-mobile-cart-drawer.astra-cart-drawer,
#astra-mobile-cart-drawer.astra-cart-drawer.active {
  z-index: var(--lp-cart-z-drawer) !important;
}

/* Desktop: standard right-side flyout (viewport-fixed, not tied to ScrollSmoother content) */
@media (min-width: 922px) {
  .astra-mobile-cart-overlay {
    position: fixed !important;
    inset: 0 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  html.ast-mobile-cart-active .astra-mobile-cart-overlay {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  #astra-mobile-cart-drawer.astra-cart-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: min(460px, 92vw) !important;
    max-width: 460px !important;
    height: 100vh !important;
    height: 100dvh !important;
    transform: translate3d(100%, 0, 0) !important;
    visibility: hidden;
    opacity: 1 !important;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease !important;
    overflow: hidden auto !important;
  }

  #astra-mobile-cart-drawer.astra-cart-drawer.active {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible !important;
  }

  html.ast-mobile-cart-active,
  body.lp-cart-drawer-open {
    overflow: hidden !important;
  }
}

/* Drawer open: keep FAB below overlay/drawer stack */
body.lp-cart-drawer-open .lp-float-wa {
  z-index: 9990 !important;
}

.astra-cart-drawer .astra-cart-drawer-header,
.astra-cart-drawer .woocommerce-mini-cart__total,
.astra-cart-drawer .woocommerce-mini-cart li {
  border-color: var(--lp-cart-border) !important;
}

.astra-cart-drawer .astra-cart-drawer-title,
.astra-cart-drawer .woocommerce-mini-cart-item a,
.astra-cart-drawer .woocommerce-mini-cart__total,
.astra-cart-drawer .woocommerce-mini-cart__total strong,
.astra-cart-drawer .woocommerce-mini-cart__total .amount,
.astra-cart-drawer .amount,
.astra-cart-drawer .quantity,
.astra-cart-drawer .astra-cart-drawer-content {
  color: #ffffff !important;
}

/* Close button — finalized in wp_footer (letspop-cart-drawer-late) for specificity */

.astra-cart-drawer .woocommerce-mini-cart-item img {
  border-radius: 12px;
}

.astra-cart-drawer .woocommerce-mini-cart a.remove {
  color: rgba(255, 255, 255, 0.65) !important;
}

.astra-cart-drawer .woocommerce-mini-cart a.remove:hover {
  color: #fff !important;
  background: transparent !important;
}

.astra-cart-drawer .woocommerce-mini-cart__empty-message {
  color: rgba(255, 255, 255, 0.72) !important;
}

/* Button row layout → wp_footer inline #letspop-cart-drawer-late (after Astra dynamic CSS) */

/* View cart / continue shopping — outline */
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons a.ast-continue-shopping,
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons a.button.wc-forward:not(.checkout),
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons .button.wc-forward:not(.checkout) {
  min-height: 46px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 999px !important;
  background: transparent !important;
  border: 2px solid rgba(255, 255, 255, 0.82) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons a.ast-continue-shopping:hover,
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons a.button.wc-forward:not(.checkout):hover,
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons .button.wc-forward:not(.checkout):hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

/* Checkout — solid red */
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons a.checkout,
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons a.button.checkout,
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons .checkout.button {
  min-height: 46px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 999px !important;
  background: var(--lp-cart-accent) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(245, 24, 34, 0.35) !important;
}

.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons a.checkout:hover,
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons a.button.checkout:hover,
.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons .checkout.button:hover {
  background: var(--lp-cart-accent-hover) !important;
  color: #ffffff !important;
}

/* Mini-cart discount code (markup from inc/cart-drawer-cart-page.php) */
#astra-mobile-cart-drawer .lp-mini-cart-coupon {
  padding: 4px 1.34em 16px;
  margin: 0;
  border-bottom: 1px solid var(--lp-cart-border);
}

#astra-mobile-cart-drawer .lp-mini-cart-coupon__label {
  display: block;
  font-size: calc(11px + var(--lp-font-bump));
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 10px;
}

#astra-mobile-cart-drawer .lp-mini-cart-coupon__row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
}

#astra-mobile-cart-drawer .lp-mini-cart-coupon__row .input-text {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px !important;
  font-size: calc(14px + var(--lp-font-bump)) !important;
  line-height: 1.4 !important;
  background: var(--lp-cart-surface) !important;
  border: 1px solid var(--lp-cart-border) !important;
  border-radius: 10px !important;
  color: #ffffff !important;
}

#astra-mobile-cart-drawer .lp-mini-cart-coupon__row .input-text::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

#astra-mobile-cart-drawer .lp-mini-cart-coupon__row .input-text:focus {
  outline: none;
  border-color: rgba(245, 24, 34, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(245, 24, 34, 0.15);
}

#astra-mobile-cart-drawer .lp-mini-cart-coupon__row .button {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 12px 18px !important;
  min-height: 46px !important;
  border-radius: 999px !important;
  background: var(--lp-cart-accent) !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: calc(13px + var(--lp-font-bump)) !important;
  box-shadow: none !important;
}

#astra-mobile-cart-drawer .lp-mini-cart-coupon__row .button:hover {
  background: var(--lp-cart-accent-hover) !important;
  color: #ffffff !important;
}

/* -------------------------------------------------------------------------
   Cart page shell (classic + shared wrappers)
   ------------------------------------------------------------------------- */

body.woocommerce-cart,
body.woocommerce-cart #primary,
body.woocommerce-cart .site-content,
body.woocommerce-cart .ast-container,
body.woocommerce-cart .ast-separate-container .site-main,
body.woocommerce-cart .ast-plain-container .site-content,
body.woocommerce-cart .ast-woocommerce-container {
  background-color: var(--lp-bg-white, #000000) !important;
  color: var(--lp-text-primary, #ffffff);
}

/* Modest gap below body header clearance (see style.css). */
body.woocommerce-cart:not(.lp-scrollsmoother) main#primary.site-main,
body.woocommerce-cart:not(.lp-scrollsmoother) #primary.site-main {
  padding-top: clamp(12px, 2vw, 20px) !important;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  body.woocommerce-cart:not(.lp-scrollsmoother) main#primary.site-main,
  body.woocommerce-cart:not(.lp-scrollsmoother) #primary.site-main {
    padding-top: clamp(10px, 2.5vw, 16px) !important;
  }
}

body.woocommerce-cart form.woocommerce-cart-form {
  margin-top: 0 !important;
}

/* Kill stray white strips from Astra / global heading & table skins */
body.woocommerce-cart .ast-separate-container .ast-article-single,
body.woocommerce-cart .ast-separate-container .ast-article-inner,
body.woocommerce-cart .ast-plain-container .site-content .entry-content {
  background: transparent !important;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table,
body.woocommerce-cart .woocommerce-cart-form table.shop_table thead,
body.woocommerce-cart .woocommerce-cart-form table.shop_table tbody,
body.woocommerce-cart .woocommerce-cart-form table.shop_table tfoot,
body.woocommerce-cart .woocommerce-cart-form table.shop_table tr,
body.woocommerce-cart table.cart.shop_table,
body.woocommerce-cart table.cart.shop_table thead,
body.woocommerce-cart table.cart.shop_table tbody,
body.woocommerce-cart table.cart.shop_table tr {
  background-color: transparent !important;
  background: transparent !important;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table th,
body.woocommerce-cart .woocommerce-cart-form table.shop_table td,
body.woocommerce-cart table.cart.shop_table th,
body.woocommerce-cart table.cart.shop_table td {
  background-color: transparent !important;
}

body.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message,
body.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-info,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-message {
  background: var(--lp-cart-surface) !important;
  border-color: var(--lp-cart-border) !important;
  color: #ffffff !important;
}

body.woocommerce-cart .woocommerce-message a,
body.woocommerce-cart .woocommerce-info a {
  color: #ffffff !important;
  text-decoration: underline;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table,
body.woocommerce-cart .woocommerce-cart-form table.shop_table th,
body.woocommerce-cart .woocommerce-cart-form table.shop_table td {
  border-color: var(--lp-cart-border) !important;
  color: #ffffff !important;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table thead th {
  font-size: calc(11px + var(--lp-font-bump));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table .product-name a {
  color: #ffffff !important;
  font-weight: 600;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table .product-thumbnail img {
  border-radius: 12px;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table a.remove {
  color: rgba(255, 255, 255, 0.55) !important;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table a.remove:hover {
  color: #ffffff !important;
  background: transparent !important;
}

body.woocommerce-cart .woocommerce-cart-form input.input-text,
body.woocommerce-cart .woocommerce-cart-form textarea {
  background: var(--lp-cart-surface) !important;
  border: 1px solid var(--lp-cart-border) !important;
  border-radius: 10px !important;
  color: #ffffff !important;
}

body.woocommerce-cart .woocommerce-cart-form input.input-text:focus {
  outline: none;
  border-color: rgba(245, 24, 34, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(245, 24, 34, 0.12);
}

body.woocommerce-cart button[name="update_cart"] {
  background: transparent !important;
  border: 2px solid rgba(255, 255, 255, 0.65) !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

body.woocommerce-cart button[name="update_cart"]:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

body.woocommerce-cart .coupon button[name="apply_coupon"] {
  background: var(--lp-cart-accent) !important;
  border: none !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

body.woocommerce-cart .coupon button[name="apply_coupon"]:hover {
  background: var(--lp-cart-accent-hover) !important;
  color: #ffffff !important;
}

body.woocommerce-cart .woocommerce-cart-form .coupon label {
  color: rgba(255, 255, 255, 0.75) !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
  background: var(--lp-cart-surface) !important;
  border: 1px solid var(--lp-cart-border) !important;
  border-radius: 16px !important;
  padding: clamp(20px, 4vw, 28px) !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals > h2 {
  color: #ffffff !important;
  font-size: calc(14px + var(--lp-font-bump));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0 14px !important;
  margin: 0 0 8px !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table tbody,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table tr,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table th,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table td {
  background: transparent !important;
  background-color: transparent !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table th,
body.woocommerce-cart .cart-collaterals .cart_totals table.shop_table td {
  border-color: var(--lp-cart-border) !important;
  color: rgba(255, 255, 255, 0.88) !important;
}

body.woocommerce-cart .cart-collaterals .woocommerce-shipping-totals td,
body.woocommerce-cart .cart-collaterals .woocommerce-shipping-totals th,
body.woocommerce-cart .cart-collaterals .shipping td,
body.woocommerce-cart .cart-collaterals .shipping th,
body.woocommerce-cart .cart-collaterals ul#shipping_method li label,
body.woocommerce-cart .cart-collaterals .woocommerce-shipping-destination,
body.woocommerce-cart .cart-collaterals .shipping-calculator-button,
body.woocommerce-cart .cart-collaterals .woocommerce-shipping-totals .woocommerce-Price-amount {
  color: rgba(255, 255, 255, 0.88) !important;
}

body.woocommerce-cart .cart-collaterals a.shipping-calculator-button,
body.woocommerce-cart .cart-collaterals .woocommerce-shipping-destination a {
  color: #ffffff !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals .order-total th,
body.woocommerce-cart .cart-collaterals .cart_totals .order-total td,
body.woocommerce-cart .cart-collaterals .cart_totals .order-total .amount {
  color: #ffffff !important;
}

body.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
body.woocommerce-cart a.checkout-button.button.alt.wc-forward {
  background: var(--lp-cart-accent) !important;
  border: none !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  box-shadow: 0 14px 32px rgba(245, 24, 34, 0.35) !important;
}

body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover,
body.woocommerce-cart a.checkout-button.button.alt.wc-forward:hover {
  background: var(--lp-cart-accent-hover) !important;
  color: #ffffff !important;
}

body.woocommerce-cart .cross-sells > h2 {
  color: #ffffff !important;
  background: transparent !important;
}

/* Cross-sells product buttons — match shop red */
body.woocommerce-cart .cross-sells ul.products li.product .button {
  background: var(--lp-cart-accent) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body.woocommerce-cart .cross-sells ul.products li.product .button:hover {
  background: var(--lp-cart-accent-hover) !important;
}

/* -------------------------------------------------------------------------
   Block-based cart (when WooCommerce blocks render on cart page)
   ------------------------------------------------------------------------- */

body.woocommerce-cart .wc-block-cart {
  color: rgba(255, 255, 255, 0.88);
}

body.woocommerce-cart .wc-block-cart-item__wrap > *,
body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-cart .wc-block-components-product-price {
  color: #ffffff !important;
}

body.woocommerce-cart .wc-block-cart-items__header,
body.woocommerce-cart .wc-block-cart-items__row {
  border-color: var(--lp-cart-border) !important;
}

body.woocommerce-cart .wc-block-components-panel__button,
body.woocommerce-cart .wc-block-components-totals-item__label {
  color: rgba(255, 255, 255, 0.75) !important;
}

body.woocommerce-cart .wc-block-components-text-input input,
body.woocommerce-cart .wc-block-components-quantity-selector input {
  background: var(--lp-cart-surface) !important;
  border-color: var(--lp-cart-border) !important;
  color: #ffffff !important;
}

body.woocommerce-cart .wc-block-cart__submit-button {
  background: var(--lp-cart-accent) !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  border: none !important;
}

body.woocommerce-cart .wc-block-cart__submit-button:hover {
  background: var(--lp-cart-accent-hover) !important;
  color: #ffffff !important;
}

@media (prefers-reduced-motion: reduce) {
  .astra-cart-drawer {
    transition: none !important;
  }
}
