/*
 * Storefront theme layer: header, category bar and hero.
 * Loaded after the other shop stylesheets, so it only restyles; structure and
 * behaviour stay in base.css / catalog.css. One palette: deep navy, indigo as
 * the action colour, amber as a small highlight.
 */
:root {
    --sf-navy: #0b1736;
    --sf-navy-2: #13224d;
    --sf-indigo: #4f46e5;
    --sf-indigo-dark: #4338ca;
    --sf-indigo-soft: #eef2ff;
    --sf-amber: #f59e0b;
}

/* ---------- Announcement ---------- */
.sf-announce { background: var(--sf-navy); color: rgba(255, 255, 255, .88); font-weight: 500; letter-spacing: .01em; }

/* ---------- Header ---------- */
.sf-header { background: rgba(255, 255, 255, .97); border-bottom: 1px solid #e5e7eb; }
.sf-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(11, 23, 54, .35); }

.sf-logo { gap: 10px; }
.sf-logo__mark {
    width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--sf-indigo), #7c3aed); color: #fff;
    font-weight: 800; font-size: 1.1rem; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .6);
}
.sf-logo__text { color: var(--sf-navy); }

/* Search */
.sf-search__input {
    height: 46px; padding-right: 104px; border: 1px solid #d1d5db; background: #f9fafb;
}
.sf-search__input:hover { border-color: #9ca3af; }
.sf-search__input:focus { background: #fff; border-color: var(--sf-indigo); box-shadow: 0 0 0 4px rgba(79, 70, 229, .14); }
.sf-search__btn {
    position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 20px; border: 0; border-radius: 999px;
    background: var(--sf-indigo); color: #fff; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
    transition: background .2s;
}
.sf-search__btn:hover { background: var(--sf-indigo-dark); }
.sf-search__btn:focus-visible { outline: 2px solid var(--sf-indigo); outline-offset: 2px; }
@media (max-width: 479px) {
    .sf-search__input { padding-right: 84px; }
    .sf-search__btn { padding: 0 14px; }
}

/* Action icons */
.sf-header__actions { gap: 4px; }
.sf-header .sf-icon-btn { color: #374151; }
.sf-header .sf-icon-btn:hover { background: var(--sf-indigo-soft); color: var(--sf-indigo) !important; }
.sf-cart-btn { background: var(--sf-indigo-soft); color: var(--sf-indigo) !important; }
.sf-cart-btn .sf-badge-count { top: -3px; right: -3px; background: var(--sf-amber); color: #1f2937; border: 2px solid #fff; }

/* ---------- Category bar ---------- */
.sf-catnav { display: block; border-top: 0; background: var(--sf-navy); }
.sf-catnav__inner { gap: 2px; padding-top: 6px; padding-bottom: 6px; }
.sf .sf-catnav__link {
    align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 8px;
    color: rgba(255, 255, 255, .82) !important; font-weight: 500;
    transition: background .2s, color .2s;
}
.sf .sf-catnav__link:hover, .sf-catnav__item:focus-within > .sf-catnav__link, .sf-catnav__item.has-mega:hover > .sf-catnav__link {
    background: rgba(255, 255, 255, .1); color: #fff !important; border: 0;
}
.sf .sf-catnav__link--all { background: var(--sf-indigo); color: #fff !important; font-weight: 600; margin-right: 8px; }
.sf .sf-catnav__link--all:hover { background: var(--sf-indigo-dark); }
.sf-catnav__caret { width: 14px; height: 14px; opacity: .6; transition: transform .2s; }
.sf-catnav__item.has-mega:hover .sf-catnav__caret { transform: rotate(180deg); }

.sf-mega { border-top: 2px solid var(--sf-indigo); border-radius: 0 0 16px 16px; }
.sf .sf-mega__title { color: var(--sf-navy); font-size: 1rem; }
.sf .sf-mega__title:hover { color: var(--sf-indigo) !important; }
.sf .sf-mega__link { padding: 7px 10px; margin: 0 -10px; border-radius: 8px; transition: background .15s, color .15s; }
.sf .sf-mega__link:hover { background: var(--sf-indigo-soft); color: var(--sf-indigo) !important; }

/* Phones and tablets: the bar becomes a row of swipeable chips */
@media (max-width: 899px) {
    .sf .sf-catnav__link { padding: 6px 12px; font-size: .85rem; }
    .sf-mega, .sf-catnav__caret { display: none; }
}

/* ---------- Hero ---------- */
.sf-hero { background: var(--sf-navy); }
.sf-hero__slide.has-text {
    --glow: #4f46e5; --hl: #fbbf24;
    background:
        radial-gradient(55% 85% at 85% 50%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 70%),
        radial-gradient(40% 60% at 0% 100%, color-mix(in srgb, var(--glow) 25%, transparent), transparent 70%),
        linear-gradient(135deg, var(--sf-navy), var(--sf-navy-2));
}
/* Each slide its own accent, all on the same navy */
.sf-hero__slide.has-text:nth-child(4n+2) { --glow: #0d9488; --hl: #5eead4; }
.sf-hero__slide.has-text:nth-child(4n+3) { --glow: #2563eb; --hl: #93c5fd; }
.sf-hero__slide.has-text:nth-child(4n+4) { --glow: #be185d; --hl: #f9a8d4; }

.sf-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.sf-hero__grid {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.5px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%);
    mask-image: linear-gradient(90deg, #000, transparent 60%);
}

.sf-hero__slide.has-text .sf-hero__content { padding: 40px 0 64px; }
.sf-hero__layout { display: grid; gap: 28px; align-items: center; }
.sf-hero__slide.has-text .sf-hero__copy { max-width: none; }

.sf-hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
    padding: 5px 12px; border-radius: 999px; font-size: .75rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
}
.sf-hero__dot-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--hl); }
.sf .sf-hero__slide.has-text .sf-hero__title { font-size: clamp(2rem, 1.25rem + 3vw, 3.6rem); line-height: 1.05; letter-spacing: -.035em; margin-bottom: 16px; }
.sf-hero__hl { color: var(--hl); }
.sf-hero__slide.has-text .sf-hero__text { color: rgba(255, 255, 255, .78); margin-bottom: 28px; }

.sf-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sf .sf-hero__cta { background: #fff; color: var(--sf-navy) !important; font-weight: 700; }
.sf .sf-hero__cta:hover { color: var(--sf-navy) !important; background: #f3f4f6; }
.sf-hero__cta .sf-ic { transition: transform .2s var(--sf-ease); }
.sf-hero__cta:hover .sf-ic { transform: translateX(3px); }
@media (max-width: 479px) { .sf-hero__cta-2 { display: none; } }

/* Copy fades up when its slide becomes active */
.sf-hero__slide.has-text .sf-hero__copy > * { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--sf-ease), transform .55s var(--sf-ease); }
.sf-hero__slide.has-text.is-active .sf-hero__copy > * { opacity: 1; transform: none; }
.sf-hero__slide.is-active .sf-hero__copy > :nth-child(2) { transition-delay: .06s; }
.sf-hero__slide.is-active .sf-hero__copy > :nth-child(3) { transition-delay: .12s; }
.sf-hero__slide.is-active .sf-hero__copy > :nth-child(4) { transition-delay: .18s; }

/* Picture in a clean card */
.sf-hero__visual { position: relative; justify-self: center; width: min(100%, 460px); }
.sf-hero__frame {
    display: block; padding: 8px; border-radius: 24px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .7);
    transition: transform .6s var(--sf-ease), opacity .6s;
}
.sf-hero__slide:not(.is-active) .sf-hero__frame { transform: scale(.96); opacity: .6; }
.sf-hero__frame img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 90% 50%; border-radius: 18px; background: #f1f5f9; }

@media (max-width: 767px) {
    .sf-hero__visual { width: min(66%, 260px); margin: 4px auto 0; }
}
@media (min-width: 768px) {
    .sf-hero__layout { grid-template-columns: 1.1fr .9fr; gap: 56px; }
    .sf-hero__slide.has-text .sf-hero__content { padding: 56px 0 76px; }
}

/* Slider controls */
.sf-hero__dot.is-active { background: #fff; }
.sf-hero__arrow { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.sf-hero__arrow:hover { background: #fff; color: var(--sf-navy); }

/* No banners yet: the welcome block uses the same navy */
.sf-welcome {
    background:
        radial-gradient(55% 85% at 85% 50%, rgba(79, 70, 229, .5), transparent 70%),
        linear-gradient(135deg, var(--sf-navy), var(--sf-navy-2));
}

@media (prefers-reduced-motion: reduce) {
    .sf-hero__slide.has-text .sf-hero__copy > * { opacity: 1; transform: none; transition: none; }
    .sf-hero__frame { transition: none; }
}

/* ---------- Home: products by category ---------- */
.sf-catshop__tabs {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 24px; padding: 2px 16px 4px;
}
.sf-catshop__tabs::-webkit-scrollbar { display: none; }
.sf .sf-catshop__tab {
    display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 16px; border-radius: 999px;
    border: 1px solid #e5e7eb; background: #fff; color: #374151 !important; font-weight: 600; font-size: .9rem; white-space: nowrap;
    transition: background .2s, border-color .2s, color .2s;
}
.sf .sf-catshop__tab:hover { border-color: var(--sf-indigo); color: var(--sf-indigo) !important; }
.sf .sf-catshop__tab.is-active { background: var(--sf-navy); border-color: var(--sf-navy); color: #fff !important; }
.sf-catshop__count {
    min-width: 24px; padding: 2px 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-align: center;
    background: #f3f4f6; color: #6b7280;
}
.sf-catshop__tab.is-active .sf-catshop__count { background: rgba(255, 255, 255, .16); color: #fff; }

.sf-catshop__panel { display: grid; gap: 20px; }
.sf-catshop__panel[hidden] { display: none; }
.sf-catshop__intro {
    position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start;
    padding: 24px; border-radius: 18px; color: #fff;
    background:
        radial-gradient(80% 60% at 100% 0%, rgba(79, 70, 229, .55), transparent 70%),
        linear-gradient(160deg, var(--sf-navy), var(--sf-navy-2));
}
.sf-catshop__eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fbbf24; }
.sf .sf-catshop__name { margin: 6px 0 4px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.sf-catshop__meta { margin: 0 0 16px; color: rgba(255, 255, 255, .7); font-size: .9rem; }
.sf-catshop__subs { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sf .sf-catshop__subs a {
    display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: .8rem;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .9) !important;
    transition: background .2s;
}
.sf .sf-catshop__subs a:hover { background: rgba(255, 255, 255, .22); color: #fff !important; }
.sf .sf-catshop__all { margin-top: auto; background: #fff; color: var(--sf-navy) !important; }
.sf .sf-catshop__all:hover { background: #f3f4f6; color: var(--sf-navy) !important; }

/* Whole rows only: 4 cards on phones, 6 on three columns, 8 on four */
@media (max-width: 639px) { .sf-catshop__grid > :nth-child(n+5) { display: none; } }
@media (min-width: 640px) and (max-width: 1279px) { .sf-catshop__grid > :nth-child(n+7) { display: none; } }
@media (min-width: 1024px) {
    .sf-catshop__panel { grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: stretch; }
    .sf-catshop__intro { padding: 28px 24px; }
}

/* ---------- Section headings ---------- */
.sf .sf-section__title { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); font-weight: 800; letter-spacing: -.025em; color: var(--sf-navy); }
.sf-section__head { padding-bottom: 14px; border-bottom: 1px solid #eef0f4; align-items: center; }
.sf .sf-section__link {
    padding: 8px 14px; border-radius: 999px; border: 1px solid #e0e7ff; background: var(--sf-indigo-soft);
    color: var(--sf-indigo) !important; font-size: .85rem; transition: background .2s, border-color .2s;
}
.sf .sf-section__link:hover { background: var(--sf-indigo); border-color: var(--sf-indigo); color: #fff !important; }
.sf-rail__btn { border-color: #e5e7eb; color: #374151; }
.sf-rail__btn:hover:not([disabled]) { background: var(--sf-navy); border-color: var(--sf-navy); color: #fff; }

/* ---------- Product card ---------- */
.sf-pcard {
    padding: 10px; border: 1px solid #eceef3; border-radius: 16px; background: #fff;
    transition: transform .25s var(--sf-ease), box-shadow .25s, border-color .25s;
}
.sf-pcard__media { border-radius: 12px; }
@media (hover: hover) and (pointer: fine) {
    .sf-pcard:hover { transform: translateY(-4px); border-color: #e0e7ff; box-shadow: 0 18px 40px -22px rgba(11, 23, 54, .35); }
    .sf-pcard:hover .sf-pcard__img img { transform: scale(1.04); }
}
.sf-pcard__name a::after { border-radius: 16px; }
.sf-pcard__body { gap: 4px; padding: 12px 4px 2px; }
.sf-pcard__brand { color: var(--sf-indigo); font-size: .7rem; letter-spacing: .08em; }
.sf .sf-pcard__name { font-weight: 600; color: var(--sf-navy); font-size: .92rem; }
.sf-pcard__name a { color: inherit !important; }
.sf .sf-pcard:hover .sf-pcard__name a { color: var(--sf-indigo) !important; }
.sf-pprice .sf-price { font-size: 1.08rem; font-weight: 800; color: var(--sf-navy); }
.sf-pprice .sf-price--sale { color: #dc2626; }
.sf-pcard .sf-badge { border-radius: 6px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; }
.sf-pcard .sf-badge--accent { background: #dc2626; }
.sf-pcard__wish { box-shadow: 0 2px 8px rgba(11, 23, 54, .12); }
.sf-pcard__wish:hover { color: #dc2626; }
.sf-pcard__quick:hover { background: var(--sf-navy); }

/* Price on its own line, a full-width button under it */
.sf-pcard__foot { flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.sf-pcard__foot > .sf-pprice { flex: 1 1 100%; }
.sf .sf-pcard__add {
    flex: 1 1 100%; width: auto; height: 40px; gap: 8px; border-radius: 10px; border: 0;
    background: var(--sf-navy); color: #fff; font: inherit; font-size: .85rem; font-weight: 600;
}
.sf .sf-pcard__add:hover { background: var(--sf-indigo); color: #fff; }
.sf .sf-pcard__add.is-disabled { opacity: 1; background: #f3f4f6; color: #9ca3af; }
.sf .sf-pcard__add.is-done { background: var(--sf-success); color: #fff; }
.sf-pcard__add.is-loading::after { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.sf-pcard__add.is-loading .sf-pcard__add-label, .sf-pcard__add.is-loading .sf-ic { visibility: hidden; }
@media (max-width: 379px) { .sf-pcard__add-label { font-size: .78rem; } }

/* List mode keeps a compact button beside the price */
.sf-products.is-list .sf-pcard { padding: 10px; }
.sf-products.is-list .sf-pcard__foot > .sf-pprice { flex: 0 1 auto; }
.sf .sf-products.is-list .sf-pcard__add { flex: 0 0 auto; padding: 0 18px; }
