/* DealsHub India - Main Stylesheet */
:root {
  --brand: #e63946;
  --brand-dark: #c1121f;
  --text: #1a1a2e;
  --muted: #6c757d;
  --light-bg: #f8f9fa;
  --card-shadow: 0 2px 10px rgba(0,0,0,.07);
  --card-hover-shadow: 0 6px 24px rgba(0,0,0,.13);
  --radius: 10px;
  --amazon: #ff9900;
  --flipkart: #2874f0;
  --myntra: #ff3f6c;
}

* { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text); background: #fff; }

/* ── Navbar ── */
.site-nav { background: var(--brand) !important; box-shadow: 0 2px 16px rgba(230,57,70,.25); }
.site-nav .navbar-brand { font-size: 1.35rem; letter-spacing: -.5px; }
.site-nav .nav-link { color: rgba(255,255,255,.9) !important; font-weight: 500; transition: color .2s; }
.site-nav .nav-link:hover { color: #fff !important; }

/* ── Hero ── */
.hero-section {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 60%, #1a1a2e 100%);
  color: #fff; padding: 4rem 0 5rem; position: relative; overflow: hidden;
}
.hero-section::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 60px;
  background: #fff; clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-title    { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.2; }
.hero-subtitle { font-size: 1.1rem; opacity: .9; }
.store-tag {
  display: inline-block; background: rgba(255,255,255,.15); border-radius: 20px;
  padding: .3rem 1rem; font-size: .85rem; margin: .25rem; border: 1px solid rgba(255,255,255,.25);
}

/* ════════════════════════════════════════════
   DEAL CARDS  — compact, uniform size
   ════════════════════════════════════════════ */
.deal-card {
  border: 1px solid #ececec;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: transform .22s, box-shadow .22s;
  overflow: hidden;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.deal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow);
  border-color: #ddd;
}

/* Image wrapper — fixed square container */
.deal-card .card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;          /* perfect square on all cards */
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.deal-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .6rem;
  transition: transform .3s;
}
.deal-card:hover .card-img-wrap img { transform: scale(1.04); }

.deal-card .card-body {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.deal-card .card-title {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3em;
  margin-bottom: .4rem;
  color: var(--text);
}

/* ── Price block ── */
.price-block  { margin: .35rem 0; }
.offer-price  { font-size: 1.05rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.mrp-price    { font-size: .78rem; color: var(--muted); text-decoration: line-through; }
.discount-badge {
  background: #1a9e3f; color: #fff; font-size: .68rem;
  font-weight: 700; padding: .15rem .4rem; border-radius: 4px;
}

/* ── Source badges ── */
.source-badge-amazon   { background: var(--amazon);   color: #111; }
.source-badge-flipkart { background: var(--flipkart); color: #fff; }
.source-badge-myntra   { background: var(--myntra);   color: #fff; }
.source-badge          { font-size: .65rem; font-weight: 700; padding: .15rem .5rem; border-radius: 10px; }

/* ── Buy button ── */
.btn-buy {
  background: var(--brand); color: #fff; border: none; border-radius: 6px;
  font-weight: 700; font-size: .78rem; padding: .4rem .75rem; width: 100%;
  transition: background .2s, transform .1s; display: block; text-align: center;
  text-decoration: none;
}
.btn-buy:hover       { background: var(--brand-dark); color: #fff; transform: scale(1.02); }
.btn-buy.amazon      { background: var(--amazon); color: #111; }
.btn-buy.amazon:hover{ background: #e88900; color: #111; }
.btn-buy.flipkart    { background: var(--flipkart); }
.btn-buy.myntra      { background: var(--myntra); }

/* ── Section headings ── */
.section-heading {
  font-size: 1.4rem; font-weight: 800;
  position: relative; padding-bottom: .45rem; margin-bottom: 1.25rem;
}
.section-heading::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 44px; height: 3px; background: var(--brand); border-radius: 2px;
}

/* ── Blog cards ── */
.blog-card { border: none; border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; height: 100%; transition: transform .25s, box-shadow .25s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.blog-card .card-img-top  { height: 180px; object-fit: cover; }
.blog-card .card-body     { padding: 1.1rem; }
.blog-card .blog-category { font-size: .72rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .5px; }
.blog-card .card-title    { font-size: .95rem; font-weight: 700; line-height: 1.4; margin: .35rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card .blog-date     { font-size: .78rem; color: var(--muted); }

/* ── Blog post content ── */
.blog-content                          { font-size: 1.05rem; line-height: 1.8; }
.blog-content h1,.blog-content h2,
.blog-content h3,.blog-content h4      { font-weight: 700; margin: 1.5rem 0 .8rem; }
.blog-content p                        { margin-bottom: 1.1rem; }
.blog-content img                      { max-width: 100%; border-radius: 8px; }
.blog-content blockquote               { border-left: 4px solid var(--brand); padding: 1rem 1.5rem; background: #fafafa; border-radius: 0 8px 8px 0; }
.blog-content ul,.blog-content ol      { padding-left: 1.5rem; margin-bottom: 1rem; }
.blog-content table                    { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.blog-content table th,
.blog-content table td                 { border: 1px solid #dee2e6; padding: .55rem .9rem; }
.blog-content table th                 { background: #f8f9fa; font-weight: 700; }
.blog-content pre                      { background: #1a1a2e; color: #f8f9fa; padding: 1.1rem; border-radius: 8px; overflow-x: auto; }
.blog-content code                     { background: #f0f0f0; padding: .1rem .35rem; border-radius: 4px; font-size: .88em; }

/* ════════════════════════════════════════════
   CATEGORY / STORE FILTER PILLS
   (sidebar — stacked list, full width)
   ════════════════════════════════════════════ */
.cat-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.cat-pill {
  display: inline-block;
  background: #f0f0f0; color: var(--text);
  border: 1px solid transparent;
  border-radius: 20px; padding: .35rem .9rem;
  font-size: .82rem; font-weight: 500;
  cursor: pointer; transition: all .18s;
  text-decoration: none; line-height: 1.4;
  white-space: nowrap;
}
.cat-pill:hover  { background: #e2e2e2; color: var(--text); border-color: #ccc; }
.cat-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── Sidebar filter panel ── */
.filter-sidebar { background: #f8f9fa; border-radius: var(--radius); padding: 1.25rem; }
.filter-sidebar h6 {
  font-weight: 700; margin-bottom: .6rem; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .8px; color: var(--muted);
}

/* Store filter buttons — full-width block links in sidebar */
.store-filter-btn {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .45rem .75rem;
  margin-bottom: .3rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  border: 1px solid #dee2e6;
  transition: all .18s;
}
.store-filter-btn:hover          { border-color: #bbb; background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.store-filter-btn.active         { color: #fff; border-color: transparent; }
.store-filter-btn.active-all     { background: var(--brand); }
.store-filter-btn.active-amazon  { background: var(--amazon); color: #111; }
.store-filter-btn.active-flipkart{ background: var(--flipkart); }
.store-filter-btn.active-myntra  { background: var(--myntra); }
.store-filter-btn .store-dot     { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.store-filter-btn .store-count   { margin-left: auto; font-size: .72rem; opacity: .7; font-weight: 500; }

/* Category list in sidebar */
.sidebar-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .35rem .5rem;
  border-radius: 6px;
  font-size: .83rem;
  text-decoration: none;
  color: var(--text);
  margin-bottom: .15rem;
  transition: background .15s, color .15s;
}
.sidebar-cat-link:hover  { background: #e9ecef; color: var(--text); }
.sidebar-cat-link.active { background: var(--brand); color: #fff; font-weight: 600; }
.sidebar-cat-link .cat-count { font-size: .72rem; opacity: .65; }

/* ── Footer ── */
.site-footer { background: #1a1a2e; color: rgba(255,255,255,.85); padding: 3rem 0 1rem; }
.site-footer h5,.site-footer h6 { color: #fff; }
.footer-links             { list-style: none; padding: 0; }
.footer-links li          { margin-bottom: .4rem; }
.footer-links a           { color: rgba(255,255,255,.65); text-decoration: none; font-size: .88rem; transition: color .2s; }
.footer-links a:hover     { color: #fff; }
.affiliate-badge          { border-left: 3px solid rgba(255,255,255,.2); padding-left: .75rem; }

/* ── Pagination ── */
.page-link                          { color: var(--brand); }
.page-item.active .page-link        { background: var(--brand); border-color: var(--brand); }

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 4px;
}
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Breadcrumb ── */
.breadcrumb-item a        { color: var(--brand); text-decoration: none; }
.breadcrumb-item.active   { color: var(--muted); }

/* ── Empty state ── */
.empty-state              { text-align: center; padding: 4rem 2rem; }
.empty-state .empty-icon  { font-size: 4rem; opacity: .3; }

/* ── Tag cloud ── */
.tag-cloud a {
  display: inline-block; background: #f0f0f0; color: var(--text);
  border-radius: 4px; padding: .2rem .55rem; font-size: .78rem;
  margin: .12rem; text-decoration: none; transition: all .18s;
}
.tag-cloud a:hover { background: var(--brand); color: #fff; }

/* ── Responsive ── */
@media (max-width: 992px) {
  .deal-card .card-body { padding: .65rem; }
  .deal-card .card-title { font-size: .78rem; }
  .offer-price { font-size: .95rem; }
}
@media (max-width: 768px) {
  .hero-section { padding: 2.5rem 0 3.5rem; }
  .section-heading { font-size: 1.2rem; }
  .deal-card .card-body { padding: .6rem; }
}
@media (max-width: 576px) {
  .deal-card .card-title { font-size: .76rem; min-height: 2.2em; }
  .btn-buy { font-size: .72rem; padding: .35rem .5rem; }
  .offer-price { font-size: .9rem; }
}
