/*
Theme Name: MyTechPrice
Theme URI: https://mytechprice.com
Author: MyTechPrice
Description: Custom price comparison theme for MyTechPrice.com - India's gadget price tracker
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: mytechprice
*/

/* ─── RESET & ROOT ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:        #1a56db;
  --brand-dark:   #1340b0;
  --brand-light:  #e8effd;
  --accent:       #f97316;
  --accent-light: #fff4ec;
  --surface:      #ffffff;
  --bg:           #f3f6fc;
  --border:       #dde3ef;
  --text:         #0f172a;
  --muted:        #64748b;
  --star:         #f59e0b;
  --green:        #16a34a;
  --red:          #dc2626;
  --radius:       10px;
  --shadow:       0 2px 12px rgba(0,0,0,.08);
}

body { font-family:'Inter',sans-serif; background:var(--bg); color:var(--text); font-size:14px; }

/* ─── TOPBAR ────────────────────────────────────────────────────────────── */
.topbar { background:var(--brand); color:#fff; font-size:12px; padding:5px 0; text-align:center; }
.topbar a { color:#c7d8ff; text-decoration:none; margin:0 10px; }

/* ─── HEADER ────────────────────────────────────────────────────────────── */
header { background:#fff; border-bottom:1px solid var(--border); position:sticky; top:0; z-index:100; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.header-inner { max-width:1280px; margin:0 auto; display:flex; align-items:center; gap:16px; padding:12px 20px; }
.logo { text-decoration:none; display:flex; align-items:center; gap:8px; flex-shrink:0; }
.logo-mark { width:36px; height:36px; border-radius:8px; background:var(--brand); display:flex; align-items:center; justify-content:center; color:#fff; font-family:'Sora',sans-serif; font-weight:800; font-size:18px; }
.logo-text { font-family:'Sora',sans-serif; font-weight:700; font-size:18px; color:var(--text); line-height:1; }
.logo-text span { color:var(--brand); }
.search-bar { flex:1; max-width:520px; display:flex; border:2px solid var(--border); border-radius:50px; overflow:hidden; transition:border-color .2s; }
.search-bar:focus-within { border-color:var(--brand); }
.search-bar input { flex:1; border:none; outline:none; padding:9px 16px; font-size:14px; background:var(--bg); color:var(--text); }
.search-bar button { background:var(--brand); border:none; color:#fff; padding:0 18px; cursor:pointer; font-size:16px; transition:background .2s; }
.search-bar button:hover { background:var(--brand-dark); }
.header-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.btn-compare { background:var(--accent); color:#fff; border:none; border-radius:50px; padding:8px 18px; font-weight:600; cursor:pointer; font-size:13px; text-decoration:none; display:flex; align-items:center; gap:6px; transition:opacity .2s; }
.btn-compare:hover { opacity:.88; }

/* ─── NAV ───────────────────────────────────────────────────────────────── */
nav { background:#fff; border-bottom:2px solid var(--brand-light); }
.nav-inner { max-width:1280px; margin:0 auto; display:flex; align-items:stretch; }
.nav-item { position:relative; }
.nav-link { display:flex; align-items:center; gap:6px; padding:12px 18px; font-weight:600; font-size:13.5px; color:var(--text); text-decoration:none; white-space:nowrap; border-bottom:3px solid transparent; transition:color .15s, border-color .15s; }
.nav-link:hover, .nav-item:hover .nav-link { color:var(--brand); border-bottom-color:var(--brand); }
.nav-link .chevron { font-size:10px; opacity:.6; }
.dropdown { display:none; position:absolute; top:100%; left:0; background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 8px 30px rgba(0,0,0,.12); z-index:200; min-width:220px; padding:12px 0; }
.nav-item:hover .dropdown { display:flex; gap:0; }
.dropdown-col { padding:0 16px; min-width:180px; }
.dropdown-col + .dropdown-col { border-left:1px solid var(--border); }
.dropdown-head { font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-weight:700; padding:8px 0 4px; }
.dropdown a { display:block; padding:6px 0; font-size:13px; color:var(--text); text-decoration:none; transition:color .15s; }
.dropdown a:hover { color:var(--brand); }

/* ─── HERO ──────────────────────────────────────────────────────────────── */
.hero { background:linear-gradient(135deg,#1a56db 0%,#1340b0 60%,#0c2d8a 100%); padding:48px 20px; text-align:center; color:#fff; }
.hero h1 { font-family:'Sora',sans-serif; font-size:clamp(28px,4vw,44px); font-weight:800; line-height:1.18; margin-bottom:14px; }
.hero h1 span { color:#ffbe55; }
.hero p { font-size:16px; opacity:.85; margin-bottom:28px; }
.hero-cats { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.hero-cat { background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.22); color:#fff; text-decoration:none; border-radius:50px; padding:8px 20px; font-size:13px; font-weight:600; transition:background .2s; }
.hero-cat:hover { background:rgba(255,255,255,.26); }

/* ─── LAYOUT ────────────────────────────────────────────────────────────── */
.container { max-width:1280px; margin:0 auto; padding:0 20px; }
.section { padding:32px 0; }
.section-head { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:20px; }
.section-title { font-family:'Sora',sans-serif; font-size:20px; font-weight:700; }
.section-title span { color:var(--brand); }
.view-all { font-size:13px; color:var(--brand); text-decoration:none; font-weight:600; }
.view-all:hover { text-decoration:underline; }

/* ─── PRODUCT CARD ──────────────────────────────────────────────────────── */
.products-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:16px; }
.product-card { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); padding:16px; display:flex; flex-direction:column; transition:box-shadow .2s, transform .2s; text-decoration:none; color:inherit; position:relative; }
.product-card:hover { box-shadow:var(--shadow); transform:translateY(-2px); }
.badge { position:absolute; top:10px; left:10px; background:var(--accent); color:#fff; font-size:10px; font-weight:700; padding:2px 7px; border-radius:4px; text-transform:uppercase; letter-spacing:.04em; }
.badge.new { background:var(--brand); }
.badge.top { background:var(--green); }
.product-img { width:100%; aspect-ratio:1; object-fit:contain; padding:8px; margin-bottom:10px; }
.product-img-placeholder { width:100%; aspect-ratio:1; background:var(--bg); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:48px; margin-bottom:10px; }
.product-brand { font-size:11px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
.product-name { font-size:14px; font-weight:600; margin:4px 0 6px; line-height:1.35; }
.product-specs { font-size:11.5px; color:var(--muted); margin-bottom:8px; display:flex; flex-wrap:wrap; gap:4px; }
.spec-chip { background:var(--bg); border-radius:4px; padding:2px 6px; font-size:11px; }
.product-rating { display:flex; align-items:center; gap:4px; margin-bottom:10px; }
.stars { color:var(--star); font-size:12px; }
.rating-count { font-size:11px; color:var(--muted); }
.product-price { font-family:'Sora',sans-serif; font-size:18px; font-weight:700; color:var(--brand); margin-top:auto; }
.product-price .old-price { font-size:12px; color:var(--muted); text-decoration:line-through; font-family:'Inter',sans-serif; font-weight:400; margin-left:6px; }
.product-price .discount { font-size:12px; color:var(--green); font-family:'Inter',sans-serif; font-weight:600; margin-left:4px; }
.card-actions { display:flex; gap:8px; margin-top:10px; }
.btn-buy { flex:1; background:var(--brand); color:#fff; border:none; border-radius:6px; padding:8px; font-size:12px; font-weight:600; cursor:pointer; transition:background .2s; text-decoration:none; text-align:center; }
.btn-buy:hover { background:var(--brand-dark); }
.btn-wish { background:var(--bg); border:1px solid var(--border); border-radius:6px; padding:8px 10px; font-size:14px; cursor:pointer; transition:border-color .2s; }
.btn-wish:hover { border-color:var(--accent); }

/* ─── CATEGORIES GRID ───────────────────────────────────────────────────── */
.cat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:14px; }
.cat-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px 12px; text-align:center; text-decoration:none; color:var(--text); transition:box-shadow .2s, transform .2s; }
.cat-card:hover { box-shadow:var(--shadow); transform:translateY(-2px); }
.cat-icon { font-size:32px; margin-bottom:8px; }
.cat-name { font-size:13px; font-weight:600; }
.cat-count { font-size:11px; color:var(--muted); margin-top:2px; }

/* ─── PRICE RANGE FINDER ────────────────────────────────────────────────── */
.price-finder { background:linear-gradient(135deg,#0f172a,#1e3a8a); border-radius:14px; padding:32px; color:#fff; margin:12px 0; }
.price-finder h2 { font-family:'Sora',sans-serif; font-size:22px; font-weight:700; margin-bottom:6px; }
.price-finder p { opacity:.7; font-size:13px; margin-bottom:24px; }
.pf-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; }
.pf-cat { background:rgba(255,255,255,.09); border-radius:10px; border:1px solid rgba(255,255,255,.14); padding:16px; }
.pf-cat-name { display:flex; align-items:center; gap:8px; font-weight:600; font-size:14px; margin-bottom:12px; }
.pf-ranges { display:flex; flex-direction:column; gap:6px; }
.pf-range { display:block; font-size:12px; color:rgba(255,255,255,.75); text-decoration:none; padding:5px 10px; border-radius:5px; background:rgba(255,255,255,.07); transition:background .15s; }
.pf-range:hover { background:rgba(255,255,255,.18); color:#fff; }

/* ─── BRANDS ────────────────────────────────────────────────────────────── */
.brands-scroll { display:flex; gap:12px; overflow-x:auto; padding-bottom:8px; scrollbar-width:none; }
.brands-scroll::-webkit-scrollbar { display:none; }
.brand-pill { flex-shrink:0; background:var(--surface); border:1px solid var(--border); border-radius:50px; padding:8px 20px; font-size:13px; font-weight:600; text-decoration:none; color:var(--text); transition:border-color .15s, color .15s; }
.brand-pill:hover { border-color:var(--brand); color:var(--brand); }

/* ─── COMPARE BANNER ────────────────────────────────────────────────────── */
.compare-banner { background:var(--accent-light); border:1px solid #fed7aa; border-radius:12px; padding:24px 28px; display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
.compare-banner .icon { font-size:40px; flex-shrink:0; }
.compare-banner h3 { font-family:'Sora',sans-serif; font-size:18px; font-weight:700; margin-bottom:4px; }
.compare-banner p { font-size:13px; color:var(--muted); }

/* ─── FILTER BAR ────────────────────────────────────────────────────────── */
.filter-bar { display:flex; gap:8px; overflow-x:auto; padding:2px 0 10px; scrollbar-width:none; }
.filter-bar::-webkit-scrollbar { display:none; }
.filter-btn { flex-shrink:0; background:var(--surface); border:1px solid var(--border); border-radius:50px; padding:7px 16px; font-size:12.5px; font-weight:500; cursor:pointer; transition:all .15s; color:var(--text); }
.filter-btn:hover, .filter-btn.active { background:var(--brand); color:#fff; border-color:var(--brand); }

/* ─── LISTING PAGE ──────────────────────────────────────────────────────── */
.page-header { background:linear-gradient(135deg,#1a56db,#1340b0); color:#fff; padding:28px 0; }
.page-header h1 { font-family:'Sora',sans-serif; font-size:28px; font-weight:800; margin-bottom:4px; }
.page-header p { opacity:.8; font-size:14px; }
.breadcrumb { font-size:12px; color:var(--muted); padding:14px 0 0; }
.breadcrumb a { color:var(--brand); text-decoration:none; }
.listing-layout { display:flex; gap:24px; padding:28px 0; }
.sidebar { width:240px; flex-shrink:0; }
.main-content { flex:1; min-width:0; }
.filter-section { background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:18px; margin-bottom:14px; }
.filter-title { font-weight:700; font-size:14px; margin-bottom:14px; display:flex; justify-content:space-between; align-items:center; }
.filter-title button { font-size:11px; color:var(--brand); background:none; border:none; cursor:pointer; font-weight:600; }
.filter-label { display:flex; align-items:center; gap:8px; font-size:13px; padding:4px 0; cursor:pointer; }
.filter-label input { accent-color:var(--brand); }

/* ─── PRODUCT DETAIL PAGE ───────────────────────────────────────────────── */
.product-layout { display:grid; grid-template-columns:340px 1fr; gap:28px; padding:20px 0 32px; }
.product-gallery { position:sticky; top:72px; }
.main-img { background:#fff; border:1px solid var(--border); border-radius:14px; aspect-ratio:1; display:flex; align-items:center; justify-content:center; font-size:100px; margin-bottom:12px; }
.product-title { font-family:'Sora',sans-serif; font-size:26px; font-weight:800; line-height:1.2; margin-bottom:10px; }
.price-box { background:var(--brand-light); border:1px solid #bfcff8; border-radius:12px; padding:18px 20px; margin-bottom:20px; }
.current-price { font-family:'Sora',sans-serif; font-size:32px; font-weight:800; color:var(--brand); }
.store-row { display:flex; align-items:center; gap:12px; background:#fff; border:1px solid var(--border); border-radius:8px; padding:12px 14px; margin-bottom:8px; }
.store-name { font-weight:600; font-size:13px; min-width:90px; }
.store-price { font-family:'Sora',sans-serif; font-weight:700; font-size:16px; }

/* ─── SPECS TABLE ───────────────────────────────────────────────────────── */
.specs-container { border:1px solid #e8edf2; border-radius:10px; overflow:hidden; }
.spec-category { background:#f0f4ff; padding:10px 16px; font-size:13px; font-weight:700; color:#1a56db; border-bottom:1px solid #e8edf2; }
.spec-row { display:flex; border-bottom:1px solid #f0f0f0; }
.spec-row:last-child { border-bottom:none; }
.spec-row:nth-child(even) { background:#fafbff; }
.spec-key-col { width:200px; min-width:200px; padding:9px 16px; font-size:13px; color:#777; }
.spec-val-col { flex:1; padding:9px 16px; font-size:13px; color:#1a1a2e; font-weight:500; }

/* ─── TABS ──────────────────────────────────────────────────────────────── */
.tabs { display:flex; gap:0; border-bottom:2px solid var(--border); margin-bottom:20px; }
.tab-btn { padding:10px 20px; font-size:14px; font-weight:600; border:none; background:none; cursor:pointer; color:var(--muted); border-bottom:2px solid transparent; margin-bottom:-2px; transition:color .15s; }
.tab-btn.active { color:var(--brand); border-bottom-color:var(--brand); }
.tab-content { display:none; }
.tab-content.active { display:block; }

/* ─── FOOTER ────────────────────────────────────────────────────────────── */
footer { background:#0f172a; color:#94a3b8; margin-top:40px; }
.footer-inner { max-width:1280px; margin:0 auto; padding:40px 20px 24px; display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:32px; }
.footer-col h4 { color:#fff; font-size:14px; font-weight:700; margin-bottom:14px; }
.footer-col a { display:block; color:#94a3b8; text-decoration:none; font-size:13px; padding:3px 0; transition:color .15s; }
.footer-col a:hover { color:#fff; }
.footer-bottom { border-top:1px solid #1e293b; padding:16px 20px; text-align:center; font-size:12px; max-width:1280px; margin:0 auto; }

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */
@media(max-width:768px) {
  .header-inner { flex-wrap:wrap; }
  .search-bar { order:3; flex-basis:100%; max-width:100%; }
  .nav-inner { overflow-x:auto; }
  .dropdown { position:fixed; top:auto; left:0; right:0; }
  .product-layout { grid-template-columns:1fr; }
  .listing-layout { flex-direction:column; }
  .sidebar { width:100%; }
  .specs-grid { grid-template-columns:1fr; }
}
