@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #4361ee; --primary-dark: #3651c7; --primary-soft: #eef1ff;
  --dark: #1f2430; --bg: #f6f7fb; --border: #e7eaf0; --text: #43435c; --text-muted: #8a93a3;
  --danger: #f06548; --success: #2dba6c; --warning: #f1963a;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 2px 14px rgba(31,36,48,0.06);
}
* { box-sizing: border-box; }
svg { width: 20px; height: 20px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
body { margin: 0; font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { color: var(--dark); font-weight: 800; margin: 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---- Top utility bar + header ---- */
.topbar { background: var(--dark); color: #cdd3e0; font-size: 12.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar svg { width: 13px; height: 13px; }
.btn-buy svg { width: 19px; height: 19px; }
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; gap: 24px; height: 74px; }
.site-logo img { height: 38px; display: block; }
.search-bar { flex: 1; display: flex; max-width: 560px; }
.search-bar input { flex: 1; padding: 11px 16px; border: 1.5px solid var(--border); border-right: none; border-radius: 8px 0 0 8px; font-size: 14px; font-family: inherit; }
.search-bar input:focus { outline: none; border-color: var(--primary); }
.search-bar button { padding: 0 20px; background: var(--primary); color: #fff; border: none; border-radius: 0 8px 8px 0; cursor: pointer; font-size: 15px; }
.header-actions { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.header-action { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.header-action svg { width: 22px; height: 22px; color: var(--dark); }

/* ---- Category nav bar ---- */
.category-nav { background: var(--primary); }
.category-nav .container { display: flex; gap: 2px; height: 46px; align-items: center; overflow-x: auto; }
.category-nav a { color: #fff; font-size: 13.5px; font-weight: 600; padding: 0 16px; height: 100%; display: flex; align-items: center; white-space: nowrap; opacity: .92; }
.category-nav a:hover { background: rgba(255,255,255,0.12); opacity: 1; }

/* ---- Banner ---- */
.hero-banner { width: 100%; max-height: 360px; overflow: hidden; border-radius: var(--radius); margin: 20px 0; background: var(--primary-soft); }
.hero-banner img { width: 100%; display: block; }

/* ---- Section headers ---- */
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 32px 0 16px; }
.section-head h2 { font-size: 20px; }
.section-head a { font-size: 13px; color: var(--primary); font-weight: 700; }

/* ---- Product grid + card ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s ease, transform .15s ease; position: relative; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card-img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fafbfd; padding: 14px; }
.product-card-body { padding: 12px 14px 16px; }
.product-card-brand { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.product-card-name { font-size: 14px; font-weight: 600; color: var(--dark); margin: 4px 0 8px; line-height: 1.35; min-height: 38px; }
.product-card-price { font-size: 16px; font-weight: 800; color: var(--primary); }
.badge-upcoming { position: absolute; top: 10px; left: 10px; background: var(--warning); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.badge-instock { position: absolute; top: 10px; left: 10px; background: var(--success); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }

/* ---- Category tiles (homepage) ---- */
.category-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.category-tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 10px; text-align: center; font-size: 13px; font-weight: 700; color: var(--dark); }
.category-tile:hover { border-color: var(--primary); color: var(--primary); }
.category-tile-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; color: var(--primary); font-weight: 800; font-size: 18px; }

/* ---- Product detail page ---- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 28px 0; align-items: start; }
.product-gallery { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.product-info h1 { font-size: 24px; margin-bottom: 8px; }
.product-info .brand-cat { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.product-info .price-block { font-size: 30px; font-weight: 800; color: var(--primary); margin: 16px 0; }
.product-info .price-block .mrp { font-size: 16px; color: var(--text-muted); text-decoration: line-through; font-weight: 500; margin-left: 10px; }
.stock-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 20px; }
.stock-pill svg { width: 15px; height: 15px; }
.search-bar button svg { width: 18px; height: 18px; }
.stock-pill.in-stock { background: #e4f8ec; color: var(--success); }
.stock-pill.upcoming { background: #fef1e3; color: var(--warning); }
.variant-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.variant-chip { padding: 8px 16px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.variant-chip.is-selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.btn-buy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary); color: #fff; border: none; padding: 15px 30px; border-radius: var(--radius-sm); font-size: 15.5px; font-weight: 700; cursor: pointer; margin-top: 10px; width: 100%; max-width: 340px; }
.btn-buy:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 30px; }
.spec-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.spec-table td:first-child { color: var(--text-muted); width: 160px; }

/* ---- Footer ---- */
.site-footer { background: var(--dark); color: #aab0c0; margin-top: 50px; padding: 36px 0 20px; font-size: 13px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: #cdd3e0; }

@media (max-width: 860px) {
  .site-header .container { flex-wrap: wrap; height: auto; padding: 10px 16px; }
  .search-bar { order: 3; width: 100%; max-width: none; margin-top: 8px; }
  .product-detail { grid-template-columns: 1fr; gap: 20px; }
  .category-nav .container { justify-content: flex-start; }
  div[style*="grid-template-columns:1.3fr 1fr"] { grid-template-columns: 1fr !important; }
  div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}
