/* ============================================================================
   Prima pagina - redesign oct 2026 (views/site/index.php, assets/HomePageAsset.php)

   Aspect de marketplace: fond alb, placi deschise, fotografii mari. Totul sta sub
   .hp, ca restul site-ului sa ramina neatins. Culorile de brand vin din tokens.css
   (var(--c-brand, ...)), deci tema altui brand le schimba fara alt CSS.
   Benzile de produse sint .products-rail native (goods-grid.css); aici doar
   capul de sectiune, latimea pe desktop si eticheta de reducere.
   ============================================================================ */

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/manrope-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

.hp {
    --hp-brand: var(--c-brand, #1e50c8);
    --hp-brand-deep: var(--c-brand-strong, #042f80);
    --hp-tint: #eef3fd;
    --hp-tint-2: #e8eefb;        /* hover pe placile de categorie */
    --hp-surface: #f3f5f9;
    --hp-line: #e4e8f0;
    --hp-ink: #0f1729;
    --hp-ink-2: #4a5468;
    --hp-sale: var(--c-sale-5, #e52e22);
    --hp-sale-text: #c4231a;     /* rosu pentru text mic pe alb: 4.5:1 */
    --hp-amber: #fff4d6;
    --hp-amber-ink: #5c4a14;
    --hp-radius: 16px;
    --hp-gap: 48px;
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--hp-ink);
    padding-top: 12px;
}

/* nuantele deschise urmeaza culoarea brandului (tema altui brand nu ramine cu albastru) */
@supports (color: color-mix(in srgb, red 50%, white)) {
    .hp {
        --hp-tint: color-mix(in srgb, var(--hp-brand) 8%, #fff);
        --hp-tint-2: color-mix(in srgb, var(--hp-brand) 11%, #fff);
    }
}

.hp ::selection { background: var(--hp-brand); color: #fff; }
.hp a:focus-visible,
.hp button:focus-visible {
    outline: 2px solid var(--hp-brand);
    outline-offset: 2px;
}
.hp-ico { display: block; flex: none; }

/* ---------- cap de sectiune ---------- */
.hp-head,
.hp .products-rail-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin: 0 0 18px;
}
.hp-head h2,
.hp .products-rail-head h2 {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--hp-ink);
    text-align: left;
}
.hp-head__note {
    font-size: 15px;
    font-weight: 600;
    color: var(--hp-ink-2);
}
.hp-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    font-size: 15px;
    font-weight: 700;
    color: var(--hp-brand);
    text-decoration: none;
    white-space: nowrap;
}
.hp-more:hover { color: var(--hp-brand-deep); text-decoration: none; }
/* sagetile din initProductRails stau dupa link */
.hp .products-rail-head { align-items: center; }
.hp .products-rail-head .hp-more + .products-rail-nav { margin-left: 4px; }
.hp .products-rail-head .hp-head__note + .products-rail-nav { margin-left: auto; }

.hp-section,
.hp .products-rail-section {
    margin: var(--hp-gap) 0 0;
}

/* ---------- prima vedere: banner + doua placi ---------- */
.hp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 29%, 420px);
    gap: 16px;
}
.hp-hero--nobanner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hp-hero--nobanner .hp-hero__side { display: contents; }

.hp-hero__banner {
    position: relative;
    min-width: 0;
    border-radius: 20px;
    overflow: hidden;
    background: var(--hp-surface);
    aspect-ratio: 1474 / 433;
}
.hp-hero__banner .wrap_product_Carousel,
.hp-hero__banner div.product_Carousel {
    width: 100%;
    margin: 0;
    padding: 0;
}
.hp-hero__banner .item_slider,
.hp-hero__banner .item_slider a { display: block; }
.hp-hero__banner .item_slider img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1474 / 433;
    object-fit: cover;
}
/* baza din webshopStyles74 da .owl-wrapper-outer margin-top: 40px (fisia goala de deasupra bannerului) */
.hp-hero__banner .owl-wrapper-outer { margin: 0 !important; }
/* Paginarea Owl Carousel devine o bara scurta de progres, dreapta-jos: cu ~20 de
   bannere bulinele acopereau o treime din banner. Latimea barei nu depinde de numar. */
.hp-hero__banner .owl-controls {
    position: absolute;
    right: 18px;
    bottom: 16px;
    margin: 0 !important;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 41, .35);
}
.hp-hero__banner .owl-pagination { display: flex; width: 120px; gap: 2px; }
.hp-hero__banner .owl-controls .owl-page { display: block; flex: 1 1 0; min-width: 0; zoom: normal; }
.hp-hero__banner .owl-controls .owl-page span {
    display: block;
    width: 100%;
    height: 4px;
    margin: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, .35);
    opacity: 1;
    transition: background-color .2s ease;
}
.hp-hero__banner .owl-controls .owl-page.active span { background: #fff; }
.hp-hero__banner .owl-buttons { display: none; }

.hp-hero__side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.hp-tile {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    min-height: 128px;
    padding: 20px 120px 20px 24px;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s ease;
}
.hp-tile:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -12px rgba(15, 23, 41, .35);
}
.hp-tile__title { font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.hp-tile__text { font-size: 14px; font-weight: 600; line-height: 1.35; }
.hp-tile__cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
}
.hp-tile__title, .hp-tile__text { position: relative; z-index: 1; }

.hp-tile--credit { background: var(--hp-brand); color: #fff; }
.hp-tile--credit:hover { color: #fff; }
.hp-tile--credit .hp-tile__text { color: rgba(255, 255, 255, .85); }
.hp-tile__art {
    position: absolute;
    right: -6px;
    bottom: -22px;
    font-size: 104px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
    color: rgba(255, 255, 255, .16);
    pointer-events: none;
}

.hp-tile--gift { background: var(--hp-amber); color: var(--hp-ink); }
.hp-tile--gift:hover { color: var(--hp-ink); }
.hp-tile--gift .hp-tile__text { color: var(--hp-amber-ink); }
.hp-tile--gift .hp-tile__cta { color: var(--hp-brand); }
.hp-tile__icon {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #ffe7a3;
    color: #8a6100;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- avantaje ---------- */
.hp-adv {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--hp-adv-n, 4), minmax(0, 1fr)); /* 2-4, dupa brand */
    border: 1px solid var(--hp-line);
    border-radius: var(--hp-radius);
}
.hp-adv li + li { border-left: 1px solid var(--hp-line); }
.hp-adv a {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 16px 20px;
    color: var(--hp-ink);
    text-decoration: none;
}
.hp-adv a:hover { color: var(--hp-ink); text-decoration: none; }
.hp-adv a:hover b { color: var(--hp-brand); }
.hp-adv__ico {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--hp-tint);
    color: var(--hp-brand);
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-adv__ico--amber { background: var(--hp-amber); color: #8a6100; }
.hp-adv b { display: block; font-size: 15px; font-weight: 800; line-height: 1.25; transition: color .15s ease; }
.hp-adv small { display: block; font-size: 13px; font-weight: 500; color: var(--hp-ink-2); }

/* ---------- categorii populare ---------- */
.hp-cats {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}
.hp-cat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 12px 14px 16px;
    border: 0;
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    color: var(--hp-ink);
    font: inherit;
    text-align: left;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s cubic-bezier(.2, .7, .2, 1);
}
.hp-cat:hover { background: var(--hp-tint-2); color: var(--hp-ink); text-decoration: none; transform: translateY(-2px); }
.hp-cat__img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    margin-bottom: 4px;
}
.hp-cat__img img {
    display: block;
    width: auto;
    height: auto;
    max-width: 86%;
    max-height: 112px;
    object-fit: contain;
    mix-blend-mode: multiply; /* fondul alb al pozei dispare in placa */
    transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}
.hp-cat:hover .hp-cat__img img { transform: scale(1.05); }
.hp-cat__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}
.hp-cat__sale { font-size: 13px; font-weight: 700; color: var(--hp-sale-text); }
.hp-cat--all {
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    background: var(--hp-tint);
    color: var(--hp-brand);
    cursor: pointer;
}
.hp-cat--all:hover { color: var(--hp-brand-deep); }
.hp-cat--all .hp-cat__name { min-height: 0; font-weight: 800; }
.hp-cat__go {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--hp-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- produsele zilei ---------- */
.hp-deals__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}
.hp-deal {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--hp-line);
    border-radius: var(--hp-radius);
    background: #fff;
    color: var(--hp-ink);
    text-decoration: none;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.hp-deal:hover { color: var(--hp-ink); text-decoration: none; border-color: transparent; box-shadow: 0 10px 28px -10px rgba(15, 23, 41, .22); }
.hp-deal__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; }
.hp-deal__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hp-deal__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}
.hp-deal__prices { margin-top: auto; display: flex; flex-direction: column; }
.hp-deal__prices s { font-size: 13px; font-weight: 600; color: #6b7487; }
.hp-deal__prices b { font-size: 21px; font-weight: 800; color: var(--hp-sale-text); }

/* ---------- eticheta de reducere (carduri + produsele zilei) ---------- */
.hp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--hp-sale);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}

/* ---------- benzile de produse ---------- */
.hp .Content_Goods_Group[view=icon].products-rail > .Content_Goods_ItemBlock {
    border-radius: var(--hp-radius) !important;
    border-color: var(--hp-line) !important;
}
.hp .products-rail .Content_Goods_ItemBlock_ImageArea { position: relative; }
@media (min-width: 1200px) {
    .hp .Content_Goods_Group[view=icon].products-rail {
        --rail-gap: 16px;
        --rail-visible: 6;
    }
}

/* "Top vanzari": locul in clasament, din numaratoarea cardurilor */
.hp-rail--top .products-rail { counter-reset: hp-rank; }
.hp-rail--top .Content_Goods_ItemBlock { counter-increment: hp-rank; }
.hp-rail--top .Content_Goods_ItemBlock_ImageArea::before {
    content: counter(hp-rank);
    position: absolute;
    top: 0;
    left: -8px;
    z-index: 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--hp-ink);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 30px;
    text-align: center;
    pointer-events: none;
}
.hp .products-rail .hp-badge { top: 0; left: -8px; }
.hp-rail--top .products-rail .hp-badge { left: auto; right: -8px; }

/* ---------- branduri ---------- */
.hp-brands {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}
.hp-brands > li { min-width: 0; }
.hp-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 76px;
    padding: 0 18px;
    border: 1px solid var(--hp-line);
    border-radius: var(--hp-radius);
    background: #fff;
    color: var(--hp-ink);
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.hp-brand:hover { color: var(--hp-ink); text-decoration: none; border-color: #c9d5ee; box-shadow: 0 8px 20px -10px rgba(15, 23, 41, .2); }
.hp-brand__logo { flex: 0 0 92px; height: 40px; display: flex; align-items: center; justify-content: center; }
.hp-brand__logo img { max-width: 92px; max-height: 40px; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; }
.hp-brand__count { font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--hp-ink-2); }

/* ---------- vizualizate recent ---------- */
.hp-recent:not(:empty) { margin-top: var(--hp-gap); }
.hp-recent .recently-viewed-area {
    margin: 0;
    padding: 24px 24px 14px;
    border-radius: 24px;
    background: var(--hp-surface);
}
.hp-recent .products-rail-head h2 { font-size: 22px; }

/* ---------- text SEO (restrins pina la "Citeste mai mult") ---------- */
.hp-seo { margin: var(--hp-gap) 0 0; }
.hp-seo .container { max-width: none; padding: 0; }
.hp-seo .row { margin: 0; }
.hp-seo .row > .col { padding: 0; }
.hp-seo__body { position: relative; }
.hp-seo.is-collapsed .hp-seo__body { max-height: 170px; overflow: hidden; }
.hp-seo.is-collapsed .hp-seo__body::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}
.hp-seo__toggle {
    margin-top: 8px;
    padding: 6px 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--hp-brand);
    cursor: pointer;
}
.hp-seo__toggle:hover { color: var(--hp-brand-deep); }
/* !important: h1-ul din textul de brand vine cu style="font-size: 28px; font-weight: 600" inline */
.hp .hp-seo h1,
.hp .hp-seo h2,
.hp .hp-seo h3 {
    font-family: inherit;
    font-size: 20px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--hp-ink) !important;
    text-align: left !important; /* textul din BrandContentHelper vine cu centrare proprie */
    margin: 0 0 10px;
}
.hp .hp-seo p,
.hp .hp-seo li {
    max-width: 75ch;
    font-size: 15px;
    line-height: 1.65;
    color: var(--hp-ink-2);
}

/* ---------- tableta ---------- */
@media (max-width: 1199.98px) {
    .hp-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .hp-brands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hp-adv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-adv li:nth-child(3) { border-left: 0; }
    .hp-adv li:nth-child(n+3) { border-top: 1px solid var(--hp-line); }
}
@media (max-width: 991.98px) {
    .hp { --hp-gap: 40px; }
    .hp-hero { grid-template-columns: minmax(0, 1fr); }
    .hp-hero__side { flex-direction: row; }
    .hp-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hp-deals__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- telefon ---------- */
@media (max-width: 767.98px) {
    .hp { --hp-gap: 36px; padding-top: 8px; }
    .hp-head h2,
    .hp .products-rail-head h2 { font-size: 21px; }
    .hp-head, .hp .products-rail-head { margin-bottom: 14px; }
    .hp-head__note { display: none; }
    .hp-more { font-size: 14px; }
    /* pe telefon banda se deruleaza cu degetul: sagetile doar ar impinge titlul pe doua rinduri */
    .hp .products-rail-head .products-rail-nav { display: none !important; }
    .hp-head h2,
    .hp .products-rail-head h2 { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .hp-hero { gap: 10px; }
    .hp-hero__banner { border-radius: 16px; aspect-ratio: 768 / 225; }
    .hp-hero__banner .item_slider img { aspect-ratio: 768 / 225; }
    .hp-hero__banner .owl-controls { right: 8px; bottom: 8px; padding: 4px 6px; }
    .hp-hero__banner .owl-pagination { width: 64px; gap: 1px; }
    .hp-hero__banner .owl-controls .owl-page span { height: 3px; }
    .hp-hero__side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hp-hero--nobanner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-tile { min-height: 118px; padding: 14px 14px 16px; border-radius: 16px; justify-content: flex-start; }
    .hp-tile__title { font-size: 19px; }
    .hp-tile__text { font-size: 13px; max-width: 92%; }
    .hp-tile__cta { margin-top: auto; font-size: 13px; }
    .hp-tile__art { display: none; } /* pe placa ingusta "0%" se suprapunea cu titlul */
    .hp-tile__icon { display: none; }

    /* un singur rind derulat: categoriile urca in primul ecran */
    .hp-adv {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        margin: 12px -12px 0;
        padding: 0 12px;
        border: 0;
        border-radius: 0;
    }
    .hp-adv::-webkit-scrollbar { display: none; }
    .hp-adv li { flex: none; }
    /* creditul e deja pe placa albastra de deasupra */
    .hp-adv li:first-child { display: none; }
    .hp-adv li + li,
    .hp-adv li:nth-child(n+3) { border: 0; }
    .hp-adv a { padding: 8px 14px 8px 8px; gap: 10px; border-radius: 12px; background: var(--hp-surface); white-space: nowrap; }
    .hp-adv__ico { width: 34px; height: 34px; border-radius: 10px; background: #fff; }
    .hp-adv__ico .hp-ico { width: 20px; height: 20px; }
    .hp-adv b { font-size: 13px; }
    .hp-adv small { display: none; }

    .hp-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .hp-cat { padding: 8px 8px 10px; border-radius: 14px; gap: 4px; }
    .hp-cat__img { height: 76px; margin-bottom: 2px; }
    .hp-cat__img img { max-height: 72px; }
    .hp-cat__name { font-size: 13px; }
    .hp-cat__sale { font-size: 12px; }
    .hp-cat__go { width: 40px; height: 40px; }
    .hp-cat--all { gap: 8px; }

    .hp-deals__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

    .hp-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .hp-brand { height: 60px; padding: 0 10px; justify-content: center; border-radius: 12px; }
    .hp-brand__logo { flex: 1 1 auto; height: 30px; }
    .hp-brand__logo img { max-width: 100%; max-height: 30px; }
    .hp-brand__count { display: none; }

    .hp-recent .recently-viewed-area { margin: 0 -12px; padding: 20px 12px 10px; border-radius: 0; }
    .hp-recent .products-rail-head h2 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    .hp-tile, .hp-cat, .hp-cat__img img, .hp-brand, .hp-deal { transition: none; }
    .hp-tile:hover, .hp-cat:hover { transform: none; }
    .hp-cat:hover .hp-cat__img img { transform: none; }
}
