:root {
    --bg: #0f1114;
    --bg-soft: rgba(255,255,255,0.02);
    --surface: rgba(255, 255, 255, 0.03);
    --surface-strong: rgba(255, 255, 255, 0.04);
    --ink: #ffffff;
    --muted: rgba(255,255,255,0.72);
    --line: rgba(255,255,255,0.06);
    --brand: #d97706;
    --brand-deep: #9a3412;
    --secoundaire-bg:rgba(36, 68, 74, 0.95);
    --accent: #1f6f5f;
    --accent-soft: rgba(255,255,255,0.03);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

/* body {
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(217, 119, 6, 0.16), transparent 30%),
        radial-gradient(circle at top right, rgba(31, 111, 95, 0.14), transparent 28%),
        linear-gradient(180deg, #fbf7f0 0%, #f4efe6 45%, #efe8dc 100%);
    min-height: 100vh;
    padding-top: 76px;
} */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Sora", sans-serif;
}


.market-shell {
    padding: 1.25rem 0 3rem;
}

.hero-panel,
.floating-panel,
.modal-content.market-modal {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow);
}

.hero-panel {
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.hero-panel::before,
.hero-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
}

.hero-panel::before {
    width: 260px;
    height: 260px;
    background: rgba(217, 119, 6, 0.15);
    top: -110px;
    right: -70px;
}

.hero-panel::after {
    width: 220px;
    height: 220px;
    background: rgba(31, 111, 95, 0.12);
    bottom: -120px;
    left: -60px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .85rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    color: var(--brand-deep);
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    margin: 1rem 0;
    max-width: 10ch;
}

.hero-copy {
    color: var(--muted);
    max-width: 58ch;
    font-size: 1.02rem;
}

.hero-actions,
.chip-row,
.stats-row,
.toolbar-row,
.store-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
}

.btn-brand,
.btn-ghost-brand {
    border-radius: 999px;
    padding: .9rem 1.25rem;
    font-weight: 800;
    border: none;
}

.btn-brand {
    color: #fff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    box-shadow: 0 14px 28px rgba(154, 52, 18, 0.2);
}

.btn-ghost-brand {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(20, 40, 29, 0.08);
}

.stats-row {
    margin-top: 1.5rem;
}

.hero-stat {
    min-width: 150px;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.hero-stat strong {
    display: block;
    font-size: 1.45rem;
    font-family: "Sora", sans-serif;
}

.hero-stat span {
    color: var(--muted);
    font-size: .92rem;
}

.floating-panel {
    border-radius: var(--radius-lg);
    padding: 1rem;
    height: 100%;
}

.hero-search {
    display: flex;
    align-items: center;
    gap: .85rem;
    border-radius: 20px;
    
    border: 1px solid rgba(20, 40, 29, 0.08);
    padding: .9rem 1rem;
    margin-bottom: 1rem;
}

.hero-search input,
.toolbar-search input,
.sidebar-search input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    color: var(--ink);
}



.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1rem;
    border-radius: 999px;
    background: var(--secoundaire-bg);
    border: 1px solid rgba(20, 40, 29, 0.08);
    color: var(--ink);
    font-weight: 700;
    font-size: .92rem;
}

.chip.active {
    background: linear-gradient(135deg, var(--accent) 0%, #174f44 100%);
    color: #fff;
    border-color: transparent;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-head p,
.section-subcopy,
.meta-text,
.sidebar-copy,
.empty-copy {
    color: var(--muted);
}

.store-pill {
    min-width: 106px;
    border-radius: 26px;
    padding: .85rem .75rem;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

.store-pill:hover,
.market-card:hover {
    transform: translateY(-6px);
}

.store-pill img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(217, 119, 6, 0.18);
    margin-bottom: .65rem;
}

.store-pill small {
    display: block;
    color: var(--muted);
    line-height: 1.25;
}

.sidebar-wrap {
    position: sticky;
    top: 96px;
}

.sidebar-box {
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 28px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.sidebar-search {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--bg-soft);
    border-radius: 18px;
    padding: .85rem 1rem;
    border: 1px solid rgba(20, 40, 29, 0.08);
    margin: 1rem 0 1.2rem;
}

.filter-group {
    margin-bottom: 1.4rem;
}

.filter-label {
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: .7rem;
}

.filter-list {
    display: grid;
    gap: .65rem;
}

.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem .95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 40, 29, 0.08);
}

.filter-item span:last-child {
    font-size: .85rem;
    color: var(--muted);
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .8rem;
    font-weight: 800;
}

.toolbar-row {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.15rem;
}

.toolbar-search {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(20, 40, 29, 0.08);
}

.toolbar-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    
}

.toolbar-pill {
    padding: .8rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(20, 40, 29, 0.08);
    color: var(--ink);
    font-weight: 700;
}

.market-card {
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.card-media {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f9e7cf 0%, #f0efe7 100%);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.market-card:hover .card-media img {
    transform: scale(1.05);
}

.card-badges {
    position: absolute;
    inset: 1rem 1rem auto 1rem;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: .75rem;
    pointer-events: none;
}

.badge-soft,
.badge-accent {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: 999px;
    padding: .5rem .8rem;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.badge-soft {
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
}

.badge-accent {
     background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%); 
    /* background: var(--accent); */
    color: #fff;
    box-shadow: 0 10px 20px rgba(154, 52, 18, 0.22);
}

.card-body-market {
    padding: 1.15rem;
}

.store-line,
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}

.store-line {
    margin-bottom: .85rem;
    color: var(--muted);
    font-size: .9rem;
}

.product-name {
    font-size: 1.15rem;
    margin-bottom: .55rem;
    min-height: 2.9rem;
}

.product-description {
    color: var(--muted);
    font-size: .92rem;
    min-height: 2.8rem;
    margin-bottom: .85rem;
}

.price-block {
    display: flex;
    align-items: end;
    gap: .65rem;
    flex-wrap: wrap;
    margin-bottom: .95rem;
}

.price-main {
    font-family: "Sora", sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--ink);
}

.price-old {
    color: #9a3412;
    opacity: .7;
    text-decoration: line-through;
    font-weight: 700;
}

.card-meta {
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: .88rem;
}

.card-actions {
    display: flex;
    gap: .75rem;
}

.card-actions .btn {
    border-radius: 16px;
    padding: .85rem 1rem;
    font-weight: 800;
}

.btn-save {
    min-width: 58px;
    background: rgba(31, 111, 95, 0.08);
    border: 1px solid rgba(31, 111, 95, 0.12);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}

.btn-save.liked {
    background: rgba(154, 52, 18, 0.12);
    border-color: rgba(154, 52, 18, 0.18);
    color: var(--brand-deep);
}

.like-count {
    font-size: .85rem;
    font-weight: 800;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 40, 29, 0.08);
    box-shadow: var(--shadow);
}

.modal-content.market-modal {
    border-radius: 28px;
    overflow: hidden;
    color: var(--ink);
}

.market-modal .modal-header,
.market-modal .modal-body {
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.12), transparent 24%),
        radial-gradient(circle at top left, rgba(31, 111, 95, 0.1), transparent 28%),
        #fffdf8;
}

.market-modal .btn-close {
    border-radius: 50%;
    padding: .75rem;
    background-color: rgba(20, 40, 29, 0.06);
}

.market-modal .price-stack {
    text-align: right;
}

.market-modal .description-box,
.market-modal .vendor-box,
.market-modal .preview-box {
    border-radius: 22px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 1rem;
}

.market-modal .preview-box {
    min-height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--muted);
    font-weight: 700;
}

.market-modal .img-thumbnail {
    border-radius: 22px;
    border: 1px solid rgba(20, 40, 29, 0.08);
    background: #fff;
    padding: .4rem;
}

.market-modal .recommendation-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: .25rem;
    scroll-snap-type: x mandatory;
}

.market-modal .recommendation-track>* {
    scroll-snap-align: start;
}

.recommendation-card {
    min-width: 190px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(20, 40, 29, 0.08);
    border-radius: 20px;
    padding: .9rem;
}

.recommendation-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: .75rem;
}

.load-state {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .85rem;
    padding: 1.25rem 1rem 0;
    color: var(--muted);
    font-weight: 700;
}

.scroll-anchor {
    height: 1px;
}

.filter-control {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(20, 40, 29, 0.08);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink);
    padding: .85rem 1rem;
    outline: none;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .8rem .95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 40, 29, 0.08);
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .sidebar-wrap {
        position: static;
    }

    .market-shell {
        padding: 1rem 0 2.2rem;
    }

    .hero-panel {
        padding: 1.5rem;
    }

    .hero-title {
        max-width: none;
    }

    .section-head {
        align-items: flex-start;
    }

    .stats-row {
        gap: 0.7rem;
    }

    .stats-row .section-card {
        flex: 1 1 calc(50% - 0.7rem);
        min-width: 0;
    }

    .floating-panel {
        padding: 0.95rem;
    }

    .chip-row {
        gap: 0.6rem;
    }

    .card-media {
        height: 200px;
    }
}

@media (max-width: 767.98px) {
    .market-shell {
        padding: 0.85rem 0 2rem;
    }

    .sidebar-wrap > aside.sidebar-box {
        display: none;
    }

    .container-fluid {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .hero-panel {
        border-radius: 22px;
        padding: 1.15rem;
        margin-bottom: 1.15rem;
    }

    .eyebrow {
        font-size: 0.76rem;
        letter-spacing: 0.06em;
        padding: 0.48rem 0.72rem;
    }

    .hero-title {
        font-size: clamp(1.85rem, 8vw, 2.45rem);
        line-height: 1.1;
        margin: 0.85rem 0 0.7rem;
    }

    .hero-copy {
        font-size: 0.95rem;
        line-height: 1.52;
    }

    .hero-actions {
        gap: 0.65rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-row .section-card {
        flex: 1 1 100%;
    }

    .hero-search,
    .toolbar-search,
    .sidebar-search {
        padding: 0.75rem 0.85rem;
        border-radius: 14px;
    }

    .hero-search input,
    .toolbar-search input,
    .sidebar-search input {
        font-size: 0.95rem;
    }

    .chip-row {
        margin-bottom: 0.9rem !important;
    }

    .chip {
        padding: 0.52rem 0.78rem;
        font-size: 0.82rem;
    }

    .ad-banner h3 {
        font-size: 1.2rem;
        line-height: 1.28;
    }

    .section-head {
        flex-direction: column;
        gap: 0.7rem;
        margin-bottom: 0.85rem;
    }

    .section-head > a,
    .section-head > .filter-badge {
        align-self: flex-start;
    }

    .store-strip {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.4rem;
        scroll-snap-type: x proximity;
    }

    .store-pill {
        min-width: 138px;
        scroll-snap-align: start;
    }

    .toolbar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
    }

    .toolbar-search {
        min-width: 0;
        width: 100%;
    }

    .toolbar-pills {
        width: 100%;
    }

    .toolbar-pill {
        flex: 1 1 calc(50% - 0.45rem);
        text-align: center;
        padding: 0.68rem 0.85rem;
    }
}

@media (max-width: 575.98px) {
    body {
        padding-top: 72px;
    }

    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .hero-panel {
        border-radius: 18px;
        padding: 1rem;
    }

    .hero-title {
        font-size: clamp(1.6rem, 9vw, 2.05rem);
    }

    .hero-copy {
        font-size: 0.92rem;
    }

    .sidebar-box,
    .market-card,
    .store-pill {
        border-radius: 24px;
    }

    .floating-panel {
        border-radius: 18px;
        padding: 0.85rem;
    }

    .toolbar-pill {
        flex: 1 1 100%;
    }

    .store-pill {
        min-width: 130px;
    }
}

@media (max-width: 399.98px) {
    .hero-title {
        font-size: 1.48rem;
    }

    .hero-actions .btn {
        padding: 0.72rem 0.95rem;
    }

    .chip {
        width: 100%;
        justify-content: center;
    }
}

/* Dark-mode overrides for products2 (white text, translucent buttons) */
body {
    background: var(--bg) !important;
    color: var(--ink) !important;
}

.market-shell .container-fluid {
    background: transparent;
}

.card-media {
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
}

.badge-soft {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.section-card,
.product-card,
.review-card,
.sidebar-box,
.empty-state,
.recommendation-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--ink);
}

/* Buttons use subtle translucent white background */
.btn-brand,
.btn-ghost-brand,
.btn-custom,
.btn-save,
.toolbar-pill,
.chip,
.store-pill {
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
}

.btn-custom:hover,
.btn-brand:hover,
.btn-view:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.08) !important;
}

.filter-control,
.sidebar-search,
.toolbar-search {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--ink);
}

.hero-search input,
.toolbar-search input,
.sidebar-search input,
.filter-control {
    color: var(--ink) !important;
}

.market-modal .modal-header,
.market-modal .modal-body {
    background: rgba(255,255,255,0.03);
    color: var(--ink);
}

.market-modal .img-thumbnail {
    background: rgba(255,255,255,0.02);
}

.price-main { color: #fff; }
.product-description, .store-line, .card-meta, .section-subcopy, .meta-text { color: var(--muted); }

/* ensure links/icons are visible */
a, a .bi { color: #fff; }

.btn-qty {
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--secoundaire-bg);
    color: var(--ink);
}

.btn-qty:hover {
    background: var(--accent);
}
