/* ============================================================
   NavkarSoft AI Ecommerce — Storefront styles (premium, mobile-first)
   ============================================================ */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --dark: #0f172a;
  --bg: #f7f7fb;
  --card: #ffffff;
  --line: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 860px; }
.section { padding: 34px 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bad { color: var(--bad); }
hr { border: none; border-top: 1px solid var(--line); margin: 12px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: .18s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #1e293b; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: rgba(79, 70, 229, .08); }
.btn-muted { background: #eef0f4; color: var(--muted); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-light { background: #fff; color: var(--dark); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
.link-btn.danger { color: var(--bad); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-top { display: flex; align-items: center; gap: 18px; padding: 14px 20px; flex-wrap: wrap; }
.brand { font-size: 21px; font-weight: 800; color: var(--dark); letter-spacing: -.02em; }
.search { flex: 1 1 260px; display: flex; min-width: 220px; }
.search input {
  flex: 1; border: 1.5px solid var(--line); border-right: none; border-radius: 10px 0 0 10px;
  padding: 10px 14px; font: inherit; outline: none;
}
.search input:focus { border-color: var(--primary); }
.search button {
  background: var(--primary); color: #fff; border: none; border-radius: 0 10px 10px 0;
  padding: 10px 18px; font-weight: 600; cursor: pointer;
}
.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.icon-link { font-weight: 600; font-size: 14px; white-space: nowrap; }
.cart-link { position: relative; }
.cart-count {
  background: var(--primary); color: #fff; border-radius: 999px; font-size: 11px;
  padding: 1px 7px; margin-left: 4px; vertical-align: top;
}
.cat-nav { display: flex; gap: 22px; padding: 10px 20px; overflow-x: auto; border-top: 1px solid var(--line); }
.cat-nav a { font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; padding: 4px 0; }
.cat-nav a:hover { color: var(--primary); }
.lang-switch { font-size: 13px; }
.lang-switch .sep { margin: 0 6px; color: var(--line); }
.lang.active { color: var(--primary); font-weight: 700; }
.flash { margin: 14px auto; padding: 12px 18px; border-radius: 10px; background: #ecfdf5; color: var(--ok); font-weight: 600; }
.flash-bad { background: #fef2f2; color: var(--bad); }

/* Hero */
.hero-slider { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; padding: 20px; }
.hero-slide { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 260px; }
.hero-slide img { width: 100%; height: 300px; object-fit: cover; transition: transform .5s; }
.hero-slide:hover img { transform: scale(1.03); }
.hero-caption {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 32px; background: linear-gradient(90deg, rgba(15,23,42,.72), rgba(15,23,42,.15));
  color: #fff;
}
.hero-caption h2 { font-size: clamp(22px, 3.4vw, 34px); max-width: 420px; }
.hero-caption p { opacity: .9; margin: 0 0 14px; }

/* Sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; margin: 0; }
.see-all { color: var(--primary); font-weight: 600; font-size: 14px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; text-align: center; font-weight: 600; transition: .18s;
}
.cat-card:hover { transform: translateY(-3px); }
.cat-card img, .cat-ph {
  width: 72px; height: 72px; object-fit: cover; border-radius: 50%;
  margin: 0 auto 10px; background: #eef0ff; color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800;
}
.offer-row { display: flex; gap: 12px; flex-wrap: wrap; }
.offer-chip {
  background: linear-gradient(120deg, #eef2ff, #fdf2f8);
  border: 1px solid #e0e7ff; border-radius: 999px; padding: 10px 20px;
  display: flex; gap: 10px; align-items: center; font-size: 14px;
}
.offer-chip b { color: var(--primary); }
.promo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.promo-banner { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.promo-banner img { height: 160px; object-fit: cover; width: 100%; }
.promo-banner div { position: absolute; inset: auto 0 0 0; padding: 16px; background: linear-gradient(transparent, rgba(15,23,42,.8)); color: #fff; }
.promo-banner h3 { margin: 0; font-size: 18px; }
.promo-banner p { margin: 0; font-size: 13px; opacity: .9; }

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.product-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px; position: relative; display: flex; flex-direction: column; transition: .18s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,.12); }
.off-badge {
  position: absolute; top: 10px; left: 10px; background: var(--bad); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 6px; padding: 3px 8px; z-index: 2;
}
.wish-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; width: 34px; height: 34px; font-size: 16px; cursor: pointer; color: var(--muted); transition: .15s;
}
.wish-btn.active { color: var(--bad); border-color: var(--bad); }
.pc-img { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #f1f2f6; display: flex; align-items: center; justify-content: center; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.img-ph { font-size: 44px; opacity: .4; }
.pc-name { font-size: 14px; font-weight: 600; margin: 10px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pc-price { display: flex; gap: 8px; align-items: baseline; }
.pc-price b { font-size: 16px; color: var(--dark); }
.pc-price s { color: var(--muted); font-size: 12.5px; }
.pc-rating { color: #b45309; font-size: 13px; font-weight: 600; }
.product-card .btn { margin-top: 10px; }

/* Listing */
.listing-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.listing-head h1 { font-size: 26px; margin: 0; }
.sort-form select { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); font: inherit; }
.listing-body { display: grid; grid-template-columns: 230px 1fr; gap: 22px; }
.filters { align-self: start; position: sticky; top: 90px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.filters h3 { margin-top: 0; }
.filter-group { margin-bottom: 14px; display: grid; gap: 6px; }
.filter-group input, .filter-group select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.filter-group.check label { display: flex; gap: 8px; align-items: center; }
.pagination { display: flex; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.pagination a { padding: 8px 13px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Product page */
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumbs a:hover { color: var(--primary); }
.product-page { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 34px; }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.gallery-main img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.gallery-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img:hover { border-color: var(--primary); }
.price-row { display: flex; gap: 12px; align-items: baseline; margin: 8px 0 2px; }
.price-row .price { font-size: 28px; font-weight: 800; color: var(--dark); }
.price-row s { color: var(--muted); }
.off { color: var(--ok); font-weight: 700; }
.tax-note { font-size: 12.5px; }
.highlights { margin: 12px 0; padding-left: 18px; color: var(--muted); }
.variant-picker { margin: 16px 0; display: grid; gap: 12px; }
.variant-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-opt {
  padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff;
  font: inherit; font-weight: 600; cursor: pointer; transition: .15s;
}
.variant-opt.selected { border-color: var(--primary); background: #eef2ff; color: var(--primary); }
.variant-opt:disabled { opacity: .4; cursor: not-allowed; }
.stock-row.in { color: var(--ok); font-weight: 600; }
.stock-row.out { color: var(--bad); font-weight: 600; }
.buy-row { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.specs table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th { text-align: left; color: var(--muted); font-weight: 600; width: 140px; padding: 7px 0; }
.specs td { padding: 7px 0; }
.reviews .review { border-top: 1px solid var(--line); padding: 12px 0; }
.review-head { display: flex; gap: 10px; align-items: center; }
.stars { color: #b45309; }

/* Cart & checkout */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto auto; gap: 14px; align-items: center;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px;
}
.ci-img { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #f1f2f6; display: flex; align-items: center; justify-content: center; }
.ci-img img { width: 100%; height: 100%; object-fit: cover; }
.ci-name { font-weight: 600; }
.ci-price { color: var(--dark); font-weight: 700; }
.ci-actions input { width: 62px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; text-align: center; font: inherit; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.sum-row.grand { font-size: 17px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.sum-row.ok { color: var(--ok); }
.coupon-box, .reward-box { margin: 12px 0; display: grid; gap: 8px; }
.coupon-box { grid-template-columns: 1fr auto; align-items: center; }
.coupon-msg.ok { color: var(--ok); font-size: 13px; font-weight: 600; }
.coupon-msg.bad { color: var(--bad); font-size: 13px; font-weight: 600; }
.checkout-main .step { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, label > input {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; outline: none;
}
.form-grid input:focus, label > input:focus { border-color: var(--primary); }
.form-grid .check { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-direction: row; }
.addr-list { display: grid; gap: 10px; margin-bottom: 14px; }
.addr-option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); padding: 12px; border-radius: 10px; cursor: pointer; }
.addr-option:has(input:checked) { border-color: var(--primary); background: #eef2ff66; }
.pay-option { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--primary); background: #eef2ff66; }
.checkout-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkout-inline input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }

/* Auth & account */
.auth-card { max-width: 440px; margin: 30px auto; }
.auth-card label { display: grid; gap: 5px; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-msg.ok { color: var(--ok); font-weight: 600; margin-top: 8px; }
.auth-msg.bad { color: var(--bad); font-weight: 600; margin-top: 8px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13.5px; }
.auth-links a { color: var(--primary); font-weight: 600; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 18px 0; }
.stat h3 { font-size: 26px; margin: 0; color: var(--primary); }
.stat p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.stat.big h3 { font-size: 34px; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.order-row:last-child { border-bottom: none; }
.order-row.unread { background: #f8faff; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: inline-block; vertical-align: middle; margin-right: 8px; }
.acct-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 18px; }
.link-card { display: grid; gap: 4px; padding: 16px; }
.link-card:hover { outline: 2px solid var(--primary); }
.order-detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 16px; }
.timeline { display: grid; gap: 0; }
.tl-item { display: flex; gap: 12px; padding: 8px 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-top: 7px; flex-shrink: 0; }
.addr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 20px; }
.badge { border-radius: 6px; padding: 3px 9px; font-size: 11.5px; font-weight: 700; display: inline-block; }
.badge-ok { background: #ecfdf5; color: var(--ok); }
.badge-warn { background: #fffbeb; color: var(--warn); }
.badge-bad { background: #fef2f2; color: var(--bad); }
.badge-info { background: #eff6ff; color: #2563eb; }
.badge-muted { background: #f1f2f6; color: var(--muted); }

/* Empty & error states */
.empty-state { text-align: center; padding: 60px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty-icon { font-size: 52px; margin-bottom: 8px; }
.error-box { text-align: center; padding: 80px 20px; }

/* Success page */
.success-box { text-align: center; padding: 44px 28px; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: #ecfdf5; color: var(--ok); font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-weight: 800; }
.success-box .inner { margin: 18px 0; text-align: left; }

/* Footer */
.site-footer { background: var(--dark); color: #cbd5e1; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 26px; padding: 40px 20px; }
.site-footer h4 { color: #fff; margin-bottom: 10px; }
.site-footer a { display: block; padding: 4px 0; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 16px 20px; font-size: 13px; }

/* Responsive */
@media (max-width: 960px) {
  .product-page { grid-template-columns: 1fr; }
  .listing-body { grid-template-columns: 1fr; }
  .filters { position: static; }
  .cart-layout, .checkout-layout, .order-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-top { gap: 10px; }
  .brand { font-size: 18px; }
  .search { order: 3; flex-basis: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pc-name { font-size: 13px; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 22px 14px; }
  .hero-caption { padding: 20px; }
}

/* ===== Premium storefront refinement ===== */
:root{--primary:#5b4cf0;--primary-dark:#4637cf;--dark:#111426;--bg:#f6f7fb;--line:#e8e9f0;--radius:18px;--shadow:0 12px 34px rgba(22,27,48,.07)}
body{background:radial-gradient(circle at 90% 0,#ece9ff 0,transparent 28%),#f7f8fc;color:#171a2a}
.container{max-width:1240px}
.site-header{background:#ffffffea;backdrop-filter:blur(18px);border-bottom:1px solid #e9eaf1;box-shadow:0 5px 25px rgba(20,25,45,.035)}
.header-top{padding:15px 20px}.brand{font-size:22px;letter-spacing:-.04em}.brand:before{content:"";display:inline-block;width:10px;height:10px;border-radius:3px;background:linear-gradient(135deg,#8b7cff,#5b4cf0);margin:0 8px 2px 0}
.search{max-width:620px}.search input{background:#f8f8fb;border-color:#e4e5ee}.search input:focus{background:#fff;box-shadow:0 0 0 4px #5b4cf00d}.search button{background:linear-gradient(135deg,#5b4cf0,#7567f7);font-weight:800}
.header-actions{gap:12px}.icon-link{font-size:12.5px}.cat-nav{gap:28px;padding-top:9px;padding-bottom:11px}.cat-nav a{font-size:12.5px}
.hero-slider{padding:24px 20px 8px;gap:18px}.hero-slide{min-height:330px;border-radius:22px;box-shadow:0 20px 45px rgba(25,30,55,.12)}.hero-slide img{height:330px}.hero-caption{padding:42px;background:linear-gradient(90deg,rgba(11,15,30,.78),rgba(11,15,30,.08) 78%)}.hero-caption h2{font-size:clamp(28px,4vw,44px);font-weight:850;letter-spacing:-.04em}.hero-caption p{font-size:14px}.section{padding:40px 20px}.section-head{margin-bottom:19px}.section-head h2{font-size:23px;font-weight:850;letter-spacing:-.035em}.see-all{font-size:12.5px}
.cat-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:15px}.cat-card{padding:21px;border:1px solid #ececf3;box-shadow:0 8px 26px rgba(25,30,55,.055)}.cat-card:hover{box-shadow:0 15px 30px rgba(25,30,55,.1)}.cat-card img,.cat-ph{width:82px;height:82px}
.offer-chip{background:linear-gradient(135deg,#f0eeff,#f7f4ff);border:1px solid #e2defd;padding:11px 17px}.offer-chip b{color:#4c3bd7}.promo-banner{border-radius:20px;box-shadow:0 14px 34px rgba(20,25,45,.1)}
.product-grid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:17px}.product-card{padding:11px;border:1px solid #ebecf2;border-radius:18px;box-shadow:0 8px 25px rgba(25,30,55,.055)}.product-card:hover{transform:translateY(-5px);box-shadow:0 18px 36px rgba(25,30,55,.11)}.pc-img{border-radius:14px;background:linear-gradient(135deg,#f0f1f7,#fafaff);min-height:205px}.pc-name{font-size:13.5px}.pc-price b{font-size:17px}.product-card .btn{border-radius:10px;font-weight:800}.off-badge{background:#e34d55;border-radius:7px}.wish-btn{width:33px;height:33px}
.site-footer{margin-top:65px;background:linear-gradient(180deg,#111426,#0d1020)}.footer-grid{padding:46px 20px}.footer-bottom{border-color:#24283b}
@media(max-width:640px){.hero-slider{padding:14px 14px 4px}.hero-slide,.hero-slide img{min-height:250px;height:250px}.hero-caption{padding:25px}.hero-caption h2{font-size:28px}.section{padding:28px 14px}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pc-img{min-height:0}.cat-grid{grid-template-columns:repeat(2,1fr)}}
