/* ============================================================
   RDB — Shared Stylesheet  v3
   Neutral base · Green accent · Shop feel · Vanilla CSS
   ============================================================ */

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

:root {
  /* Accent — green, used sparingly */
  --accent:        #16a34a;
  --accent-h:      #15803d;
  --accent-light:  #f0fdf4;
  --accent-mid:    #bbf7d0;

  /* Neutral base — warm off-white */
  --bg:            #ffffff;
  --surface:       #f9fafb;
  --surface-2:     #f3f4f6;
  --border:        #e5e7eb;
  --border-dark:   #d1d5db;
  --text:          #111827;
  --text-2:        #374151;
  --muted:         #6b7280;
  --muted-light:   #9ca3af;

  /* Semantic */
  --success:       #16a34a;
  --danger:        #dc2626;
  --warn:          #d97706;
  --info:          #2563eb;

  /* Tokens */
  --radius:        8px;
  --radius-sm:     5px;
  --radius-lg:     12px;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 2px 6px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.07);
  --font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                   Helvetica, Arial, sans-serif;
  --nav-h:         60px;
  --topbar-h:      38px;
  --max-w:         1280px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, .page-content { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }

/* ── FontAwesome SVG sprite helper ────────────────────────── */
.icon {
  display: inline-block;
  width:  1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  flex-shrink: 0;
}
.icon-sm  { width: .85em;  height: .85em; }
.icon-lg  { width: 1.3em;  height: 1.3em; }
.icon-xl  { width: 1.75em; height: 1.75em; }
.icon-2x  { width: 2em;    height: 2em; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* ── Top bar (above navbar) ───────────────────────────────── */
.topbar {
  background: var(--text);
  color: var(--muted-light);
  height: var(--topbar-h);
  font-size: .78rem;
  display: flex;
  align-items: center;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar a { color: var(--muted-light); }
.topbar a:hover { color: #fff; text-decoration: none; }
.topbar-left  { display: flex; align-items: center; gap: 1.25rem; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-item  { display: flex; align-items: center; gap: .35rem; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.05em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; color: var(--accent); }
.nav-logo .logo-dot { color: var(--accent); }

/* Search bar in navbar */
.nav-search {
  flex: 1;
  max-width: 380px;
  position: relative;
  margin: 0 1.25rem;
  padding-left: 1.25rem;
  border-left: 1.5px solid var(--border);
}
.nav-search input {
  width: 100%;
  height: 36px;
  padding: 0 .75rem 0 2rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.nav-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
  background: var(--bg);
}
.nav-search input::placeholder { color: var(--muted-light); }
.nav-search-icon {
  position: absolute;
  left: calc(1.25rem + .5rem);
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: .85rem;
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .1rem;
  list-style: none;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-2);
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  padding: .35rem .7rem;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  display: flex;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.active { color: var(--accent); }

.nav-social { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text);
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--surface); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-dark); }

.btn-dark {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.btn-dark:hover { background: var(--text-2); border-color: var(--text-2); color: #fff; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

.btn-sm  { padding: .3rem .7rem; font-size: .8rem; }
.btn-lg  { padding: .65rem 1.6rem; font-size: .95rem; }
.btn-xl  { padding: .85rem 2rem; font-size: 1rem; border-radius: var(--radius); }
.btn-block { width: 100%; justify-content: center; }

/* ── Product Cards ────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-img-wrap {
  position: relative;
  aspect-ratio: 3/2;
  background: var(--surface-2);
  overflow: hidden;
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.card:hover .card-img-wrap img { transform: scale(1.03); }
.card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--border-dark);
}
/* Category tag overlaid on image top-left */
.card-category-tag {
  position: absolute;
  top: .5rem; left: .5rem;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .5rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}
/* Out of stock overlay */
.card-unavailable-tag {
  position: absolute;
  top: .5rem; right: .5rem;
  background: rgba(220,38,38,.85);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .2rem .5rem;
  border-radius: var(--radius-sm);
}

.card-body {
  padding: .75rem 1rem .5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.card-price-row {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin-top: .3rem;
}
.card-price {
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
}
.card-price-old {
  font-size: .78rem;
  color: var(--muted);
  text-decoration: line-through;
}
.card-price-badge {
  font-size: .68rem;
  font-weight: 700;
  background: #fef2f2;
  color: var(--danger);
  padding: .1rem .3rem;
  border-radius: 99px;
}

.card-footer {
  padding: .6rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ── Product grid ─────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.1rem;
}

/* Single row (homepage) */
.products-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  overflow: hidden;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .55rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-success { background: var(--accent-light); color: var(--accent-h); }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-muted   { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge-dark    { background: var(--text); color: #fff; }

/* Color chip */
.color-chip {
  display: inline-block;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.15);
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .3rem;
  color: var(--text-2);
}
.form-group label .req { color: var(--danger); margin-left: 2px; }

.form-control {
  display: block;
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
.form-control::placeholder { color: var(--muted-light); }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-hint { font-size: .78rem; color: var(--muted); margin-top: .3rem; }

/* ── Sidebar + catalog layout ────────────────────────────── */
.catalog-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.filter-sidebar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.filter-sidebar-head {
  padding: .75rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter-sidebar-head button {
  font-size: .72rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.filter-sidebar-head button:hover { text-decoration: underline; }

.filter-section {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
}
.filter-section:last-child { border-bottom: none; }

.filter-section-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: .55rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Checkbox list */
.filter-check-list {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  max-height: 160px;
  overflow-y: auto;
}
.filter-check-list label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-2);
  cursor: pointer;
  padding: .2rem .25rem;
  border-radius: var(--radius-sm);
  transition: background .1s;
}
.filter-check-list label:hover { background: var(--surface-2); }
.filter-check-list input[type=checkbox] {
  width: 14px; height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Price range slider ───────────────────────────────────── */
.range-slider-wrapper {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
  margin: .25rem 0;
}
.range-slider-track {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.range-slider-fill {
  position: absolute;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.range-slider-wrapper input[type=range] {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  height: 4px;
}
.range-slider-wrapper input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  pointer-events: all;
  cursor: pointer;
}
.range-slider-wrapper input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  pointer-events: all;
  cursor: pointer;
  border: none;
}
.range-values {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--muted);
  margin-top: .3rem;
}

/* Catalog toolbar */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.catalog-toolbar .results-count { font-size: .83rem; color: var(--muted); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2.5rem;
  align-items: end;
}

.hero-text { padding-bottom: 3.5rem; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .9rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 1rem;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 1.75rem;
}
.hero-actions { display: flex; gap: .65rem; flex-wrap: wrap; }

/* Hero product showcase — plain image, no card chrome */
.hero-showcase {
  align-self: end;
  position: relative;
}
.hero-showcase-img-wrap {
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--surface-2);
  aspect-ratio: 4/3;
}
.hero-showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-showcase-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border-dark);
  background: var(--surface-2);
}
/* kept for compat — old card style no longer used */
.hero-showcase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-showcase-info {
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.hero-showcase-name { font-weight: 700; font-size: .95rem; }
.hero-showcase-price { font-weight: 800; color: var(--accent); font-size: 1.1rem; }

/* ── Feature strip ────────────────────────────────────────── */
.feature-strip {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.feature-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.feature-item {
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  border-right: 1px solid var(--border);
}
.feature-item:last-child { border-right: none; }
.feature-icon {
  width: 36px; height: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.feature-text-title { font-weight: 700; font-size: .88rem; line-height: 1.2; }
.feature-text-sub   { font-size: .78rem; color: var(--muted); line-height: 1.3; }

/* ── Section ──────────────────────────────────────────────── */
.section { padding: 3rem 0; }
.section-header { margin-bottom: 1.75rem; }
.section-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: .25rem;
}
.section-header p { color: var(--muted); font-size: .92rem; }

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── About section ────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: stretch;
}
.about-feature-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1.25rem;
}
.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}
.about-feature-icon {
  width: 30px; height: 30px;
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: .1rem;
}
.about-feature-title { font-weight: 700; font-size: .88rem; }
.about-feature-sub   { font-size: .81rem; color: var(--muted); }

/* About map side — fills full height */
.about-map-col {
  display: flex;
  flex-direction: column;
}
.about-map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.about-map-iframe {
  flex: 1;
  width: 100%;
  min-height: 260px;
  border: none;
  display: block;
}
.about-map-img { width: 100%; display: block; }
.about-map-placeholder {
  flex: 1;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: var(--muted);
  min-height: 260px;
}
.about-map-actions {
  display: flex;
  gap: .6rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.about-map-actions .btn { flex: 1; justify-content: center; }

/* ── Specs table ──────────────────────────────────────────── */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table th {
  text-align: left;
  padding: .6rem .9rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  width: 40%;
  font-size: .8rem;
}
.specs-table td { padding: .6rem .9rem; color: var(--text); }
.specs-table tr:nth-child(even) td { background: var(--surface); }

/* ── Image gallery (product detail) ──────────────────────── */
.gallery { display: flex; flex-direction: column; gap: .6rem; }
.gallery-main-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.gallery-main {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.gallery-main-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border-dark);
  font-size: 5rem;
}
.gallery-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s;
  font-size: .9rem;
}
.gallery-nav:hover { background: rgba(0,0,0,.7); }
.gallery-nav-prev { left: .6rem; }
.gallery-nav-next { right: .6rem; }
.gallery-counter {
  position: absolute;
  bottom: .6rem; right: .6rem;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  padding: .15rem .45rem;
  border-radius: 99px;
}
.gallery-thumbs { display: flex; gap: .4rem; flex-wrap: wrap; }
.gallery-thumb {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .15s;
  flex-shrink: 0;
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--accent); }

/* ── Product detail ───────────────────────────────────────── */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.product-detail-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin-bottom: .5rem;
}
.product-detail-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  margin: .65rem 0;
  letter-spacing: -.02em;
}
.product-detail-price-old {
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: .4rem;
}
.product-detail-desc { color: var(--muted); line-height: 1.75; margin-bottom: 1.25rem; font-size: .93rem; }

/* ── Contact page ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: stretch;
}
.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.contact-card-header {
  background: var(--accent);
  color: #fff;
  padding: 1.5rem;
}
.contact-card-header h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: .2rem; display: flex; align-items: center; gap: .5rem; }
.contact-card-header p  { opacity: .85; font-size: .85rem; }
.contact-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.contact-item-icon {
  width: 34px; height: 34px;
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-item-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .1rem; }
.contact-item-value { font-size: .9rem; color: var(--text); line-height: 1.55; }
.contact-item-value a { color: var(--text); }
.contact-item-value a:hover { color: var(--accent); text-decoration: none; }

/* Contact map column */
.contact-map-col {
  display: flex;
  flex-direction: column;
}
.map-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.map-iframe {
  flex: 1;
  width: 100%;
  min-height: 320px;
  border: none;
  display: block;
}
.map-img { width: 100%; display: block; }
.map-actions {
  display: flex;
  gap: .65rem;
  padding: .85rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.map-actions .btn { flex: 1; justify-content: center; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--text);
  color: #9ca3af;
  padding: 2.5rem 0 0;
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .nav-logo { color: #fff; font-size: 1.3rem; }
.footer-brand .nav-logo:hover { color: var(--accent-mid); }
.footer-brand p { font-size: .84rem; margin-top: .6rem; max-width: 220px; line-height: 1.65; }

.footer-col h4 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  margin-bottom: .85rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer-col a {
  font-size: .84rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-social {
  display: flex;
  gap: .5rem;
  margin-top: .9rem;
}
.footer-social a {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.footer-social a:hover { background: var(--accent); color: #fff; }

.footer-bottom {
  padding: 1rem 0;
  text-align: center;
  font-size: .78rem;
  color: #6b7280;
}

/* ── Dashboard ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}
.login-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
}
.login-card h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: .25rem; }
.login-card .subtitle { color: var(--muted); font-size: .88rem; margin-bottom: 1.75rem; }
.login-error {
  background: #fee2e2; color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  font-size: .85rem;
  margin-bottom: 1rem;
  display: none;
}
.login-error.visible { display: block; }

.dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; flex-wrap: wrap; gap: 1rem;
}
.dashboard-header h1 { font-size: 1.5rem; font-weight: 800; }

.admin-table-wrapper {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table thead th {
  text-align: left; padding: .75rem 1rem; font-weight: 700;
  background: var(--surface); border-bottom: 1px solid var(--border);
  white-space: nowrap; color: var(--muted); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.admin-table tbody td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: var(--surface); }
.admin-table .thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.admin-table .no-thumb { width: 48px; height: 48px; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }

.stock-toggle { position: relative; width: 40px; height: 22px; cursor: pointer; display: inline-block; }
.stock-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.stock-toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 99px; transition: background .2s; }
.stock-toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.stock-toggle input:checked + .stock-toggle-slider { background: var(--success); }
.stock-toggle input:checked + .stock-toggle-slider::before { transform: translateX(18px); }

/* ── Modal ────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%; max-width: 680px; max-height: 90vh; overflow-y: auto;
  transform: translateY(16px); transition: transform .2s;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 1;
}
.modal-header h2 { font-size: 1.05rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: .25rem .4rem; border-radius: var(--radius-sm); }
.modal-close:hover { background: var(--surface); color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .75rem; }

/* ── Upload ───────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.5rem;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
  background: var(--surface);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent); background: var(--accent-light); }
.upload-zone p { color: var(--muted); font-size: .88rem; margin-top: .35rem; }
.upload-zone input[type=file] { display: none; }
.upload-previews { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.upload-preview-item { position: relative; width: 80px; height: 80px; }
.upload-preview-item img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.upload-preview-remove { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: .7rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ── Confirm dialog ───────────────────────────────────────── */
.confirm-dialog {
  background: var(--bg); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.2);
  padding: 2rem; max-width: 380px; width: 100%; text-align: center;
  transform: translateY(16px); transition: transform .2s;
}
.modal-backdrop.open .confirm-dialog { transform: translateY(0); }
.confirm-dialog h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.confirm-dialog p { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.confirm-actions { display: flex; gap: .75rem; justify-content: center; }

/* ── Alerts & toast ───────────────────────────────────────── */
.alert { padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-error   { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.alert-success { background: var(--accent-light); color: #15803d; border-color: var(--accent-mid); }

#toast { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast-item {
  background: var(--text); color: #fff; padding: .65rem 1.1rem;
  border-radius: var(--radius-sm); font-size: .87rem; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateX(20px); transition: opacity .2s, transform .2s;
  display: flex; align-items: center; gap: .5rem;
}
.toast-item.show { opacity: 1; transform: translateX(0); }
.toast-item.toast-success { background: var(--success); }
.toast-item.toast-error   { background: var(--danger); }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state-icon { margin-bottom: .75rem; color: var(--border-dark); }
.empty-state p { font-size: .93rem; }

/* ── Dash navbar ──────────────────────────────────────────── */
.dash-navbar { background: #0f172a; color: #fff; height: var(--nav-h); display: flex; align-items: center; position: sticky; top: 0; z-index: 100; }
.dash-navbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.dash-navbar .nav-logo { color: #fff; }
.dash-navbar .nav-logo:hover { color: var(--accent-mid); }
.dash-nav-right { display: flex; align-items: center; gap: .65rem; }
.dash-user { font-size: .85rem; color: #94a3b8; }
.dash-body { padding: 2rem 0 4rem; background: var(--surface); min-height: calc(100vh - var(--nav-h)); }

/* ── Dash stats bar ───────────────────────────────────────── */
.dash-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.dash-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  flex: 1;
  min-width: 140px;
  box-shadow: var(--shadow-sm);
}
.dash-stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-stat-value { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.dash-stat-label { font-size: .75rem; color: var(--muted); margin-top: .2rem; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 200px 1fr; }
  .hero-inner { grid-template-columns: 1fr 340px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .products-row { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-showcase { display: none; }
  .hero { padding: 2.5rem 0; }
  .about-grid { grid-template-columns: 1fr; }
  .feature-strip-inner { grid-template-columns: 1fr 1fr; }
  .feature-item:nth-child(2) { border-right: none; }
  .products-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topbar { display: none; }

  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-md); flex-direction: column;
    padding: .5rem; gap: .15rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .nav-search { display: none; }
  .nav-toggle { display: flex; }

  .catalog-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; display: none; }
  .filter-sidebar.open { display: block; }

  .product-detail-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .products-row  { grid-template-columns: 1fr 1fr; }
  .map-actions { flex-direction: column; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .feature-strip-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .about-map-actions { flex-direction: column; }
}
