/* IndianDeals2Buy — single shared stylesheet, no external dependencies */

:root {
  --accent: #e2661a;
  --accent-dark: #c0510d;
  --accent-soft: rgba(226, 102, 26, 0.12);
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #17181c;
  --muted: #62656e;
  --border: #e5e3dd;
  --shadow: 0 1px 2px rgba(16, 18, 24, .05), 0 8px 24px rgba(16, 18, 24, .06);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #ff8b45;
    --accent-dark: #ffa76d;
    --accent-soft: rgba(255, 139, 69, 0.16);
    --bg: #0f1116;
    --surface: #171a21;
    --text: #eceef3;
    --muted: #9aa0ad;
    --border: #262b35;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

main { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem 4rem; }

.muted { color: var(--muted); }
.disclosure { font-size: .82rem; color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: .85rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}
.site-logo span { color: var(--accent); }
.header-tag { margin: 0; font-size: .85rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 3rem 0 1.5rem; max-width: 40rem; }
.hero h1 {
  margin: 0 0 .6rem;
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}
.hero-sub { margin: 0; color: var(--muted); font-size: 1.05rem; }

.stats { display: flex; gap: 2.25rem; margin-top: 1.75rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; }
.stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

/* ---------- Search + chips ---------- */
.search-wrap {
  position: sticky;
  top: 3.4rem;
  z-index: 15;
  background: var(--bg);
  padding: 1rem 0 .85rem;
}
.search-box { position: relative; display: flex; align-items: center; }
.search-box input {
  width: 100%;
  padding: .8rem 1rem .8rem 2.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-icon {
  position: absolute;
  left: 1.05rem;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.filter-count {
  position: absolute;
  right: 1.1rem;
  font-size: .82rem;
  color: var(--muted);
}

.chips { display: flex; gap: .5rem; margin-top: .8rem; overflow-x: auto; padding-bottom: .2rem; }
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .85rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip span { color: var(--muted); font-size: .75rem; }

/* ---------- Section headings ---------- */
.section-heading {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 2.5rem 0 1rem;
}

/* ---------- Featured cards ---------- */
/* Two-up on phones: full-width cards make the featured strip scroll forever
   before a visitor reaches the main list. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: .8rem;
}
@media (min-width: 40rem) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1.1rem; }
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
  color: inherit;
}
.card-media {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem;
  background: var(--bg);
}
@media (min-width: 40rem) {
  .card-media { aspect-ratio: 4 / 3; padding: 1rem; }
}
.card-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card-media-empty {
  background: linear-gradient(135deg, var(--accent-soft), transparent);
}
.card-media-empty span {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  opacity: .55;
}
.card-body { padding: .85rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; }
.card-cat {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.card-title {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
}
.card-price { font-size: 1.05rem; font-weight: 750; color: var(--accent); }

/* ---------- Category link lists ---------- */
.category-section { margin-bottom: .5rem; }
.category-section .section-heading {
  margin: 1.75rem 0 .5rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}
.product-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2.5rem;
}
@media (max-width: 46rem) { .product-list { columns: 1; } }
.product-list li {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
}
/* Padding sits on the anchor, not the row, so the tappable area itself clears
   the ~44px guideline on touch screens. Denser on pointer devices. */
.product-list a {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .7rem;
  flex: 1;
  min-width: 0;
  padding: .55rem 0;
  min-height: 44px;
}
@media (pointer: fine) {
  .product-list a { padding: .3rem 0; min-height: 0; }
}
/* Lazy-loaded row thumbnails. Fixed box so rows never reflow as images
   arrive, and the space simply stays empty for products without one. */
.li-thumb {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}
.li-thumb-empty { background: transparent; border-color: transparent; }
.li-title { min-width: 0; }
.product-list a:hover { color: var(--accent); }
.product-list .li-price { color: var(--muted); font-size: .85rem; white-space: nowrap; }

.no-results { color: var(--muted); margin-top: 2rem; }

/* ---------- Product page ---------- */
.breadcrumb { font-size: .87rem; margin: 1.5rem 0 1rem; color: var(--muted); }

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  gap: 2.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.product-image { flex: 1 1 16rem; display: flex; align-items: flex-start; justify-content: center; }
.product-image img { max-width: 100%; height: auto; border-radius: 10px; }
.product-info { flex: 2 1 20rem; min-width: 0; }
.product-info h1 {
  margin: 0 0 .5rem;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.price { font-size: 1.75rem; font-weight: 800; color: var(--accent); margin: .25rem 0 .9rem; }
.price-note { font-size: 1rem; font-weight: 600; color: var(--muted); margin: .25rem 0 .9rem; }
.description { margin: 0 0 1rem; }
.features { padding-left: 1.15rem; margin: 0 0 1.5rem; }
.features li { margin: .3rem 0; }

.buy-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 650;
  padding: .8rem 1.8rem;
  border-radius: 999px;
  transition: background .16s ease, transform .16s ease;
}
.buy-button:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.product-page .disclosure { margin-top: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: .86rem;
  color: var(--muted);
}
.site-footer p { margin: .35rem 0; }
