:root{
    /* Core */
    --bg: #0f1115;
    --text: rgba(245,245,245,0.92);
    --muted: rgba(245,245,245,0.70);

    /* Surfaces */
    --panel: rgba(255,255,255,0.04);
    --panel2: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.10);
    --shadow: rgba(0,0,0,0.45);

    /* Accents (gold-metal + emerald) */
    --gold-hi: #f8e8a6;
    --gold:    #d4af37;
    --gold-lo: #8d6b1f;
    --emerald: #145c44;

    /* Layout */
    --content-width: 1200px;
}

*{ box-sizing: border-box; }

html, body{
    height:100%;
    overflow-x: hidden;
    margin: 0;
}

body{
    background:
        radial-gradient(1200px 800px at 85% 85%, rgba(20,92,68,0.16), transparent 65%),
        radial-gradient(1000px 600px at 20% 10%, rgba(20,92,68,0.18), transparent 60%),
        radial-gradient(900px 700px at 80% 40%, rgba(212,175,55,0.10), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

input, button, textarea, select{
    font: inherit;
    color: inherit;
}

a{ color: inherit; }

.container{
    width: min(var(--content-width), 100%);
    margin: 0 auto;
    padding: 0 clamp(14px, 3vw, 28px);
}

.page{
    min-height: 100%;
    display: block;
    padding: 0;
}

/* Topbar (brand + search): shared chrome, styled in topbar.css. */

/* Content spacing */
.sections{
    padding-top: 18px; /* keeps content off the topbar */
    padding-bottom: 40px;
    display: grid;
    gap: 26px;
}

.section-head{
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 10px;
    margin-bottom: 12px;
}

.section-title{
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.2px;
}

.section-sub{
    margin: 6px 0 0;
    color: rgba(245,245,245,0.62);
    font-size: 13.5px;
}

/* Cards grid */
.cards{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.card{
    position: relative;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.card-after{
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 160ms ease;
    background: linear-gradient(
        135deg,
        rgba(248,232,166,0.10),
        rgba(212,175,55,0.14),
        rgba(20,92,68,0.10)
    );
    /* mask so it becomes a thin "ring", not a full overlay */
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1px;
}

.card-link{
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card:hover{
    transform: translateY(-2px);
    border-color: rgba(212,175,55,0.22);
    background: rgba(255,255,255,0.04);
}

.card-media{
    position: relative;
    aspect-ratio: 10/10;
    overflow: hidden;
    padding: 3px 3px 0 3px;
    background: rgba(255,255,255,0.02);
}

.card-media img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 15px 15px 0 0;
}

.chip{
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(212,175,55,0.25);
    background: rgba(212,175,55,0.10);
    color: rgba(248,232,166,0.92);
    font-size: 12px;
    font-weight: 700;
    display: none;
}

.card-body{
    padding: 12px 12px 14px;
    display: grid;
    gap: 10px;
    flex: 1;
}

.price-row{
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.price-main{
    display: grid;
    gap: 2px;
}

.price{
    font-size: 18px;
    font-weight: 820;
    letter-spacing: -0.2px;
    line-height: 1.05;
    background: linear-gradient(
        100deg,
        #e6c46a,
        #c6a34a,
        #9e7a2b
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.shop{
    color: rgba(245,245,245,0.58);
    font-size: 12.5px;
    margin-top: 4px;
}

.shop-name{
    color: rgba(120, 214, 176, 0.92);
    font-weight: 720;
    text-shadow: 0 0 8px rgba(20, 92, 68, 0.18);
    transition: filter 160ms ease, text-shadow 160ms ease, color 160ms ease;}


.offers-btn{
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(245,245,245,0.86);
    border-radius: 12px;
    padding: 8px 10px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.attrs{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attr{
    font-size: 11.5px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: linear-gradient(
        145deg,
        rgba(255,255,255,0.05),
        rgba(255,255,255,0.015)
    );
    color: rgba(245,245,245,0.72);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 1px 3px rgba(0,0,0,0.35);
}

/* ------------------------- */
/* Modal                     */
/* ------------------------- */

body.modal-open .topbar, body.modal-open .sections, body.modal-open .footer{
    pointer-events: none;
}

body.modal-open .modal-backdrop{
    pointer-events: auto;
}
.modal-backdrop{
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.55);
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal-backdrop[hidden]{ display: none !important; }

.modal{
    width: min(560px, 100%);
    max-height: min(50vh, 720px);
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(15,17,21,0.92);
    box-shadow: 0 18px 60px rgba(0,0,0,0.55);
    overflow: hidden;
}

.modal-head{
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-kicker{
    font-size: 11.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(245,245,245,0.46);
}

.modal-title{
    font-size: 16px;
    font-weight: 760;
    letter-spacing: -0.15px;
    line-height: 1.25;
    color: rgba(245,245,245,0.90);
}

.modal-body{
    padding: 12px 14px 16px;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
}

.offers-list{
    display: grid;
    gap: 8px;
}

.offer-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
}

.offer-shop{
    color: rgba(245,245,245,0.84);
    font-weight: 650;
    transition: color 140ms ease, text-shadow 140ms ease;
}

/* whole-row link: subtle highlight across the full line on hover */
a.offer-row{
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}

a.offer-row:hover{
    background: rgba(212,175,55,0.05);
    border-color: rgba(212,175,55,0.30);
}

a.offer-row:hover .offer-shop{
    color: rgba(150, 232, 200, 0.92);
    text-shadow: 0 0 10px rgba(20, 92, 68, 0.28);
}

a.offer-row:focus-visible{
    outline: 2px solid rgba(212,175,55,0.5);
    outline-offset: 2px;
}

.offer-price{
    background: linear-gradient(92deg, var(--gold-hi), var(--gold), var(--gold-lo));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 850;
}

.icon-btn{
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

/* ========================= */
/* Global Scrollbar Styling  */
/* Chrome / Edge / Safari    */
/* ========================= */

body::-webkit-scrollbar, .modal-body::-webkit-scrollbar{
    width: 10px;
}

body::-webkit-scrollbar-track, .modal-body::-webkit-scrollbar-track{
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
}

body::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb{
    background: rgba(212,175,55,0.5);
    border-radius: 999px;
    border: 2px solid rgba(15,17,21,0.9);
}

body::-webkit-scrollbar-thumb:hover, .modal-body::-webkit-scrollbar-thumb:hover{
    background: linear-gradient(
        180deg,
        var(--gold-hi),
        var(--gold),
        var(--gold-hi)
    );
}

/* ========================= */
/* Scrollbar - Firefox only  */
/* (avoid overriding WebKit) */
/* ========================= */
@supports not selector(::-webkit-scrollbar) {
    body, .modal-body {
        scrollbar-width: thin;
        scrollbar-color: rgba(212, 175, 55, 0.6) rgba(255, 255, 255, 0.06);
    }
}

/*.modal-body{*/
/*    scrollbar-width: thin;*/
/*    scrollbar-color: var(--gold) rgba(255,255,255,0.05);*/
/*}*/

/* Footer: shared chrome, styled in footer.css (loaded from base.html). */

/* Responsive */

@media (max-width: 1100px){
    .cards{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px){
    .cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px){
    .cards{ grid-template-columns: 1fr; gap: 14px; }
}

/*@media (max-height: 430px){*/
/*    .modal-backdrop{*/
/*        padding: 10px;*/
/*        place-items: start center;*/
/*    }*/

/*    .modal{*/
/*        max-height: 92vh;*/
/*    }*/
/*}*/

/* ------------------------- */
/* Card typography polish    */
/* ------------------------- */

/* 1) Mai mult "air" + ritm */
.card-body{
    padding: 14px 14px 16px;
    gap: 11px;
}

.card-title{
    font-weight: 640;
    font-size: 14.5px;
    letter-spacing: -0.15px;
    line-height: 1.35;
    color: rgba(245,245,245,0.88);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: background 180ms ease, color 180ms ease;
}

.offers-btn{
    padding: 7px 10px;
    border-radius: 12px;
    font-weight: 650;
    font-size: 12.5px;
    letter-spacing: 0.1px;
    background: rgba(255,255,255,0.035);
    border-color: rgba(255,255,255,0.10);
    color: rgba(245,245,245,0.82);
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.offers-btn:hover{
    background: rgba(255,255,255,0.055);
    border-color: rgba(212,175,55,0.22);
    transform: translateY(-1px);
}

.offers-btn:focus{
    outline: none;
}

.offers-btn:focus-visible{
    border-color: rgba(212,175,55,0.30);
    box-shadow:
        0 0 0 2px rgba(212,175,55,0.18),
        0 0 16px rgba(212,175,55,0.12);
}

@media (min-width: 821px){
    .cards{ gap: 14px; }
    .card-body{ padding: 14px 14px 16px; }
}

.card:hover .card-title{
    background: linear-gradient(
        95deg,
        #f0d37c,
        #c6a34a,
        #8d6b1f
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card:hover .shop-name{
    color: rgba(150, 232, 200, 0.92);
    filter: drop-shadow(0 0 6px rgba(20, 92, 68, 0.55));
    text-shadow: 0 0 12px rgba(20, 92, 68, 0.24);
}

/* ========================= */
/* No Results Panel          */
/* ========================= */

.no-results{
    margin: 8px 0 22px;
}

.no-results-inner{
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 28px 26px;
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.04),
            rgba(255,255,255,0.02)
        );
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 18px 60px rgba(0,0,0,0.35);
    text-align: center;
}

.no-results-kicker{
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(245,245,245,0.45);
    margin-bottom: 10px;
}

.no-results-title{
    margin: 0;
    font-size: 20px;
    font-weight: 760;
    letter-spacing: -0.2px;
}

.no-results-query{
    background: linear-gradient(
        100deg,
        #e6c46a,
        #c6a34a,
        #9e7a2b
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.no-results-sub{
    margin: 12px 0 0;
    color: rgba(245,245,245,0.65);
    font-size: 14px;
}