/* ============================================================
   NextLife Hub — Mobile Spare Parts Ecommerce
   Design System & Global Styles
   ============================================================ */

:root {
  /* Brand palette */
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #dbeafe;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;

  /* Neutrals */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.14);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1240px;
  --header-h: 132px;

  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  /* Apple-style easing + timing for refined hover/press feel */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.32s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
/* Kill the mobile/webkit tap highlight that can flash a dark box on click */
* { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }

/* Reserve viewport height for the main content so async-loaded pages
   (shop, product, refurbished) don't render short first — which made
   the footer ride up mid-screen then jump down as content arrived
   (the "footer flash"). */
main { min-height: 78vh; }
/* Keep async product grids from collapsing before data arrives */
#results, #rf-results, #home-bestsellers, #home-new, #home-refurb { min-height: 300px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 1.9rem; letter-spacing: -0.02em; }
.section-head p { color: var(--text-muted); }
.section-head .link { color: var(--brand); font-weight: 600; }

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #1f2937; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-sale { background: #fee2e2; color: var(--danger); }
.badge-new { background: var(--brand-light); color: var(--brand-dark); }
.badge-oem { background: #dcfce7; color: var(--success); }
.badge-out { background: #f1f5f9; color: var(--text-soft); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-alt); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-muted);
}

/* ---------- Header ---------- */
/* Whole header block (topbar + header + nav) sticky as one unit */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Frosted-glass LOOK without backdrop-filter — a translucent white
     gradient. We avoid backdrop-filter on the sticky header because it
     repaints as a brief dark flash during navigation/scroll in some
     browsers (Chrome/Windows). This is visually near-identical and stable. */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.82));
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.07);
}

.topbar {
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.82rem;
}
.topbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 38px; gap: 16px;
}
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 18px; }

/* Transparent — the glass look comes from #site-header's background */
.header { background: transparent; }
.header-main { display: flex; align-items: center; gap: 24px; height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.logo .mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 1.2rem;
  overflow: hidden;
}
/* When a custom logo image is uploaded, it fills the mark box and the
   gradient background is dropped so the logo shows cleanly. */
.logo .mark:has(img.logo-img) { background: none; }
.logo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo span b { color: var(--brand); }

.search-bar { flex: 1; display: flex; max-width: 620px; }
.search-bar select {
  border: 1px solid rgba(148, 163, 184, 0.4); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 0 12px; background: rgba(255, 255, 255, 0.55); color: var(--text-muted); max-width: 150px;
}
.search-bar input {
  flex: 1; border: 1px solid rgba(148, 163, 184, 0.4); padding: 11px 14px; outline: none;
  background: rgba(255, 255, 255, 0.7);
}
.search-bar input:focus { border-color: var(--brand); }
.search-bar button {
  background: var(--brand); color: #fff; padding: 0 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-weight: 600;
}
.search-bar button:hover { background: var(--brand-dark); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-muted);
  font-size: 0.72rem; transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--surface-alt); color: var(--brand); }
.icon-btn .ico { font-size: 1.3rem; line-height: 1; }
.count-badge {
  position: absolute; top: 2px; right: 4px;
  background: var(--accent); color: #1f2937; font-size: 0.65rem; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center;
  padding: 0 4px;
}

/* ---------- Nav ---------- */
.nav { border-top: 1px solid rgba(148, 163, 184, 0.25); }
.nav .container { display: flex; align-items: center; gap: 6px; height: 48px; }
.nav a {
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 500;
  font-size: 0.92rem; color: var(--text); transition: background 0.2s, color 0.2s;
}
.nav a:hover, .nav a.active { background: var(--brand-light); color: var(--brand-dark); }
.nav .nav-all { font-weight: 700; color: var(--brand); }
.nav .nav-refurb { font-weight: 700; color: #047857; background: #ecfdf5; }
.nav .nav-refurb:hover, .nav .nav-refurb.active { background: #d1fae5; color: #065f46; }
.menu-toggle { display: none; font-size: 1.5rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  color: #fff; border-radius: var(--radius-lg); overflow: hidden;
  position: relative; margin-top: 28px;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(245,158,11,0.25), transparent 45%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; padding: 56px; align-items: center; }
.hero h1 { font-size: 2.9rem; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 16px; }
.hero p { color: #cbd5e1; font-size: 1.1rem; max-width: 520px; margin-bottom: 26px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 34px; }
.hero-stats b { font-size: 1.6rem; display: block; }
.hero-stats span { color: #94a3b8; font-size: 0.85rem; }
.hero-visual { display: grid; place-items: center; }
.hero-visual .device {
  font-size: 12rem; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 14px; text-align: center; transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand); }
.cat-card .emoji { font-size: 2.3rem; }
.cat-card h4 { font-size: 0.95rem; margin-top: 10px; }
.cat-card small { color: var(--text-soft); }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform 0.15s, box-shadow 0.2s;
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-media {
  position: relative; height: 220px; flex-shrink: 0; background: #fff;
  display: grid; place-items: center; font-size: 4.2rem; padding: 14px; overflow: hidden;
}
/* Product images sit on white and are shown IN FULL (contain), centered,
   with consistent padding — like a standard e-commerce catalog. Every
   image ends up the same uniform size regardless of its dimensions. */
.media-img {
  position: absolute;
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  object-fit: contain;
  display: block;
}
.product-media .badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.wish-btn {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.9); display: grid; place-items: center; font-size: 1.1rem;
  box-shadow: var(--shadow-sm); transition: transform 0.12s, color 0.2s; color: var(--text-soft);
}
.wish-btn:hover { transform: scale(1.12); color: var(--danger); }
.wish-btn.active { color: var(--danger); }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-brand { font-size: 0.75rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.product-title { font-weight: 600; font-size: 0.98rem; line-height: 1.35; min-height: 2.6em; }
.product-title a:hover { color: var(--brand); }
.product-meta { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); }
.stars { color: var(--accent); letter-spacing: 1px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.price { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.price-old { font-size: 0.9rem; color: var(--text-soft); text-decoration: line-through; }
.stock-line { font-size: 0.8rem; font-weight: 600; }
.in-stock { color: var(--success); }
.low-stock { color: var(--warning); }
.no-stock { color: var(--danger); }
.product-actions { display: flex; gap: 8px; margin-top: 4px; }
.product-actions .btn { flex: 1; }

/* ---------- Feature strip / trust badges ---------- */
.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-item {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
}
.feature-item .ico { font-size: 2rem; }
.feature-item h4 { font-size: 0.98rem; }
.feature-item p { font-size: 0.82rem; color: var(--text-muted); }

.brand-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.brand-chip {
  padding: 12px 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-weight: 700; color: var(--text-muted); font-size: 1.05rem;
  transition: color 0.2s, border-color 0.2s;
}
.brand-chip:hover { color: var(--brand); border-color: var(--brand); }

/* ---------- Promo banners ---------- */
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.promo {
  border-radius: var(--radius-lg); padding: 40px; color: #fff; position: relative; overflow: hidden;
  min-height: 200px; display: flex; flex-direction: column; justify-content: center;
}
.promo h3 { font-size: 1.7rem; margin-bottom: 8px; }
.promo p { opacity: 0.9; margin-bottom: 18px; }
.promo-a { background: linear-gradient(120deg, #7c3aed, #2563eb); }
.promo-b { background: linear-gradient(120deg, #db2777, #f59e0b); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(120deg, #0f172a, #1e293b); color: #fff;
  border-radius: var(--radius-lg); padding: 48px; text-align: center;
}
.newsletter h2 { font-size: 1.8rem; margin-bottom: 8px; }
.newsletter p { color: #94a3b8; margin-bottom: 22px; }
.newsletter form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.newsletter input { flex: 1; padding: 14px; border-radius: var(--radius-sm); border: none; outline: none; }

/* ---------- Footer ---------- */
.footer { background: var(--text); color: #94a3b8; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 56px 0 36px; }
.footer h5 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer a { display: block; padding: 5px 0; font-size: 0.9rem; transition: color 0.2s; }
.footer a:hover { color: #fff; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer .about { font-size: 0.9rem; max-width: 320px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08); display: grid; place-items: center; font-size: 1.1rem; }
.footer-social a:hover { background: var(--brand); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; }
.pay-icons { display: flex; gap: 8px; font-size: 1.6rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--text-muted); padding: 18px 0; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--text-soft); }

/* ---------- Shop layout ---------- */
.shop-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: sticky; top: calc(var(--header-h) + 12px);
}
.filter-group { padding: 16px 0; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: none; }
.filter-group h4 { font-size: 0.95rem; margin-bottom: 12px; display: flex; justify-content: space-between; }
.filter-opt { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 0.9rem; color: var(--text-muted); cursor: pointer; }
.filter-opt:hover { color: var(--text); }
.filter-opt input { accent-color: var(--brand); width: 16px; height: 16px; }
.filter-opt .cnt { margin-left: auto; font-size: 0.78rem; color: var(--text-soft); }
.price-inputs { display: flex; gap: 8px; align-items: center; }
.price-inputs input { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 20px; flex-wrap: wrap;
}
.shop-toolbar .count { font-size: 0.9rem; color: var(--text-muted); }
.shop-toolbar select { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip-remove {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: var(--brand-light); color: var(--brand-dark); font-size: 0.82rem; font-weight: 600;
}
.chip-remove button { color: var(--brand-dark); font-weight: 800; }

.shop-grid { grid-template-columns: repeat(3, 1fr); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 36px; }
.pagination button {
  min-width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); font-weight: 600; color: var(--text);
}
.pagination button:hover { border-color: var(--brand); color: var(--brand); }
.pagination button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.empty-state { text-align: center; padding: 70px 20px; color: var(--text-muted); }
.empty-state .ico { font-size: 4rem; margin-bottom: 12px; }

/* ---------- Product detail ---------- */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.pdp-gallery { position: sticky; top: calc(var(--header-h) + 12px); }
.pdp-main-img {
  position: relative;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  aspect-ratio: 1/1; display: grid; place-items: center; font-size: 10rem; margin-bottom: 14px;
  overflow: hidden; padding: 24px;
}
.pdp-main-img img.media-img { inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); border-radius: var(--radius-sm); }
.pdp-thumbs { display: flex; gap: 10px; }
.pdp-thumbs .thumb {
  width: 76px; height: 76px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  display: grid; place-items: center; font-size: 2rem; background: var(--surface); cursor: pointer;
}
.pdp-thumbs .thumb { transition: border-color 0.15s, transform 0.12s; }
.pdp-thumbs .thumb:hover { border-color: var(--brand); transform: translateY(-2px); }
.pdp-thumbs .thumb.active { border-color: var(--brand); }
.pdp-info h1 { font-size: 1.9rem; letter-spacing: -0.02em; margin-bottom: 10px; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin: 18px 0; }
.pdp-price .price { font-size: 2.1rem; }
.pdp-list { margin: 18px 0; }
.pdp-list li { display: flex; gap: 10px; padding: 6px 0; font-size: 0.92rem; }
.pdp-list li .k { color: var(--text-muted); min-width: 130px; }
.qty {
  display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}
.qty button { width: 42px; height: 44px; font-size: 1.2rem; background: var(--surface-alt); }
.qty button:hover { background: var(--brand-light); }
.qty input { width: 54px; height: 44px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.pdp-buy { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.pdp-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.pdp-trust .t { display: flex; gap: 10px; align-items: center; font-size: 0.85rem; color: var(--text-muted); }

.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--border); margin: 40px 0 24px; flex-wrap: wrap; }
.tab { padding: 12px 20px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--brand); border-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 12px 16px; border: 1px solid var(--border); }
.spec-table tr td:first-child { background: var(--surface-alt); font-weight: 600; width: 220px; }

.review { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; background: var(--surface); }
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-head b { font-size: 0.95rem; }
.review-head .date { font-size: 0.8rem; color: var(--text-soft); }

/* ---------- Cart & Checkout ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.cart-items { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 88px 1fr auto auto auto; gap: 16px; align-items: center; padding: 18px; border-bottom: 1px solid var(--border); }
.cart-row:last-child { border-bottom: none; }
.cart-thumb { position: relative; width: 88px; height: 88px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 2.4rem; overflow: hidden; }
.cart-thumb img.media-img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
.cart-row .name { font-weight: 600; }
.cart-row .brand { font-size: 0.8rem; color: var(--text-soft); }
.cart-row .line-price { font-weight: 800; font-size: 1.1rem; text-align: right; }
.cart-row .rm { color: var(--danger); font-size: 0.85rem; }
.cart-row .rm:hover { text-decoration: underline; }

.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; position: sticky; top: calc(var(--header-h) + 12px); }
.summary h3 { margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--text-muted); font-size: 0.95rem; }
.summary-row.total { border-top: 2px solid var(--border); margin-top: 10px; padding-top: 16px; font-size: 1.25rem; font-weight: 800; color: var(--text); }
.coupon { display: flex; gap: 8px; margin: 14px 0; }
.coupon input { flex: 1; padding: 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.checkout-steps { display: flex; gap: 8px; margin-bottom: 26px; }
.checkout-steps .step { flex: 1; text-align: center; padding: 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); }
.checkout-steps .step.active { border-color: var(--brand); color: var(--brand); font-weight: 700; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.form-card h3 { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.field input, .field select, .field textarea { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; cursor: pointer; }
.pay-method:hover { border-color: var(--brand); }
.pay-method input { accent-color: var(--brand); }

/* ---------- Account / Auth ---------- */
.auth-wrap { max-width: 460px; margin: 40px auto; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.auth-card h2 { margin-bottom: 6px; }
.auth-card .sub { color: var(--text-muted); margin-bottom: 22px; }
.auth-tabs { display: flex; margin-bottom: 22px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.auth-tabs button { flex: 1; padding: 12px; font-weight: 600; color: var(--text-muted); }
.auth-tabs button.active { background: var(--brand); color: #fff; }

.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.account-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.account-nav a { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 500; }
.account-nav a:hover, .account-nav a.active { background: var(--brand-light); color: var(--brand-dark); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card b { font-size: 1.8rem; display: block; }
.stat-card span { color: var(--text-muted); font-size: 0.85rem; }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.data-table th { background: var(--surface-alt); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }

.status { padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.status-delivered { background: #dcfce7; color: var(--success); }
.status-transit { background: var(--brand-light); color: var(--brand-dark); }
.status-processing { background: #fef3c7; color: var(--accent-dark); }

/* ---------- Page header banner ---------- */
.page-hero {
  background: linear-gradient(120deg, #1e293b, #334155); color: #fff;
  border-radius: var(--radius-lg); padding: 40px; margin-top: 20px;
}
.page-hero h1 { font-size: 2.2rem; letter-spacing: -0.02em; }
.page-hero p { color: #cbd5e1; margin-top: 6px; }

/* ---------- Order success ---------- */
.success-box { max-width: 620px; margin: 40px auto; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px; box-shadow: var(--shadow); }
.success-box .check { width: 90px; height: 90px; border-radius: 50%; background: #dcfce7; color: var(--success); font-size: 3rem; display: grid; place-items: center; margin: 0 auto 20px; }
.success-box h1 { font-size: 1.9rem; margin-bottom: 8px; }
.order-meta { display: flex; justify-content: center; gap: 30px; margin: 24px 0; flex-wrap: wrap; }
.order-meta div { text-align: center; }
.order-meta b { display: block; font-size: 1.1rem; }
.order-meta span { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- FAQ / accordion ---------- */
.accordion { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: none; }
.acc-head { width: 100%; text-align: left; padding: 18px 20px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.acc-head:hover { background: var(--surface-alt); }
.acc-body { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.25s ease, padding 0.25s ease; color: var(--text-muted); }
.acc-item.open .acc-body { padding: 0 20px 20px; max-height: 300px; }
.acc-item.open .acc-head .plus { transform: rotate(45deg); }
.acc-head .plus { transition: transform 0.2s; font-size: 1.4rem; color: var(--brand); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--text); color: #fff; padding: 14px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; font-size: 0.9rem;
  animation: toastIn 0.25s ease; max-width: 340px;
}
.toast .ico { font-size: 1.2rem; }
.toast.success { border-left: 4px solid var(--success); }
.toast.info { border-left: 4px solid var(--brand); }
.toast.warn { border-left: 4px solid var(--warning); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- Info grid pages ---------- */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.info-card .ico { font-size: 2.2rem; margin-bottom: 10px; }
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.prose h3 { margin: 20px 0 8px; }
.prose p, .prose li { color: var(--text-muted); margin-bottom: 8px; }
.prose ul { padding-left: 20px; list-style: disc; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid, .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .shop-layout, .cart-layout, .checkout-layout, .account-layout, .pdp { grid-template-columns: 1fr; }
  .pdp-gallery, .filters, .summary { position: static; }
  .filters { display: none; }
  .filters.show { display: block; }
  .nav .container { overflow-x: auto; }
}
@media (max-width: 640px) {
  .hero { margin-top: 16px; }
  .hero-inner { padding: 32px 22px; }
  .hero h1 { font-size: 2rem; }
  .search-bar { display: none; }
  .menu-toggle { display: block; }

  /* Mobile nav: collapsed by default, drops down as a vertical list
     when the hamburger adds .open */
  .nav .container {
    display: none;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 2px;
    padding: 8px 12px 12px;
  }
  .nav .container.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1rem; border-radius: var(--radius-sm); }
  /* Keep products 2-up on phones; single-column only for these blocks */
  .cat-grid, .promo-grid, .info-grid, .feature-strip, .form-grid, .stat-grid { grid-template-columns: 1fr; }
  .product-grid, .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Compact product cards for small screens */
  .product-media { aspect-ratio: auto; height: 120px; font-size: 2.6rem; }
  .product-media .badges { top: 6px; left: 6px; gap: 4px; }
  .badge { padding: 2px 7px; font-size: 0.62rem; }
  .wish-btn { width: 30px; height: 30px; top: 6px; right: 6px; font-size: 0.95rem; }
  .product-body { padding: 10px; gap: 3px; }
  .product-title { font-size: 0.9rem; min-height: 0; line-height: 1.25; }
  .product-brand { font-size: 0.66rem; }
  .price { font-size: 1.05rem; }
  .price-row { margin-top: 4px; }
  .product-meta { font-size: 0.72rem; gap: 4px; }
  .stock-line { font-size: 0.72rem; }
  .product-actions { flex-direction: column; gap: 6px; margin-top: 6px; }
  .product-actions .btn { padding: 8px 10px; font-size: 0.8rem; }

  /* Product detail buy row: stack cleanly, full-width controls */
  .pdp-buy { flex-direction: column; align-items: stretch; gap: 10px; }
  .pdp-buy .qty { align-self: flex-start; }
  .pdp-buy .btn { width: 100%; }
  .pdp-trust { grid-template-columns: 1fr; gap: 10px; }

  .cart-row { grid-template-columns: 64px 1fr; }
  .cart-thumb { width: 64px; height: 64px; }
  .section { padding: 40px 0; }
  .newsletter form { flex-direction: column; }
  .topbar-links { display: none; }
}

/* Very small phones: allow single column so cards aren't cramped */
@media (max-width: 380px) {
  .product-grid, .shop-grid { grid-template-columns: 1fr; }
  .product-media { font-size: 3.4rem; }
  .product-actions { flex-direction: row; }
}

/* ============================================================
   Admin Panel
   ============================================================ */
.admin-body { background: #0f172a; }
.admin-login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.admin-login {
  background: var(--surface); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.admin-login .logo { justify-content: center; margin-bottom: 8px; }
.admin-login h2 { text-align: center; }
.admin-login .sub { text-align: center; color: var(--text-muted); margin-bottom: 24px; }

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { background: #0f172a; color: #cbd5e1; padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .logo { color: #fff; margin-bottom: 28px; }
.admin-side .logo .mark { background: linear-gradient(135deg, var(--brand), var(--accent)); }
.admin-side nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  color: #94a3b8; font-weight: 500; margin-bottom: 4px; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.admin-side nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-side nav a.active { background: var(--brand); color: #fff; }
.admin-side .side-foot { margin-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; }
.admin-side .side-foot a { color: #94a3b8; font-size: 0.85rem; }

.admin-main { background: var(--bg); padding: 26px 30px; overflow-x: hidden; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-topbar h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
.admin-topbar .who { color: var(--text-muted); font-size: 0.9rem; }

.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.admin-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
.admin-stat .ico { position: absolute; right: 14px; top: 14px; font-size: 1.6rem; opacity: 0.5; }
.admin-stat b { font-size: 1.9rem; display: block; letter-spacing: -0.02em; }
.admin-stat span { color: var(--text-muted); font-size: 0.85rem; }

.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.admin-card-head h3 { font-size: 1.1rem; }

.admin-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.admin-toolbar input, .admin-toolbar select { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.admin-toolbar input[type="search"] { min-width: 240px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.88rem; white-space: nowrap; }
.admin-table th { background: var(--surface-alt); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); position: sticky; top: 0; }
.admin-table tr:hover td { background: var(--surface-alt); }
.admin-table .prod-cell { display: flex; align-items: center; gap: 10px; white-space: normal; min-width: 220px; }
.admin-table .prod-emoji { position: relative; width: 40px; height: 40px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--border); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; overflow: hidden; }
.admin-table .prod-emoji img.media-img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.admin-actions { display: flex; gap: 6px; }
.icon-action { width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); font-size: 0.95rem; }
.icon-action:hover { border-color: var(--brand); }
.icon-action.danger:hover { border-color: var(--danger); background: #fee2e2; }

.stock-tag { padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.stock-ok { background: #dcfce7; color: var(--success); }
.stock-low { background: #fef3c7; color: var(--accent-dark); }
.stock-none { background: #fee2e2; color: var(--danger); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.55); display: none; place-items: center; z-index: 300; padding: 20px; overflow-y: auto; }
.modal-overlay.open { display: grid; }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 680px; box-shadow: var(--shadow-lg); max-height: 92vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 1.2rem; }
.modal-head .close { font-size: 1.5rem; color: var(--text-muted); width: 36px; height: 36px; border-radius: var(--radius-sm); }
.modal-head .close:hover { background: var(--surface-alt); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.admin-empty { text-align: center; padding: 50px 20px; color: var(--text-muted); }

/* Image upload control (admin modals) */
.img-upload { display: flex; gap: 16px; align-items: flex-start; }
.img-preview {
  width: 96px; height: 96px; flex-shrink: 0; border-radius: var(--radius-sm);
  border: 1px dashed var(--border); background: var(--surface-alt);
  display: grid; place-items: center; overflow: hidden; color: var(--text-soft); font-size: 0.75rem; text-align: center;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-upload-controls { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.img-upload-controls input[type="file"] { font-size: 0.85rem; }

/* Bulk action bar */
.bulk-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--brand-light); border: 1px solid var(--brand); border-radius: var(--radius-sm); margin-bottom: 14px; flex-wrap: wrap; }
.bulk-bar #bulk-count { font-weight: 700; color: var(--brand-dark); }

/* Dashboard bar chart */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bar { width: 100%; max-width: 44px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--brand), var(--brand-dark)); transition: height .3s var(--ease-out); }
.bar-val { font-size: .68rem; color: var(--text-muted); white-space: nowrap; }
.bar-lbl { font-size: .72rem; color: var(--text-muted); }

/* Progress bars (status breakdown) */
.progress { height: 8px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--brand); }

@media (max-width: 900px) { .dash-analytics { grid-template-columns: 1fr !important; } }

/* Taxonomy add-row */
.tax-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tax-add input { flex: 1; min-width: 140px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.tax-add .btn { flex-shrink: 0; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; display: flex; flex-direction: column; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .admin-stat-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 18px; }
}

/* ============================================================
   Refurbished phones section
   ============================================================ */
.refurb-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); margin-top: 24px;
  background: linear-gradient(120deg, #064e3b 0%, #047857 45%, #10b981 100%);
  color: #fff; padding: 48px;
}
.refurb-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(255,255,255,0.18), transparent 45%);
}
.refurb-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: center; }
.refurb-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.15); padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em; }
.refurb-hero h1 { font-size: 2.6rem; line-height: 1.1; letter-spacing: -0.03em; margin: 14px 0 12px; }
.refurb-hero p { color: rgba(255,255,255,0.9); max-width: 520px; margin-bottom: 22px; }
.refurb-hero .assurances { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 20px; }
.refurb-hero .assurances div { font-size: 0.9rem; }
.refurb-hero .assurances b { display: block; font-size: 1.3rem; }
.refurb-hero-visual { display: grid; place-items: center; font-size: 9rem; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.35)); }

/* Grade badges */
.grade { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; }
.grade-A { background: #dcfce7; color: #15803d; }
.grade-B { background: #dbeafe; color: #1d4ed8; }
.grade-C { background: #fef3c7; color: #b45309; }

/* Display / screen type chip */
.display-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; align-self: flex-start; }
.disp-oem { background: #dcfce7; color: #15803d; }
.disp-refurb { background: #dbeafe; color: #1d4ed8; }
.disp-after { background: #fef3c7; color: #b45309; }
.display-note { background: var(--surface-alt); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.85rem; color: var(--text-muted); margin: 14px 0; line-height: 1.5; }

/* Phone card extras (reuses .product-card grid) */
.phone-specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.spec-chip { font-size: 0.72rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; color: var(--text-muted); }
.battery { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.battery-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; max-width: 90px; }
.battery-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #16a34a, #4ade80); }

/* Home featured refurb band */
.refurb-band {
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  background: linear-gradient(120deg, #0f172a, #064e3b);
  color: #fff; padding: 40px; margin: 8px 0;
}
.refurb-band-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.refurb-band-head h2 { font-size: 1.9rem; letter-spacing: -0.02em; }
.refurb-band-head p { color: rgba(255,255,255,0.85); }
.refurb-band .product-grid { grid-template-columns: repeat(4, 1fr); }

/* Grade guide */
.grade-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grade-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.grade-card .g { font-size: 1.6rem; font-weight: 800; }

@media (max-width: 900px) {
  .refurb-hero-inner { grid-template-columns: 1fr; }
  .refurb-hero-visual { display: none; }
  .refurb-band .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .refurb-hero { padding: 30px 22px; }
  .refurb-hero h1 { font-size: 1.9rem; }
  .grade-guide { grid-template-columns: 1fr; }
  .refurb-band { padding: 26px 20px; }
  .refurb-band .product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Apple-style refined hover / press easing (CSS only)
   Smooth, slightly slower, springy-out easing on interactive
   elements. Deliberately does NOT touch #site-header/#site-footer
   containers or use scroll/opacity animations (no flash risk).
   ============================================================ */

/* Unified smooth transitions on interactive elements */
.btn,
.cat-card,
.product-card,
.brand-chip,
.icon-btn,
.nav a,
.wish-btn,
.pdp-thumbs .thumb,
.pagination button,
.qty button,
.pay-method,
.filter-opt,
.account-nav a,
.acc-head,
.footer a,
.footer-social a,
.breadcrumb a,
.product-title a,
.icon-action,
.chip-remove,
.tab,
.grade-card,
.info-card,
.feature-item,
.search-bar button,
.link {
  transition:
    color var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease-out) !important;
}

/* Cards: gentle lift + soft shadow on hover, ease back down smoothly */
.product-card:hover,
.cat-card:hover,
.info-card:hover,
.grade-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

/* Buttons: subtle raise on hover, press-in on click */
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }

/* Small controls: tactile press */
.icon-btn:active,
.brand-chip:active,
.pagination button:active,
.icon-action:active,
.qty button:active { transform: scale(0.94); }

/* Brand chips & feature tiles lift slightly */
.brand-chip:hover,
.feature-item:hover { transform: translateY(-3px); }

/* Wishlist heart: springy pop */
.wish-btn { transition: transform var(--dur) var(--ease-out), color var(--dur) var(--ease) !important; }
.wish-btn:hover { transform: scale(1.18); }
.wish-btn:active { transform: scale(0.9); }

/* Product image gets a slow, subtle zoom when hovering its card */
.product-media .media-img,
.product-media > span { transition: transform 0.5s var(--ease-out); }
.product-card:hover .media-img { transform: scale(1.05); }

/* Links underline-grow feel via color only (no layout shift) */
.product-title a,
.breadcrumb a,
.footer a,
.link { transition: color var(--dur) var(--ease) !important; }

/* Honour reduced-motion preference: disable movement, keep color fades */
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active,
  .product-card:hover, .cat-card:hover, .info-card:hover, .grade-card:hover,
  .brand-chip:hover, .feature-item:hover,
  .wish-btn:hover, .wish-btn:active,
  .product-card:hover .media-img,
  .icon-btn:active, .brand-chip:active, .pagination button:active,
  .icon-action:active, .qty button:active {
    transform: none !important;
  }
}
