/* BuyLowa v3 - price comparison / deal directory */

:root {
    --bg: #f4f5f6;
    --surface: #ffffff;
    --soft: #f8f9fa;
    --ink: #1f2933;
    --text: #414b57;
    --muted: #6f7b88;
    --line: #dce1e6;
    --brand: #0f766e;
    --brand-dark: #0b5f59;
    --brand-soft: #e6f7f5;
    --orange: #f97316;
    --orange-soft: #fff2e8;
    --blue: #2563eb;
    --blue-soft: #eaf1ff;
    --green: #15803d;
    --green-soft: #eaf8ef;
    --max: 1200px;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(31,41,51,.06), 0 10px 28px rgba(31,41,51,.07);
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: inherit; }

.container {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto;
}

/* Header */
.top-strip {
    background: var(--ink);
    color: rgba(255,255,255,.78);
    font-size: .82rem;
}
.top-strip-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.top-strip a { color: white; text-decoration: none; font-weight: 700; }

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    min-height: 70px;
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    gap: 1rem;
    align-items: center;
}
.logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--ink);
    font-weight: 950;
    letter-spacing: -.05em;
    font-size: 1.35rem;
    white-space: nowrap;
}
.logo-badge {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--brand);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 950;
}
.logo strong { color: var(--brand); }

.header-search {
    display: flex;
    background: var(--surface);
    border: 2px solid var(--brand);
    border-radius: 12px;
    overflow: hidden;
    min-width: 0;
}
.header-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: .8rem .95rem;
    font: inherit;
    min-width: 0;
    color: var(--ink);
}
.header-search button { border-radius: 0; flex: 0 0 auto; }

.header-actions { display: flex; align-items: center; gap: .65rem; }
.region-select {
    border: 1.5px solid var(--line);
    background: var(--soft);
    color: var(--ink);
    border-radius: 10px;
    padding: .65rem .75rem;
    font: inherit;
    font-size: .85rem;
    font-weight: 800;
    outline: none;
}

.nav-row {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.nav-links {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: .35rem;
    list-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.nav-links a {
    display: inline-flex;
    white-space: nowrap;
    text-decoration: none;
    color: var(--text);
    font-size: .86rem;
    font-weight: 800;
    padding: .48rem .75rem;
    border-radius: 999px;
}
.nav-links a:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: none;
    padding: .78rem 1rem;
    border-radius: 10px;
    font: inherit;
    font-size: .88rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-small { padding: .55rem .75rem; font-size: .8rem; border-radius: 9px; }

.badge {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: .24rem .58rem;
    font-size: .7rem;
    font-weight: 900;
    border: 1px solid var(--line);
    color: var(--muted);
    background: var(--soft);
}
.badge.green { color: var(--green); background: var(--green-soft); border-color: rgba(21,128,61,.18); }
.badge.blue { color: var(--blue); background: var(--blue-soft); border-color: rgba(37,99,235,.16); }
.badge.orange { color: #c2410c; background: var(--orange-soft); border-color: rgba(249,115,22,.2); }

/* Search hero */
.search-hero { padding: 2rem 0 1.25rem; }
.search-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.search-panel-top {
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--brand-soft), #fff);
    border-bottom: 1px solid var(--line);
}
.search-panel-top h1 {
    color: var(--ink);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: -.06em;
    line-height: 1.05;
    margin-bottom: .45rem;
}
.search-panel-top p { color: var(--muted); max-width: 760px; }

.big-search {
    padding: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 155px 155px auto;
    gap: .65rem;
    border-bottom: 1px solid var(--line);
}
.big-search input,
.big-search select {
    border: 1.5px solid var(--line);
    background: var(--surface);
    border-radius: 10px;
    padding: .78rem .85rem;
    font: inherit;
    color: var(--ink);
    outline: none;
    min-width: 0;
}
.big-search input:focus,
.big-search select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(15,118,110,.1);
}
.quick-searches {
    padding: .9rem 1rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.quick-searches span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
    align-self: center;
}
.quick-searches button {
    border: 1px solid var(--line);
    background: var(--soft);
    color: var(--text);
    border-radius: 999px;
    padding: .38rem .7rem;
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}
.quick-searches button:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* Sections */
.section { padding: 1.25rem 0; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}
.section-title {
    color: var(--ink);
    font-size: 1.35rem;
    letter-spacing: -.035em;
}
.section-sub { color: var(--muted); font-size: .9rem; margin-top: .15rem; }
.view-note { color: var(--muted); font-size: .82rem; font-weight: 750; }

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: .7rem;
}
.category-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .9rem .7rem;
    text-decoration: none;
    text-align: center;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .35rem;
}
.category-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.category-icon { font-size: 1.75rem; }
.category-card strong { color: var(--ink); font-size: .88rem; }
.category-card span { color: var(--muted); font-size: .74rem; }

/* Promotions */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .85rem;
}
.promo-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.promo-card:hover { border-color: var(--brand); }
.promo-top {
    padding: .75rem .85rem;
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}
.promo-market { color: var(--muted); font-size: .75rem; font-weight: 850; }
.promo-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    flex: 1;
}
.promo-body h3 { color: var(--ink); font-size: 1.05rem; line-height: 1.25; }
.promo-body p { color: var(--muted); font-size: .86rem; }
.promo-expiry { color: var(--text); font-size: .78rem; font-weight: 800; margin-top: auto; }
.promo-body .btn { width: 100%; }

/* Results */
.results-toolbar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .85rem;
}
.filter-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter-chip {
    border: 1px solid var(--line);
    background: var(--soft);
    color: var(--text);
    border-radius: 999px;
    padding: .42rem .7rem;
    font: inherit;
    font-size: .78rem;
    font-weight: 850;
    cursor: pointer;
}
.filter-chip.active {
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-color: rgba(15,118,110,.24);
}
.results-meta { color: var(--muted); font-size: .82rem; font-weight: 750; }

.product-list { display: grid; gap: .75rem; }
.price-check-card,
.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 190px;
    gap: 0;
}
.price-check-card:hover,
.product-card:hover { border-color: var(--brand); }
.product-thumb {
    background: linear-gradient(135deg, #fff, var(--soft));
    border-right: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-size: 2.7rem;
    min-height: 120px;
}
.product-main { padding: .95rem; min-width: 0; }
.product-main h3 {
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.3;
    margin: .4rem 0 .35rem;
}
.product-main p { color: var(--muted); font-size: .86rem; }
.product-side {
    border-left: 1px solid var(--line);
    padding: .95rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    align-items: stretch;
    justify-content: center;
}
.price-label {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 950;
    letter-spacing: -.02em;
}
.side-note { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.empty-state {
    background: var(--surface);
    border: 1.5px dashed var(--line);
    border-radius: 16px;
    padding: 1.6rem;
    text-align: center;
}
.empty-state h3 { color: var(--ink); margin-bottom: .3rem; }
.empty-state p { color: var(--muted); }

/* Info */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; }
.info-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: var(--shadow);
}
.info-card h3 { color: var(--ink); margin-bottom: .35rem; }
.info-card p { color: var(--muted); font-size: .88rem; }
.disclosure-strip {
    background: #fff8e9;
    border: 1px solid #fde3a2;
    border-radius: 14px;
    padding: .95rem 1rem;
    color: #7a4b00;
    font-size: .88rem;
}

/* Pages */
.page-hero {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 2.5rem 0;
}
.page-hero h1 {
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -.05em;
}
.page-hero p { color: var(--muted); margin-top: .5rem; max-width: 760px; }
.content-page {
    width: min(860px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.5rem 0;
}
.content-page h2 { color: var(--ink); margin: 1.8rem 0 .65rem; }
.content-page p,
.content-page li { margin-bottom: .9rem; }
.content-page ul { padding-left: 1.25rem; }

/* Footer */
footer {
    background: var(--ink);
    color: white;
    margin-top: 2rem;
    padding: 2.5rem 0 1.3rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}
footer .logo { color: white; }
.footer-brand p {
    color: rgba(255,255,255,.62);
    margin-top: .7rem;
    max-width: 320px;
    font-size: .9rem;
}
.footer-col h4 {
    color: rgba(255,255,255,.88);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    margin-bottom: .75rem;
}
.footer-col ul { list-style: none; display: grid; gap: .4rem; }
.footer-col a {
    color: rgba(255,255,255,.62);
    text-decoration: none;
    font-size: .86rem;
}
.footer-col a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: rgba(255,255,255,.58);
    font-size: .8rem;
}

@media (max-width: 1020px) {
    .header-inner { grid-template-columns: 1fr auto; }
    .header-search { grid-column: 1 / -1; order: 3; }
    .category-grid { grid-template-columns: repeat(4, 1fr); }
    .promo-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid,
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .container { width: min(100% - 1.2rem, var(--max)); }
    .top-strip-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: .5rem 0;
        gap: .25rem;
    }
    .header-inner { gap: .75rem; padding: .75rem 0; min-height: 0; }
    .logo { font-size: 1.2rem; }
    .logo-badge { width: 30px; height: 30px; }
    .region-select { max-width: 122px; }
    .nav-links { padding: .15rem 0; }
    .search-hero { padding-top: 1rem; }
    .search-panel-top { padding: 1rem; }
    .big-search { grid-template-columns: 1fr; padding: .8rem; }
    .quick-searches {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .quick-searches span,
    .quick-searches button { flex: 0 0 auto; white-space: nowrap; }
    .category-grid,
    .promo-grid,
    .info-grid,
    .footer-grid { grid-template-columns: 1fr; }
    .category-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: .2rem;
        -webkit-overflow-scrolling: touch;
    }
    .category-card { min-width: 128px; }
    .section-head { align-items: flex-start; flex-direction: column; }
    .results-toolbar { align-items: stretch; flex-direction: column; }
    .filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .15rem;
    }
    .filter-chip { flex: 0 0 auto; white-space: nowrap; }
    .price-check-card,
    .product-card { grid-template-columns: 1fr; }
    .product-thumb {
        min-height: 110px;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .product-side {
        border-left: none;
        border-top: 1px solid var(--line);
    }
}
