/* =====================================================================
   electro_storefront — home page (phase 2)

   Sections: hero slideshow, category families, section rhythm,
   proof strip, recently-viewed rail.
   ===================================================================== */

/* ------------------------------------------------------------ hero area */
.sf-hero-area {
    padding-block: 1.1em;
    background: var(--sf-body-bg);
}

.sf-hero-area__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.sf-hero {
    position: relative;
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: var(--sf-radius);
    overflow: hidden;
}

.sf-hero-area__inner.has-departments { grid-template-columns: 232px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.sf-hero-departments { border: 1px solid var(--sf-border); border-radius: var(--sf-radius); overflow: hidden; }
.sf-hero-departments h2 { font-size: 1rem; font-weight: 700; padding: 14px; margin: 0; background: var(--sf-primary); color: #222; }
.sf-hero-departments ul { margin: 0; }
.sf-hero-departments li > a, .sf-hero-departments li > span { display: flex; justify-content: space-between; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--sf-border); }
@media (max-width: 991px) { .sf-hero-area__inner.has-departments { grid-template-columns: minmax(0,1fr); } .sf-hero-departments { display: none; } }
/* ------------------------------------------------------- hero track */
.sf-hero__track {
    display: grid;
}

.sf-hero__slide {
    grid-area: 1 / 1;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility .5s;
}

.sf-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
}

.sf-hero__media {
    display: block;
    position: relative;
    aspect-ratio: 1200 / 420;
    background: #f7f7f7;
}

.sf-hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-hero__slide.is-artwork-only .sf-hero__media {
    aspect-ratio: 1200 / 380;
}

.sf-hero__slide.is-artwork-only .sf-hero__media img {
    object-fit: contain;
}

/* ------------------------------------------------------- hero copy */
.sf-hero__copy {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    max-width: min(44%, 440px);
    padding: 24px 34px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .95) 55%, rgba(255, 255, 255, .55) 78%, rgba(255, 255, 255, 0) 100%);
    text-align: start;
}

[dir="rtl"] .sf-hero__copy {
    background: linear-gradient(270deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .86) 60%, rgba(255, 255, 255, 0) 100%);
}

.sf-hero__eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sf-primary-active);
}

.sf-hero__title {
    font-size: clamp(20px, 3vw, 34px);
    font-weight: 600;
    line-height: 1.15;
    color: var(--sf-dark);
    margin: 0;
}

.sf-hero__subtitle {
    font-size: 14px;
    line-height: 1.6;
    color: var(--sf-text-muted);
    margin: 0;
}

.sf-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.sf-hero__cta {
    min-height: 44px;
    align-self: flex-start;
}

/* ---------------------------------------------------- hero controls */
.sf-hero__controls {
    position: absolute;
    inset-block-end: 14px;
    inset-inline-end: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    padding: 6px 10px;
    backdrop-filter: blur(4px);
}

.sf-hero__nav {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: 50%;
    color: var(--sf-dark);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.sf-hero__nav:hover {
    background: var(--sf-primary);
    border-color: var(--sf-primary);
    color: #000;
}

.sf-hero__dots {
    display: flex;
    gap: 6px;
}

.sf-hero__dots button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 0;
    background: rgba(51, 62, 72, .3);
    cursor: pointer;
    padding: 0;
    transition: background .2s ease, width .2s ease;
}

.sf-hero__dots button.is-active,
.sf-hero__dots button.active {
    background: var(--sf-primary);
    width: 22px;
    border-radius: 5px;
}

.sf-hero__toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: 50%;
    color: var(--sf-dark);
    cursor: pointer;
}

.sf-hero__toggle:hover {
    background: var(--sf-primary);
    color: #000;
}

/* -------------------------------------------------- hero fallback */
.sf-hero--fallback {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    min-height: 300px;
}

.sf-hero--fallback .sf-hero__copy {
    position: static;
    max-width: none;
    background: none;
    padding: 34px 38px;
    justify-content: center;
}

.sf-hero__discovery {
    border-inline-start: 1px solid var(--sf-border);
    padding: 26px 30px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--sf-accent-light, #fafafa);
}

.sf-hero__discovery-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--sf-text-muted);
    margin: 0 0 12px;
}

.sf-hero__discovery a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 2px;
    border-block-end: 1px solid #efefef;
    font-size: 14px;
    color: var(--sf-dark);
}

.sf-hero__discovery a b {
    color: var(--sf-primary-active);
    font-weight: 400;
}

.sf-hero__discovery a:hover {
    color: var(--sf-primary-active);
    text-decoration: none;
}

/* ------------------------------------------------------ section rhythm */
.sf-home-section {
    padding-block: 1.3em;
}

.sf-home-section--soft {
    background: #fafafa;
}

.sf-home-section--deals .sf-section-head__title {
    color: var(--sf-dark);
}

.sf-home-recent {
    padding-block: 1.7em 2.6em;
}

/* ------------------------------------------------------ section head */
.sf-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-block-end: 1.05em;
    padding-block-end: .7em;
    border-block-end: 1px solid var(--sf-border);
    position: relative;
}

/* Electro signature: short yellow tick under the heading. */
.sf-section-head::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: -1px;
    width: 84px;
    height: 2px;
    background: var(--sf-primary);
}

.sf-section-head__title {
    font-size: 1.29em;
    font-weight: 500;
    color: var(--sf-dark);
    margin: 0;
    line-height: 1.25;
}

.sf-section-head__link {
    font-size: 13px;
    font-weight: 500;
    color: var(--sf-text-muted);
    white-space: nowrap;
}

.sf-section-head__link:hover {
    color: var(--sf-primary-active);
    text-decoration: none;
}

.sf-section-head__link span {
    color: var(--sf-primary-active);
}

/* --------------------------------------------------- category families */
.sf-cat-families {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 14px;
}

.sf-cat-family {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--sf-border);
    background: #fff;
    border-radius: var(--sf-radius);
    overflow: hidden;
}

.sf-cat-family__main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

a.sf-cat-family__main:hover {
    background: #fafafa;
    text-decoration: none;
}

.sf-cat-family__media {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border: 1px solid var(--sf-border);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.sf-cat-family__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-cat-monogram {
    font-size: 20px;
    font-weight: 700;
    color: var(--sf-primary-active);
}

.sf-cat-family__icon-text {
    font-size: 20px;
    line-height: 1;
}

.sf-cat-family__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sf-cat-family__copy strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--sf-dark);
}

.sf-cat-family__copy small {
    font-size: 12px;
    color: var(--sf-text-muted);
}

.sf-cat-family__arrow {
    margin-inline-start: auto;
    color: var(--sf-primary-active);
    font-size: 16px;
}

.sf-cat-family__children {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 14px;
    border-block-start: 1px solid #f2f2f2;
    padding-block-start: 12px;
}

.sf-cat-family__child {
    font-size: 12px;
    color: var(--sf-text-muted);
    padding: 4px 9px;
    background: #f7f7f7;
    border-radius: 3px;
}

a.sf-cat-family__child:hover {
    background: var(--sf-primary);
    color: #000;
    text-decoration: none;
}

.sf-cat-family__child.is-structural {
    opacity: .65;
}

.sf-cat-family.is-structural .sf-cat-family__arrow {
    display: none;
}

/* -------------------------------------------------------- proof strip */
.sf-proof {
    background: #fff;
    border-block: 1px solid var(--sf-border);
    padding-block: 1.5em;
}

.sf-proof__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.sf-proof__item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--sf-primary-active);
}

.sf-proof__item svg {
    flex-shrink: 0;
}

.sf-proof__glyph {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
}

.sf-proof__item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sf-dark);
}

.sf-proof__item small {
    display: block;
    font-size: 12px;
    color: var(--sf-text-muted);
}

/* ------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
    .sf-hero__media { aspect-ratio: 4 / 3; }
    .sf-hero__copy { max-width: 60%; }
    .sf-hero--fallback { grid-template-columns: minmax(0, 1fr); }
    .sf-hero__discovery { border-inline-start: 0; border-block-start: 1px solid var(--sf-border); }
    .sf-cat-families { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 767.98px) {
    .sf-hero__media { aspect-ratio: 1 / 1; }
    .sf-hero__copy {
        position: static;
        max-width: none;
        background: #fff;
        border-block-end: 1px solid var(--sf-border);
        padding: 18px 18px 20px;
    }
    .sf-hero__controls { inset-block-end: 10px; inset-inline-end: 10px; }
    .sf-proof__grid { gap: 14px; }
    .sf-section-head__link { font-size: 12px; }
    .sf-cat-families { grid-template-columns: minmax(0, 1fr); }
}
