/* A Fior di Pelle - Vertical Hero. Scoped to this module; no OpenCart core overrides. */
.afp-hero { position: relative; isolation: isolate; width: 100%; max-width: none; margin-bottom: 0; }
.afp-hero--bleed { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }
.afp-hero__scene { position: relative; display: block; height: var(--afp-desktop-height, 85svh); min-height: 380px; width: 100%; background: #181818; overflow: hidden; }
.afp-hero__media { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.afp-hero__video { object-fit: cover; }
.afp-hero__scene:has(.afp-hero__title)::after { content:""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg,rgba(0,0,0,.02) 25%,rgba(0,0,0,.34) 95%); }
.afp-hero__cover-link { position: absolute; z-index: 4; inset: 0; display: block; }
.afp-hero__cover-link:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.afp-hero__content { z-index: 3; position: absolute; left: 6%; bottom: 11%; width: 88%; color: #fff; pointer-events: none; }
.afp-hero__title { margin: 0 0 18px; max-width: 900px; color: #fff; font-weight: 300; font-size: clamp(28px,4.3vw,68px); letter-spacing: .05em; line-height: 1.12; text-shadow: 0 2px 25px rgba(0,0,0,.28); }
.afp-hero__button { display: inline-block; border: 1px solid rgba(255,255,255,.85); padding: 10px 22px; text-transform: uppercase; font-size: 12px; font-weight: 500; letter-spacing: .14em; }
@media(max-width: 767px) {
  .afp-hero__scene { height: var(--afp-mobile-height, 70svh); min-height: 300px; }
  .afp-hero__content { left: 6%; bottom: 9%; width: 88%; }
  .afp-hero__title { font-size: clamp(26px,8vw,43px); }
}
/* Motion relies on native vertical page scroll, so content below remains reachable. */
@media(prefers-reduced-motion: reduce) { .afp-hero * { animation: none !important; transition: none !important; } }
/* AFP - Stacked Scroll Reveal */
.afp-hero--stacked .afp-hero__scene {
    position: sticky;
    bottom: 0;
    height: calc(100vh - var(--afp-header-offset, 0px));
    height: calc(100dvh - var(--afp-header-offset, 0px));
    min-height: 0;
}

/* Accessibilità: scorrimento normale con movimento ridotto */
@media (prefers-reduced-motion: reduce) {
    .afp-hero--stacked .afp-hero__scene {
        position: relative;
        bottom: auto;
    }
}


/* AFP - Menu compatto, solo home con Hero Verticale */

body.afp-compact-enabled {
    --afp-compact-height: 60px;
}

.afp-hero.afp-hero--compact-ready {
    --afp-header-offset: var(--afp-compact-height);
}

#afp-compact-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1035;
    background: #fff;
    color: #292929;
    box-shadow: 0 2px 12px rgba(0,0,0,.09);
    font-family: Inter, Arial, sans-serif;
}

#afp-compact-header [hidden],
#afp-compact-header[hidden] {
    display: none !important;
}

#afp-compact-header .afp-compact-row {
    height: var(--afp-compact-height);
    display: grid;
    grid-template-columns: 1fr minmax(0, 2fr) 1fr;
    align-items: center;
    padding: 0 14px;
    gap: 5px;
}

#afp-compact-header .afp-compact-left {
    justify-self: start;
}

#afp-compact-header .afp-compact-right {
    justify-self: end;
    display: flex;
    gap: 2px;
}

#afp-compact-header .afp-compact-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #292929;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    min-width: 0;
}

#afp-compact-header .afp-compact-logo img {
    display: block;
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
}

#afp-compact-header .afp-compact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #292929;
    border: 0;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    text-decoration: none;
    font-size: 20px;
    cursor: pointer;
}

#afp-compact-header .afp-compact-icon[aria-expanded="true"] {
    background: #f4f1ed;
}

#afp-compact-header .afp-compact-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - var(--afp-compact-height));
    max-height: calc(100dvh - var(--afp-compact-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    padding: 16px 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,.13);
}

#afp-compact-header .afp-compact-search {
    left: auto;
    right: 0;
}

#afp-compact-header .afp-compact-item {
    border-bottom: 1px solid #e9e5e0;
}

#afp-compact-header .afp-compact-item a,
#afp-compact-header summary {
    display: block;
    padding: 12px 0;
    color: #292929;
    text-decoration: none;
    font-size: 14px;
}

#afp-compact-header summary {
    display: list-item;
    cursor: pointer;
}

#afp-compact-header .afp-compact-children {
    padding-left: 18px;
}

#afp-compact-header form {
    display: flex;
    gap: 8px;
    margin: 0;
}

#afp-compact-header input {
    flex: 1;
    min-width: 0;
    font-size: 16px;
}

#afp-compact-header :focus-visible {
    outline: 2px solid #6d5444;
    outline-offset: 2px;
}

@media (max-width: 767px) {

    body.afp-compact-enabled {
        --afp-compact-height: 56px;
    }

    #afp-compact-header .afp-compact-row {
        padding: 0 6px;
        grid-template-columns: 90px minmax(0,1fr) 90px;
    }

    #afp-compact-header .afp-compact-logo img {
        max-height: 36px;
    }

    #afp-compact-header .afp-compact-panel {
        max-width: none;
    }
}


/* ==========================================
   AFP - Intestazione iniziale compatta Mobile
   Solo Home con Hero Verticale
   ========================================== */

@media (max-width: 767px) {

    /* Intestazione principale */
    body:has(#common-home .afp-hero) header {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    /* Riduzione logo */
    body:has(#common-home .afp-hero) header #logo {
        margin: 0 auto 10px !important;
        padding: 0 !important;
        text-align: center;
    }

    body:has(#common-home .afp-hero) header #logo img {
        display: block;
        width: auto !important;
        height: auto !important;
        max-width: 210px !important;
        max-height: 70px !important;
        margin: 0 auto !important;
    }

    /* Riduzione spazi della riga principale */
    body:has(#common-home .afp-hero) header .row:has(#logo) {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    body:has(#common-home .afp-hero) header
    .row > div:has(#logo),
    body:has(#common-home .afp-hero) header
    .row > div:has(#search),
    body:has(#common-home .afp-hero) header
    .row > div:has(#cart) {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Campo ricerca */
    body:has(#common-home .afp-hero) header #search {
        margin-top: 0 !important;
        margin-bottom: 8px !important;
    }

    body:has(#common-home .afp-hero) header #search input,
    body:has(#common-home .afp-hero) header #search button {
        height: 44px !important;
    }

    /* Carrello */
    body:has(#common-home .afp-hero) header #cart {
        margin-top: 0 !important;
        margin-bottom: 4px !important;
    }

    body:has(#common-home .afp-hero) header #cart > .btn {
        min-height: 44px;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    /* Spazio sotto il menu categorie */
    body:has(#common-home .afp-hero) #menu {
        margin-bottom: 8px !important;
    }

}


/* AFP - Riduzione divisori intestazione Mobile */

@media (max-width: 767px) {

    /* Divisorio sopra il logo */
    body:has(#common-home .afp-hero) #top {
        margin-bottom: 0 !important;
        border-bottom: 1px solid #e5ddd3 !important;
    }

    body:has(#common-home .afp-hero) header {
        margin-top: 0 !important;
    }

    /* Divisorio sotto il menu Categorie */
    body:has(#common-home .afp-hero) #menu {
        margin-bottom: 0 !important;
    }

    body:has(#common-home .afp-hero) #common-home,
    body:has(#common-home .afp-hero) #common-home #content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body:has(#common-home .afp-hero) .afp-hero {
        margin-top: 0 !important;
        border-top: 1px solid #e5ddd3;
    }

}


/* AFP - Uniforma pulsanti Lingua e Valuta */

@media (max-width: 767px) {

    body:has(#common-home .afp-hero)
    #top #form-language .btn-group > .btn,
    body:has(#common-home .afp-hero)
    #top #form-currency .btn-group > .btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 5px;
        height: 38px !important;
        min-height: 38px !important;
        padding: 6px 10px !important;
        white-space: nowrap !important;
    }

    body:has(#common-home .afp-hero)
    #top #form-language .btn img {
        width: 16px !important;
        height: auto !important;
        margin: 0 !important;
    }

}


/* AFP - Ottimizzazione inquadratura Desktop */

@media (min-width: 768px) {

    .afp-hero .afp-hero__media {
        object-fit: cover !important;
        object-position: center top !important;
    }

}


/* ==========================================
   AFP - Intestazione compatta Desktop
   Solo Home Page con Hero Verticale
   ========================================== */

@media (min-width: 768px) {

    /* Divisorio sopra il logo */
    body:has(#common-home .afp-hero) #top {
        margin-bottom: 0 !important;
        border-bottom: 1px solid #e5ddd3 !important;
    }

    /* Intestazione principale */
    body:has(#common-home .afp-hero) header {
        margin-top: 0 !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    /* Riduzione logo */
    body:has(#common-home .afp-hero) header #logo {
        margin: 0 !important;
        padding: 0 !important;
    }

    body:has(#common-home .afp-hero) header #logo img {
        display: block;
        width: auto !important;
        height: auto !important;
        max-width: min(270px, 100%) !important;
        max-height: 90px !important;
    }

    /* Allineamento logo, ricerca e carrello */
    body:has(#common-home .afp-hero)
    header > .container > .row:has(#logo) {
        display: flex;
        align-items: center;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    body:has(#common-home .afp-hero)
    header > .container > .row:has(#logo)::before,
    body:has(#common-home .afp-hero)
    header > .container > .row:has(#logo)::after {
        display: none;
    }

    /* Ricerca e carrello */
    body:has(#common-home .afp-hero) header #search,
    body:has(#common-home .afp-hero) header #cart {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Uniforma lingua e valuta */
    body:has(#common-home .afp-hero)
    #top #form-language .btn-group > .btn,
    body:has(#common-home .afp-hero)
    #top #form-currency .btn-group > .btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 5px;
        height: 38px !important;
        min-height: 38px !important;
        padding: 6px 10px !important;
        white-space: nowrap !important;
    }

    body:has(#common-home .afp-hero)
    #top #form-language .btn img {
        width: 16px !important;
        height: auto !important;
        margin: 0 !important;
    }

    /* Divisorio sotto il menu */
    body:has(#common-home .afp-hero) #menu {
        margin-bottom: 0 !important;
    }

    body:has(#common-home .afp-hero) #common-home,
    body:has(#common-home .afp-hero) #common-home #content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body:has(#common-home .afp-hero) .afp-hero {
        margin-top: 0 !important;
        border-top: 1px solid #e5ddd3;
    }

}


/* ==========================================
   AFP - Rifinitura titoli e pulsanti Hero
   ========================================== */

.afp-hero .afp-hero__title {
    font-weight: 300 !important;
    letter-spacing: .06em;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #ffffff !important;
    text-shadow: 0 2px 15px rgba(0,0,0,.35);
}

.afp-hero .afp-hero__button {
    background: #ffffff;
    color: #39332d;
    border: 1px solid #ffffff;
    padding: 13px 30px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .16em;
    border-radius: 2px;
    transition: background .25s ease, color .25s ease;
}

/* Effetto al passaggio del mouse */

@media (hover: hover) {

    .afp-hero__scene:hover .afp-hero__button {
        background: #c49a76;
        border-color: #c49a76;
        color: #ffffff;
    }

}

/* Titoli Desktop */

@media (min-width: 768px) {

    .afp-hero .afp-hero__title {
        font-size: clamp(30px, 3.3vw, 54px) !important;
    }

}

/* Titoli Smartphone */

@media (max-width: 767px) {

    .afp-hero .afp-hero__title {
        font-size: clamp(26px, 7vw, 36px) !important;
        margin-bottom: 15px;
    }

    .afp-hero .afp-hero__button {
        padding: 12px 24px;
        font-size: 11px;
    }

}











