/* Progressive presentation layer; no content depends on animation to be visible. */
:root { --motion-ease: cubic-bezier(.22, 1, .36, 1); }
/* Page changes stay brief while the shared shell keeps its brand colours steady. */
body.storefront-page .main-content { transition: opacity 160ms ease; }
body.storefront-page.is-page-leaving .main-content { opacity: .82; }
.site-header::after {
    content: '';
    position: absolute;
    z-index: 1001;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #ffe66a 55%, var(--primary));
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0;
    pointer-events: none;
    transition: transform 160ms var(--motion-ease), opacity 90ms ease-out;
}
body.storefront-page.is-page-leaving .site-header::after {
    transform: scaleX(1);
    opacity: 1;
}
/* Crossfade the catalog's industrial hero into the shared page backdrop. */
body.storefront-page .catalog-hero { z-index: 1; border-bottom: 0 !important; }
body.storefront-page .catalog-hero::after {
    content: '';
    position: absolute;
    z-index: 0;
    pointer-events: none;
    inset: 54% 0 0;
    background: linear-gradient(to bottom,
        transparent 0%,
        color-mix(in srgb, var(--bg-main) 30%, transparent) 40%,
        color-mix(in srgb, var(--bg-main) 78%, transparent) 76%,
        color-mix(in srgb, var(--bg-main) 94%, transparent) 100%);
}
body.storefront-page .catalog-hero + .catalog-section {
    position: relative;
    isolation: isolate;
}
body.storefront-page .catalog-hero + .catalog-section::before {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    inset: 0 0 auto;
    height: clamp(100px, 17vw, 220px);
    background: linear-gradient(to bottom,
        color-mix(in srgb, var(--bg-main) 94%, transparent),
        color-mix(in srgb, var(--bg-main) 54%, transparent) 44%,
        transparent);
}
.section-header .section-title { position: relative; padding-bottom: 20px; }
.section-header .section-title::after {
    content: ''; position: absolute; bottom: 0; left: 50%; width: 52px; height: 4px;
    border-radius: 4px; background: var(--primary); transform: translateX(-50%);
}
.service-card, .product-card, .faq-item {
    transition: box-shadow 320ms ease, border-color 320ms ease, transform 420ms var(--motion-ease);
}
.service-card:focus-within, .product-card:focus-within, .faq-item:focus-within {
    border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255, 214, 0, .18);
}
.service-link-btn { transition: transform 380ms var(--motion-ease), background-color 250ms ease; }
.service-card:focus-visible .service-link-btn { transform: rotate(-8deg); }
.motion-stat-group { flex-wrap: wrap; gap: 20px 32px !important; }
.motion-stat {
    position: relative; min-width: 100px; padding: 12px 0 12px 18px;
    border-left: 2px solid rgba(255, 214, 0, .6);
}
.motion-stat > :first-child { font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.motion-stat > :last-child { line-height: 1.5; }
.motion-feature {
    transition: border-color 300ms ease, background-color 300ms ease;
}
.motion-feature svg { transition: transform 400ms var(--motion-ease); }
@media (hover: hover) and (pointer: fine) {
    .service-card:hover, .product-card:hover {
        transform: translateY(-5px); border-color: rgba(255, 214, 0, .65);
        box-shadow: 0 16px 36px rgba(0, 0, 0, .1);
    }
    .service-card:hover .service-link-btn { transform: rotate(-8deg); }
    .motion-feature:hover { border-color: rgba(255, 214, 0, .45) !important; background-color: rgba(255, 214, 0, .06) !important; }
    .motion-feature:hover svg { transform: translateY(-3px); }
}
@media (max-width: 600px) {
    .bento-box.bento-wide { padding: 28px 20px !important; gap: 28px !important; }
    .bento-box.bento-wide > div { min-width: 0 !important; flex-basis: 100% !important; }
    .bento-box.bento-wide > div[style*="display: grid"] { gap: 12px !important; }
    .motion-feature { min-width: 0; padding: 16px !important; overflow-wrap: anywhere; }
    .hero, .banner-slide { background-attachment: scroll !important; }
    .hero-content .hero-title { font-size: clamp(32px, 9vw, 48px) !important; overflow-wrap: anywhere; }
    .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
    .hero-actions .btn { max-width: 100%; padding: 15px 24px !important; }
    .motion-stat-group { gap: 12px 18px !important; margin-top: 36px !important; }
    .motion-stat { flex: 1 1 100px; padding-left: 12px; }
    .motion-stat > :last-child { font-size: 11px !important; letter-spacing: .4px !important; }
}
@media (max-width: 360px) {
    .bento-box.bento-wide > div[style*="display: grid"] { grid-template-columns: 1fr !important; }
}

/* Checkout feedback hooks: reassuring, compact and localized by the view. */
.checkout-submit-button { position: relative; }
.checkout-submit-button.is-loading { cursor: progress; }
.checkout-submit-button__spinner {
    display: none;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin-inline-start: 10px;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    border-radius: 50%;
}
.checkout-submit-button.is-loading .checkout-submit-button__spinner {
    display: inline-block;
    animation: checkout-spinner 720ms linear infinite;
}
@keyframes checkout-spinner { to { transform: rotate(360deg); } }
.checkout-submit-status {
    display: none;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}
.checkout-submit-status.is-active {
    display: block;
    margin-block-start: 10px;
    animation: checkout-status-in 180ms var(--motion-ease) both;
}
@keyframes checkout-status-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.checkout-success.reveal {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    padding: clamp(48px, 7vw, 80px) clamp(20px, 6vw, 64px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-main);
    text-align: center;
    box-shadow: var(--shadow-md);
    opacity: 1;
    transform: none;
}
.checkout-success.is-visible {
    border-color: color-mix(in srgb, #18845b 42%, var(--border));
    background: linear-gradient(145deg, var(--bg-card), color-mix(in srgb, #e9f7ef 42%, var(--bg-card)));
    box-shadow: 0 18px 48px rgba(17, 83, 58, .12);
    animation: checkout-success-in 420ms var(--motion-ease) both;
}
.checkout-success__mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border: 1px solid rgba(24, 132, 91, .22);
    border-radius: 50%;
    margin: 0 auto 32px;
    background: radial-gradient(circle at 35% 28%, #fff 0, #eaf8ef 72%) !important;
    color: #14784f !important;
    box-shadow: 0 8px 22px rgba(24, 132, 91, .12);
}
.checkout-success__mark.is-animated {
    animation: checkout-mark-in 520ms var(--motion-ease) both;
}
.checkout-success__mark svg {
    stroke-dasharray: 28;
    stroke-dashoffset: 28;
}
.checkout-success__mark.is-animated svg {
    animation: checkout-check-draw 360ms var(--motion-ease) 150ms both;
}
@media (max-width: 600px) {
    .checkout-success.reveal { padding: 52px 20px; }
    .checkout-success h3 { font-size: clamp(26px, 7vw, 36px) !important; }
    .checkout-success__mark { width: 76px !important; height: 76px !important; margin-bottom: 24px !important; }
    .checkout-success__mark svg { width: 40px; height: 40px; }
}
@keyframes checkout-success-in {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes checkout-mark-in {
    0% { opacity: 0; transform: scale(.65) rotate(-12deg); }
    72% { opacity: 1; transform: scale(1.08) rotate(3deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes checkout-check-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    body.storefront-page .main-content { transition: none !important; }
    body.storefront-page.is-page-leaving .main-content { opacity: 1 !important; }
    .site-header::after { transition: none !important; }
    body.storefront-page.is-page-entering .main-content,
    .checkout-submit-button.is-loading .checkout-submit-button__spinner,
    .checkout-submit-status.is-active,
    .checkout-success.is-visible,
    .checkout-success__mark.is-animated,
    .checkout-success__mark.is-animated svg { animation: none !important; }
    .checkout-success__mark svg { stroke-dashoffset: 0; }
    .reveal, .reveal.active { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
    .service-card, .product-card, .faq-item, .service-link-btn, .motion-feature, .motion-feature svg,
    .hero-actions .btn, .banner-slides { animation: none !important; transition: none !important; }
    .service-card:hover, .product-card:hover, .service-card:hover .service-link-btn,
    .motion-feature:hover svg { transform: none !important; }
}

/* Shared storefront shell. Earlier layers disagreed on scrolled surfaces and
   the header CTA (red, then yellow); keep the same black/white/yellow treatment
   on every route and in both saved themes. */
body.storefront-page .site-header {
    color: var(--text-main);
    background: var(--header-bg);
    border-bottom: 0;
    box-shadow: 0 5px 20px rgba(16, 20, 18, .045);
    transition: background-color 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}
body.storefront-page .site-header.scrolled {
    background: var(--header-bg);
    box-shadow: 0 10px 26px rgba(16, 20, 18, .10);
}
body.storefront-page .site-header.two-tier-header .header-top,
body.storefront-page .site-header .header-bottom {
    background: transparent;
    border-color: color-mix(in srgb, var(--text-main) 12%, transparent);
}
body.storefront-page .site-header .main-nav a,
body.storefront-page .site-header .lang-switcher a,
body.storefront-page .site-header .user-auth a,
body.storefront-page .site-header .header-bottom-actions > a {
    color: var(--text-main);
}
body.storefront-page .site-header .main-nav a:hover,
body.storefront-page .site-header .main-nav a:focus-visible,
body.storefront-page .site-header .main-nav a[aria-current="page"],
body.storefront-page .site-header .main-nav a.active {
    color: var(--text-main);
}
body.storefront-page .site-header .main-nav a::after {
    background: var(--primary);
    height: 2px;
}
body.storefront-page .site-header .lang-switcher a.active {
    color: var(--text-main);
    text-decoration: underline;
    text-decoration-color: var(--primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}
body.storefront-page .site-header.two-tier-header .contact-email,
body.storefront-page .site-header.two-tier-header .contact-email:hover,
body.storefront-page .site-header.two-tier-header .contact-email:focus-visible {
    color: #795b00 !important;
}
:root[data-theme="dark"] body.storefront-page .site-header.two-tier-header .contact-email,
:root[data-theme="dark"] body.storefront-page .site-header.two-tier-header .contact-email:hover,
:root[data-theme="dark"] body.storefront-page .site-header.two-tier-header .contact-email:focus-visible {
    color: #ffe36a !important;
}
body.storefront-page .site-header.two-tier-header .ask-btn,
body.storefront-page .site-header.two-tier-header .ask-btn:hover,
body.storefront-page .site-header.two-tier-header .ask-btn:focus-visible,
body.storefront-page .site-header.two-tier-header .ask-btn:hover:focus-visible {
    color: #171717 !important;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 5px 16px rgba(255, 214, 0, .22);
}
body.storefront-page .site-header :is(a, button, input, select, textarea):focus-visible,
body.storefront-page .site-footer :is(a, button):focus-visible {
    outline: 3px solid #795b00 !important;
    outline-offset: 3px !important;
}
:root[data-theme="dark"] body.storefront-page .site-header :is(a, button, input, select, textarea):focus-visible,
:root[data-theme="dark"] body.storefront-page .site-footer :is(a, button):focus-visible {
    outline-color: #ffd600 !important;
}
body.storefront-page .site-footer {
    margin-top: clamp(56px, 6vw, 88px);
    padding-top: clamp(56px, 7vw, 76px);
    background: linear-gradient(180deg, color-mix(in srgb, var(--footer-bg) 84%, #26241b), var(--footer-bg));
    color: var(--footer-text);
    border-top: 1px solid rgba(255, 214, 0, .32);
}
body.storefront-page .site-footer .footer-container {
    align-items: start;
    gap: clamp(32px, 5vw, 60px);
    margin-bottom: 56px;
}
body.storefront-page .site-footer .footer-logo-img {
    width: clamp(180px, 20vw, 220px);
}
body.storefront-page .site-footer .footer-desc {
    max-width: 340px;
    color: #d1d4d1;
    line-height: 1.65;
}
body.storefront-page .site-footer .footer-links { gap: 36px; }
body.storefront-page .site-footer .footer-col h3 {
    position: relative;
    width: fit-content;
    margin-bottom: 22px;
    padding-bottom: 10px;
    color: #fff;
    font-size: 15px;
    letter-spacing: .09em;
}
body.storefront-page .site-footer .footer-col h3::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    width: 34px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
}
body.storefront-page .site-footer .footer-col ul { gap: 12px; }
body.storefront-page .site-footer .footer-col a {
    color: #d1d4d1;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: color 180ms ease, text-decoration-color 180ms ease;
}
body.storefront-page .site-footer .footer-col a:hover,
body.storefront-page .site-footer .footer-col a:focus-visible {
    color: #ffe36a;
    text-decoration: underline;
    text-decoration-color: currentColor;
}
body.storefront-page .site-footer .contact-list .contact-label {
    color: #aeb5b1;
}
body.storefront-page .site-footer .contact-list .contact-value {
    color: #f4f5f3;
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
body.storefront-page .site-footer .social-icon {
    border: 1px solid rgba(255, 214, 0, .28);
    background: rgba(255, 255, 255, .045);
}
body.storefront-page .site-footer .social-icon:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #171717;
}
body.storefront-page .site-footer .footer-bottom {
    border-top-color: rgba(255, 214, 0, .16);
    color: #b8bdb9;
}
@media (max-width: 768px) {
    body.storefront-page .site-footer { padding-top: 52px; }
    body.storefront-page .site-footer .footer-container { gap: 32px; margin-bottom: 40px; }
    body.storefront-page .site-footer .footer-brand { text-align: center; }
    body.storefront-page .site-footer .footer-desc { margin-inline: auto; }
    body.storefront-page .site-footer .footer-links { gap: 28px; }
    body.storefront-page .site-footer .footer-col h3 { margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
    body.storefront-page .site-header,
    body.storefront-page .site-header::after,
    body.storefront-page .site-header .main-nav a::after,
    body.storefront-page .site-footer .footer-col a,
    body.storefront-page .site-footer .social-icon {
        transition: none !important;
    }
}

/* Keep legacy layout hooks, but let one progressive controller own visibility. */
body.storefront-page .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* Small entrance for the shared shell; the homepage already staggers its hero copy. */
@keyframes shell-enter {
    from { opacity: 0; translate: 0 -8px; }
    to { opacity: 1; translate: 0 0; }
}
@keyframes content-enter {
    from { opacity: 0; translate: 0 12px; }
    to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: no-preference) {
    body.storefront-page.is-page-entering .site-header {
        animation: shell-enter 380ms var(--motion-ease) both;
    }
    body.storefront-page.is-page-entering:not([data-view="home"]) .main-content > :first-child:not(.reveal):not(:has(.reveal)):not(.motion-reveal-target):not(:has(.motion-reveal-target)) {
        animation: content-enter 440ms var(--motion-ease) 70ms both;
    }
    body.storefront-page.is-page-entering .site-header:focus-within,
    body.storefront-page.is-page-entering .main-content > :first-child:focus-within {
        animation: none;
        opacity: 1;
        translate: none;
    }
}

/* JS enhancement only: content stays visible if scripts or IntersectionObserver fail. */
body.storefront-page { --scroll-reveal-enabled: 1; }
body.storefront-page.motion-reveal-ready .motion-reveal-target {
    /* This opt-in layer owns these properties, including legacy !important resets. */
    opacity: 0 !important;
    translate: 0 20px !important;
    scale: 1 !important;
    transition: none !important;
}
body.storefront-page.motion-reveal-ready .motion-reveal-target.motion-reveal-media {
    translate: none !important;
    scale: .985 !important;
}
body.storefront-page.motion-reveal-ready .motion-reveal-target.motion-revealed {
    opacity: 1 !important;
    translate: 0 0 !important;
    scale: 1 !important;
    transition:
        opacity 520ms var(--motion-ease) var(--motion-delay, 0ms),
        translate 520ms var(--motion-ease) var(--motion-delay, 0ms),
        scale 600ms var(--motion-ease) var(--motion-delay, 0ms),
        transform 300ms var(--motion-ease), box-shadow 300ms ease, border-color 300ms ease !important;
}
body.storefront-page.motion-reveal-ready .motion-reveal-target.motion-reveal-media.motion-revealed {
    transition-duration: 600ms, 600ms, 600ms, 300ms, 300ms, 300ms !important;
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    body.storefront-page .product-card .product-img-wrapper { overflow: hidden; }
    body.storefront-page .product-card .product-img-wrapper img {
        transition: transform 620ms cubic-bezier(.22, 1, .36, 1);
    }
    body.storefront-page .product-card:hover .product-img-wrapper img,
    body.storefront-page .product-card:focus-within .product-img-wrapper img {
        transform: scale(1.055);
    }
}
@media (prefers-reduced-motion: no-preference) {
    body.storefront-page .section-header.motion-revealed .section-title::after {
        animation: section-line-draw 680ms cubic-bezier(.22, 1, .36, 1) both;
    }
}
@keyframes section-line-draw {
    from { transform: translateX(-50%) scaleX(.2); opacity: .3; }
    to { transform: translateX(-50%) scaleX(1); opacity: 1; }
}
body.storefront-page.motion-reveal-ready .motion-reveal-target:focus-within {
    opacity: 1 !important;
    translate: 0 0 !important;
    scale: 1 !important;
    transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
    body.storefront-page .product-card .product-img-wrapper img { transition: none !important; transform: none !important; }
    body.storefront-page.is-page-entering .site-header,
    body.storefront-page.is-page-entering .main-content > :first-child,
    body.storefront-page:not([data-motion="full"]).motion-reveal-ready .motion-reveal-target {
        animation: none !important;
        opacity: 1 !important;
        translate: none !important;
        scale: none !important;
        transition: none !important;
    }
}
