/* First Jack V25 shared appearance system.
   The storefront sets --brand, --ink, --paper, --surface using saved Store Settings.
   Standalone product.php sets the SAME properties on <body>. No hardcoded green theme. */
.store,
body.fj-product-themed {
  --fj-color:var(--brand,#37543d);
  --fj-text:var(--ink,#223428);
  --fj-bg:var(--paper,#f6f7f3);
  --fj-card:var(--surface,#fff);
  --fj-tint:color-mix(in srgb,var(--fj-color) 9%,var(--fj-card));
  --fj-tint-strong:color-mix(in srgb,var(--fj-color) 16%,var(--fj-card));
  --fj-border:color-mix(in srgb,var(--fj-color) 24%,var(--fj-card));
  --fj-dark:color-mix(in srgb,var(--fj-color) 72%,#151c18);
  --fj-muted:color-mix(in srgb,var(--fj-text) 60%,var(--fj-card));
}
/* A consistent shop theme, not purple homepage / green product page. */
.store .fj-v21-header-bag,
.store .fj-v18-cart-dismiss,
.store .fj-v18-cart-stepper,
.store .fj-v18-cart-stepper button,
body.fj-product-themed .fj-cart-trigger,
body.fj-product-themed .fj-cart-close,
body.fj-product-themed .fj-nav-back {
  color:var(--fj-text)!important;
  border-color:var(--fj-border)!important;
  background:var(--fj-tint)!important;
}
.store .fj-v21-header-bag:hover,
body.fj-product-themed .fj-cart-trigger:hover,
body.fj-product-themed .fj-nav-back:hover {background:var(--fj-tint-strong)!important;}
.store .fj-v21-header-bag:focus-visible,
body.fj-product-themed button:focus-visible,
body.fj-product-themed a:focus-visible {outline:3px solid var(--fj-color)!important;outline-offset:3px;}
/* Shared slide-out cart */
.store .fj-v18-cart-shade,
body.fj-product-themed .fj-cart-backdrop {
  background:color-mix(in srgb,var(--fj-text) 52%,transparent)!important;
  backdrop-filter:blur(3px);
}
.store .fj-v18-cart-panel,
body.fj-product-themed .fj-cart-drawer {
  background:var(--fj-card)!important; color:var(--fj-text)!important;
  border-left:1px solid var(--fj-border)!important;
  box-shadow:-15px 0 50px color-mix(in srgb,var(--fj-text) 15%,transparent)!important;
}
.store .fj-v18-cart-header,
body.fj-product-themed .fj-cart-drawer-head {background:var(--fj-card)!important;border-color:var(--fj-border)!important;}
.store .fj-v18-cart-header h2,
.store .fj-v18-cart-item-name,
.store .fj-v18-cart-subtotal,
.store .fj-v18-cart-subtotal strong,
body.fj-product-themed .fj-cart-drawer-head h2,
body.fj-product-themed .fj-cart-item-copy strong,
body.fj-product-themed .fj-cart-total strong {color:var(--fj-text)!important;}
.store .fj-v18-cart-item,
body.fj-product-themed .fj-cart-item {background:var(--fj-card)!important;border-color:var(--fj-border)!important;}
.store .fj-v18-cart-thumb,
body.fj-product-themed .fj-cart-photo {background:var(--fj-tint)!important;}
.store .fj-v18-cart-footer,
body.fj-product-themed .fj-cart-bottom {background:var(--fj-card)!important;border-color:var(--fj-border)!important;}
.store .fj-v18-cart-stepper,
body.fj-product-themed .fj-cart-qty {border:1px solid var(--fj-border)!important;background:var(--fj-card)!important;}
body.fj-product-themed .fj-cart-qty button {color:var(--fj-text)!important;background:var(--fj-tint)!important;}
.store .fj-v18-cart-checkout,
.store .fj-v18-cart-empty button,
.store .fj-v18-cart-use,
.store .fj-v18-cart-code button,
body.fj-product-themed .fj-cart-checkout,
body.fj-product-themed .fj-floating-cart,
body.fj-product-themed .fj-buy-now {
  background:var(--fj-dark)!important; color:#fff!important;
  border-color:var(--fj-dark)!important;
  box-shadow:0 8px 20px color-mix(in srgb,var(--fj-color) 19%,transparent)!important;
}
.store .fj-v18-cart-checkout:hover:not(:disabled),
body.fj-product-themed .fj-cart-checkout:hover:not(:disabled),
body.fj-product-themed .fj-buy-now:hover:not(:disabled) {
  background:color-mix(in srgb,var(--fj-dark) 86%,black)!important;
}
.store .fj-v18-cart-keep-shopping,
.store .fj-v18-cart-add-more,
.store .fj-v18-cart-offer-skip,
body.fj-product-themed .fj-cart-continue,
body.fj-product-themed .fj-cart-remove {color:var(--fj-color)!important;}
.store .fj-v18-cart-offer,
body.fj-product-themed .fj-product-stepper {background:var(--fj-tint)!important;border-color:var(--fj-border)!important;color:var(--fj-text)!important;}
.store .fj-v21-size-editor select,
body.fj-product-themed .fj-cart-size-edit select {background:var(--fj-tint)!important;border-color:var(--fj-border)!important;color:var(--fj-text)!important;}
/* Checkout: no overhanging, double or clipped borders at the four corners. */
.store .modal-backdrop:has(.fj-v21-checkout) {
  box-sizing:border-box!important;
  padding:clamp(10px,2.5vw,24px)!important;
  background:color-mix(in srgb,var(--fj-text) 60%,transparent)!important;
  backdrop-filter:blur(3px);
  overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain;
}
.store .store-modal:has(.fj-v21-checkout) {
  box-sizing:border-box!important;
  position:relative;
  width:min(100%,760px)!important;
  max-width:760px!important;
  max-height:calc(100dvh - 34px)!important;
  margin:auto;
  padding:25px 29px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  border:1px solid var(--fj-border)!important;
  border-radius:19px!important;
  background:var(--fj-card)!important;
  color:var(--fj-text)!important;
  box-shadow:0 24px 65px color-mix(in srgb,var(--fj-text) 20%,transparent)!important;
  scrollbar-width:thin;
}
.store .store-modal:has(.fj-v21-checkout) .modal-heading {
  position:relative;
  margin:-25px -29px 21px!important;
  padding:22px 27px!important;
  border-bottom:1px solid var(--fj-border)!important;
  border-radius:18px 18px 0 0!important;
  background:var(--fj-tint)!important;
}
.store .store-modal:has(.fj-v21-checkout) .modal-heading h2 {color:var(--fj-text)!important;}
.store .store-modal:has(.fj-v21-checkout) .modal-heading .icon-button {
  background:var(--fj-card)!important;color:var(--fj-text)!important;
  border:1px solid var(--fj-border)!important;
  border-radius:50%; min-width:44px;min-height:44px;
}
.store .fj-v21-checkout-intro,
.store .fj-v21-checkout .totals.grand,
.store .fj-v21-checkout .checkout-bag,
.store .fj-v21-checkout .checkout-coupon,
.store .fj-v21-description-card,
body.fj-product-themed .fj-v21-story,
body.fj-product-themed .fj-benefits span {
  background:var(--fj-tint)!important;
  border:1px solid var(--fj-border)!important;
  color:var(--fj-text)!important;
}
.store .fj-v21-checkout-intro strong,
.store .fj-v21-checkout .checkout-section-heading h3,
.store .fj-v21-checkout .checkout-bag-copy strong,
.store .fj-v21-checkout .fj-v21-section-title,
.store .fj-v21-description-card .fj-v21-description-caption,
body.fj-product-themed .fj-v21-story h2,
body.fj-product-themed .fj-v21-story-eyebrow {color:var(--fj-text)!important;}
.store .fj-v21-checkout input,
.store .fj-v21-checkout textarea,
.store .fj-v21-checkout select {
  box-sizing:border-box!important;
  background:var(--fj-card)!important;
  border:1px solid var(--fj-border)!important;
  color:var(--fj-text)!important;
  outline-color:var(--fj-color)!important;
}
.store .fj-v21-checkout input:focus,
.store .fj-v21-checkout textarea:focus,
.store .fj-v21-checkout select:focus {outline:2px solid var(--fj-color)!important;border-color:var(--fj-color)!important;}
.store .fj-v21-checkout .primary.full[type=submit],
.store .fj-v21-checkout .checkout-coupon>div button {
  background:var(--fj-dark)!important;color:#fff!important;
  border-color:var(--fj-dark)!important;
}
/* Standalone product page: obtain identical colors from the Store Settings PHP values. */
body.fj-product-themed {background:var(--fj-bg)!important;color:var(--fj-text)!important;}
body.fj-product-themed .fj-product-header,
body.fj-product-themed .fj-product-footer {background:var(--fj-card)!important;border-color:var(--fj-border)!important;}
body.fj-product-themed .fj-announcement {background:var(--fj-dark)!important;color:#fff;}
body.fj-product-themed .fj-product-header nav,
body.fj-product-themed .fj-product-brand,
body.fj-product-themed .fj-product-info h1,
body.fj-product-themed .fj-product-price strong {color:var(--fj-text)!important;}
body.fj-product-themed .fj-feature-stage {background:var(--fj-tint)!important;}
body.fj-product-themed .fj-stock.fj-in-stock {background:var(--fj-tint)!important;color:var(--fj-text)!important;border:1px solid var(--fj-border);}
body.fj-product-themed .fj-size-choice-text {
  background:var(--fj-card)!important;color:var(--fj-text)!important;
  border-color:var(--fj-border)!important;
}
body.fj-product-themed .fj-size-choice input:checked + .fj-size-choice-text {
  background:var(--fj-tint-strong)!important;color:var(--fj-text)!important;
  border-color:var(--fj-color)!important;
  box-shadow:0 0 0 2px var(--fj-border)!important;
}
body.fj-product-themed .fj-size-choice input:focus-visible + .fj-size-choice-text {outline-color:var(--fj-color)!important;}
body.fj-product-themed .fj-product-stepper button {background:var(--fj-card)!important;color:var(--fj-text)!important;}
body.fj-product-themed .fj-product-stepper span {color:var(--fj-text)!important;}
body.fj-product-themed .fj-product-description {border-color:var(--fj-border)!important;}
body.fj-product-themed .fj-add-bag {background:var(--fj-card)!important;color:var(--fj-text)!important;border-color:var(--fj-border)!important;}
body.fj-product-themed .fj-v21-story-lead,
body.fj-product-themed .fj-v21-story ul {color:var(--fj-text)!important;}
body.fj-product-themed .fj-language-toggle {border-color:var(--fj-border)!important;background:var(--fj-tint)!important;color:var(--fj-text)!important;}
body.fj-product-themed .fj-thumb.is-active {border-color:var(--fj-color)!important;outline-color:var(--fj-border)!important;}
body.fj-product-themed .fj-cart-toast {background:var(--fj-dark)!important;}
@media (max-width:640px) {
 .store .store-modal:has(.fj-v21-checkout) {width:100%!important;max-height:calc(100dvh - 20px)!important;padding:16px!important;border-radius:15px!important;}
 .store .store-modal:has(.fj-v21-checkout) .modal-heading {margin:-16px -16px 16px!important;padding:16px!important;border-radius:14px 14px 0 0!important;}
 .store .fj-v21-checkout .checkout-bag {padding:12px!important;}
}
@media (prefers-reduced-motion:reduce) {
 .store .fj-v18-cart-panel,body.fj-product-themed .fj-cart-drawer {animation:none!important;}
}
