/* =============================================
   PricePick — Shopping Comparison Interface
   ============================================= */

:root {
    --primary:      #163a5f;
    --primary-dk:   #102d4b;
    --primary-lt:   #1e5090;
    --accent:       #2878c8;
    --accent-pale:  #e8f2fc;
    --deal:         #d96722;
    --deal-pale:    #fdf0e8;
    --saving:       #23845b;
    --saving-pale:  #e6f5ee;
    --surface:      #ffffff;
    --surface-soft: #f4f6f8;
    --background:   #eef2f5;
    --text:         #20262c;
    --muted:        #68737d;
    --border:       #d9e0e5;
    --border-dk:    #b8c4cc;
    --shadow:       0 1px 8px rgba(22,58,95,0.08);
    --radius:       6px;
    --radius-sm:    4px;
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }
body {
    background: var(--background);
    color: var(--text);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
}
section[id], article[id] { scroll-margin-top: 90px; }
h1,h2,h3,h4,h5 { color: var(--text); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.5rem,3.5vw,2.2rem); }
h2 { font-size: clamp(1.15rem,2.5vw,1.5rem); }
a  { color: var(--accent); }
a:hover { color: var(--primary); }

/* ---- Marketplace Header ---- */
.site-header {
    background: var(--primary);
    border-bottom: 3px solid var(--accent);
    position: sticky; top:0; z-index:1050;
    box-shadow: 0 2px 12px rgba(16,45,75,0.18);
}
.header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0;
}
.site-logo {
    font-size: 1.35rem;
    font-weight: 900;
    color: #fff !important;
    text-decoration: none;
    letter-spacing: -0.04em;
    flex-shrink: 0;
}
.site-logo .logo-pick { color: #4db8ff; }
.site-logo .tagline {
    display: block;
    font-size: 0.57rem;
    font-weight: 400;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.04em;
    line-height: 1;
}
.header-search {
    flex: 1;
    display: flex;
    gap: 0;
    max-width: 680px;
}
.header-search input {
    flex: 1;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 0.5rem 0.85rem;
    font-size: 0.88rem;
    background: #fff;
}
.header-search input:focus { outline: 2px solid #4db8ff; outline-offset: -2px; }
.header-search button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.13s;
}
.header-search button:hover { background: var(--primary-lt); }
.header-nav {
    background: var(--primary-dk);
    padding: 0;
}
.header-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}
.header-nav a {
    display: block;
    color: rgba(255,255,255,0.78) !important;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.42rem 0.9rem;
    text-decoration: none;
    transition: all 0.12s;
    border-bottom: 2px solid transparent;
}
.header-nav a:hover, .header-nav a.active {
    color: #fff !important;
    background: rgba(255,255,255,0.07);
    border-bottom-color: #4db8ff;
}
.mobile-search-toggle, .mobile-menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.3rem 0.4rem;
    display: none;
}

/* ---- Breadcrumb ---- */
.breadcrumb-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.35rem 0;
    font-size: 0.77rem;
}
.breadcrumb { margin:0; background:none; padding:0; }
.breadcrumb-item a { color:var(--accent); text-decoration:none; font-weight:500; }
.breadcrumb-item.active { color:var(--muted); }
.breadcrumb-item + .breadcrumb-item::before { color:var(--muted); }

/* ---- Hero / Search Section ---- */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-lt) 100%);
    padding: 3.5rem 0 2.8rem;
    color: #fff;
}
.hero-search {
    display: flex;
    max-width: 680px;
    margin: 1.5rem auto 0;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    border-radius: var(--radius);
    overflow: hidden;
}
.hero-search input {
    flex: 1;
    border: none;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
}
.hero-search input:focus { outline: none; }
.hero-search button {
    background: var(--deal);
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.13s;
}
.hero-search button:hover { background: #c05818; }
.hero-tags { display:flex; flex-wrap:wrap; gap:0.4rem; margin-top:1rem; justify-content:center; }
.hero-tag {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 0.15rem 0.65rem;
    font-size: 0.76rem;
    text-decoration: none;
    transition: all 0.12s;
}
.hero-tag:hover { background: rgba(255,255,255,0.22); color:#fff; }

/* ---- Category Rail ---- */
.category-rail {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.7rem 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-rail::-webkit-scrollbar { display:none; }
.category-rail .container { display:flex; gap:0.5rem; }
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    background: var(--surface-soft);
    border: 1.5px solid var(--border);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.12s;
}
.cat-chip:hover, .cat-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.cat-chip .count {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 0 0.35rem;
    font-size: 0.68rem;
}
.cat-chip.active .count { background: rgba(255,255,255,0.2); }

/* ---- Product Cards / Rows ---- */
.product-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem;
    margin-bottom: 0.7rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: box-shadow 0.12s;
}
.product-row:hover { box-shadow: var(--shadow); }

.product-image-ph {
    width: 90px;
    height: 90px;
    min-width: 90px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.6rem;
    text-align: center;
    overflow: hidden;
}
.product-image-ph .bi { font-size: 2.2rem; color: var(--border-dk); }
.product-image-ph-lg {
    width: 180px;
    height: 180px;
    min-width: 180px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.65rem;
    text-align: center;
}
.product-image-ph-lg .bi { font-size: 3.5rem; color: var(--border-dk); }

.product-info { flex: 1; min-width: 0; }
.product-name { font-weight: 700; font-size: 0.95rem; color: var(--text); text-decoration:none; line-height: 1.25; }
.product-name:hover { color: var(--accent); }
.product-brand { font-size: 0.75rem; color: var(--muted); }
.product-features-mini {
    margin: 0.35rem 0;
    font-size: 0.78rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.75rem;
}
.product-features-mini span::before { content:'• '; color:var(--border-dk); }

.price-block { text-align: right; min-width: 120px; }
.price-lowest { font-size: 1.15rem; font-weight: 800; color: var(--saving); }
.price-label { font-size: 0.67rem; color: var(--muted); font-weight: 500; display:block; margin-bottom:0.05rem; }
.price-mrp { font-size: 0.78rem; color: var(--muted); text-decoration: line-through; }
.discount-badge {
    display: inline-block;
    background: var(--deal);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    margin-left: 0.3rem;
}
.listings-count { font-size: 0.73rem; color: var(--muted); margin-top:0.2rem; }

/* ---- Price Comparison Table ---- */
.comparison-table-wrap { overflow-x: auto; }
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 600px;
}
.comparison-table th {
    background: var(--primary);
    color: #fff;
    padding: 0.55rem 0.85rem;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.comparison-table td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: var(--surface-soft); }
.comparison-table tr.lowest-row td { background: var(--saving-pale); }
.lowest-badge {
    display: inline-block;
    background: var(--saving);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    margin-left: 0.3rem;
}
.sample-badge {
    display: inline-block;
    background: var(--background);
    color: var(--muted);
    font-size: 0.63rem;
    border: 1px solid var(--border);
    padding: 0.05rem 0.35rem;
    border-radius: var(--radius-sm);
}
.store-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.store-initial-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    border-radius: var(--radius);
}
.visit-btn {
    background: var(--accent);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.7rem;
    font-size: 0.77rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s;
    white-space: nowrap;
}
.visit-btn:hover { background: var(--primary); color:#fff !important; }

/* ---- Specs Table ---- */
.specs-table { width:100%; font-size:0.85rem; }
.specs-table tr:nth-child(odd) td:first-child { background:var(--surface-soft); }
.specs-table td { padding:0.4rem 0.7rem; border-bottom:1px solid var(--border); }
.specs-table td:first-child { font-weight:600; width:40%; color:var(--primary); }

/* ---- Compare Grid ---- */
.compare-table-wrap { overflow-x: auto; }
.compare-table { min-width: 500px; }
.compare-table th {
    background: var(--primary);
    color: #fff;
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
    text-align: center;
}
.compare-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    text-align: center;
}
.compare-table .row-label {
    text-align: left;
    font-weight: 700;
    background: var(--surface-soft);
    font-size: 0.78rem;
    color: var(--primary);
    white-space: nowrap;
}
.compare-table tr:hover td { background:var(--accent-pale); }
.compare-table tr:hover .row-label { background:var(--accent-pale); }
.diff-highlight { background:var(--accent-pale) !important; font-weight:700; }

/* ---- Deal Rows ---- */
.deal-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--deal);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.deal-type-badge {
    display: inline-block;
    background: var(--deal);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.deal-discount-large {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--deal);
    line-height: 1;
}
.deal-prices .original { color: var(--muted); text-decoration: line-through; font-size: 0.82rem; }
.deal-prices .offer { color: var(--saving); font-weight: 700; font-size: 1.05rem; }

/* ---- Filter Sidebar ---- */
.filter-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}
.filter-group { margin-bottom: 1.1rem; }
.filter-group h6 { font-size: 0.78rem; font-weight: 700; text-transform:uppercase; letter-spacing:0.05em; color:var(--primary); margin-bottom:0.45rem; }
.filter-check { display:flex; align-items:center; gap:0.35rem; font-size:0.82rem; margin-bottom:0.25rem; cursor:pointer; }
.filter-check input { cursor:pointer; }

/* ---- Price Summary ---- */
.price-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}
.price-summary .row-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.price-summary .row-item:last-child { border-bottom:none; }
.price-summary .low { color: var(--saving); font-weight: 700; }
.price-summary .high { color: var(--deal); font-weight: 700; }
.price-summary .diff { color: var(--accent); font-weight: 700; }

/* ---- Disclosure ---- */
.disclosure-notice {
    background: #fffbf0;
    border: 1px solid #e6d48a;
    border-radius: var(--radius);
    padding: 0.65rem 0.9rem;
    font-size: 0.78rem;
    color: #6b5c10;
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}
.disclosure-notice .bi { font-size: 0.95rem; flex-shrink:0; margin-top:0.05rem; }

/* ---- Section ---- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.section-header h2 { margin:0; }
.view-all-link { font-size: 0.82rem; font-weight:600; color:var(--accent); text-decoration:none; }
.view-all-link:hover { color:var(--primary); }

/* ---- Process Steps ---- */
.how-steps { display:flex; gap:0; align-items:flex-start; flex-wrap:wrap; }
.how-step {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 1rem;
    position: relative;
}
.how-step::after {
    content: '→';
    position: absolute;
    right: -0.5rem;
    top: 1.5rem;
    font-size: 1.3rem;
    color: var(--border-dk);
}
.how-step:last-child::after { display: none; }
.how-step-icon {
    width: 3rem;
    height: 3rem;
    background: var(--accent-pale);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.3rem;
    color: var(--accent);
}
.how-step h4 { font-size: 0.88rem; margin-bottom: 0.25rem; }
.how-step p { font-size: 0.78rem; color: var(--muted); margin:0; }

/* ---- Store Cards ---- */
.store-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    transition: box-shadow 0.12s;
}
.store-card:hover { box-shadow: var(--shadow); }

/* ---- Category Cards ---- */
.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    display: block;
    transition: all 0.12s;
}
.category-card:hover { border-color: var(--accent); box-shadow: var(--shadow); color: var(--primary); }
.category-card .cat-icon { font-size: 2rem; color: var(--accent); margin-bottom: 0.4rem; display:block; }
.category-card h3 { font-size: 0.88rem; margin-bottom: 0.15rem; }
.category-card .cat-count { font-size: 0.73rem; color: var(--muted); }

/* ---- Comparison selector ---- */
.compare-selector {
    background: var(--accent-pale);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.8rem;
    margin-bottom: 1rem;
}

/* ---- VS strip ---- */
.vs-strip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.6rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
}
.vs-badge {
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    font-size: 0.8rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
}

/* ---- Sort bar ---- */
.sort-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}
.sort-bar label { font-size: 0.78rem; font-weight:600; color:var(--muted); white-space:nowrap; }
.sort-bar select { font-size: 0.82rem; border: 1px solid var(--border); border-radius:var(--radius-sm); padding: 0.2rem 0.5rem; }
.result-count { font-size: 0.78rem; color:var(--muted); margin-left:auto; }

/* ---- Ad placeholder ---- */
.ad-placeholder {
    background: var(--surface-soft);
    border: 1px dashed var(--border-dk);
    border-radius: var(--radius);
    padding: 0.85rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.71rem;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Shopping checklist ---- */
.shopping-check { list-style:none; padding:0; margin:0; }
.shopping-check li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
}
.shopping-check li:last-child { border-bottom:none; }
.shopping-check .bi { color: var(--saving); flex-shrink:0; margin-top:0.15rem; }

/* ---- Key features ---- */
.feature-list { list-style:none; padding:0; margin:0; }
.feature-list li {
    display:flex; align-items:flex-start; gap:0.4rem;
    padding:0.25rem 0; font-size:0.87rem;
    border-bottom:1px solid var(--border);
}
.feature-list li:last-child { border-bottom:none; }
.feature-list .bi { color:var(--accent); flex-shrink:0; margin-top:0.15rem; font-size:0.8rem; }

/* ---- Price range ---- */
.price-range-bar {
    height: 5px;
    background: var(--border);
    border-radius: 5px;
    position: relative;
    margin: 0.35rem 0;
}
.price-range-fill {
    position: absolute;
    height: 100%;
    background: var(--saving);
    border-radius: 5px;
}

/* ---- Footer ---- */
.site-footer {
    background: var(--primary-dk);
    color: #8aaccc;
    padding: 2.5rem 0 1.2rem;
    margin-top: 3rem;
    border-top: 3px solid var(--accent);
}
.site-footer h5 { color:#fff; font-size:0.77rem; text-transform:uppercase; letter-spacing:0.08em; font-weight:700; margin-bottom:0.7rem; }
.site-footer a { color:#8aaccc; text-decoration:none; font-size:0.82rem; display:block; padding:0.08rem 0; }
.site-footer a:hover { color:#fff; }
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 0.85rem;
    margin-top: 1.4rem;
    font-size: 0.73rem;
    color: #4a6a88;
}
.footer-disclosure {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 0.65rem 0.9rem;
    font-size: 0.75rem;
    color: #6888a8;
    margin-bottom: 1.5rem;
}

/* ---- Back to top ---- */
#backToTop {
    position:fixed; bottom:1.4rem; right:1.4rem;
    background:var(--primary); color:#fff;
    border:none; border-radius:50%;
    width:2.4rem; height:2.4rem;
    font-size:1rem; display:none;
    align-items:center; justify-content:center;
    cursor:pointer; z-index:2000;
    box-shadow:var(--shadow);
    transition:background 0.13s;
}
#backToTop:hover { background:var(--accent); }
#backToTop.visible { display:flex; }

/* ---- Badges ---- */
.avail-yes { color:var(--saving); font-weight:600; font-size:0.78rem; }
.avail-no  { color:var(--deal);   font-weight:600; font-size:0.78rem; }
.label-sample { font-size:0.63rem; color:var(--muted); font-style:italic; }

/* ---- Policy pages ---- */
.policy-section { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.policy-section:last-child { border-bottom:none; }

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .header-search { display:none; }
    .header-search.mobile-open { display:flex; position:absolute; left:0; right:0; top:100%; background:var(--primary); padding:0.5rem 1rem; z-index:100; }
    .mobile-search-toggle, .mobile-menu-toggle { display:block; }
    .header-nav { display:none; }
    .header-nav.mobile-open { display:block; }
    .header-nav ul { flex-direction:column; }
    .product-image-ph-lg { width:110px; height:110px; min-width:110px; }
    .product-image-ph { width:70px; height:70px; min-width:70px; }
    .product-image-ph .bi { font-size:1.6rem; }
    .price-block { min-width:0; }
    .hero-section { padding:2rem 0 1.8rem; }
    .how-step::after { display:none; }
    .how-step { min-width:0; flex:0 0 50%; }
}

@media (max-width: 575px) {
    .deal-row { flex-direction:column; gap:0.5rem; }
    .vs-strip { grid-template-columns:1fr; }
}

/* ---- Print ---- */
@media print {
    .site-header, .category-rail, .site-footer, #backToTop,
    .ad-placeholder, .filter-sidebar, .sort-bar, .no-print { display:none !important; }
    body { background:#fff; }
    .comparison-table-wrap, .compare-table-wrap { overflow:visible; }
}

/* ---- Accessibility ---- */
:focus-visible { outline:3px solid var(--accent); outline-offset:2px; border-radius:3px; }
