/* ============================================================
   GadgetsMandu — design system
   Identity: the shop's own material world — PCB green, solder
   copper, ledger paper, ink stamps — instead of a generic SaaS
   violet-gradient template.
   ============================================================ */
:root {
  --primary: #0EA45E;         /* vivid emerald — brand primary */
  --primary-dark: #0A7A46;
  --primary-light: #DFF7EB;   /* pale green tint for chips/hovers */
  --accent: #FF7A1A;          /* bold orange — CTAs, highlights */
  --accent-light: #FFE3CC;
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #E11D2E;
  --bg: #FFFFFF;               /* clean white background */
  --surface: #FFFFFF;
  --surface-2: #F2F6F4;
  --text: #14181B;
  --muted: #5B6660;
  --border: #DEE6E1;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20,24,27,.06), 0 1px 1px rgba(20,24,27,.04);
  --shadow-md: 0 12px 28px -8px rgba(20,24,27,.14), 0 2px 6px rgba(20,24,27,.06);
  --shadow-lg: 0 24px 56px -12px rgba(20,24,27,.22), 0 4px 12px rgba(20,24,27,.08);
  --shadow-primary: 0 10px 24px -6px rgba(14,164,94,.35);
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --header-h: 76px;
}

[data-theme="dark"] {
  --primary: #34D399;
  --primary-dark: #10B981;
  --primary-light: #123526;
  --accent: #FF9142;
  --accent-light: #4A2A16;
  --bg: #0B0F0D;
  --surface: #131917;
  --surface-2: #1B2320;
  --text: #F0F4F2;
  --muted: #9AA69F;
  --border: #2A342F;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.25);
  --shadow-md: 0 12px 28px -8px rgba(0,0,0,.38), 0 2px 6px rgba(0,0,0,.2);
  --shadow-lg: 0 26px 60px -14px rgba(0,0,0,.55), 0 4px 12px rgba(0,0,0,.25);
  --shadow-primary: 0 10px 26px -6px rgba(52,211,153,.3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 .75rem; color: var(--muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700;
  color: var(--accent); margin-bottom: .5rem; font-family: var(--font-mono);
}
.eyebrow::before { content: '// '; opacity: .6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .85rem 1.7rem; border-radius: 999px; border: none; cursor: pointer;
  background: var(--primary); color: #fff; font-weight: 600; font-size: .92rem; font-family: var(--font-head);
  box-shadow: var(--shadow-primary);
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, background .2s ease, opacity .15s ease;
  text-align: center; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -6px rgba(14,164,94,.42); background: var(--primary-dark); }
.btn:active { transform: translateY(0); box-shadow: 0 6px 14px -4px rgba(14,164,94,.35); }
.btn.secondary { background: var(--surface); color: var(--text); box-shadow: none; border: 1.5px solid var(--border); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--text); color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn.ghost { background: transparent; color: var(--primary); box-shadow: none; padding: .5rem .8rem; }
.btn.ghost:hover { transform: none; background: var(--primary-light); box-shadow: none; }
.btn.sm { padding: .58rem 1.15rem; font-size: .82rem; }
.btn.block { width: 100%; }
.btn.danger { background: var(--danger); box-shadow: 0 10px 24px -6px rgba(225,29,46,.35); }
.btn.danger:hover { background: #b5182a; box-shadow: 0 14px 30px -6px rgba(225,29,46,.42); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text);
  transition: all .2s cubic-bezier(.2,.7,.3,1); flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.icon-btn.active { color: var(--accent); border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 clamp(1rem, 4vw, 3rem); height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.site-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: .7;
}
.brand { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.brand-logo { height: 56px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 1.6rem; font-weight: 600; font-size: .93rem; font-family: var(--font-head); }
.main-nav a { color: var(--muted); position: relative; padding: .3rem 0; transition: color .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }
.main-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent); border-radius: 2px; }
.header-spacer { flex: 1; }
.search { position: relative; display: flex; align-items: center; }
.search input {
  width: clamp(140px, 22vw, 280px); padding: .6rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: var(--font-body); font-size: .88rem;
}
.search input:focus { outline: none; border-color: var(--primary); }
.search button { position: absolute; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--primary); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.search-suggestions {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 200; display: none;
}
.search-suggestions.open { display: block; }
.search-suggestions a { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; font-size: .85rem; }
.search-suggestions a:hover { background: var(--surface-2); }
.search-suggestions img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: .6rem; }
.badge-count {
  position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff; font-size: .65rem; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
  font-family: var(--font-mono);
}
.icon-wrap { position: relative; display: inline-flex; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text); padding: .4rem; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: stretch;
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem);
  max-width: 1280px; margin: 0 auto; position: relative; overflow: hidden;
}
.hero h1 { margin-bottom: .9rem; }
.hero p { max-width: 46ch; font-size: 1.08rem; }
.hero .actions { display: flex; gap: .9rem; margin-top: 1.6rem; flex-wrap: wrap; }

/* Hero banner slideshow — fixed frame so every slide (any aspect ratio) shows
   in full (no cropping), centered inside a designed frame, no matter how
   many slides are added or removed. */
.hero-media {
  position: relative; width: 100%; height: 100%; min-height: 280px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--primary-light) 0%, var(--surface) 65%);
  box-shadow: var(--shadow-lg);
}
.hero-slide {
  position: absolute; inset: 18px; width: auto; height: auto; object-fit: contain;
  object-position: center; opacity: 0; transition: opacity 1.1s ease;
  border-radius: calc(var(--radius) - 4px); filter: drop-shadow(0 6px 16px rgba(20,24,27,.12));
}
.hero-slide.active { opacity: 1; }
.hero-dots { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: .5rem; z-index: 2; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: 1px solid rgba(20,24,27,.08); transition: background .3s ease, transform .3s ease; }
.hero-dot.active { background: var(--primary); transform: scale(1.25); }

/* ---------- Trust strip ---------- */
.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.2rem, 4vw, 3rem);
  max-width: 1280px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) 1rem;
}
.trust-item { display: flex; align-items: center; gap: .6rem; font-size: .85rem; font-weight: 600; color: var(--muted); font-family: var(--font-head); }
.trust-item .ic { font-size: 1.2rem; }

/* ---------- Sections & layout ---------- */
.section { max-width: 1280px; margin: 0 auto; padding: 3.2rem clamp(1rem, 4vw, 3rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.6rem; gap: 1rem; }
.section-head a { color: var(--primary); font-weight: 600; font-size: .9rem; font-family: var(--font-head); }
.page-head { max-width: 1280px; margin: 0 auto; padding: 2.4rem clamp(1rem, 4vw, 3rem) 1rem; }
.breadcrumbs { display: flex; gap: .4rem; font-size: .82rem; color: var(--muted); max-width: 1280px; margin: 1rem auto 0; padding: 0 clamp(1rem, 4vw, 3rem); flex-wrap: wrap; font-family: var(--font-mono); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs .current { color: var(--text); font-weight: 600; }

.layout { max-width: 1280px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) 3rem; display: grid; gap: 1.6rem; }
.layout.two-col { grid-template-columns: 1fr 380px; align-items: start; }
.layout.shop { grid-template-columns: 240px 1fr; align-items: start; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 260px)); gap: 1.6rem; }
/* Featured Products uses flex instead of grid: cards grow to fill each row
   completely, so an incomplete last row never leaves empty dead space,
   no matter how many featured products exist. */
.featured-grid { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.featured-grid > .card { flex: 1 1 230px; max-width: 300px; }
@media (max-width: 480px) { .featured-grid > .card { max-width: none; } }

/* ---------- Cards ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem;
  display: flex; flex-direction: column; gap: .4rem; position: relative;
  transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s cubic-bezier(.2,.7,.3,1), border-color .28s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-media { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); aspect-ratio: 1/1; padding: 1.1rem; box-sizing: border-box; }
.product-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .45s cubic-bezier(.2,.7,.3,1); }
.card:hover .product-media img { transform: scale(1.05); }
.placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 1.6rem; color: var(--primary); background: var(--primary-light); }
.sale-badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; z-index: 2; font-family: var(--font-mono); box-shadow: 0 4px 12px -2px rgba(255,122,26,.5); }
.wishlist-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.95); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all .2s cubic-bezier(.2,.7,.3,1); font-size: 1.05rem; box-shadow: var(--shadow-sm);
}
.wishlist-btn:hover { transform: scale(1.1); box-shadow: var(--shadow-md); }
.wishlist-btn.active { color: var(--accent); }
.card small { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-family: var(--font-mono); }
.card h3 { font-size: .96rem; margin: 0; font-family: var(--font-head); }
.card h3 a:hover { color: var(--primary); }
.price-row { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.price { font-family: var(--font-mono); font-weight: 700; font-size: 1.2rem; color: var(--text); letter-spacing: -.01em; }
.was-price { text-decoration: line-through; color: var(--muted); font-size: .85rem; font-family: var(--font-mono); opacity: .7; }
.off-pct { color: var(--success); font-weight: 700; font-size: .78rem; font-family: var(--font-mono); }
.card .actions { display: flex; gap: .5rem; margin-top: .5rem; }
.card .actions form { flex: 1; }
.card .actions .btn { width: 100%; padding: .65rem 1rem; font-size: .82rem; }

/* Stock status — a clean pill, quiet by default so it doesn't compete
   with the product photo; color still carries the meaning. */
.stock-badge {
  font-size: .7rem; font-weight: 700; padding: .28rem .65rem; display: inline-block; width: fit-content;
  font-family: var(--font-mono); letter-spacing: .03em;
  border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent);
}
.stock-badge.in { color: var(--success); }
.stock-badge.low { color: var(--warning); }
.stock-badge.out { color: var(--danger); }

.category-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.7rem 1.5rem 1.9rem;
  display: block; transition: all .25s cubic-bezier(.2,.7,.3,1); position: relative; border-left: 3px solid var(--accent);
}
.category-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; border-left-color: var(--primary); }
.category-tile strong { position: relative; display: block; font-family: var(--font-head); margin-bottom: .3rem; font-size: 1.05rem; }
.category-tile p { position: relative; margin: 0; font-size: .85rem; }

/* ---------- Filters sidebar ---------- */
.filters { position: sticky; top: calc(var(--header-h) + 20px); }
.filters h2 { font-size: 1rem; margin-bottom: .8rem; }
.filters .filter-group { margin-bottom: 1.4rem; }
.filters .filter-group h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .6rem; font-family: var(--font-mono); }
.filters a { display: flex; justify-content: space-between; padding: .45rem .1rem; font-size: .88rem; color: var(--muted); border-radius: 6px; }
.filters a:hover { color: var(--primary); }
.filters a.active { color: var(--primary); font-weight: 700; }
.filters input[type="number"] { width: 100%; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: .85rem; margin-bottom: .4rem; font-family: var(--font-mono); }
.filters label.check { display: flex; align-items: center; gap: .5rem; font-size: .87rem; color: var(--muted); padding: .3rem 0; cursor: pointer; }
.filters label.check:hover { color: var(--text); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.toolbar .result-count { font-size: .88rem; color: var(--muted); font-family: var(--font-mono); }
.toolbar select { padding: .55rem .9rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .85rem; font-weight: 600; }
.active-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--primary-light); color: var(--primary); font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: var(--radius-sm); font-family: var(--font-mono); }
.filter-chip a { font-weight: 700; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 2rem; flex-wrap: wrap; font-family: var(--font-mono); }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-size: .85rem; font-weight: 600; border: 1px solid var(--border); color: var(--text); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Product detail ---------- */
.product-gallery img { border-radius: var(--radius); width: 100%; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-stepper button { width: 38px; height: 42px; border: none; background: var(--surface-2); cursor: pointer; font-size: 1.1rem; color: var(--text); }
.qty-stepper input { width: 46px; padding: 0; text-align: center; border: none; background: transparent; color: var(--text); font-weight: 700; height: 42px; -moz-appearance: textfield; font-family: var(--font-mono); }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; }

/* ---------- Reviews ---------- */
.stars { color: var(--border); letter-spacing: 1px; font-size: .95rem; }
.stars .full, .stars .half { color: var(--accent); }
.rating-count { font-size: .82rem; color: var(--muted); margin-left: .4rem; font-family: var(--font-mono); }
.review-card { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.review-card:last-child { border-bottom: none; }
.review-card .review-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .3rem; }
.review-card strong { font-size: .92rem; }
.review-card time { font-size: .78rem; color: var(--muted); font-family: var(--font-mono); }
.rating-input { display: flex; gap: .3rem; flex-direction: row-reverse; justify-content: flex-end; }
.rating-input input { display: none; }
.rating-input label { font-size: 1.5rem; color: var(--border); cursor: pointer; transition: color .15s; }
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label { color: var(--accent); }
.rating-summary { display: flex; align-items: center; gap: 1.6rem; padding: 1.2rem; background: var(--surface-2); border-radius: var(--radius); margin-bottom: 1.2rem; flex-wrap: wrap; }
.rating-summary .avg { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: .9rem; }
.form-grid .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
input, select, textarea {
  width: 100%; padding: .78rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: var(--font-body); font-size: .92rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }
textarea { min-height: 110px; resize: vertical; }
label { font-size: .85rem; font-weight: 600; color: var(--muted); font-family: var(--font-head); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-msg { padding: .8rem 1rem; border-radius: var(--radius-sm); font-size: .88rem; font-weight: 600; margin-bottom: .5rem; }
.form-msg.error { background: rgba(168,59,50,.12); color: var(--danger); }
.form-msg.success { background: rgba(47,125,79,.12); color: var(--success); }

/* ---------- Cart ---------- */
.cart-row { display: grid; grid-template-columns: 64px 1fr auto auto auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.cart-row:last-child { border-bottom: none; }
.cart-row img, .cart-row .placeholder { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; }
.cart-row .item-name { font-weight: 600; font-size: .92rem; font-family: var(--font-head); }
.cart-row .item-price { color: var(--muted); font-size: .85rem; font-family: var(--font-mono); }
.cart-empty { text-align: center; padding: 3rem 1rem; }
.cart-empty .ic { font-size: 3rem; margin-bottom: .6rem; }
.summary-row { display: flex; justify-content: space-between; padding: .5rem 0; font-size: .92rem; color: var(--muted); font-family: var(--font-mono); }
.summary-row.total { font-size: 1.2rem; font-weight: 700; color: var(--text); border-top: 1px dashed var(--border); margin-top: .5rem; padding-top: 1rem; }
.remove-link { color: var(--danger); font-size: .78rem; font-weight: 600; }

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); font-family: var(--font-mono); }
tr:last-child td { border-bottom: none; }
.status-pill { padding: .25rem .7rem; border-radius: var(--radius-sm); font-size: .74rem; font-weight: 700; text-transform: capitalize; display: inline-block; font-family: var(--font-mono); }
.status-pill.placed, .status-pill.pending { background: rgba(184,117,46,.16); color: var(--warning); }
.status-pill.confirmed, .status-pill.processing { background: rgba(31,75,58,.14); color: var(--primary); }
.status-pill.shipped { background: rgba(47,125,79,.12); color: var(--success); }
.status-pill.delivered, .status-pill.paid { background: rgba(47,125,79,.2); color: var(--success); }
.status-pill.cancelled, .status-pill.failed { background: rgba(168,59,50,.14); color: var(--danger); }
.row-actions { display: flex; gap: .5rem; }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; gap: 1.6rem; max-width: 1400px; margin: 0 auto; padding: 1.6rem clamp(1rem, 3vw, 2rem) 3rem; }
.admin-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; position: sticky; top: calc(var(--header-h) + 16px); height: fit-content; }
.admin-nav .admin-name { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); font-family: var(--font-mono); }
.admin-nav a { display: flex; align-items: center; gap: .6rem; padding: .65rem .7rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .88rem; color: var(--muted); margin-bottom: .2rem; font-family: var(--font-head); }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.active { background: var(--primary); color: #fff; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; position: relative; overflow: hidden; }
.stat-card span.label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-mono); }
.stat-card h2 { margin: .3rem 0 0; font-size: 1.7rem; font-family: var(--font-mono); }
.stat-card .ic { position: absolute; right: 1rem; top: 1rem; font-size: 1.6rem; opacity: .25; }
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 1rem; }
.chart-bars .bar { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; min-height: 3px; position: relative; }
.chart-bars .bar:hover::after { content: attr(data-label); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: .7rem; background: var(--text); color: var(--bg); padding: 2px 6px; border-radius: 4px; white-space: nowrap; margin-bottom: 4px; font-family: var(--font-mono); }
.mini-list { display: flex; flex-direction: column; gap: .7rem; }
.mini-list .row { display: flex; justify-content: space-between; align-items: center; font-size: .87rem; padding-bottom: .7rem; border-bottom: 1px solid var(--border); }
.mini-list .row:last-child { border: none; padding: 0; }
.admin-toolbar { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.admin-toolbar input, .admin-toolbar select { width: auto; }
.thumb-sm { width: 42px; height: 42px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 6px; }

/* ---------- Toast ---------- */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: .6rem; }
.toast {
  background: var(--text); color: var(--bg); padding: .85rem 1.2rem; border-radius: var(--radius-sm); font-size: .87rem; font-weight: 600;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: .6rem; animation: slideIn .25s ease; max-width: 320px;
  font-family: var(--font-head);
}
.toast.success::before { content: '✓'; color: #7FD9A6; font-weight: 900; }
.toast.error::before { content: '!'; color: #E08E85; font-weight: 900; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- Footer — styled like the bottom of a receipt ---------- */
.footer {
  background: var(--surface); padding: 3rem clamp(1rem, 4vw, 3rem) 2rem; display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; max-width: 1280px; margin: 0 auto;
  border-top: none; position: relative;
}
.footer::before {
  /* perforated "tear line" at the top of the footer, like a receipt */
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background-image: linear-gradient(90deg, var(--border) 60%, transparent 40%);
  background-size: 10px 1px;
}
.footer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .9rem; font-family: var(--font-mono); }
.footer a, .footer p { display: block; color: var(--muted); font-size: .88rem; margin-bottom: .5rem; }
.footer a:hover { color: var(--primary); }
.footer-brand { margin-bottom: .8rem; }
.footer-logo-plate { display: inline-flex; }
.newsletter-form { display: flex; gap: .5rem; margin-top: .5rem; }
.newsletter-form input { flex: 1; }
.social-row { display: flex; gap: .6rem; margin-top: .8rem; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; margin: 0; color: var(--text);
  transition: all .18s ease;
}
.social-row a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); transform: translateY(-2px); }
.footer-bottom {
  max-width: 1280px; margin: 0 auto; padding: 1.2rem clamp(1rem, 4vw, 3rem) 1.6rem; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: .6rem; font-size: .78rem; color: var(--muted); font-family: var(--font-mono);
  border-top: 1px dashed var(--border);
}

.whatsapp-float {
  position: fixed; bottom: 24px; left: 24px; width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); z-index: 90; transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.08); }
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--border); color: var(--text); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); z-index: 90; cursor: pointer; opacity: 0; pointer-events: none; transition: all .2s;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- Empty / misc states ---------- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.badge { display: inline-block; background: var(--primary-light); color: var(--primary); font-size: .74rem; font-weight: 700; padding: .2rem .6rem; border-radius: var(--radius-sm); font-family: var(--font-mono); }

/* ---------- Focus visibility (accessibility floor) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout.two-col, .layout.shop, .admin-shell { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 480px; width: 100%; aspect-ratio: 4/3; min-height: 0; margin: 0 auto; }
  .footer { grid-template-columns: 1fr 1fr; }
  .filters { position: static; }
  .admin-nav { position: static; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; padding: 1rem 1.2rem; gap: .2rem; display: none; box-shadow: var(--shadow-md); }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; padding: .7rem 0; }
  .menu-toggle { display: inline-flex; }
  .search { display: none; }
  .header-actions .search-toggle { display: inline-flex; }
  .footer { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 52px 1fr; }
  .cart-row .qty-stepper { grid-column: 1 / -1; justify-self: start; margin-top: .4rem; }
}


/* ============================================================
   Product-page & conversion details — buy-box CTA, variant
   picker, urgency cues, sticky mobile bar. One consolidated
   layer (earlier passes here stacked three versions of the same
   rules and fought each other in the cascade — merged into one).
   ============================================================ */

/* Add-to-cart CTA: solid fill, soft real shadow, gentle lift on
   hover — no gradient sweep, no comic drop-shadow step. */
.btn-cta {
  background: var(--primary);
  box-shadow: 0 10px 24px -6px rgba(14,164,94,.4);
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, background .2s ease;
}
.btn-cta:hover { background: var(--primary-dark); box-shadow: 0 14px 30px -6px rgba(14,164,94,.5); transform: translateY(-2px); }
.btn-cta:active { transform: translateY(0); }
.btn-cta[disabled] { background: var(--border); color: var(--muted); box-shadow: none; }

/* Bigger, more confident pricing on the product page buy-box */
.price-row-lg .price { font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; }
.price-row-lg .was-price { font-size: 1rem; }
.price-row-lg .off-pct { font-size: .85rem; background: rgba(22,163,74,.12); padding: .2rem .6rem; border-radius: 999px; }

.sale-badge-lg { font-size: .85rem; padding: .4rem .85rem; }

/* Low-stock urgency — a quiet pulse on the dot only, not the whole badge */
.stock-badge.low::before { content: '●'; margin-right: .35em; animation: gm-dot-pulse 1.6s ease-in-out infinite; }
@keyframes gm-dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Variant / options picker on the product page */
.variant-picker { margin-top: 1.2rem; }
.variant-label { font-size: .85rem; color: var(--muted); font-family: var(--font-mono); display: block; margin-bottom: .5rem; }
.variant-label strong { color: var(--text); }
.variant-options { display: flex; flex-wrap: wrap; gap: .6rem; }
.variant-chip {
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  padding: .58rem 1.15rem; border-radius: 999px; font-weight: 600; font-size: .9rem;
  font-family: var(--font-head); cursor: pointer; transition: all .2s cubic-bezier(.2,.7,.3,1);
}
.variant-chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.variant-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -4px rgba(14,164,94,.4); }
.variant-chip.out { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.variant-chip.out:hover { transform: none; border-color: var(--border); color: var(--text); }

/* Product gallery main image gets a touch more presence */
.product-media-main img { transition: transform .45s cubic-bezier(.2,.7,.3,1); }
.product-media-main:hover img { transform: scale(1.03); }

/* Gallery thumbnail strip below the main product photo */
.pdp-thumbs { display: flex; gap: .6rem; padding: .8rem; flex-wrap: wrap; }
.pdp-thumb {
  width: 64px; height: 64px; padding: 0; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid var(--border); background: var(--surface-2); cursor: pointer; flex-shrink: 0;
  transition: border-color .2s ease, transform .2s ease;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-thumb:hover { border-color: var(--primary); transform: translateY(-2px); }
.pdp-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }

/* Trust strip on the product page, with icons in soft colored circles
   for a more premium, less "text list" feel */
.trust-strip-pdp .trust-item { gap: .5rem; }
.trust-strip-pdp .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary-light);
  font-size: 1rem;
}

/* Cart line variant label */
.item-variant { font-size: .8rem; color: var(--muted); font-family: var(--font-mono); margin: .1rem 0 .2rem; }

/* Hero: a subtle radial glow behind the media frame */
.hero { position: relative; }
.hero::before {
  content: ''; position: absolute; top: -10%; right: 5%; width: 420px; height: 420px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  opacity: .6; pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

/* Sticky mobile add-to-cart bar for the product page — appears once the
   main buy box has scrolled past, so the CTA is always reachable. */
.pdp-sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--surface); border-top: 1px solid var(--border); box-shadow: var(--shadow-lg);
  padding: .7rem 1rem; display: none; align-items: center; gap: .8rem;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.pdp-sticky-bar.visible { transform: translateY(0); }
.pdp-sticky-bar .info { flex: 1; min-width: 0; }
.pdp-sticky-bar .info .name { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-sticky-bar .info .price { font-family: var(--font-mono); font-weight: 700; color: var(--primary); font-size: .95rem; }
@media (max-width: 720px) {
  .pdp-sticky-bar { display: flex; }
  body.has-pdp-sticky { padding-bottom: 72px; }
}

/* ---------- Live SEO Score (admin) ---------- */
.seo-score-box { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .9rem 1rem; margin: .6rem 0 1rem; background: var(--surface); }
.seo-score-head { display: flex; align-items: center; gap: .8rem; }
.seo-score-ring {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; flex: none;
  border: 3px solid var(--border); background: var(--surface-2);
}
.seo-score-good { border-color: var(--success); color: var(--success); }
.seo-score-ok { border-color: var(--warning); color: var(--warning); }
.seo-score-bad { border-color: var(--danger); color: var(--danger); }
.seo-score-label.seo-score-good-text { color: var(--success); }
.seo-score-label.seo-score-ok-text { color: var(--warning); }
.seo-score-label.seo-score-bad-text { color: var(--danger); }
.seo-score-list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .3rem; font-size: .82rem; }
.seo-score-list li { display: flex; align-items: flex-start; gap: .4rem; color: var(--text); }
.seo-score-list li.good { color: var(--success); }
.seo-score-list li.bad { color: var(--danger); }

/* ---------- Keyword suggestions (admin) ---------- */
.kw-suggest-box { margin: .6rem 0 0; }
.kw-suggest-label { margin: 0 0 .4rem; font-size: .78rem; color: var(--muted); }
.kw-suggest-list { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.kw-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.kw-chip-use { border: none; background: transparent; padding: .3rem .7rem; font-size: .76rem; color: var(--text); cursor: pointer; }
.kw-chip-use:hover { background: var(--primary-light); color: var(--primary); }
.kw-chip-add { border: none; border-left: 1px solid var(--border); background: var(--surface-2); padding: .3rem .55rem; font-size: .8rem; font-weight: 700; color: var(--primary); cursor: pointer; }
.kw-chip-add:hover { background: var(--primary); color: #fff; }
.kw-chip-all { border: 1px dashed var(--border); border-radius: 999px; background: transparent; padding: .3rem .7rem; font-size: .76rem; color: var(--muted); cursor: pointer; }
.kw-chip-all:hover { border-color: var(--primary); color: var(--primary); }
