/* Bridges native WordPress/WooCommerce markup to the Next.js design tokens
   (black ink, #e4e4e7 lines, Montserrat). Loaded last. */
:root { --font-retail: "Figtree", Arial, sans-serif; }
body.sn-storefront { font-family: var(--font-retail), Arial, sans-serif; margin: 0; color: #000; background: #fff; }
body.sn-storefront main { min-height: 40vh; }
.sn-storefront .screen-reader-text, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.header-panel-backdrop[hidden], .header-panel[hidden] { display: none !important; }
.header-panel-backdrop:not([hidden]) { display: block; }
.icon-button span[data-sn-cart-count], .icon-button span[data-sn-wishlist-count] { position: absolute; }

/* Gallery thumbs */
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumb { width: 72px; height: 72px; padding: 0; border: 1px solid #e4e4e7; border-radius: 6px; background: #fff; cursor: pointer; overflow: hidden; }
.gallery-thumb.active { border-color: #000; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-price-block { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.pdp-price-block .price { font-size: 1.7rem; font-weight: 800; }
.pdp-price-block .old-price { color: #71717a; text-decoration: line-through; }
.pdp-tax-note { width: 100%; color: #71717a; font-size: .78rem; }

/* WooCommerce add-to-cart form on the PDP */
.product-purchase-panel form.cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin: 0 0 18px; }
.product-purchase-panel table.variations { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.product-purchase-panel table.variations th, .product-purchase-panel table.variations td { display: block; padding: 4px 0; text-align: left; }
.product-purchase-panel table.variations label { font-weight: 700; font-size: .85rem; }
.product-purchase-panel select { width: 100%; min-height: 44px; border: 1px solid #e4e4e7; border-radius: 6px; padding: 0 36px 0 12px; background: #fff; }
.product-purchase-panel .quantity input.qty { width: 84px; min-height: 48px; text-align: center; border: 1px solid #e4e4e7; border-radius: 6px; font-weight: 700; }
.product-purchase-panel .single_add_to_cart_button,
.sn-page .button, .sn-page button.button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .wc-block-components-button:not(.is-link) {
  background: #000 !important; color: #fff !important; border: 1px solid #000 !important; border-radius: 6px !important;
  min-height: 48px; padding: 0 22px !important; font-weight: 700 !important; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.product-purchase-panel .single_add_to_cart_button { flex: 1 1 200px; }
.product-purchase-panel .single_add_to_cart_button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: #18181b !important; }
.card-quick-add.added::after, a.added_to_cart { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border: 1px solid #e4e4e7; border-left: 4px solid #000; background: #fafafa; border-radius: 6px; padding: 14px 18px; margin: 0 0 18px; list-style: none; }
.woocommerce-error { border-left-color: #b91c1c; }

/* Cart + checkout (native shortcode markup) */
.woocommerce table.shop_table { width: 100%; border: 1px solid #e4e4e7; border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: #fff; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 14px 16px; border-bottom: 1px solid #f4f4f5; text-align: left; vertical-align: middle; }
.woocommerce table.shop_table img { width: 64px; height: 64px; object-fit: contain; border: 1px solid #e4e4e7; border-radius: 6px; }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-checkout-review-order { border: 1px solid #e4e4e7; border-radius: 10px; padding: 20px; background: #fff; }
.woocommerce .cart-collaterals { margin-top: 24px; display: flex; justify-content: flex-end; }
.woocommerce .cart-collaterals .cart_totals { width: min(420px, 100%); float: none; }
.woocommerce form .form-row { margin: 0 0 14px; display: block; }
.woocommerce form .form-row label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container--default .select2-selection--single {
  width: 100%; min-height: 46px; border: 1px solid #e4e4e7; border-radius: 6px; padding: 10px 12px; font-family: inherit; background: #fff; box-sizing: border-box;
}
.woocommerce-checkout #customer_details { display: grid; gap: 20px; }
@media (min-width: 992px) {
  form.woocommerce-checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 28px; align-items: start; }
  form.woocommerce-checkout #order_review_heading { grid-column: 2; margin: 0; }
  form.woocommerce-checkout #order_review { grid-column: 2; }
  form.woocommerce-checkout #customer_details { grid-column: 1; grid-row: 1 / span 3; }
}
.woocommerce-checkout-payment { margin-top: 16px; }
.woocommerce-checkout-payment ul { list-style: none; padding: 0; margin: 0 0 12px; }
.woocommerce-checkout-payment li { border: 1px solid #e4e4e7; border-radius: 6px; padding: 12px 14px; margin-bottom: 8px; }

/* Mobile filter drawer */
@media (max-width: 991px) {
  .desktop-filter-rail { position: fixed; inset: 0 auto 0 0; width: min(88vw, 360px); background: #fff; z-index: 1200; transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto; display: block; }
  .desktop-filter-rail.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
}
.sn-page-content { padding-bottom: 3rem; }

/* ------------------------------------------------------------------
   Page width: desktop + tablet = 90% (min and max), mobile = 100% with
   10px side padding and no margin.
   ------------------------------------------------------------------ */
body.sn-storefront .container {
  box-sizing: border-box !important;
  width: 90% !important;
  min-width: 90% !important;
  max-width: 90% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
@media (max-width: 767px) {
  body.sn-storefront .container {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* Account portal: card fills its own centred box (never a narrow side column) */
.woocommerce-account .woocommerce,
.woocommerce-account .woocommerce > * { float: none; width: auto; max-width: 100%; }
.woocommerce-account .woocommerce::before, .woocommerce-account .woocommerce::after { display: none; }
.account-portal-wrapper { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; box-sizing: border-box; }
.account-portal-wrapper .account-container { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }
.account-portal-wrapper .account-user-banner,
.account-portal-wrapper .account-nav-tabs,
.account-portal-wrapper .account-content-panel { width: 100%; max-width: 100%; box-sizing: border-box; }
.account-form-grid .form-field, .account-form-grid .input-with-icon { width: 100%; }
.account-form-grid .field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; white-space: nowrap; }
.account-submit-btn { width: 100%; white-space: normal; }
.remember-me-checkbox { display: inline-flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------
   Cart page polish + side cart extras
   ------------------------------------------------------------------ */
/* WooCommerce ships a giant red circular "a.remove" – neutralise it inside our cart */
.cart-item .cart-text-action.remove,
.woocommerce .cart-item a.remove {
  position: static; display: inline-flex !important; align-items: center; gap: 6px;
  width: auto !important; height: auto !important; margin: 0; padding: 0; border-radius: 0 !important;
  background: transparent !important; color: #b91c1c !important; font-size: .78rem !important; font-weight: 600; line-height: 1.2 !important; text-decoration: none;
  white-space: nowrap; text-indent: 0; overflow: visible;
}
.cart-item .cart-text-action.remove:hover { color: #7f1d1d !important; text-decoration: underline; }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 0; }
.cart-item .cart-text-action { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.cart-price-line { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cart-price-line span { color: #71717a; font-size: .85rem; }
.cart-price-line strong { font-size: 1.05rem; }
.cart-quantity input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.cart-quantity input[type="number"]::-webkit-outer-spin-button, .cart-quantity input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.summary-line-group p { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 0 12px; }
.summary-line-group p span, .summary-line-group p strong { white-space: nowrap; }
.summary-line-group p.saving a { color: #b91c1c; }
.coupon-actions { display: flex; align-items: center; gap: 8px; }
a.coupon-apply { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 8px; background: #000; color: #fff !important; font-weight: 700; font-size: .78rem; text-decoration: none; }
.coupon-manual { display: flex; gap: 8px; margin-bottom: 12px; }
.coupon-manual input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 900px) {
  .premium-cart { display: block; }
  .premium-cart .summary-panel { margin-top: 18px; position: static; }
  .cart-item { grid-template-columns: 84px 1fr; }
  .cart-item .cart-item-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
}

/* Side cart */
.global-cart-backdrop { z-index: 99999 !important; }
.global-cart-drawer { display: flex; flex-direction: column; }
.global-cart-drawer .sn-cart-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.global-cart-drawer .drawer-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.global-cart-drawer.is-loading .drawer-scroll { opacity: .55; pointer-events: none; transition: opacity .15s ease; }
.global-cart-drawer .drawer-remove, .global-cart-drawer .drawer-save { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.global-cart-drawer .coupon-offers .coupon-list { max-height: 240px; overflow-y: auto; }
.global-cart-drawer button[disabled].coupon-apply { opacity: .45; cursor: not-allowed; }
.global-cart-drawer a.drawer-checkout { display: flex; align-items: center; justify-content: center; gap: 10px; }
.sn-toast { position: fixed; left: 50%; bottom: 86px; transform: translate(-50%, 12px); z-index: 100000; max-width: calc(100% - 20px); padding: 12px 20px; border-radius: 999px; background: #0a0a0a; color: #fff; font-size: .86rem; font-weight: 600; box-shadow: 0 14px 34px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.sn-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
