/* Single-product only. Loaded after legacy styles; no shop/header/footer changes. */
body.single-product {
    --ss-product-surface: var(--ss-surface);
    --ss-product-soft: var(--ss-cream);
    --ss-product-line: var(--ss-cream);
    --ss-product-selected: var(--ss-brand-soft);
    --ss-product-radius: 8px;
    --ss-product-motion: 180ms;
}
html body.single-product #primary .fm-product-top {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
    gap: 32px !important;
    align-items: start !important;
}
html body.single-product .fm-info { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
html body.single-product .fm-info .product_title { font-size: 28px !important; line-height: 1.3 !important; font-weight: 500 !important; letter-spacing: 0 !important; margin-bottom: 10px !important; }
html body.single-product .fm-info .fm-short-description { color: var(--ss-muted) !important; line-height: 1.75; margin: 12px 0 18px; }
html body.single-product .fm-info .fm-divider { background: var(--ss-product-line); margin: 16px 0 !important; }
html body.single-product .fm-gallery .woocommerce-product-gallery__image,
html body.single-product .fm-gallery .flex-viewport { border-radius: var(--ss-product-radius) !important; background: var(--ss-product-soft) !important; }
html body.single-product .fm-gallery .woocommerce-product-gallery__image img { object-fit: contain !important; background: var(--ss-product-surface) !important; border-radius: var(--ss-product-radius) !important; transform: none !important; }
html body.single-product .fm-info .price .woocommerce-Price-amount { color: var(--ss-ink) !important; font-size: 26px !important; }
html body.single-product .fm-info .price del .woocommerce-Price-amount { color: var(--ss-muted) !important; font-size: 15px !important; }
html body.single-product .fm-info .fm-sale-badge { background: var(--ss-brand-soft) !important; color: var(--ss-brand-deep) !important; }
/* Keep Woo's real select in the form. Only hide a row once its replacement is ready. */
html body.single-product .fm-info .variations tr.ss-weight-enhanced { display: none !important; }
html body.single-product .fm-info .variations.ss-weight-only { margin: 0 !important; }
/* Reset Storefront's fieldset/legend panel at its source; canvas remains Customizer-owned. */
html body.single-product .fm-info fieldset.ss-product-weights {
    border: 0; padding: 0; margin: 16px 0 20px; min-width: 0;
    background: transparent; box-shadow: none;
}
html body.single-product .fm-info .ss-product-weights legend {
    float: none; width: auto; padding: 0; background: transparent;
    font: 500 13px/1.5 var(--ss-font-sans); color: var(--ss-ink); margin-bottom: 14px;
}
.ss-product-weight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px 12px; }
html body.single-product .fm-info .ss-product-weight {
    position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0; min-height: 100px; width: 100%; padding: 0; margin: 0;
    border: 1px solid var(--ss-option-border) !important; border-radius: var(--ss-product-radius) !important;
    background: var(--ss-cream) !important; color: var(--ss-ink) !important;
    font: 500 14px/1.4 var(--ss-font-sans); box-shadow: none !important;
    cursor: pointer; text-transform: none; letter-spacing: 0;
    transition: border-color var(--ss-product-motion);
}
html body.single-product .fm-info .ss-product-weight-label {
    display: block; padding: 10px 8px; background: var(--ss-lime); color: var(--ss-ink);
    border-radius: 7px 7px 0 0; text-align: center; overflow-wrap: anywhere;
}
html body.single-product .fm-info .ss-product-weight:hover { border-color: var(--ss-brand) !important; }
html body.single-product .fm-info .ss-product-weight[aria-pressed="true"] { border-color: var(--ss-brand) !important; }
html body.single-product .fm-info .ss-product-weight[aria-pressed="true"] .ss-product-weight-label { background: var(--ss-brand); color: var(--ss-white); }
html body.single-product .fm-info .ss-product-weight:disabled { opacity: .4; cursor: not-allowed; }
html body.single-product .fm-info .ss-product-weight:focus-visible { outline: 2px solid var(--ss-brand) !important; outline-offset: 3px; }
.ss-product-weight-body { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 10px 8px; min-width: 0; }
.ss-product-weight-price { font-size: 16px; line-height: 1.4; color: var(--ss-ink); font-weight: 600; overflow-wrap: anywhere; }
.ss-product-weight-regular { font-size: 12px; line-height: 1.3; color: var(--ss-muted); overflow-wrap: anywhere; }
.ss-product-weight-saving { position: absolute; top: -10px; right: 8px; font-size: 10px; line-height: 20px; padding: 0 6px; border-radius: 3px; background: var(--ss-brand-deep); color: var(--ss-white); white-space: nowrap; }
.ss-product-weight [hidden] { display: none !important; }
@keyframes ss-product-atc-shine {
    0% { transform: translateX(0) skewX(-18deg); opacity: 0; }
    7% { opacity: .62; }
    34% { transform: translateX(420%) skewX(-18deg); opacity: .42; }
    43%, 100% { transform: translateX(420%) skewX(-18deg); opacity: 0; }
}
html body.single-product .fm-info .single_add_to_cart_button,
html body.single-product form.cart .single_add_to_cart_button {
    position: relative !important;
    isolation: isolate;
    overflow: hidden !important;
    min-height: 52px !important;
    border: 1px solid color-mix(in srgb, var(--ss-cream) 18%, transparent) !important;
    border-radius: 999px !important;
    background: linear-gradient(115deg, var(--ss-brand), var(--ss-brand-deep)) !important;
    color: var(--ss-white) !important;
    -webkit-text-fill-color: var(--ss-white) !important;
    box-shadow: 0 9px 22px color-mix(in srgb, var(--ss-brand) 22%, transparent) !important;
    font-weight: 650 !important;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease !important;
}
html body.single-product .fm-info .single_add_to_cart_button::before,
html body.single-product form.cart .single_add_to_cart_button::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -55%;
    left: -62%;
    width: 42%;
    height: 210%;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 0, color-mix(in srgb, var(--ss-cream) 5%, transparent) 24%, color-mix(in srgb, var(--ss-cream) 72%, transparent) 50%, color-mix(in srgb, var(--ss-cream) 5%, transparent) 76%, transparent 100%);
    transform: translateX(0) skewX(-18deg);
    opacity: 0;
    animation: ss-product-atc-shine 4.2s ease-in-out infinite;
}
html body.single-product .fm-info .single_add_to_cart_button::after,
html body.single-product form.cart .single_add_to_cart_button::after { animation: none !important; }
html body.single-product .fm-info .single_add_to_cart_button > *,
html body.single-product form.cart .single_add_to_cart_button > * { position: relative; z-index: 1; }
html body.single-product .fm-info .single_add_to_cart_button:hover,
html body.single-product form.cart .single_add_to_cart_button:hover {
    background: linear-gradient(115deg, var(--ss-brand-deep), var(--ss-ink)) !important;
    box-shadow: 0 12px 26px color-mix(in srgb, var(--ss-brand) 28%, transparent) !important;
    transform: translateY(-2px) !important;
}
html body.single-product .fm-info .single_add_to_cart_button:active,
html body.single-product form.cart .single_add_to_cart_button:active { transform: translateY(0) scale(.985) !important; }
html body.single-product .fm-info .single_add_to_cart_button:focus-visible,
html body.single-product form.cart .single_add_to_cart_button:focus-visible { outline: 3px solid var(--ss-brand-soft) !important; outline-offset: 3px; }
html body.single-product .fm-info .single_add_to_cart_button.is-loading::before,
html body.single-product .fm-info .single_add_to_cart_button.loading::before,
html body.single-product .fm-info .single_add_to_cart_button.is-added::before,
html body.single-product .fm-info .single_add_to_cart_button.added::before,
html body.single-product form.cart .single_add_to_cart_button.is-loading::before,
html body.single-product form.cart .single_add_to_cart_button.loading::before,
html body.single-product form.cart .single_add_to_cart_button.is-added::before,
html body.single-product form.cart .single_add_to_cart_button.added::before { animation: none !important; opacity: 0 !important; }
html body.single-product .fm-info .single_add_to_cart_button.is-added,
html body.single-product .fm-info .single_add_to_cart_button.added {
    background: linear-gradient(115deg, var(--ss-ink), var(--ss-ink)) !important;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--ss-ink) 20%, transparent) !important;
}
html body.single-product .fm-info .single_add_to_cart_button:disabled { opacity: .5; transform: none !important; }
html body.single-product .fm-qty-row { border-radius: var(--ss-product-radius) !important; border-color: var(--ss-product-line) !important; background: var(--ss-product-surface) !important; }
.ss-product-trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 20px 0; margin: 22px 0 14px; border-top: 1px solid var(--ss-product-line); border-bottom: 1px solid var(--ss-product-line); }
.ss-product-trust li { min-width: 0; margin: 0; padding: 0 4px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--ss-muted); font: 400 12px/1.5 var(--ss-font-sans); }
.ss-product-trust-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--ss-brand); border-radius: 50%; color: var(--ss-brand); transition: transform var(--ss-product-motion); }
.ss-product-trust-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ss-product-trust li:hover .ss-product-trust-icon { transform: translateY(-2px); }
@media (max-width: 820px) {
    html body.single-product #primary .fm-product-top { grid-template-columns: minmax(0, 1fr) !important; gap: 22px !important; }
    html body.single-product .fm-info .product_title { font-size: 24px !important; }
    .ss-product-trust { gap: 4px; padding: 18px 0; }
    .ss-product-trust li { font-size: 11px; padding: 0 2px; }
}
@media (max-width: 360px) { .ss-product-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; } }
@media (prefers-reduced-motion: reduce) {
    html body.single-product .fm-info .single_add_to_cart_button,
    html body.single-product .fm-info .ss-product-weight,
    .ss-product-trust-icon { transition: none !important; transform: none !important; }
    html body.single-product .fm-info .single_add_to_cart_button::before,
    html body.single-product form.cart .single_add_to_cart_button::before { animation: none !important; opacity: 0 !important; }
}
/* Stock status: replace the inherited WooCommerce glyph with one clean live dot. */
html body.single-product .fm-info .stock.in-stock {
    color: var(--ss-stock) !important;
    background: var(--ss-stock-soft) !important;
    border: 1px solid var(--ss-stock-line) !important;
    border-radius: var(--ss-product-radius) !important;
    padding: 10px 14px !important;
    gap: 12px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    max-width: 100%;
    box-sizing: border-box;
}
html body.single-product .fm-info .stock.in-stock::before,
html body.single-product .fm-info .stock.in-stock::after {
    content: none !important;
    display: none !important;
}
html body.single-product .fm-info .stock.in-stock .fm-stock-dot {
    position: relative;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ss-stock) !important;
    box-shadow: 0 0 0 0 var(--ss-stock-halo);
    animation: ss-stock-glow 2.4s ease-in-out infinite;
}
html body.single-product .fm-info .stock.in-stock .fm-stock-dot::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 2px solid var(--ss-stock-line);
    border-radius: 50%;
    opacity: 0;
    animation: ss-stock-ripple 2.4s cubic-bezier(.2, .6, .3, 1) infinite;
}
@keyframes ss-stock-glow {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 var(--ss-stock-halo); }
    50% { transform: scale(1.3); box-shadow: 0 0 0 6px var(--ss-stock-halo); }
}
@keyframes ss-stock-ripple {
    0% { transform: scale(.7); opacity: .9; }
    80%, 100% { transform: scale(1.6); opacity: 0; }
}
/* Details use the theme's berry/white palette, not the inherited cream button. */
html body.single-product #fm-product-details.fm-section {
    background: var(--ss-cream) !important;
    border-color: var(--ss-border-strong) !important;
}
html body.single-product #fm-product-details .fm-acc-item {
    background: var(--ss-cream) !important;
    border-color: var(--ss-border) !important;
}
html body.single-product #fm-product-details .fm-acc-trigger {
    background: var(--ss-cream) !important;
    color: var(--ss-brand-deep) !important;
    padding: 16px 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    transition: background var(--ss-product-motion), color var(--ss-product-motion);
}
html body.single-product #fm-product-details .fm-acc-trigger:hover,
html body.single-product #fm-product-details .fm-acc-trigger[aria-expanded="true"] {
    background: var(--ss-brand-soft) !important;
    color: var(--ss-brand-deep) !important;
}
html body.single-product #fm-product-details .fm-acc-trigger:focus-visible {
    outline: 2px solid var(--ss-brand) !important;
    outline-offset: -3px;
}
html body.single-product #fm-product-details .fm-acc-chevron {
    stroke: currentColor !important;
}
html body.single-product #fm-product-details .fm-acc-inner {
    padding: 14px !important;
    color: var(--ss-ink-soft) !important;
    background: var(--ss-cream) !important;
}
@media (prefers-reduced-motion: reduce) {
    html body.single-product .fm-info .stock.in-stock .fm-stock-dot,
    html body.single-product .fm-info .stock.in-stock .fm-stock-dot::after {
        animation: none !important;
        opacity: .6;
        transform: none;
        box-shadow: 0 0 0 3px var(--ss-stock-halo);
    }
    html body.single-product #fm-product-details .fm-acc-trigger { transition: none !important; }
}

/* v13.0.39 — modern stock pill (light mint tone) + quantity border */
html body.single-product .fm-info .stock.in-stock {
    --ss-stock-mint: color-mix(in srgb, var(--ss-stock) 9%, #fff);
    --ss-stock-mint-2: color-mix(in srgb, var(--ss-lime, var(--ss-stock)) 16%, #fff);
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    padding: 8px 16px 8px 12px !important;
    border-radius: 999px !important;
    border: 1px solid color-mix(in srgb, var(--ss-stock) 28%, transparent) !important;
    background: linear-gradient(110deg, var(--ss-stock-mint) 0%, var(--ss-stock-mint-2) 45%, var(--ss-stock-mint) 90%) !important;
    background-size: 220% 100% !important;
    box-shadow: 0 2px 10px -4px color-mix(in srgb, var(--ss-stock) 35%, transparent) !important;
    font-weight: 600 !important;
    letter-spacing: .01em;
    animation: ss-stock-sheen 3.6s ease-in-out infinite;
}
html body.single-product .fm-info .stock.in-stock .fm-stock-dot {
    flex: 0 0 auto;
    width: 10px; height: 10px;
    background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--ss-stock) 55%, #fff), var(--ss-stock) 70%) !important;
    animation: ss-stock-beat 1.8s ease-in-out infinite;
}
html body.single-product .fm-info .stock.in-stock .fm-stock-dot::after {
    inset: -4px;
    border: 0;
    background: color-mix(in srgb, var(--ss-stock) 35%, transparent);
    animation: ss-stock-ripple 1.8s cubic-bezier(.2,.6,.3,1) infinite;
}
@keyframes ss-stock-sheen { 0%,100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
@keyframes ss-stock-beat {
    0%,100% { transform: scale(1); box-shadow: 0 0 0 0 var(--ss-stock-halo); }
    40% { transform: scale(1.2); box-shadow: 0 0 0 5px var(--ss-stock-halo); }
}
html body.single-product .fm-qty-row {
    border: 1px solid var(--ss-border-strong, var(--ss-product-line)) !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    box-shadow: 0 1px 3px var(--ss-stock-halo);
}
html body.single-product .fm-qty-btn { border-radius: 999px !important; }
@media (prefers-reduced-motion: reduce) {
    html body.single-product .fm-info .stock.in-stock,
    html body.single-product .fm-info .stock.in-stock .fm-stock-dot,
    html body.single-product .fm-info .stock.in-stock .fm-stock-dot::after { animation: none !important; }
}
