/* ==========================================================================
   AVstore — Homepage design layer
   --------------------------------------------------------------------------
   Aliniaza homepage-ul cu limbajul de design nou folosit deja pe pagina de
   categorie / produs / CardAvantaj:
     - canvas = var(--clr-black) (#101010); ORICE card (produs, banner, voucher, blog...) = #2B2C2E, ca sa se detaseze clar de fundal
     - accent unic: coral #F16A52 (inlocuieste portocaliul #F68421 si albastrul #0DB4FF)
     - hanken-grotesk pentru UI, alternate-gothic-atf pentru preturi si titluri
     - raze: 4px (butoane), 8px (carduri), 50px (pills)
   Incarcat doar din pages/staticpages/homepage.phtml. Toate regulile sunt
   limitate la #content.homepage ca sa nu afecteze restul site-ului.
   ========================================================================== */

#content.homepage {
    --hp-canvas: var(--clr-black, #101010);
    /* canvas #101010  <  card #2B2C2E (=--clr-cardgrey din site). Regula: ORICE card foloseste --hp-card;
       imaginile de produs sunt generate pe aceeasi culoare (vezi homepageProductCard.phtml), deci se topesc in card. */
    --hp-card: #2b2c2e;
    --hp-card-inset: #232425;
    --hp-line: #2b2c2e;
    --hp-text: #ffffff;
    --hp-text-2: #eeeeee;
    --hp-muted: #acaaaa;
    --hp-faint: #675f5d;
    --hp-accent: #f16a52;     /* coral: preturi + butoanele de cumparare + focus */
    --hp-blue: var(--clr-blue, #49b2e3);  /* albastrul din logo: accente secundare (linii, etichete, detalii) */
    --hp-accent-hi: #f58a76;
    
    --hp-r-sm: 4px;
    --hp-r-md: 8px;
    --hp-r-pill: 50px;

    --hp-gap: 8px;
    --hp-section: 64px;

    --hp-ui: var(--ff-hg, 'hanken-grotesk'), 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --hp-display: var(--ff-aga, 'alternate-gothic-atf'), 'Arial Narrow', Impact, sans-serif;

    --hp-ease: cubic-bezier(.4, 0, .2, 1);

    font-family: var(--hp-ui);
}

/* Accesibilitate: focus vizibil pe tot ce e clicabil in homepage */
#content.homepage a:focus-visible,
#content.homepage button:focus-visible {
    outline: 2px solid var(--hp-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   1. HERO — grila de tile-uri
   ========================================================================== */

#content.homepage .homepage-tiles {
    margin-bottom: var(--hp-section);
    background: transparent;
}

#content.homepage .homepage-tiles .tile {
    float: none;
    border: 0;
    border-radius: var(--hp-r-md);
    overflow: hidden;
    background: var(--hp-card);
    transition: none;
    will-change: auto;
}

#content.homepage .homepage-tiles .tile:hover {
    transform: none;
    box-shadow: none;
    z-index: auto;
}

#content.homepage .homepage-tiles .tile .tile-inner-wrapper,
#content.homepage .homepage-tiles .tile .image-wrapper {
    border-radius: inherit;
}

/* imaginea face zoom lent, nu tile-ul intreg (nu mai sare peste vecini) */
#content.homepage .homepage-tiles .tile .image-wrapper img,
#content.homepage .homepage-tiles .tile .image-wrapper video {
    transition: transform .6s var(--hp-ease);
}

#content.homepage .homepage-tiles .tile:hover .image-wrapper img,
#content.homepage .homepage-tiles .tile:hover .image-wrapper video {
    transform: translateX(-50%) translateY(-50%) scale(1.04);
}

#content.homepage .homepage-tiles .tile:hover .image-wrapper video {
    transform: scale(1.04);
}

/* ---- Eticheta tile-ului ----
   Trei tratamente, alese cu o clasa pe .homepage-tiles (vezi homepageTiles.phtml):
     tiles--label-tab   (implicit) tab albastru lipit de marginea din stanga, text alb
     tiles--label-bar   banda albastra pe toata latimea, jos
     tiles--label-glass sticla mata inchisa cu muchie albastra
   Albastrul = var(--clr-blue) din site (tokenul global, #49B2E3), nu o valoare proprie. */
#content.homepage .homepage-tiles {
    --lbl-left: 0;
    --lbl-right: auto;
    --lbl-bottom: 14px;
    --lbl-display: inline-block;
    --lbl-pad: 10px 18px 10px 16px;
    --lbl-bg: var(--clr-blue, #49b2e3);
    --lbl-color: #fff;
    --lbl-radius: 0 4px 4px 0;
    --lbl-border: 0;
    --lbl-shadow: none;
    --lbl-blur: none;
    --lbl-size: 15px;
    --lbl-text-shadow: 0 1px 2px rgba(16, 16, 16, .3);
}

#content.homepage .homepage-tiles .tile.tile--feature {
    --lbl-bottom: 28px;
    --lbl-pad: 14px 28px 14px 24px;
    --lbl-size: clamp(16px, 1.55vw, 22px);
}

/* banda */
#content.homepage .homepage-tiles.tiles--label-bar {
    --lbl-left: 0;
    --lbl-right: 0;
    --lbl-bottom: 0;
    --lbl-display: block;
    --lbl-pad: 12px 16px;
    --lbl-radius: 0;
}

#content.homepage .homepage-tiles.tiles--label-bar .tile.tile--feature {
    --lbl-bottom: 0;
    --lbl-pad: 18px 24px;
}

/* sticla */
#content.homepage .homepage-tiles.tiles--label-glass {
    --lbl-left: 12px;
    --lbl-right: auto;
    --lbl-bottom: 12px;
    --lbl-pad: 10px 16px 10px 15px;
    --lbl-bg: rgba(16, 16, 16, .56);
    --lbl-radius: 4px;
    --lbl-border: 1px solid rgba(255, 255, 255, .16);
    --lbl-shadow: inset 3px 0 0 var(--clr-blue, #49b2e3);
    --lbl-blur: blur(10px) saturate(1.3);
    --lbl-text-shadow: none;
}

#content.homepage .homepage-tiles.tiles--label-glass .tile.tile--feature {
    --lbl-left: 20px;
    --lbl-bottom: 20px;
    --lbl-pad: 14px 24px 14px 22px;
}

#content.homepage .homepage-tiles .tile .tile-inner-wrapper .info-wrapper {
    left: var(--lbl-left);
    right: var(--lbl-right);
    bottom: var(--lbl-bottom);
    max-width: 92%;
    overflow: visible;
    pointer-events: none;
}

#content.homepage .homepage-tiles.tiles--label-bar .tile .tile-inner-wrapper .info-wrapper {
    max-width: none;
}

#content.homepage .homepage-tiles .tile .tile-inner-wrapper .info-wrapper .tile-title {
    display: var(--lbl-display);
    max-width: 100%;
    margin: 0;
    padding: var(--lbl-pad);
    border: var(--lbl-border);
    border-radius: var(--lbl-radius);
    background: var(--lbl-bg);
    box-shadow: var(--lbl-shadow);
    -webkit-backdrop-filter: var(--lbl-blur);
    backdrop-filter: var(--lbl-blur);
    font-family: var(--hp-ui);
    font-size: var(--lbl-size);
    font-weight: 700;
    line-height: 1.25 !important;
    letter-spacing: -.005em;
    color: var(--lbl-color);
    text-shadow: var(--lbl-text-shadow);
}

#content.homepage .homepage-tiles .tile.tile--feature .tile-inner-wrapper .info-wrapper .tile-title {
    font-weight: 800;
    line-height: 1.15 !important;
    letter-spacing: -.012em;
}

#content.homepage .homepage-tiles .tile .tile-inner-wrapper .info-wrapper .tile-title a {
    pointer-events: auto;
    font-family: inherit;
    font-weight: inherit;
    color: inherit !important;
    /* tot tile-ul ramane clicabil prin imagine */
}

/* sageata de dupa titlu: apare la hover / focus */
#content.homepage .homepage-tiles .tile .tile-title a::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 12px;
    margin-left: 8px;
    vertical-align: -1px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12' fill='none'%3E%3Cpath d='M1 6h12M8 1l5 5-5 5' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .25s var(--hp-ease), transform .25s var(--hp-ease);
}

#content.homepage .homepage-tiles .tile:hover .tile-title a::after,
#content.homepage .homepage-tiles .tile:focus-within .tile-title a::after {
    opacity: 1;
    transform: none;
}

#content.homepage .homepage-tiles .tile.tile--feature .tile-title a::after {
    width: 20px;
    height: 17px;
    margin-left: 12px;
    vertical-align: -2px;
}

/* ==========================================================================
   2. SECTIUNI DESKTOP — ritm vertical comun
   ========================================================================== */

/* spatiul de sub ultima sectiune il da newsletter-ul (padding-top 64px, vezi newsletter.phtml); fara margine aici,
   ca sa nu iasa din #content si sa lase o banda neagra (#wrap e negru) intre continut si newsletter */
#content.homepage #homepage_desktop {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* spatiere comuna intre sectiuni (copii directi ai #homepage_desktop) */
#content.homepage #homepage_desktop > .cnt-1,
#content.homepage #homepage_desktop > .cnt-2,
#content.homepage #homepage_desktop > .hp-voucher,
#content.homepage #homepage_desktop > .ca-banner,
#content.homepage #homepage_desktop > .crsl-wrapper {
    width: 100%;
    margin: 0 0 var(--hp-section);
}

/* containerele de continut sunt transparente; bannerele (.ca-banner, .hp-voucher) isi pastreaza culoarea de card */
#content.homepage #homepage_desktop > .cnt-1,
#content.homepage #homepage_desktop > .cnt-2,
#content.homepage #homepage_desktop > .crsl-wrapper {
    padding: 0;
    background: transparent;
    overflow: visible;
}

/* ultima sectiune nu mai are margine jos (ar iesi din #content si ar lasa o banda neagra); aerul il da newsletter-ul.
   Trebuie sa stea dupa regulile de spatiere de mai sus (specificitate egala). */
#content.homepage #homepage_desktop > .hp-rails:last-child,
#content.homepage #homepage_desktop > .cnt-2:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   3. RAIL DE PRODUSE (homepageCampaignV2) — titlu + "Vezi toate" + sageti
   ========================================================================== */

#content.homepage #homepage_desktop .crsl-wrapper {
    width: 100%;
    padding: 0;
    background: transparent;
}

#content.homepage .hp-rail__head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--hp-line);
    margin-bottom: 24px;
}

/* segment coral peste linia de sub titlu */
#content.homepage .hp-rail__head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 64px;
    height: 3px;
    background: var(--hp-blue);
}

#content.homepage .hp-rail__title,
#content.homepage .crsl-wrapper > h2 {
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--hp-display);
    font-size: clamp(30px, 2.8vw, 44px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--hp-text);
}

/* "Vezi toate" ca pill cu contur coral: cel mai vizibil element interactiv din antet */
#content.homepage .hp-rail__all {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid #5a5b60;
    border-radius: var(--hp-r-pill);
    font-family: var(--hp-ui);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: var(--hp-text-2) !important;
    transition: background-color .15s var(--hp-ease), color .15s var(--hp-ease), gap .2s var(--hp-ease);
}

#content.homepage .hp-rail__all:hover {
    background: var(--hp-text);
    border-color: var(--hp-text);
    color: #101010 !important;
    gap: 12px;
    text-decoration: none;
}

#content.homepage .hp-rail__all svg {
    width: 14px;
    height: 12px;
}

#content.homepage .hp-rail__nav {
    flex: none;
    display: flex;
    gap: 8px;
}

#content.homepage .hp-rail__btn {
    all: unset;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #4a4b50;
    border-radius: 50%;
    color: var(--hp-text);
    cursor: pointer;
    transition: background-color .15s var(--hp-ease), border-color .15s var(--hp-ease), color .15s var(--hp-ease);
}

#content.homepage .hp-rail__btn:hover {
    background: var(--hp-text);
    border-color: var(--hp-text);
    color: #101010;
}

#content.homepage .hp-rail__btn:focus-visible {
    outline: 2px solid var(--hp-accent);
    outline-offset: 2px;
}

#content.homepage .hp-rail__btn svg {
    width: 12px;
    height: 12px;
}

#content.homepage .hp-rail__btn--prev svg {
    transform: scaleX(-1);
}

/* spatierea dintre sectiuni o dau containerele (vezi sectiunea 2), nu rail-ul in sine */
#content.homepage #homepage_desktop .hp-rail {
    margin-bottom: 0;
}

#content.homepage #homepage_desktop > .hp-rail {
    margin-bottom: var(--hp-section);
}

/* slick-list taie pe orizontala (overflow:hidden); ii dam loc pe verticala ca ridicarea cardului la hover (translateY)
   sa nu fie taiata sus. Containerul .mask nu mai taie nimic, taierea o face slick-list. */
#content.homepage #homepage_desktop .crsl-wrapper .mask {
    width: 100%;
    max-height: none;
    margin: 0;
    overflow: visible;
}

#content.homepage .slick-slider .slick-list {
    padding: 8px 0;
    margin: -8px 0;
}

#content.homepage .slick-slider {
    margin: 0;
}

/* NB: pagina ruleaza in quirks mode (doctype dupa <style>), deci evitam height:% pe parinti cu inaltime auto.
   Cardurile au aceeasi inaltime prin constructie (imagine patrata, nume pe 2 randuri, pret cu inaltime minima). */
#content.homepage .slick-slider .slick-slide {
    width: 216px;
    height: auto;
    margin-right: 12px;
}

/* ==========================================================================
   4. CARD DE PRODUS (homepageProductCard) — desktop + mobil
   ========================================================================== */

#content.homepage .hp-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    padding: 12px 12px 16px;
    background: var(--hp-card);
    border: 0;
    border-radius: var(--hp-r-md);
    transition: box-shadow .2s var(--hp-ease), transform .2s var(--hp-ease);
}

/* inelul e INTERIOR (inset): overflow:hidden de pe slick-list / owl nu il mai poate taia la marginile randului */
#content.homepage .hp-card:hover {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32);
    transform: translateY(-2px);
}

/* imaginea e generata pe aceeasi culoare ca cardul (#2B2C2E) -> produsul "pluteste" in card */
#content.homepage .hp-card__img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--hp-r-sm);
    background: var(--hp-card);
}

#content.homepage .hp-card__img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s var(--hp-ease);
}

#content.homepage .hp-card:hover .hp-card__img img {
    transform: scale(1.04);
}

#content.homepage .hp-card__name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 2.6em;
    overflow: hidden;
    font-family: var(--hp-ui);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--hp-text) !important;
}

#content.homepage .hp-card__name:hover {
    text-decoration: none;
    color: var(--hp-blue) !important;
}

/* review-uri: desenul si culoarea stelelor vin din css/stars.css (comun cu lista de produse si pagina de produs).
   Linia e rezervata si cand nu exista review-uri, ca toate cardurile sa aiba aceeasi inaltime. */
#content.homepage .hp-card__rating {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 16px;
    white-space: nowrap;
    font-family: var(--hp-ui);
    font-size: 12px;
    line-height: 1;
    color: var(--hp-muted);
}

#content.homepage .hp-card__rating .av-rating__value {
    font-weight: 700;
    color: var(--hp-text-2);
}

#content.homepage .hp-card__rating .av-rating__count {
    font-weight: 500;
}

/* pret + RRP (clasele .pret-2 / .pret-lista sunt cele pe care le actualizeaza js/pagedproducts.js la schimbarea variantei) */
#content.homepage .hp-card__prices {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 56px;
    margin-top: auto;
}

#content.homepage .hp-card__prices .pret-2 {
    display: block;
    min-height: 1em;
    font-family: var(--hp-display);
    font-size: 34px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .005em;
    color: var(--hp-accent);
    font-variant-numeric: tabular-nums;
}

#content.homepage .hp-card__prices .pret-2 .moneda {
    margin-left: 1px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .04em;
    vertical-align: top;
    text-transform: uppercase;
}

#content.homepage .hp-card__prices .pret-lista {
    display: block;
    min-height: 1.2em;
    font-family: var(--hp-ui);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--hp-muted);
    font-variant-numeric: tabular-nums;
}

/* rand de cumparare: pret + RRP in stanga, buton de cos (doar icoana) in dreapta */
#content.homepage .hp-card__buy {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: auto;
}

#content.homepage .hp-card__buy .hp-card__prices {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0;
}

#content.homepage .hp-card__actions {
    flex: none;
}

#content.homepage .hp-card .av-quick {
    display: block;
}

/* buton "Adauga in cos" (js/pagedproducts.js) — coral, 4px, ca .av-quick__cart din lista de produse; aici doar cu icoana de cos */
#content.homepage .hp-card .av-quick__cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--hp-r-sm);
    background: var(--hp-accent);
    color: #fff;
    cursor: pointer;
    transition: background-color .15s var(--hp-ease), box-shadow .15s var(--hp-ease);
}

#content.homepage .hp-card .av-quick__cart:hover:not(:disabled) {
    background: var(--hp-accent-hi);
}

#content.homepage .hp-card .av-quick__cart:disabled {
    background: transparent;
    box-shadow: inset 0 0 0 1px #4a4b50;
    color: #8c8a8a;
    cursor: not-allowed;
}

#content.homepage .hp-card .av-quick__cart.is-busy {
    cursor: progress;
    opacity: .85;
}

#content.homepage .hp-card .av-quick__cart.is-added {
    background: #1ba829;
    color: #fff;
}

#content.homepage .hp-card .av-quick__cart:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* icoana de cos; bifa apare dupa adaugare */
#content.homepage .hp-card .av-quick__ico {
    display: block;
    flex: none;
    width: 22px;
    height: 22px;
    fill: currentColor;
}

#content.homepage .hp-card .av-quick__ico--ok,
#content.homepage .hp-card .av-quick__cart.is-added .av-quick__ico:not(.av-quick__ico--ok) {
    display: none;
}

#content.homepage .hp-card .av-quick__cart.is-added .av-quick__ico--ok {
    display: block;
}

/* textul ramane in DOM (il actualizeaza js-ul: "Adaugat" / "Indisponibil") si e citit de cititoarele de ecran, dar nu se vede */
#content.homepage .hp-card .av-quick__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   5. TRUST BAR (@AVstore — campania why_avstore)
   ========================================================================== */

#content.homepage #homepage_desktop .cnt-2 .promo-1,
#content.homepage .cnt-2 .promo-1.home-promo-top {
    width: 100%;
    overflow: visible;
}

#content.homepage .promo-1.home-promo-top .description {
    float: none;
    display: flex;
    align-items: center;
    gap: 16px 40px;
    padding: 22px 32px;
    background: var(--hp-card);
    border: 0;
    border-radius: var(--hp-r-md);
}

#content.homepage .promo-1.home-promo-top .description .big_twitter {
    float: none;
    flex: none;
    font-family: var(--hp-display);
    font-size: 40px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .01em;
    color: var(--hp-blue);
}

#content.homepage .promo-1.home-promo-top .description ul {
    flex: 1 1 0;
    min-width: 0;
    float: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

#content.homepage .promo-1.home-promo-top .description li {
    position: relative;
    padding: 0 0 0 26px;
    background: none;
    font-family: var(--hp-ui);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--hp-text-2);
}

#content.homepage .promo-1.home-promo-top .description li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .2em;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(73, 178, 227, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' fill='none'%3E%3Cpath d='M1 4l2.6 2.6L9 1' stroke='%2349b2e3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 9px 7px no-repeat;
}

/* ==========================================================================
   6. BANNERE PROMO — voucher + Card Avantaj
   ========================================================================== */

#content.homepage .ca-banner {
    background: var(--hp-card);
    border-radius: var(--hp-r-md);
    border: 0;
}

#content.homepage .ca-banner .ca-vline {
    background: #4a4b50;
}

#content.homepage .ca-banner .ca-stat {
    background: var(--hp-card-inset);
}

#content.homepage .hp-voucher {
    width: 100%;
    height: auto;
    margin: 0 0 var(--hp-section);
    padding: 24px 32px;
    background: var(--hp-card);
    border: 0;
    border-radius: var(--hp-r-md);
}

#content.homepage .hp-voucher__inner {
    display: flex;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

#content.homepage .hp-voucher__image {
    flex: none;
    width: 150px;
    height: 100px;
    object-fit: contain;
}

#content.homepage .hp-voucher__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#content.homepage .hp-voucher__eyebrow {
    font-family: var(--hp-ui);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--hp-muted);
}

#content.homepage .hp-voucher__title {
    margin: 0;
    font-family: var(--hp-display);
    font-size: clamp(26px, 2.2vw, 34px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--hp-text);
}

#content.homepage .hp-voucher__icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

#content.homepage .hp-voucher__icons img {
    height: 24px;
    width: auto;
    opacity: .72;
    mix-blend-mode: lighten; /* iconitele au fundal negru; asa se topeste in suprafata cardului */
}

/* buton primar — aceeasi specificatie ca .av-quick__cart din cardurile de produs */
#content.homepage .hp-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 3px 24px 0;
    border: 0;
    border-radius: var(--hp-r-sm);
    background: var(--hp-accent);
    font-family: var(--hp-display);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff !important;
    cursor: pointer;
    transition: background-color .15s var(--hp-ease);
}

#content.homepage .hp-btn:hover {
    background: var(--hp-accent-hi);
    text-decoration: none;
}

/* ==========================================================================
   7. BLOG
   ========================================================================== */

#content.homepage .news-wrapper {
    gap: 0;
}

#content.homepage .news-wrapper > .hp-rail__head {
    margin-bottom: 24px;
}

#content.homepage .news {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
}

#content.homepage .news .news-card {
    height: auto;
    transform: none;
    list-style: none;
}

#content.homepage .news .news-card a {
    display: block;
    border-radius: var(--hp-r-md);
    overflow: hidden;
    background: var(--hp-card);
    border: 0;
    transition: box-shadow .2s var(--hp-ease);
}

#content.homepage .news .news-card a:hover {
    outline: 1px solid rgba(255, 255, 255, .4);
    outline-offset: -1px;
    text-decoration: none;
}

#content.homepage .news .news-image {
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    aspect-ratio: 16 / 11;
    background-size: cover;
    background-position: center;
    transition: none;
}

/* imaginea face zoom lent prin pseudo-element, ca titlul sa ramana fix */
#content.homepage .news .news-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    transition: transform .6s var(--hp-ease);
}

#content.homepage .news .news-card a:hover .news-image::before {
    transform: scale(1.04);
}

#content.homepage .news .news-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 16, 16, .92) 0%, rgba(16, 16, 16, .45) 45%, rgba(16, 16, 16, 0) 75%);
}

#content.homepage .news .post-title {
    position: relative;
    z-index: 1;
    margin-top: auto;
    min-height: 0;
    padding: 24px 20px 20px;
    background: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-align: left;
    font-family: var(--hp-ui);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--hp-text);
}

#content.homepage .news-btn {
    display: none;
}

/* Layout editorial pentru EXACT 6 articole (clasa .news--bento vine din blogLatestArticles.phtml), desktop > 1024px:
     [  1  (2x2)  ] [ 2 ]
     [            ] [ 3 ]
     [ 4 ] [ 5 ]    [ 6 ]
   Fara height:% (pagina e in quirks mode): cardurile se intind prin grid + flex. */
@media (min-width: 1025px) {
    #content.homepage .news.news--bento {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: clamp(220px, 19vw, 290px);
    }

    #content.homepage .news.news--bento .news-card {
        display: flex;
    }

    #content.homepage .news.news--bento .news-card a {
        flex: 1 1 auto;
        display: flex;
        min-width: 0;
    }

    #content.homepage .news.news--bento .news-image {
        flex: 1 1 auto;
        min-height: 0;
        aspect-ratio: auto;
    }

    #content.homepage .news.news--bento .news-card:nth-child(1) {
        grid-column: 1 / span 2;
        grid-row: 1 / span 2;
    }

    /* articolul principal: titlu mare, pana la 3 randuri */
    #content.homepage .news.news--bento .news-card:nth-child(1) .post-title {
        padding: 40px 32px 32px;
        font-size: clamp(24px, 2.4vw, 34px);
        line-height: 1.15;
        letter-spacing: -.015em;
    }
}

/* ==========================================================================
   8. LICHIDARI / CUNOSCATORI — doua rail-uri in aceeasi zona
   ========================================================================== */

#content.homepage #homepage_desktop .cnt-2.hp-rails {
    display: flex;
    flex-direction: column;
    gap: var(--hp-section);
    background: transparent;
}

/* ==========================================================================
   9. MOBIL / TABLETA (<= 1024px — acelasi prag ca avs_mobile.css)
   ========================================================================== */

@media (max-width: 1024px), (max-device-width: 640px) {

    #content.homepage {
        --hp-section: 40px;
    }

    /* titluri de sectiune (markup-ul vechi .slider_title din #homepage_mobile) */
    #content.homepage #homepage_mobile div.slider_title {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 16px;
        width: 100%;
        height: auto;
        margin: 0 0 16px;
        padding: 0 4px 14px;
        border-bottom: 1px solid var(--hp-line);
        position: relative;
        align-items: center;
    }

    #content.homepage #homepage_mobile div.slider_title::after {
        content: "";
        position: absolute;
        left: 4px;
        bottom: -1px;
        width: 48px;
        height: 3px;
        background: var(--hp-blue);
    }

    #content.homepage #homepage_mobile div.slider_title > span.title {
        position: static;
        height: auto;
        font-family: var(--hp-display);
        font-size: 30px;
        font-weight: 500;
        line-height: 1 !important;
        letter-spacing: .01em;
        text-transform: uppercase;
        color: var(--hp-text);
    }

    #content.homepage #homepage_mobile .slider_title .hot {
        padding: 0;
        background: none;
        color: var(--hp-blue);
        font-family: inherit;
    }

    #content.homepage #homepage_mobile div.slider_title > a {
        flex: none;
    }

    #content.homepage #homepage_mobile div.slider_title > a > div.more_button {
        position: static;
        float: none;
        height: auto;
        padding: 9px 14px;
        background: none;
        box-shadow: none;
        border: 1px solid #5a5b60;
        border-radius: var(--hp-r-pill);
        font-family: var(--hp-ui);
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        color: var(--hp-text-2);
    }

    #content.homepage #homepage_mobile div.slider_title > a > div.more_button::after {
        content: " \2192";
    }

    #content.homepage #homepage_mobile div.multiple-items {
        height: auto;
        margin: 0 0 var(--hp-section);
        padding: 0;
    }

    #content.homepage #homepage_mobile div.multiple-items .owl-item .hp-card {
        margin: 0 5px;
        width: auto;
    }

    #content.homepage #homepage_mobile .hp-card {
        padding: 10px 10px 14px;
        gap: 10px;
    }

    #content.homepage #homepage_mobile .hp-card__name {
        font-size: 13px;
    }

    #content.homepage #homepage_mobile .hp-card__rating {
        gap: 5px;
        font-size: 11px;
    }

    #content.homepage #homepage_mobile .hp-card__rating .av-rating__stars {
        width: 66px;
    }

    #content.homepage #homepage_mobile .hp-card__prices .pret-2 {
        font-size: 28px;
    }

    #content.homepage #homepage_mobile .hp-card__prices {
        min-height: 50px;
    }

    #content.homepage #homepage_mobile .hp-card__buy {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #content.homepage #homepage_mobile .hp-card__actions {
        min-height: 40px;
    }

    #content.homepage #homepage_mobile .hp-card .av-quick__cart {
        width: 100%;
        height: 40px;
    }

    #content.homepage .hp-card:hover {
        transform: none;
    }

    /* trust bar vertical */
    #content.homepage .promo-1.home-promo-top .description {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 20px;
    }

    #content.homepage .promo-1.home-promo-top .description .big_twitter {
        font-size: 34px;
    }

    #content.homepage .promo-1.home-promo-top .description ul {
        width: 100%;
        flex: none;
    }

    /* voucher compact */
    #content.homepage .hp-voucher {
        padding: 20px;
    }

    #content.homepage .hp-voucher__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    #content.homepage .hp-voucher__image {
        width: 120px;
        height: 80px;
    }

    #content.homepage .hp-voucher__icons {
        gap: 16px;
    }

    #content.homepage .hp-voucher__icons img {
        height: 22px;
    }

    #content.homepage .hp-voucher .hp-btn {
        width: 100%;
    }

    /* blog: derulare orizontala cu snap, in loc de 6 carduri stivuite */
    #content.homepage .news-wrapper .hp-rail__head {
        margin-bottom: 16px;
        padding-left: 4px;
        padding-right: 4px;
    }

    #content.homepage #homepage_mobile .cnt-2 {
        width: 100%;
        margin: 0 0 var(--hp-section);
        overflow: visible;
    }

    #content.homepage #homepage_mobile > .ca-banner {
        margin: 0 0 var(--hp-section);
    }

    #content.homepage #homepage_mobile {
        padding-bottom: 0;
    }

    #content.homepage #homepage_mobile > div.multiple-items:last-child {
        margin-bottom: 0;
    }

    #content.homepage .hp-rail__nav {
        display: none;
    }
}

/* telefon: blogul devine o banda cu derulare orizontala si snap (6 carduri stivuite ar fi ~2000px) */
@media (max-width: 640px) {

    #content.homepage .news {
        display: flex;
        gap: 12px;
        margin: 0;
        padding: 0 4px 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    #content.homepage .news::-webkit-scrollbar {
        display: none;
    }

    #content.homepage .news .news-card {
        flex: 0 0 78%;
        max-width: 340px;
        scroll-snap-align: start;
    }

    #content.homepage .news .news-image {
        aspect-ratio: 4 / 5;
    }

    #content.homepage .news .post-title {
        font-size: 17px;
    }

    #content.homepage .news .news-card:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }
}

/* tableta (641-1024px): 2 coloane; la 6 articole, primul si ultimul sunt late */
@media (min-width: 641px) and (max-width: 1024px) {
    #content.homepage .news.news--bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #content.homepage .news.news--bento .news-card:nth-child(1),
    #content.homepage .news.news--bento .news-card:nth-child(6) {
        grid-column: 1 / -1;
    }

    #content.homepage .news.news--bento .news-card:nth-child(1) .news-image,
    #content.homepage .news.news--bento .news-card:nth-child(6) .news-image {
        aspect-ratio: 21 / 9;
    }

    #content.homepage .news.news--bento .news-card:nth-child(1) .post-title,
    #content.homepage .news.news--bento .news-card:nth-child(6) .post-title {
        font-size: 24px;
    }
}

/* telefon: hero mai compact (grila 2 coloane e definita in homepageTiles.phtml) */
@media (max-width: 640px) {

    #content.homepage .homepage-tiles .tile {
        padding-bottom: 0 !important;
    }

    #content.homepage .homepage-tiles {
        --lbl-bottom: 10px;
        --lbl-pad: 8px 14px 8px 12px;
        --lbl-size: 13px;
    }

    #content.homepage .homepage-tiles .tile.tile--feature {
        --lbl-bottom: 16px;
        --lbl-pad: 12px 18px 12px 16px;
        --lbl-size: 17px;
    }

    #content.homepage .homepage-tiles.tiles--label-bar {
        --lbl-bottom: 0;
        --lbl-pad: 10px 12px;
    }

    #content.homepage .homepage-tiles.tiles--label-bar .tile.tile--feature {
        --lbl-bottom: 0;
        --lbl-pad: 14px 16px;
    }

    #content.homepage .homepage-tiles.tiles--label-glass {
        --lbl-left: 8px;
        --lbl-bottom: 8px;
    }

    #content.homepage .homepage-tiles.tiles--label-glass .tile.tile--feature {
        --lbl-left: 12px;
        --lbl-bottom: 12px;
    }

    #content.homepage .homepage-tiles .tile .tile-title a::after {
        display: none;
    }
}

/* ==========================================================================
   10. MISCARE REDUSA
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    #content.homepage *,
    #content.homepage *::before,
    #content.homepage *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

    #content.homepage .hp-card:hover,
    #content.homepage .hp-card:hover .hp-card__img img,
    #content.homepage .homepage-tiles .tile:hover .image-wrapper img {
        transform: none;
    }
}
