/*
 * SC-025-FZ — home page in the Wecommerce layout (template imok/home/home.phtml, CMS blocks imok_home_*).
 * Loaded on cms_index_index only (layout imok_home.xml). Our own markup and CSS, scoped under .imok-hp.
 * The theme's custom.css forces Roboto with !important on text elements, hence the !important font-family.
 */

.imok-hp {
    --hp-orange: #ff701f;
    --hp-text: #1f2326;
    --hp-muted: #6b7076;
    --hp-body: #4a4f55;
    --hp-cream: #fff6f0;
    --hp-line: #ece7e3;
    --hp-green: #5a9e2f;
    color: var(--hp-text);
}

.imok-hp,
.imok-hp * {
    font-family: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
    box-sizing: border-box;
}

.imok-hp a,
.imok-hp a:hover,
.imok-hp a:focus {
    color: inherit;
    text-decoration: none;
}

.imok-hp img {
    display: block;
    max-width: 100%;
}

.imok-hp h1,
.imok-hp h2 {
    text-transform: none;
    color: var(--hp-text) !important;
}

/* ---------- hero ---------- */

.imok-hp .hp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
    min-height: 440px;
    margin-left: 0;
    padding: 28px 32px;
    background: var(--hp-cream);
}

.imok-hp .hp-eyebrow {
    margin: 0 0 10px;
    color: var(--hp-orange) !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.imok-hp .hp-hero h1 {
    margin: 0 0 14px;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.02em;
}

.imok-hp .hp-hero h1 em {
    font-style: normal;
    color: var(--hp-orange);
}

.imok-hp .hp-hero-text p {
    margin: 0 0 20px;
    color: var(--hp-body);
    font-size: 15px;
    line-height: 1.6;
}

.imok-hp .hp-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.imok-hp .hp-btn,
.imok-hp a.hp-btn {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 24px;
    border: 1.5px solid var(--hp-text);
    border-radius: 999px;
    background: transparent;
    color: var(--hp-text);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}

.imok-hp a.hp-btn:hover {
    background: var(--hp-text);
    color: #fff;
}

.imok-hp a.hp-btn--o,
.imok-hp a.hp-btn--o:hover,
.imok-hp a.hp-btn--o:focus {
    border-color: var(--hp-orange);
    background: var(--hp-orange);
    color: #fff;
}

.imok-hp a.hp-btn--o:hover {
    filter: brightness(.94);
}

.imok-hp .hp-hero-text .hp-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    background: #fff;
    color: var(--hp-body);
    font-size: 13px;
    line-height: 1.4;
}

.imok-hp .hp-pill b {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--hp-orange);
    color: #fff;
    font-size: 12px;
}

.imok-hp .hp-hero-img {
    position: relative;
    height: 380px;
    overflow: hidden;
    border-radius: 18px;
    background: #ddd;
}

.imok-hp .hp-hero-img img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.imok-hp .hp-hero-card {
    position: absolute;
    left: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    color: var(--hp-body);
    font-size: 12px;
}

.imok-hp .hp-hero-card b {
    display: block;
    color: var(--hp-text);
    font-size: 15px;
}

/* ---------- promise strip ---------- */

.imok-hp .hp-usp {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--hp-line);
}

.imok-hp .hp-usp-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--hp-muted);
    font-size: 13px;
    line-height: 1.4;
}

.imok-hp .hp-usp-item svg {
    flex: 0 0 26px;
}

.imok-hp .hp-usp-item b {
    display: block;
    color: var(--hp-text);
    font-size: 14px;
}

/* ---------- sections + heads ---------- */

.imok-hp .hp-sec {
    padding: 44px 0 8px;
}

.imok-hp .hp-sec--cream {
    margin: 32px -40px 0;
    padding: 44px 40px 36px;
    background: var(--hp-cream);
}

.imok-hp .hp-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 20px;
}

.imok-hp .hp-head h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.imok-hp .hp-head p {
    margin: 4px 0 0;
    color: var(--hp-muted);
    font-size: 14px;
}

.imok-hp .hp-head > a {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.imok-hp .hp-head > a:hover {
    color: var(--hp-orange);
}

/* ---------- category tiles ---------- */

.imok-hp .hp-tiles {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 16px;
}

.imok-hp .hp-tile {
    display: block;
    min-width: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.imok-hp .hp-tile-im {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--hp-line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .15s;
}

.imok-hp .hp-tile-im img {
    width: 78%;
    height: 78%;
    object-fit: contain;
}

.imok-hp .hp-tile:hover .hp-tile-im {
    border-color: var(--hp-orange);
}

.imok-hp .hp-tile-lb {
    display: block;
}

/* ---------- product cards ---------- */

.imok-hp .hp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.imok-hp .hp-card {
    min-width: 0;
}

/* the picture fills the box: the gap between picture and border is the same on every card */
.imok-hp .hp-card-im {
    position: relative;
    display: block;
    aspect-ratio: 400 / 350;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--hp-line);
    border-radius: 14px;
    background: #fff;
}

.imok-hp .hp-card-im img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.imok-hp .hp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--hp-green);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.imok-hp .hp-card-nm {
    display: -webkit-box;
    min-height: 2.7em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 15px;
    line-height: 1.35;
}

.imok-hp a.hp-card-nm:hover {
    color: var(--hp-orange);
}

.imok-hp .hp-card-pr {
    margin-top: 6px;
}

.imok-hp .hp-card-pr .price-box {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin: 0;
    padding: 0;
}

.imok-hp .hp-card-pr .price-box p {
    margin: 0;
}

.imok-hp .hp-card-pr .price-label {
    display: none;
}

.imok-hp .hp-card-pr .price {
    color: var(--hp-text) !important;
    font-size: 17px;
    font-weight: 800;
}

/* the theme gives .special-price padding-left: 14px — align the sale price with the other cards */
.imok-hp .hp-card-pr .special-price,
.imok-hp .hp-card-pr .old-price {
    margin: 0;
    padding-left: 0;
}

.imok-hp .hp-card-pr .special-price {
    order: 1;
}

.imok-hp .hp-card-pr .old-price {
    order: 2;
}

.imok-hp .hp-card-pr .old-price .price {
    color: #9aa0a6 !important;
    font-size: 12px;
    font-weight: 400;
    text-decoration: line-through;
}

/* ---------- promo banners ---------- */

.imok-hp .hp-promos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.imok-hp .hp-promo {
    position: relative;
    display: block;
    height: 300px;
    overflow: hidden;
    border-radius: 18px;
    background: #222;
}

.imok-hp .hp-promo img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform .3s;
}

.imok-hp .hp-promo:hover img {
    transform: scale(1.03);
}

.imok-hp .hp-promo-label {
    position: absolute;
    left: 18px;
    bottom: 18px;
    max-width: calc(100% - 36px);
    padding: 10px 16px;
    border-radius: 10px;
    background: #fff;
    color: var(--hp-muted);
    font-size: 13px;
}

.imok-hp .hp-promo-label b {
    display: block;
    color: var(--hp-text);
    font-size: 19px;
}

/* ---------- ordering steps ---------- */

.imok-hp .hp-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.imok-hp .hp-step {
    padding: 20px 22px;
    border-radius: 14px;
    background: var(--hp-cream);
    color: var(--hp-muted);
    font-size: 13px;
}

.imok-hp .hp-step b {
    display: block;
    margin-bottom: 6px;
    color: var(--hp-text);
    font-size: 16px;
}

/* ---------- about ---------- */

.imok-hp .hp-about {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 40px;
    align-items: center;
    padding: 56px 0 64px;
}

.imok-hp .hp-about h2 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.15;
}

.imok-hp .hp-about-text p {
    margin: 0 0 20px;
    color: var(--hp-body);
    font-size: 15px;
    line-height: 1.6;
}

.imok-hp .hp-box {
    padding: 28px;
    border-radius: 18px;
    background: var(--hp-cream);
}

.imok-hp .hp-box p {
    margin: 0;
}

.imok-hp .hp-box .hp-box-big {
    color: var(--hp-orange) !important;
    font-size: 52px;
    font-weight: 800;
    line-height: 1;
}

.imok-hp .hp-box .hp-box-note {
    margin-top: 6px;
    color: var(--hp-muted);
    font-size: 13px;
}

.imok-hp .hp-box .hp-box-row {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}

/* ---------- desktop band: always-open menu + hero, one height (SC-025 items 5 + 10) ---------- */

/*
 * The script at the end of imok/home/home.phtml sets html.imok-band-on only while the always-open panel is really
 * visible and the window is >= 1100px wide, and writes --imok-band-h = max(hero's natural height, the list's real
 * height). SC-041: the list height is the sum of the visible rows' own heights (each row's link, at least 32px), and
 * a row is never shorter than its content (flex: 1 0 auto), so the two-line "Lansete/ Rod pod-uri/ Suporturi" keeps
 * its two lines; when the hero is taller, the extra height is shared evenly. Hero and panel both take that height.
 * Without the class (no JS, < 1100px, panel hidden) the hero has no left offset and the panel keeps the
 * imok-header.css sizing.
 */
html body.cms-acasa .imok-hp .hp-hero {
    margin-left: 0;
}

html.imok-band-on body.cms-acasa .imok-hp .hp-hero {
    min-height: var(--imok-band-h, 440px);
    margin-left: 310px;
    border-left: 1px solid #f1e4da;
}

html.imok-band-on body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl {
    height: var(--imok-band-h, 440px) !important;
}

html.imok-band-on body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer,
html.imok-band-on body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer .nav-primary {
    height: 100% !important;
}

html.imok-band-on body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer .nav-primary > li.level0 {
    flex: 1 0 auto;
    min-height: 32px;
}

/*
 * SC-033 item 6 (CLS): the band is in place from the first paint. custom.css hides .navControl until miki.js calls
 * navControl.show() at DOM ready, so the script above could only switch html.imok-band-on on then, and the hero
 * was first painted full width (no 310px offset) and re-laid out about a second later. From 1100px (the script's
 * own threshold) the panel is shown and the band applied by CSS; the script still writes --imok-band-h (it now
 * sees the panel on its first run, while the page is parsed) and keeps the class for the rules above. :root lifts
 * these over the imok-header.css section 24/26 rules regardless of file order.
 */
@media only screen and (min-width: 1100px) {
    :root body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl {
        display: block;
        height: var(--imok-band-h, 440px) !important;
    }

    :root body.cms-acasa .imok-hp .hp-hero {
        min-height: var(--imok-band-h, 440px);
        margin-left: 310px;
        border-left: 1px solid #f1e4da;
    }

    :root body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer,
    :root body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer .nav-primary {
        height: 100% !important;
    }

    :root body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer .nav-primary > li.level0 {
        flex: 1 0 auto;
        min-height: 32px;
    }
}

/* ---------- 1001–1099px: the home page uses the inner pages' dropdown (SC-025 item 11) ---------- */

/*
 * Here the old theme wraps the dark link bar onto a second line under the panel, so there is no band: the hero is
 * full width (no imok-band-on, see above) and the panel behaves like on every other page — hidden until the green
 * CATEGORII PRODUSE button (#nav, which holds .navControl at > 900px) is hovered, tapped or focused, then shown as
 * the dropdown in the inner pages' white. miki.js calls navControl.show() on the home page (an inline
 * display:block) and binds no hover handlers there, so both the hiding and the opening are done here with
 * !important, which beats the inline style; :hover on #nav also covers the pointer moving into the panel.
 * The :not(.imok-band-on) only lifts the specificity over the home-page cream rules of imok-header.css.
 */
@media only screen and (min-width: 1001px) and (max-width: 1099px) {
    html:not(.imok-band-on) body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl {
        display: none !important;
    }

    html:not(.imok-band-on) body.cms-acasa #header-nav .nav-wrapp-m #nav:hover .navControl,
    html:not(.imok-band-on) body.cms-acasa #header-nav .nav-wrapp-m #nav:focus-within .navControl {
        display: block !important;
    }

    html:not(.imok-band-on) body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl,
    html:not(.imok-band-on) body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer {
        background-color: transparent;
    }

    html:not(.imok-band-on) body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer .nav-primary {
        background-color: #fff;
    }

    html:not(.imok-band-on) body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer .nav-primary > li.level0 {
        min-height: 40px;
        background-color: transparent;
    }

    html:not(.imok-band-on) body.cms-acasa #header-nav .nav-wrapp-m #nav .navControl .navFixer .nav-primary > li.level0:hover {
        background-color: #fff;
    }
}

/* ---------- breakpoints ---------- */

@media only screen and (max-width: 1279px) {
    .imok-hp .hp-hero h1 {
        font-size: 30px;
    }

    .imok-hp .hp-tiles {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media only screen and (max-width: 700px) {
    .imok-hp .hp-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 22px 16px;
    }

    .imok-hp .hp-hero h1 {
        font-size: 30px;
    }

    .imok-hp .hp-hero-img {
        height: 220px;
    }

    .imok-hp .hp-usp {
        grid-template-columns: 1fr 1fr;
        padding: 18px 16px;
    }

    .imok-hp .hp-sec,
    .imok-hp .hp-about {
        padding-left: 16px;
        padding-right: 16px;
    }

    .imok-hp .hp-sec--cream {
        margin: 24px 0 0;
    }

    .imok-hp .hp-promos {
        padding: 0 16px;
    }

    .imok-hp .hp-head h2 {
        font-size: 24px;
    }

    .imok-hp .hp-tiles {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .imok-hp .hp-tile {
        font-size: 12px;
    }

    .imok-hp .hp-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .imok-hp .hp-card-nm {
        font-size: 13px;
    }

    .imok-hp .hp-card-pr .price {
        font-size: 15px;
    }

    .imok-hp .hp-promos,
    .imok-hp .hp-steps,
    .imok-hp .hp-about {
        grid-template-columns: 1fr;
    }

    .imok-hp .hp-promo {
        height: 200px;
    }

    .imok-hp .hp-about h2 {
        font-size: 26px;
    }

    .imok-hp .hp-box .hp-box-big {
        font-size: 40px;
    }
}
