/* =============================================
   DealNest — Deal Discovery Hub
   ============================================= */

:root {
    --primary:      #27315f;
    --primary-dk:   #1c2347;
    --primary-lt:   #3a4a7a;
    --deal:         #db6246;
    --deal-pale:    #fdf1ed;
    --saving:       #2d805c;
    --saving-pale:  #e8f5ee;
    --gold:         #c79a3b;
    --gold-pale:    #fdf6e3;
    --cream:        #faf7f0;
    --surface:      #ffffff;
    --surface-soft: #f2f3f6;
    --text:         #25272b;
    --muted:        #6d7178;
    --border:       #dddfe4;
    --border-dk:    #c4c7ce;
    --shadow:       0 2px 12px rgba(39,49,95,0.08);
    --radius:       8px;
    --radius-sm:    5px;
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }
body {
    background: var(--cream);
    color: var(--text);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    line-height: 1.75;
}
h1,h2,h3,h4,h5 { color: var(--primary); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(1.45rem, 3.5vw, 2.1rem); }
h2 { font-size: clamp(1.1rem, 2.5vw, 1.45rem); }
a { color: var(--primary-lt); }
a:hover { color: var(--deal); }

/* ---- Site Header ---- */
.site-header {
    background: var(--primary);
    border-bottom: 3px solid var(--deal);
    position: sticky; top: 0; z-index: 1050;
    box-shadow: 0 2px 16px rgba(28,35,71,0.18);
}
.header-inner {
    display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0;
}
.site-logo {
    font-size: 1.4rem; font-weight: 900;
    color: #fff !important; text-decoration: none;
    letter-spacing: -0.03em; flex-shrink: 0;
}
.site-logo .logo-nest { color: var(--deal); }
.site-logo .logo-tag {
    display: block; font-size: 0.54rem; font-weight: 400;
    color: rgba(255,255,255,0.5); letter-spacing: 0.05em; line-height: 1;
}
.header-search-wrap {
    flex: 1; max-width: 560px;
    display: flex; gap: 0;
}
.header-search-wrap input {
    flex: 1; border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    padding: 0.45rem 0.85rem; font-size: 0.86rem; background: #fff;
}
.header-search-wrap input:focus { outline: 2px solid var(--deal); outline-offset: -2px; }
.header-search-wrap button {
    background: var(--deal); color: #fff; border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.45rem 0.9rem; font-size: 0.84rem; font-weight: 600;
    cursor: pointer; transition: background 0.12s; white-space: nowrap;
}
.header-search-wrap button:hover { background: #c04a2e; }
.mobile-toggle {
    background: none; border: none; color: #fff;
    font-size: 1.35rem; cursor: pointer; padding: 0.25rem 0.4rem; display: none;
}
.mobile-search-btn {
    background: none; border: none; color: #fff;
    font-size: 1.2rem; cursor: pointer; padding: 0.25rem 0.4rem; display: none;
}

.header-nav { background: var(--primary-dk); }
.header-nav ul {
    list-style: none; margin: 0; padding: 0; display: flex; gap: 0; flex-wrap: wrap;
}
.header-nav a {
    display: block; color: rgba(255,255,255,0.75) !important;
    font-size: 0.79rem; font-weight: 600; padding: 0.4rem 0.85rem;
    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.06);
    border-bottom-color: var(--deal);
}

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

/* ---- Hero — deal board style ---- */
.hero {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-lt) 100%);
    padding: 3rem 0 2.5rem; color: #fff;
}
.hero h1 { color: #fff; font-size: clamp(1.5rem, 4vw, 2.3rem); }
.hero-lead { color: rgba(255,255,255,0.82); max-width: 580px; font-size: 0.98rem; }
.hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.btn-deal {
    background: var(--deal); color: #fff !important; font-weight: 700;
    border: none; border-radius: var(--radius-sm); padding: 0.65rem 1.4rem;
    font-size: 0.92rem; text-decoration: none; transition: background 0.12s;
    cursor: pointer; display: inline-block;
}
.btn-deal:hover { background: #c04a2e; }
.btn-outline-light-custom {
    background: rgba(255,255,255,0.12); color: #fff !important;
    border: 2px solid rgba(255,255,255,0.3); border-radius: var(--radius-sm);
    padding: 0.6rem 1.3rem; font-size: 0.92rem; font-weight: 600;
    text-decoration: none; transition: all 0.12s; display: inline-block;
}
.btn-outline-light-custom:hover { background: rgba(255,255,255,0.2); color: #fff !important; }

/* Deal board in hero */
.deal-board {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius); padding: 1rem 1.2rem;
}
.deal-board-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.84rem;
}
.deal-board-row:last-child { border-bottom: none; }
.deal-board-cat { font-weight: 600; color: rgba(255,255,255,0.9); }
.deal-board-tag {
    background: var(--deal); color: #fff; font-size: 0.67rem; font-weight: 700;
    padding: 0.08rem 0.45rem; border-radius: 20px;
}

/* Hero search */
.hero-search {
    display: flex; max-width: 620px; margin: 1.5rem auto 0;
    border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.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.4rem; font-size: 0.95rem; font-weight: 700;
    cursor: pointer; transition: background 0.12s; white-space: nowrap;
}
.hero-search button:hover { background: #c04a2e; }

/* ---- Category Rail ---- */
.cat-rail {
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 0.65rem 0; overflow-x: auto; white-space: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.cat-rail::-webkit-scrollbar { display: none; }
.cat-rail .container { display: flex; gap: 0.45rem; }
.cat-chip {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.3rem 0.8rem; border-radius: 20px;
    background: var(--surface-soft); border: 1.5px solid var(--border);
    color: var(--text); font-size: 0.77rem; 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 .deal-count {
    background: rgba(0,0,0,0.1); border-radius: 10px;
    padding: 0 0.35rem; font-size: 0.66rem;
}
.cat-chip.active .deal-count { background: rgba(255,255,255,0.2); }

/* ---- Deal Card / Row ---- */
.deal-row {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem;
    display: flex; gap: 1rem; align-items: flex-start;
    transition: box-shadow 0.12s;
    position: relative;
}
.deal-row:hover { box-shadow: var(--shadow); }
.deal-row .ribbon {
    position: absolute; top: 0; right: 0;
    background: var(--deal); color: #fff;
    font-size: 0.65rem; font-weight: 700;
    padding: 0.18rem 0.6rem;
    border-radius: 0 var(--radius) 0 var(--radius-sm);
}

.deal-image-ph {
    width: 88px; height: 88px; min-width: 88px;
    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.58rem; text-align: center;
}
.deal-image-ph .bi { font-size: 2.1rem; color: var(--border-dk); }
.deal-image-ph-lg {
    width: 160px; height: 160px; min-width: 160px;
    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.63rem;
}
.deal-image-ph-lg .bi { font-size: 3.2rem; color: var(--border-dk); }

.deal-info { flex: 1; min-width: 0; }
.deal-title { font-weight: 700; font-size: 0.93rem; color: var(--text); text-decoration: none; line-height: 1.25; }
.deal-title:hover { color: var(--deal); }
.deal-meta { font-size: 0.73rem; color: var(--muted); margin-top: 0.15rem; }
.offer-tag {
    display: inline-block; background: var(--deal-pale); color: var(--deal);
    border: 1px solid rgba(219,98,70,0.25); font-size: 0.67rem; font-weight: 700;
    padding: 0.1rem 0.42rem; border-radius: var(--radius-sm);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.sample-tag {
    display: inline-block; background: var(--surface-soft); color: var(--muted);
    border: 1px solid var(--border); font-size: 0.62rem;
    padding: 0.05rem 0.35rem; border-radius: var(--radius-sm);
}
.deal-condition { font-size: 0.77rem; color: var(--muted); margin-top: 0.25rem; }

.deal-price-block { text-align: right; min-width: 115px; }
.deal-price { font-size: 1.2rem; font-weight: 900; color: var(--saving); }
.deal-mrp { font-size: 0.78rem; color: var(--muted); text-decoration: line-through; }
.discount-tag {
    display: inline-block; background: var(--deal); color: #fff;
    font-size: 0.68rem; font-weight: 700;
    padding: 0.1rem 0.38rem; border-radius: var(--radius-sm);
}
.saving-text { font-size: 0.72rem; color: var(--saving); font-weight: 600; }
.price-label { font-size: 0.64rem; color: var(--muted); display: block; margin-bottom: 0.05rem; }

/* ---- Deal Detail ---- */
.deal-breakdown {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.1rem;
}
.deal-breakdown-row {
    display: flex; justify-content: space-between;
    padding: 0.35rem 0; border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.deal-breakdown-row:last-child { border-bottom: none; }
.breakdown-lo { color: var(--saving); font-weight: 700; }
.breakdown-ref { color: var(--muted); text-decoration: line-through; }
.breakdown-save { color: var(--deal); font-weight: 700; }

/* ---- Offer Conditions Block ---- */
.conditions-block {
    background: var(--gold-pale); border: 1px solid rgba(199,154,59,0.3);
    border-radius: var(--radius); padding: 1.1rem;
}
.conditions-block h3 { color: var(--primary); font-size: 0.95rem; margin-bottom: 0.75rem; }
.condition-row {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.3rem 0; border-bottom: 1px solid rgba(199,154,59,0.15);
    font-size: 0.84rem;
}
.condition-row:last-child { border-bottom: none; }
.condition-row .bi { color: var(--gold); flex-shrink: 0; font-size: 0.85rem; margin-top: 0.2rem; }

/* ---- Coupon Block ---- */
.coupon-block {
    background: var(--surface); border: 2px dashed var(--border-dk);
    border-radius: var(--radius); padding: 1rem; position: relative;
}
.coupon-code-display {
    font-size: 1.3rem; font-weight: 900; letter-spacing: 0.1em;
    color: var(--primary); font-family: monospace;
    background: var(--surface-soft); padding: 0.5rem 1rem;
    border-radius: var(--radius-sm); display: inline-block;
    border: 1px solid var(--border);
}
.coupon-demo-notice {
    font-size: 0.72rem; color: var(--muted); font-style: italic;
    display: block; margin-top: 0.3rem;
}
.copy-demo-btn {
    background: var(--primary); color: #fff; border: none;
    border-radius: var(--radius-sm); padding: 0.3rem 0.75rem;
    font-size: 0.78rem; cursor: pointer; transition: background 0.12s;
}
.copy-demo-btn:hover { background: var(--primary-lt); }

/* ---- Store Chips ---- */
.store-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0.45rem 0.75rem;
    text-decoration: none; color: var(--text); font-size: 0.82rem;
    font-weight: 600; transition: all 0.12s;
}
.store-chip:hover { border-color: var(--primary-lt); color: var(--primary); }
.store-initial {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.1rem; height: 2.1rem; background: var(--primary);
    color: #fff; font-weight: 800; font-size: 0.72rem;
    border-radius: var(--radius-sm); flex-shrink: 0;
}
.store-initial-lg {
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.2rem; height: 3.2rem; background: var(--primary);
    color: #fff; font-weight: 800; font-size: 1rem;
    border-radius: var(--radius);
}

/* ---- Filter sidebar ---- */
.filter-panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem;
}
.filter-section { margin-bottom: 1rem; }
.filter-section:last-child { margin-bottom: 0; }
.filter-section h6 {
    font-size: 0.76rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--primary); margin-bottom: 0.4rem;
}
.filter-opt {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.81rem; margin-bottom: 0.22rem; cursor: pointer;
}
.filter-opt input { cursor: pointer; }

/* ---- 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.77rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.sort-bar select {
    font-size: 0.81rem; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0.2rem 0.5rem;
}
.result-count { font-size: 0.76rem; color: var(--muted); margin-left: auto; }

/* ---- Disclosure / Transparency ---- */
.disclosure {
    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 .bi { font-size: 0.9rem; flex-shrink: 0; margin-top: 0.05rem; }

/* ---- How-to strips ---- */
.how-strip {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.2rem; margin-bottom: 0.5rem;
}
.how-strip h4 { font-size: 0.9rem; margin-bottom: 0.3rem; }
.how-strip p { font-size: 0.83rem; color: var(--muted); margin: 0; }
.how-arrow {
    text-align: center; color: var(--border-dk); font-size: 1.4rem;
    line-height: 1; margin: 0.1rem 0;
}

/* ---- Discount range bands ---- */
.discount-band {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 0.8rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
    text-decoration: none; color: var(--text); margin-bottom: 0.5rem;
    transition: all 0.12s;
}
.discount-band:hover { border-color: var(--deal); color: var(--deal); }
.discount-band .band-pct { font-size: 1.2rem; font-weight: 900; color: var(--deal); }
.discount-band .band-label { font-size: 0.82rem; color: var(--muted); }

/* ---- Sale Calendar ---- */
.sale-event {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 4px solid var(--gold); border-radius: var(--radius);
    padding: 1rem 1.1rem; margin-bottom: 0.75rem;
}
.sale-event h3 { font-size: 1rem; margin-bottom: 0.25rem; color: var(--primary); }
.sale-event-period { font-size: 0.78rem; color: var(--gold); font-weight: 700; margin-bottom: 0.4rem; }
.sale-event-cats { font-size: 0.76rem; color: var(--muted); }

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

/* ---- Category cards ---- */
.cat-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;
}
.cat-card:hover { border-color: var(--deal); box-shadow: var(--shadow); color: var(--primary); }
.cat-card .cat-icon { font-size: 2.1rem; color: var(--deal); display: block; margin-bottom: 0.4rem; }
.cat-card h3 { font-size: 0.86rem; margin-bottom: 0.12rem; }
.cat-card .cat-sub { font-size: 0.72rem; color: var(--muted); }

/* ---- Section header ---- */
.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; }
.see-all { font-size: 0.81rem; font-weight: 600; color: var(--deal); text-decoration: none; }
.see-all:hover { color: var(--primary); }

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

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

/* ---- Footer ---- */
.site-footer {
    background: var(--primary-dk); color: #8aaccc;
    padding: 2.5rem 0 1.2rem; margin-top: 3rem;
    border-top: 3px solid var(--deal);
}
.site-footer h5 {
    color: #fff; font-size: 0.76rem; 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.81rem; display: block; padding: 0.07rem 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 0.8rem; margin-top: 1.4rem;
    font-size: 0.72rem; color: #4a6a88;
}
.footer-notice {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius); padding: 0.6rem 0.9rem;
    font-size: 0.74rem; 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.12s;
}
#backToTop:hover { background: var(--deal); }
#backToTop.visible { display: flex; }

/* ---- Misc ---- */
.view-deal-btn {
    background: var(--deal); color: #fff !important; border: none;
    border-radius: var(--radius-sm); padding: 0.32rem 0.75rem;
    font-size: 0.77rem; font-weight: 700; text-decoration: none;
    cursor: pointer; transition: background 0.12s; white-space: nowrap;
    display: inline-block;
}
.view-deal-btn:hover { background: #c04a2e; color: #fff !important; }
.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); }
.savings-pill {
    display: inline-block; background: var(--saving-pale); color: var(--saving);
    border: 1px solid rgba(45,128,92,0.2); font-size: 0.68rem; font-weight: 700;
    padding: 0.08rem 0.4rem; border-radius: 20px;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .header-search-wrap { display: none; }
    .header-search-wrap.open {
        display: flex; position: absolute; left: 0; right: 0; top: 100%;
        background: var(--primary); padding: 0.5rem 1rem; z-index: 200;
    }
    .mobile-toggle, .mobile-search-btn { display: block; }
    .header-nav { display: none; }
    .header-nav.open { display: block; }
    .header-nav ul { flex-direction: column; }
    .deal-image-ph-lg { width: 100px; height: 100px; min-width: 100px; }
    .deal-image-ph { width: 70px; height: 70px; min-width: 70px; }
    .deal-image-ph .bi { font-size: 1.6rem; }
    .hero { padding: 2rem 0 1.8rem; }
}
@media (max-width: 575px) {
    .deal-row { flex-wrap: wrap; }
    .deal-price-block { text-align: left; min-width: 0; }
    .hero-ctas { gap: 0.5rem; }
}

/* ---- Print ---- */
@media print {
    .site-header, .cat-rail, .site-footer, #backToTop,
    .ad-placeholder, .filter-panel, .sort-bar,
    .hero, .no-print { display: none !important; }
    body { background: #fff; }
    .check-list li { break-inside: avoid; }
}

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