/* ==========================================================================
   Ardux_Offers — foaia de stil a paginilor de oferte.

   Paginile astea NU mostenesc nimic din tema (layoutul scoate CSS-ul si JS-ul
   site-ului din blocul head), deci fisierul e complet: reset, tokeni, tot.
   Directie: editorial — mult alb, tipografie mare, accente putine.
   ========================================================================== */

/* --- reset minim ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* --- tokeni --------------------------------------------------------------- */
:root {
    /* Rosul e cel din sigla, luat direct din logo-new.png (#d03431), nu unul
       aproximat. Petrolul e complementul lui: rosu cald si verde-albastru rece
       contrasteaza fara sa se bata, si tin tonul editorial fara sa alunece in
       promo. Negrul e "inmuiat" cu un strop de albastru — pagina avea prea mult
       negru pur. */
    --ink:          #1b2431;
    --muted:        #5c6672;
    --faint:        #8a919c;
    --hair:         #e6e8ec;
    --paper:        #ffffff;
    --wash:         #fafafa;
    --accent:       #d03431;
    --accent-dark:  #b32a27;
    --accent-soft:  #fdf1f0;
    --accent-2:     #1f6f78;
    --accent-2-dark:#175258;
    --accent-2-soft:#eff6f6;
    --ok:           #1c7a4b;

    --measure: 68ch;
    --wide:    1120px;
    --radius:  14px;

    --step-1: 0.875rem;
    --step0:  1.0625rem;
    --step1:  1.25rem;
    --step2:  1.5rem;
    --step3:  2rem;
}

body.offers-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: var(--step0);
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

/* --- header --------------------------------------------------------------- */
/* Lipit sus: pe paginile astea butonul de comanda trebuie sa fie mereu la
   indemana, mai ales pe articolele lungi. Separarea de continut o face linia de
   jos, nu o umbra — o umbra care apare la derulare ar cere JS, iar paginile
   astea nu incarca niciun script in afara celui de adaugare in cos. */
.offers-head {
    position: sticky; top: 0; z-index: 20;
    border-bottom: 1px solid var(--hair);
    background: var(--paper);
}
.offers-head__in {
    max-width: var(--wide); margin: 0 auto; padding: .6rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.offers-head__logo img { width: 148px; height: auto; }
.offers-head__right { display: flex; align-items: center; gap: 1.25rem; }
.offers-head__phone { display: inline-flex; align-items: center; gap: .55rem; }
.offers-head__phone-text { display: flex; flex-direction: column; line-height: 1.25; }
.offers-head__phone-label { font-size: 0.75rem; color: var(--faint); letter-spacing: .02em; }
.offers-head__phone-num {
    font-size: var(--step0); font-weight: 600;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.offers-head__phone .offers-ico { width: 20px; height: 20px; color: var(--accent); }

/* Iconite inline: fara font de iconite si fara fisiere in plus — paginile astea
   incarca exact doua resurse proprii si atat. `currentColor` le lasa sa
   mosteneasca culoarea textului de langa ele. */
.offers-ico { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; vertical-align: -.15em; }

/* --- bara fixa de finalizare --------------------------------------------- */
/* Se randeaza doar cand cosul are ceva (vezi checkoutbar.phtml). Spacer-ul e in
   flux normal si tine locul barei, altfel bara ar acoperi ultimele randuri din
   footer si n-ai putea derula sub ele. */
.offers-cta-spacer { height: calc(4.25rem + env(safe-area-inset-bottom, 0px)); }
.offers-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    backdrop-filter: saturate(180%) blur(8px);
    border-top: 1px solid var(--hair);
    padding: .7rem 1.5rem calc(.7rem + env(safe-area-inset-bottom, 0px));
    display: flex; justify-content: center;
}
.offers-cta__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    background: var(--accent); color: #fff; border-radius: 10px;
    padding: .5rem 2rem; font-size: var(--step0); font-weight: 650;
    letter-spacing: -0.01em; white-space: nowrap;
    transition: background .15s ease, transform .12s ease;
}
.offers-cta__btn:hover { background: var(--accent-dark); }
.offers-cta__btn:active { transform: translateY(1px); }
.offers-cta__btn .offers-ico { width: 18px; height: 18px; }

/* --- schelet -------------------------------------------------------------- */
.offers-main { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem 5rem; }
/* Ancorele nu trebuie sa ajunga sub header-ul lipit. */
.offers-main :target { scroll-margin-top: 5rem; }
.offers-page { padding-top: 1rem; }

.offers-crumbs {
    padding: 1.5rem 0 0; font-size: var(--step-1); color: var(--faint);
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
}
.offers-crumbs a { color: var(--muted); }
.offers-crumbs a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.offers-crumbs__here { color: var(--ink); }

/* --- titluri -------------------------------------------------------------- */
.offers-title {
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
    line-height: 1.12; letter-spacing: -0.022em; font-weight: 700;
    margin: 1.5rem 0 0; max-width: 20ch;
}
/* Acelasi fir rosu ca deasupra titlurilor din continut, dar doar pe landing si
   pe categorie: pe pagina de produs locul de deasupra titlului e deja luat de
   eticheta de reducere, iar doua accente suprapuse ar fi zgomot. */
.offers-landing .offers-title::before,
.offers-category .offers-title::before {
    content: ""; display: block; width: 2.75rem; height: 4px;
    background: var(--accent); border-radius: 2px; margin-bottom: 1.1rem;
}

.offers-sub {
    font-size: var(--step1); color: var(--muted); line-height: 1.55;
    margin: 1rem 0 0; max-width: 46ch;
}
.offers-empty { color: var(--muted); padding: 4rem 0; font-size: var(--step1); }

/* --- grid de carduri ------------------------------------------------------ */
.offers-grid {
    display: grid; gap: 2rem 1.75rem; margin: 3rem 0 0;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.offers-card { position: relative; }
.offers-card > a { display: flex; flex-direction: column; height: 100%; }
.offers-card__img {
    display: block; background: var(--accent-2-soft); border-radius: var(--radius);
    overflow: hidden; aspect-ratio: 4 / 3;
}
.offers-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 1.25rem; }
/* Coloana flexibila: titlurile si subtitlurile au inaltimi diferite, iar fara
   asta preturile a patru carduri alaturate ies pe patru linii diferite. */
.offers-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 0 0; }
.offers-card__badge {
    display: inline-block; font-size: 0.6875rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
    margin-bottom: .5rem;
}
.offers-card__name {
    display: block; font-size: var(--step1); font-weight: 650;
    line-height: 1.35; letter-spacing: -0.01em;
}
.offers-card > a:hover .offers-card__name { text-decoration: underline; text-underline-offset: 4px; }
.offers-card__sub { display: block; color: var(--muted); font-size: var(--step-1); margin-top: .4rem; }
.offers-card__count {
    display: block; color: var(--accent-2); font-size: 0.8125rem;
    margin-top: auto; padding-top: .75rem; letter-spacing: .02em;
}
.offers-card__price { display: flex; align-items: baseline; gap: .5rem; margin-top: auto; padding-top: .7rem; }
.offers-card__price-now { font-weight: 700; letter-spacing: -0.01em; }
.offers-card__price-old { color: var(--faint); text-decoration: line-through; font-size: var(--step-1); }

/* --- pagina de oferta ----------------------------------------------------- */
.offers-item__head {
    display: grid; gap: 3rem; margin-top: 2.5rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
}
.offers-item__img {
    background: var(--accent-2-soft); border-radius: var(--radius); overflow: hidden;
    display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.offers-item__info { padding-top: .5rem; }

.offers-badge {
    display: inline-block; font-size: 0.6875rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
    border: 1px solid currentColor; border-radius: 999px; padding: .2rem .7rem;
}
.offers-item__info .offers-title { margin-top: .9rem; }

.offers-price { display: flex; align-items: baseline; gap: .85rem; margin: 2rem 0 0; }
.offers-price__old { color: var(--faint); text-decoration: line-through; font-size: var(--step1); }
.offers-price__now { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; }
.offers-price__note { color: var(--faint); font-size: var(--step-1); margin: .4rem 0 0; }

.offers-buy { margin-top: 2rem; }
.offers-buy__btn {
    display: inline-flex; flex-direction: column; align-items: center;
    background: var(--accent); color: #fff; border-radius: 10px;
    padding: 1rem 2.5rem; font-size: var(--step1); font-weight: 650;
    letter-spacing: -0.01em; transition: transform .12s ease, background .15s ease;
}
.offers-buy__btn small { font-weight: 400; font-size: 0.8125rem; opacity: .72; margin-top: .15rem; }
.offers-buy__btn:hover { background: var(--accent-dark); }
.offers-buy__btn:active { transform: translateY(1px); }
.offers-buy__btn[disabled] { opacity: .6; cursor: default; }
.offers-unavailable {
    margin-top: 2rem; color: var(--accent); font-weight: 600;
    border-left: 3px solid currentColor; padding-left: 1rem;
}

/* --- continut editat in WYSIWYG ------------------------------------------- */
.offers-rich { max-width: var(--measure); margin: 3.5rem 0 0; }
.offers-rich > * + * { margin-top: 1.25rem; }
.offers-rich h2 {
    font-size: var(--step2); font-weight: 700; letter-spacing: -0.015em;
    line-height: 1.25; margin-top: 2.75rem;
}
/* Un fir scurt, in rosul marcii, deasupra fiecarui titlu mare din continut:
   aduce culoarea si in corpul textului, fara sa coloreze literele. */
.offers-rich h2::before {
    content: ""; display: block; width: 2.25rem; height: 3px;
    background: var(--accent); border-radius: 2px; margin-bottom: .85rem;
}
.offers-rich h3 { font-size: var(--step1); font-weight: 650; line-height: 1.35; margin-top: 2rem; }
.offers-rich h4 { font-size: var(--step0); font-weight: 650; margin-top: 1.5rem; }
.offers-rich p { color: #2a2f38; }
.offers-rich a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.offers-rich a:hover { color: var(--accent-dark); }
.offers-rich ul, .offers-rich ol { padding-left: 1.35rem; }
.offers-rich ul li { list-style: disc; }
.offers-rich ol li { list-style: decimal; }
.offers-rich li + li { margin-top: .4rem; }
.offers-rich blockquote {
    border-left: 2px solid var(--accent-2); padding-left: 1.25rem;
    color: var(--muted); font-style: italic;
}
.offers-rich hr { border: 0; border-top: 1px solid var(--hair); margin: 2.5rem 0; }
.offers-rich img { border-radius: 10px; margin: 1.75rem 0; }
.offers-rich figure figcaption { color: var(--faint); font-size: var(--step-1); margin-top: .5rem; }
.offers-rich table { margin: 1.75rem 0; font-size: var(--step-1); }
.offers-rich th, .offers-rich td { border-bottom: 1px solid var(--hair); padding: .7rem .5rem; text-align: left; }
.offers-rich th { font-weight: 650; color: var(--accent-2); width: 40%; }

/* Vocabularul continutului editat in WYSIWYG.
   Sanitizerul (Ardux_Offers_Helper_Html) accepta din toate clasele DOAR pe cele
   cu prefixul "offer-", deci lista de mai jos e tot ce are la dispozitie cineva
   care scrie o descriere. Se tin scurte si semantice, ca sa nu ajunga niste
   utilitare de layout cu alt nume. */
.offers-rich .offer-lead { font-size: var(--step1); color: var(--muted); line-height: 1.6; }

/* Galerie de poze de detaliu: cate incap, patrate, fara sa rupa ritmul. */
.offers-rich .offer-gallery {
    display: grid; gap: .9rem; margin: 1.75rem 0;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
/* Pozele de produs sunt JPEG pe fond alb: fara un chenar subtire plutesc in
   pagina, pentru ca fondul colorat de sub ele nu se vede. */
.offers-rich .offer-gallery img,
.offers-rich .offer-figure img {
    width: 100%; height: auto; margin: 0;
    background: var(--paper); border: 1px solid var(--hair);
}

/* O singura poza, cu legenda. Latimea e plafonata la sursa reala
   (product_big e 700x700): intinsa peste atat, s-ar vedea marita si moale. */
.offers-rich .offer-figure { margin: 1.75rem 0; max-width: 460px; }

/* Peste 960px pozele ies din coloana de text (68ch) si ocupa latimea
   disponibila — textul ramane lizibil, iar pagina nu mai are jumatatea dreapta
   goala. Pragul e ales ca latimea fixa sa incapa mereu in .offers-main. */
@media (min-width: 960px) {
    .offers-rich .offer-gallery { width: 860px; max-width: none; }
}

/* Enumerare de beneficii: bifa in locul bulinei. */
.offers-rich .offer-checks { padding-left: 0; }
.offers-rich .offer-checks li {
    list-style: none; position: relative; padding-left: 1.65rem;
}
.offers-rich .offer-checks li::before {
    content: ""; position: absolute; left: .3rem; top: .38em;
    width: .4rem; height: .72rem; border: solid var(--accent-2);
    border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Tabel de specificatii: perechi eticheta/valoare, nu date tabelare. */
.offers-rich .offer-specs { width: 100%; border-top: 1px solid var(--hair); }
.offers-rich .offer-specs th { width: 45%; vertical-align: top; }

/* Casetele de context (garantie, livrare, o precizare utila). */
.offers-rich .offer-note {
    background: var(--accent-2-soft); border-left: 3px solid var(--accent-2);
    border-radius: 0 10px 10px 0; padding: .95rem 1.15rem;
    color: var(--muted); font-size: var(--step-1);
}
.offers-rich .offer-note strong { color: var(--ink); font-weight: 650; }

.offers-intro { margin-top: 2rem; }

/* --- footer --------------------------------------------------------------- */
.offers-foot { border-top: 1px solid var(--hair); background: var(--wash); margin-top: 4rem; }
.offers-foot__in {
    max-width: var(--wide); margin: 0 auto; padding: 3rem 1.5rem 2rem;
    display: flex; flex-wrap: wrap; gap: 2rem 3rem; justify-content: space-between;
}
.offers-foot__name { font-weight: 650; }
.offers-foot__contact { display: flex; flex-direction: column; gap: .35rem; margin-top: .5rem; font-size: var(--step-1); }
.offers-foot__contact a { color: var(--muted); display: inline-flex; align-items: center; gap: .45rem; }
.offers-foot__contact a .offers-ico { color: var(--accent-2); }
.offers-foot__contact a:hover .offers-ico { color: var(--accent-dark); }
.offers-foot__contact a:hover { color: var(--ink); }
.offers-foot__links { display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; font-size: var(--step-1); }
.offers-foot__links a { color: var(--muted); }
.offers-foot__links a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.offers-foot__legal {
    max-width: var(--wide); margin: 0 auto; padding: 1.25rem 1.5rem 2.5rem;
    border-top: 1px solid var(--hair); color: var(--faint); font-size: 0.8125rem;
}

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
    .offers-item__head { grid-template-columns: 1fr; gap: 2rem; }
    .offers-head__phone-label { display: none; }
    .offers-head__phone .offers-ico { width: 18px; height: 18px; }
    .offers-buy__btn { width: 100%; }
}
@media (max-width: 560px) {
    .offers-main { padding: 0 1.15rem 3.5rem; }
    .offers-rich .offer-gallery { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
    /* Pe doua coloane, o galerie de trei lasa ultima poza singura si strambe —
       o intindem pe tot randul, ca sa arate ca o alegere, nu ca o scapare. */
    .offers-rich .offer-gallery img:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .offers-head__in { padding: .55rem 1.15rem; gap: .75rem; }
    .offers-head__logo img { width: 130px; }
    .offers-head__right { gap: .75rem; }
    .offers-cta { padding-left: 1.15rem; padding-right: 1.15rem; }
    .offers-cta__btn { width: 100%; }
    .offers-head__phone-num { font-size: var(--step-1); }
    .offers-head__phone .offers-ico { width: 16px; height: 16px; }
    .offers-grid { gap: 1.75rem 1.25rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .offers-rich { margin-top: 2.5rem; }
}

/* Substitut cand nu exista imagine: initiala, ca sa nu se rupa ritmul gridului. */
.offers-card__initial {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    font-size: 2.75rem; font-weight: 700; letter-spacing: -0.03em;
    color: #d3d7de;
}
