/* Promotiile (nov 2026): /super = lista promotiilor active, /promo/<id> = o promotie.
   Totul e sub .promo-page; culorile prin tokenuri (tokens.css), fontul site-ului. */

.promo-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 16px 48px;
    font-family: var(--font-sans);
    color: var(--c-text, #1a1a2e);
}

.promo-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: var(--c-muted, #6b7a90);
    margin-bottom: 12px;
}
.promo-crumbs a { color: inherit; text-decoration: none; }
.promo-crumbs a:hover { color: var(--c-brand, #1e50c8); text-decoration: underline; }

.promo-head { margin-bottom: 20px; }
.promo-head h1 {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.promo-head__lead {
    margin: 0;
    max-width: 68ch;
    color: var(--c-muted, #4a5a70);
    font-size: 15px;
    line-height: 1.5;
}
.promo-empty { color: var(--c-muted, #6b7a90); font-size: 15px; }

/* ---------- lista de promotii ---------- */
.promo-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.promo-card { min-width: 0; }
.promo-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--c-border, #e3e8ef);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.promo-card__link:hover,
.promo-card__link:focus-visible {
    border-color: var(--c-brand, #1e50c8);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}
.promo-card__link:focus-visible { outline: 2px solid var(--c-brand, #1e50c8); outline-offset: 2px; }
.promo-card__media { display: block; aspect-ratio: 1474 / 433; background: var(--c-surface, #f2f5f9); }
.promo-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.promo-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
    flex: 1;
}
.promo-card__title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.promo-card__desc { font-size: 14px; line-height: 1.45; color: var(--c-muted, #4a5a70); }
.promo-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-top: auto;
    padding-top: 6px;
    font-size: 13px;
    color: var(--c-muted, #6b7a90);
}
.promo-card__count::before { content: "•"; margin-right: 14px; color: var(--c-border, #c8d1dc); }
.promo-card__date + .promo-card__count::before { display: inline; }
.promo-card__meta > .promo-card__count:first-child::before { display: none; }
.promo-card__cta {
    margin-left: auto;
    font-weight: 600;
    color: var(--c-brand, #1e50c8);
    white-space: nowrap;
}

@media (max-width: 860px) {
    .promo-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .promo-head h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .promo-card__link { transition: none; }
    .promo-card__link:hover { transform: none; }
}

/* ---------- pagina unei promotii (/promo/<id>) ---------- */
.promo-hero {
    display: block;
    aspect-ratio: 1474 / 433;
    border-radius: 14px;
    overflow: hidden;
    background: var(--c-surface, #f2f5f9);
    margin-bottom: 18px;
}
.promo-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

.promo-head--view { margin-bottom: 24px; }
.promo-head__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--c-muted, #6b7a90);
}
.promo-head__meta span + span::before { content: "\2022"; margin-right: 16px; color: var(--c-border, #c8d1dc); }

.promo-section-title {
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 12px;
}
.promo-cats, .promo-groups { margin-bottom: 26px; }

/* tile-urile categoriilor de nivel 2 */
.promo-tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}
.promo-tile {
    display: flex;
    align-items: stretch;
    gap: 10px;
    height: 100%;
    min-height: 118px;
    padding: 14px 12px 14px 16px;
    border: 2px solid var(--c-border, #e3e8ef);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.promo-tile:hover, .promo-tile:focus-visible {
    border-color: var(--c-accent, #f28c28);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    color: inherit;
    text-decoration: none;
}
.promo-tile:focus-visible { outline: 2px solid var(--c-accent, #f28c28); outline-offset: 2px; }
.promo-tile.is-active {
    border-color: var(--c-accent, #f28c28);
    box-shadow: 0 0 0 1px var(--c-accent, #f28c28) inset;
    background: var(--c-accent-tint, #fff8f1);
}
.promo-tile__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.promo-tile__title {
    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.promo-tile__count { font-size: 13px; color: var(--c-muted, #6b7a90); }
.promo-tile__badge {
    margin-top: auto;
    padding: 4px 9px;
    border-radius: 6px;
    background: var(--c-sale, #ed2727);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.promo-tile__media {
    flex: 0 0 88px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.promo-tile__media img { width: 88px; height: 88px; object-fit: contain; mix-blend-mode: multiply; }

/* grupele de nivel 3 */
.promo-pills {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.promo-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 5px;
    border: 1px solid var(--c-border, #dfe5ee);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.promo-pill:hover, .promo-pill:focus-visible {
    border-color: var(--c-accent, #f28c28);
    color: inherit;
    text-decoration: none;
}
.promo-pill.is-active {
    border-color: var(--c-accent, #f28c28);
    box-shadow: 0 0 0 1px var(--c-accent, #f28c28) inset;
    background: var(--c-accent-tint, #fff8f1);
    font-weight: 600;
}
.promo-pill__media {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 7px;
    background: var(--c-surface, #f2f5f9);
    overflow: hidden;
}
.promo-pill__media img { width: 40px; height: 40px; object-fit: contain; mix-blend-mode: multiply; }
.promo-pill__count { color: var(--c-muted, #6b7a90); }

/* filtre + produse */
.promo-body { display: block; }
.promo-body.has-filters {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.promo-filters { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; overscroll-behavior: contain; border-radius: 12px; }
.promo-filters__wrap {
    border: 1px solid var(--c-border, #e3e8ef);
    border-radius: 12px;
    background: #fff;
}
.promo-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.promo-filters__head::-webkit-details-marker { display: none; }
.promo-filters__reset { font-size: 13px; font-weight: 600; color: var(--c-brand, #1e50c8); }
.promo-filters__form { padding: 0 14px 10px; }
.promo-filters__form.is-busy { opacity: .55; pointer-events: none; }
.promo-filter { border-top: 1px solid var(--c-border, #edf0f5); }
.promo-filter__title {
    padding: 11px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
}
.promo-filter__title::-webkit-details-marker { display: none; }
.promo-filter__title::after { content: "+"; color: var(--c-muted, #6b7a90); font-weight: 400; }
.promo-filter[open] > .promo-filter__title::after { content: "\2013"; }
.promo-filter__list { list-style: none; margin: 0 0 10px; padding: 0; }
.promo-filter__list.is-long { max-height: 264px; overflow-y: auto; }
.promo-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}
.promo-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--c-brand, #1e50c8); flex: 0 0 auto; }
.promo-check__label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.promo-check__count { font-size: 12px; color: var(--c-muted, #8592a6); }
.promo-check.is-empty { opacity: .5; }
.promo-filters__apply { margin-top: 8px; }

.promo-results { min-width: 0; }
.promo-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 14px;
}
.promo-toolbar__count { font-size: 15px; font-weight: 600; }
.promo-sort { display: flex; align-items: center; gap: 8px; margin: 0; }
.promo-sort label { margin: 0; font-size: 14px; color: var(--c-muted, #6b7a90); white-space: nowrap; }
.promo-sort select { width: auto; min-width: 220px; }
.promo-results .Content_Goods_Group { float: none; width: auto; }

@media (max-width: 991px) {
    .promo-body.has-filters { display: block; }
    .promo-filters { position: static; margin-bottom: 16px; }
}
@media (max-width: 600px) {
    .promo-tiles {
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
    }
    .promo-tiles > li { scroll-snap-align: start; }
    .promo-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
    .promo-pill { white-space: nowrap; }
    .promo-sort { width: 100%; }
    .promo-sort select { flex: 1; min-width: 0; }
    .promo-hero { border-radius: 10px; }
    .promo-head__meta { flex-direction: column; }
    .promo-head__meta span + span::before { content: none; }
}
@media (prefers-reduced-motion: reduce) {
    .promo-tile, .promo-pill { transition: none; }
}

/* inlocuirea fara reincarcare (web/js/promo-page.js) */
.promo-content { scroll-margin-top: 84px; transition: opacity .15s ease; }
.promo-content.is-loading { opacity: .5; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .promo-content { transition: none; }
}
