/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --navy:       #1a3a5c;
  --navy-dark:  #0e2035;
  --navy-mid:   #2d5f8a;
  --navy-light: #d9e4f0;
  --navy-50:    #f0f4f8;
  --gold:       #d4a017;
  --gold-light: #fef3cd;
  --ocean:      #a0c4e8;
  --green:      #16a34a;
  --green-bg:   #dcfce7;
  --red:        #dc2626;
  --red-bg:     #fee2e2;
  --amber:      #d97706;
  --amber-bg:   #fef3c7;
  --blue-bg:    #dbeafe;
  --blue:       #1d4ed8;
  --gray-50:    #f9fafb;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --gray-300:   #d1d5db;
  --gray-400:   #9ca3af;
  --gray-500:   #6b7280;
  --gray-600:   #4b5563;
  --gray-700:   #374151;
  --gray-800:   #1f2937;
  --gray-900:   #111827;
  --white:      #ffffff;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow:     0 4px 16px rgba(0,0,0,.10);
  --shadow-md:  0 8px 32px rgba(0,0,0,.12);
  --transition: all .2s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

main { flex: 1; }

/* ── Container ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 640px)  { .container { padding: 0 28px; } }
@media (min-width: 1024px) { .container { padding: 0 40px; } }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--navy);  color: white; }
.btn-primary:hover:not(:disabled)  { background: var(--navy-dark); box-shadow: 0 4px 12px rgba(26,58,92,.3); }
.btn-gold     { background: var(--gold);  color: white; }
.btn-gold:hover:not(:disabled)     { background: #b8860b; box-shadow: 0 4px 12px rgba(212,160,23,.35); }
.btn-outline  { background: white; color: var(--navy); border: 1.5px solid var(--navy-light); }
.btn-outline:hover:not(:disabled)  { background: var(--navy-50); }
.btn-ghost    { background: rgba(255,255,255,.12); color: white; border: 1.5px solid rgba(255,255,255,.3); }
.btn-ghost:hover:not(:disabled)    { background: rgba(255,255,255,.22); }
.btn-sm  { padding: 7px 16px; font-size: 13px; }
.btn-xs  { padding: 5px 12px; font-size: 12px; }
.btn-lg  { padding: 13px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-green { background: var(--green); color: white; }
.btn-green:hover:not(:disabled) { background: #15803d; }
.btn-red   { background: var(--red);   color: white; }
.btn-red:hover:not(:disabled)   { background: #b91c1c; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.py-8  { padding-top: 32px; padding-bottom: 32px; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}
.card-hover {
  transition: var(--transition);
}
.card-hover:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card-header-row {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header-row h2, .card-header-row h3 {
  font-size: 16px;
  color: var(--navy);
}

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert button {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: .5;
  line-height: 1;
}
.alert-info    { background: var(--navy-light); border-color: #b3c9e1; color: var(--navy); }
.alert-success { background: var(--green-bg);   border-color: #86efac; color: #166534; }
.alert-error   { background: var(--red-bg);     border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: var(--amber-bg);   border-color: #fcd34d; color: #92400e; }

/* ── Flash messages ───────────────────────────────────────────────────────── */
.flash {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.flash button { background: none; border: none; cursor: pointer; font-size: 18px; opacity: .6; }
.flash-success { background: var(--green-bg); color: #166534; border-bottom: 2px solid #86efac; }
.flash-error   { background: var(--red-bg);   color: #991b1b; border-bottom: 2px solid #fca5a5; }
.flash-info    { background: var(--navy-light); color: var(--navy); border-bottom: 2px solid var(--ocean); }

/* ── Status badges ────────────────────────────────────────────────────────── */
.badge, .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-green, .status-green  { background: var(--green-bg); color: #166534; }
.badge-amber, .status-amber  { background: var(--amber-bg); color: #92400e; }
.badge-red,   .status-red    { background: var(--red-bg);   color: #991b1b; }
.badge-blue,  .status-blue   { background: var(--blue-bg);  color: var(--blue); }
.badge-navy,  .status-navy   { background: var(--navy-light); color: var(--navy); }
.badge-gray,  .status-gray   { background: var(--gray-100); color: var(--gray-600); }
.badge-gold                  { background: var(--gold-light); color: #92400e; }

/* ── Form fields ──────────────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.field label .hint { font-weight: 400; color: var(--gray-400); margin-left: 6px; font-size: 11px; }
.req { color: var(--red); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  background: white;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy-mid);
  box-shadow: 0 0 0 3px rgba(45,95,138,.1);
}
.field textarea { resize: vertical; line-height: 1.5; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .row-2 { grid-template-columns: 1fr; } }

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--navy-dark);
  color: var(--ocean);
  font-size: 12px;
  padding: 7px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lang-switcher { display: flex; align-items: center; gap: 8px; }
.lang-switcher a { color: var(--ocean); transition: color .15s; }
.lang-switcher a:hover, .lang-switcher a.active { color: white; font-weight: 700; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  background: white;
  box-shadow: 0 1px 0 var(--gray-100), var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-badge {
  background: var(--navy);
  color: white;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 18px;
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-badge.lg { width: 52px; height: 52px; font-size: 22px; border-radius: 14px; }
.logo-text strong { display: block; font-size: 17px; color: var(--navy); font-family: 'Playfair Display', serif; font-weight: 700; line-height: 1.1; }
.logo-text span   { display: block; font-size: 11px; color: var(--gray-400); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  padding: 6px 12px;
  border-radius: 8px;
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--navy);
  background: var(--navy-50);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cart-link {
  position: relative;
  padding: 8px;
  color: var(--gray-600);
  font-size: 20px;
  transition: color .15s;
  display: flex;
}
.cart-link:hover { color: var(--navy); }
.cart-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--gold);
  color: white;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* User menu */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--gray-700);
  padding: 6px 10px; border-radius: 8px;
  transition: var(--transition);
  font-family: inherit;
}
.user-btn:hover { background: var(--gray-100); }
.user-avatar {
  background: var(--navy-light);
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 6px);
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
  padding: 4px 0;
}
.user-dropdown.open { display: block; }
.dropdown-header {
  padding: 10px 16px 8px;
  font-size: 12px;
  color: var(--gray-400);
  border-bottom: 1px solid var(--gray-50);
  margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--gray-700);
  transition: background .1s;
}
.user-dropdown a:hover { background: var(--gray-50); }
.user-dropdown .admin-link { color: var(--gold); }
.user-dropdown .admin-link:hover { background: var(--gold-light); }
.user-dropdown .sign-out { color: var(--red); }
.user-dropdown .sign-out:hover { background: var(--red-bg); }
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 4px 0; }

/* Mobile */
.mobile-menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--gray-600); padding: 4px;
}
.mobile-nav {
  display: none;
  background: white;
  border-top: 1px solid var(--gray-100);
  padding: 8px 20px 12px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
  border-radius: 8px;
}
.mobile-nav a:hover { background: var(--gray-50); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .user-name { display: none; }
  .nav-actions .btn { display: none; }
  .nav-actions .btn.btn-sm:last-of-type { display: none; }
  .cart-link { display: flex; }
}

/* ── Page header ──────────────────────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: white;
  padding: 36px 0 32px;
}
.page-header h1 { font-size: 32px; color: white; margin-bottom: 4px; }
.page-header p  { color: var(--ocean); font-size: 14px; }
.page-header-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ocean); font-size: 13px; margin-bottom: 10px; transition: color .15s; }
.back-link:hover { color: white; }

/* ── Section ──────────────────────────────────────────────────────────────── */
.section       { padding: 56px 0; }
.section-white { background: white; }
.section-navy  { background: var(--navy-dark); color: white; }
.section-navy h2 { color: white; }
.section-title { font-size: 30px; color: var(--navy); margin-bottom: 6px; }
.text-center   { text-align: center; }
.text-muted    { color: var(--gray-400); font-size: 12px; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--navy-dark) url('/images/backround.jpg') center 35%/cover no-repeat;
  color: white;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(10,25,47,.80) 0%, rgba(10,25,47,.55) 60%, rgba(10,25,47,.35) 100%);
}
.hero-wave { position: absolute; bottom: -1px; left: 0; right: 0; line-height: 0; }
.hero-content { position: relative; z-index: 2; padding: 72px 0 96px; max-width: 680px; margin: 0 auto; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px; padding: 6px 16px; font-size: 13px; color: var(--ocean);
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  color: white;
  line-height: 1.1;
  margin-bottom: 18px;
}
.hero-title span { display: block; font-size: .55em; color: var(--ocean); margin-top: 4px; }
.hero-sub { font-size: 18px; color: rgba(255,255,255,.75); max-width: 540px; margin-bottom: 32px; line-height: 1.6; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature-card { padding: 28px 24px; text-align: center; }
.feature-icon { font-size: 32px; margin-bottom: 14px; }
.feature-card h3 { font-size: 16px; color: var(--navy); margin-bottom: 8px; }
.feature-card p  { font-size: 13px; color: var(--gray-500); line-height: 1.6; }

/* Scrolling banner */
.banner-outer {
  overflow: hidden;
  position: relative;
  padding: 8px 0;
  /* fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.banner-track {
  display: flex;
  width: max-content;
  animation: banner-scroll 40s linear infinite;
  gap: 16px;
}
.banner-outer:hover .banner-track { animation-play-state: paused; }
@keyframes banner-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.banner-item {
  flex-shrink: 0;
  width: 280px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  border: 1px solid var(--gray-200);
}
.banner-img { height: 170px; overflow: hidden; background: var(--gray-100); }
.banner-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.banner-item:hover .banner-img img { transform: scale(1.05); }
.banner-name { padding: 10px 14px; font-weight: 600; font-size: 13px; color: var(--navy); }

/* Ports */
.ports-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 20px 0; }
.port-badge {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--ocean);
  padding: 7px 18px;
  border-radius: 24px;
  font-size: 14px;
}

/* ── Products layout ──────────────────────────────────────────────────────── */
.products-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding-top: 32px;
  padding-bottom: 48px;
  align-items: start;
}
@media (max-width: 768px) {
  .products-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

.sidebar h3 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--gray-400);
  margin-bottom: 10px;
}
.cat-list { list-style: none; }
.cat-list li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--gray-700);
  transition: var(--transition);
}
.cat-list li a:hover { background: var(--gray-100); }
.cat-list li a.active { background: var(--navy); color: white; font-weight: 600; }
.cat-list li a span { font-size: 11px; opacity: .6; }
.cat-list li a.active span { opacity: .7; }

/* Search */
.search-form { display: flex; gap: 10px; margin-bottom: 20px; }
.search-input-wrap { position: relative; flex: 1; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; }
.search-input-wrap input {
  width: 100%; padding: 10px 36px 10px 36px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .15s;
}
.search-input-wrap input:focus { border-color: var(--navy-mid); box-shadow: 0 0 0 3px rgba(45,95,138,.1); }
.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: 18px; line-height: 1; padding: 4px;
}
.search-clear:hover { color: var(--gray-700); }

/* Products grid */
.products-main {}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
@media (max-width: 480px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }

/* In-cart indicator */
.product-card { display: flex; flex-direction: column; }
.product-card.in-cart {
  border: 2px solid var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.08);
}
.product-card.in-cart .product-img {
  border-bottom-color: #bbf7d0;
}
.product-img {
  aspect-ratio: 1 / 1;
  background: var(--gray-50);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--gray-100);
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  transition: transform .3s ease;
}
.product-card:hover .product-img img { transform: scale(1.04); }
.remove-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15, 23, 42, .65);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  z-index: 2;
  transition: background .15s;
}
.remove-badge:hover { background: var(--red); }
.product-img.no-img, .no-img-icon {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 36px; color: var(--gray-300);
}
.stock-badge { display: none; }

.product-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.cat-label { font-size: 11px; color: var(--navy-mid); font-weight: 600; margin-bottom: 4px; display: block; }
.product-name { font-size: 13px; font-weight: 600; color: var(--gray-900); line-height: 1.4; margin-bottom: 4px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-unit { font-size: 11px; color: var(--gray-500); margin-bottom: 10px; }
.sign-in-hint { font-size: 11px; color: var(--navy-mid); text-align: center; margin-top: auto; }
.sign-in-hint:hover { text-decoration: underline; }

/* Qty controls */
.qty-control {
  display: flex; align-items: center;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.qty-control button {
  background: none; border: none; cursor: pointer;
  padding: 5px 8px; font-size: 16px; color: var(--gray-500);
  transition: background .1s; line-height: 1; flex-shrink: 0;
}
.qty-control button:hover { background: var(--gray-100); }
.qty-control input[type=number] {
  border: none; outline: none; background: none;
  padding: 5px 2px; font-size: 13px; font-weight: 700;
  font-family: inherit; color: var(--navy);
  width: 36px; text-align: center; flex-shrink: 0;
  -moz-appearance: textfield;
}
.qty-control input[type=number]::-webkit-inner-spin-button,
.qty-control input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.qty-unit-label {
  font-size: 12px; font-weight: 600; color: var(--gray-500);
  padding: 0 6px 0 1px; flex-shrink: 0; white-space: nowrap;
}
.add-to-cart { display: flex; gap: 5px; align-items: center; margin-top: auto; min-width: 0; }
.add-btn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination span { font-size: 14px; color: var(--gray-500); }
.pagination-num { min-width: 34px; text-align: center; padding: 7px 10px; }
.pagination-current {
  min-width: 34px; text-align: center; padding: 7px 10px; border-radius: 8px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 13px;
}
.pagination-ellipsis { color: var(--gray-400); padding: 0 2px; }
.pagination-jump { display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.pagination-jump-input {
  width: 60px; padding: 6px 8px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 13px; font-family: inherit; text-align: center;
}

/* Empty state */
.empty-state { text-align: center; padding: 64px 20px; color: var(--gray-400); }
.empty-state p { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 20px; color: var(--gray-600); margin-bottom: 8px; }
.empty-state.full-width { width: 100%; }

/* ── Cart ─────────────────────────────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 48px;
  align-items: start;
}
@media (max-width: 768px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-items { }
.cart-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-50);
}
.cart-row:last-child { border-bottom: none; }
.cart-img { width: 56px; height: 56px; border-radius: 10px; background: var(--gray-100); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; }
.cart-name { font-size: 14px; font-weight: 600; color: var(--gray-900); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-unit { font-size: 12px; color: var(--gray-400); }
.remove-btn { background: none; border: none; cursor: pointer; color: var(--gray-300); font-size: 16px; padding: 4px; transition: color .15s; flex-shrink: 0; }
.remove-btn:hover { color: var(--red); }

.cart-sidebar { display: flex; flex-direction: column; gap: 16px; }
.cart-form { padding: 24px; }
.cart-form h2 { font-size: 20px; color: var(--navy); margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.order-note { font-size: 12px; color: var(--gray-400); text-align: center; margin-top: 10px; }
.order-summary { padding: 18px 20px; }
.order-summary h3 { font-size: 15px; color: var(--navy); margin-bottom: 12px; font-weight: 700; }
.summary-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--gray-50); font-size: 13px; }
.summary-name { color: var(--gray-600); flex: 1; }
.summary-qty { font-weight: 600; color: var(--navy); flex-shrink: 0; }
.summary-total { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 6px; font-weight: 700; font-size: 14px; color: var(--navy); }

/* ── Orders ───────────────────────────────────────────────────────────────── */
.orders-list { display: flex; flex-direction: column; gap: 10px; }
.order-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 18px 20px; text-decoration: none; color: inherit;
}
.order-row-main { flex: 1; min-width: 0; }
.order-id { font-weight: 800; font-size: 16px; color: var(--navy); margin-bottom: 6px; }
.order-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--gray-500); margin-top: 6px; }
.order-date { font-size: 12px; color: var(--gray-400); flex-shrink: 0; }

/* Order detail */
.order-detail { max-width: 760px; margin: 0 auto; }
.order-info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0; padding: 20px 24px; margin-bottom: 16px;
}
.order-info-grid > div { padding: 8px 12px; }
.info-label { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.info-val { font-weight: 600; color: var(--navy); font-size: 15px; }
.note-card { padding: 16px 20px; margin-bottom: 16px; background: var(--amber-bg); border-color: #fcd34d; }
.order-lines { }
.order-line-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--gray-50); }
.order-line-row:last-child { border-bottom: none; }
.order-line-img { width: 40px; height: 40px; border-radius: 8px; background: var(--gray-100); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.order-line-img img { width: 100%; height: 100%; object-fit: cover; }
.order-line-info { flex: 1; min-width: 0; }
.order-line-info p { font-size: 14px; font-weight: 500; color: var(--gray-900); }
.order-line-qty { font-size: 14px; font-weight: 700; color: var(--navy); flex-shrink: 0; }

/* ── Auth pages ───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-page-wide { align-items: flex-start; padding-top: 32px; }
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
}
.auth-page-wide .auth-card { max-width: 560px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .logo-badge { margin: 0 auto 12px; }
.auth-logo h1 { font-size: 24px; color: var(--navy); margin-bottom: 4px; }
.auth-logo p  { font-size: 14px; color: var(--gray-400); }
.auth-link { text-align: center; font-size: 13px; color: var(--gray-500); margin-top: 20px; }
.auth-link a { color: var(--navy); font-weight: 600; }
.success-icon-lg { font-size: 48px; margin-bottom: 16px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }

/* Customer search (register) */
.customer-search-widget { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.customer-results { margin-top: 10px; border: 1px solid var(--gray-200); border-radius: 10px; overflow: hidden; max-height: 220px; overflow-y: auto; }
.customer-result-item {
  display: block; width: 100%; text-align: left; background: white; border: none;
  padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--gray-100);
  transition: background .1s; font-family: inherit;
}
.customer-result-item:hover { background: var(--navy-50); }
.customer-result-item strong { display: block; font-size: 14px; color: var(--navy); }
.customer-result-item span  { font-size: 12px; color: var(--gray-400); }
.no-results { padding: 12px 16px; font-size: 13px; color: var(--gray-400); }
.selected-customer {
  display: flex; align-items: center; gap: 12px;
  background: var(--navy-50); border: 1.5px solid var(--navy-light);
  border-radius: var(--radius); padding: 10px 14px; margin-top: 10px;
}
.selected-info strong { display: block; font-size: 14px; color: var(--navy); }
.selected-info span   { font-size: 12px; color: var(--gray-400); }

/* ── About ────────────────────────────────────────────────────────────────── */
.about-hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; }
.about-hero-stats > div { text-align: center; padding: 20px; border-right: 1px solid var(--gray-200); }
.about-hero-stats > div:last-child { border-right: none; }
.stat-val { font-size: 32px; font-weight: 800; color: var(--navy); font-family: 'Playfair Display', serif; }
.stat-label { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }
.about-img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.about-img-grid > div { border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; }
.about-img-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.about-img-grid > div:hover img { transform: scale(1.05); }
.about-text h2 { font-size: 28px; color: var(--navy); margin-bottom: 16px; }
.about-text p { color: var(--gray-600); line-height: 1.75; margin-bottom: 14px; font-size: 15px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.service-box { background: rgba(255,255,255,.08); border-radius: 12px; padding: 20px; }
.service-box h3 { font-size: 15px; color: white; margin-bottom: 10px; }
.service-box li { font-size: 13px; color: rgba(255,255,255,.7); margin: 5px 0 5px 14px; }

/* ── Contact ──────────────────────────────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; padding: 40px 0 56px; align-items: start; }
@media (max-width: 768px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.contact-icon { background: var(--navy-light); color: var(--navy); width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.contact-info-item h4 { font-size: 12px; color: var(--gray-400); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.contact-info-item p, .contact-info-item a { font-size: 15px; font-weight: 600; color: var(--navy); }
.contact-form-card { padding: 28px; }
.contact-form-card h2 { font-size: 22px; color: var(--navy); margin-bottom: 20px; }
.success-box-sm { text-align: center; padding: 32px; }
.success-box-sm .icon { font-size: 40px; margin-bottom: 12px; }

/* ── Account ──────────────────────────────────────────────────────────────── */
.account-layout { max-width: 680px; margin: 0 auto; padding: 32px 0 56px; }
.account-tabs { display: flex; gap: 4px; background: var(--gray-100); padding: 4px; border-radius: 12px; width: fit-content; margin-bottom: 24px; }
.account-tab { padding: 8px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--gray-500); cursor: pointer; transition: var(--transition); text-decoration: none; }
.account-tab:hover { color: var(--navy); }
.account-tab.active { background: white; color: var(--navy); box-shadow: var(--shadow-sm); }
.account-card { padding: 28px; }
.customer-badge { display: flex; align-items: center; gap: 14px; background: var(--navy-50); border: 1px solid var(--navy-light); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; }
.customer-badge .dk-label { background: var(--navy); color: white; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }

/* ── Invoices ─────────────────────────────────────────────────────────────── */
.invoice-table-wrap { overflow-x: auto; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.invoice-table th { background: var(--gray-50); padding: 10px 16px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); font-weight: 700; }
.invoice-table td { padding: 13px 16px; border-bottom: 1px solid var(--gray-50); }
.invoice-table tr:hover td { background: var(--gray-50); }

/* ── 404 ──────────────────────────────────────────────────────────────────── */
.page-404 { min-height: 65vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.page-404 .anchor { font-size: 56px; color: var(--navy-light); margin-bottom: 20px; }
.page-404 h1 { font-size: 72px; color: var(--navy); line-height: 1; margin-bottom: 8px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { background: var(--navy-dark); color: var(--gray-400); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding: 48px 0 36px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer-logo .logo-badge { background: var(--navy-mid); }
.footer-logo strong { color: white; font-family: 'Playfair Display', serif; font-size: 18px; display: block; }
.footer-logo span   { font-size: 11px; color: var(--gray-500); }
.footer-desc { font-size: 13px; line-height: 1.65; color: var(--gray-500); }
.footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-500); margin-bottom: 14px; font-family: inherit; font-weight: 700; }
.footer ul { list-style: none; }
.footer ul li { font-size: 13px; margin-bottom: 8px; }
.footer ul li a { color: var(--gray-400); transition: color .15s; }
.footer ul li a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); text-align: center; padding: 16px; font-size: 12px; color: var(--gray-600); }

/* ── Admin ────────────────────────────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════════
   ADMIN PANEL — Redesigned
══════════════════════════════════════════════════════════════════ */

.admin-wrap {
  min-height: 100vh;
  background: #f0f2f5;
  font-family: 'Source Sans 3', sans-serif;
}

/* ── Top header bar ─────────────────────────────────────────────── */
.admin-header {
  background: var(--navy);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
}
.admin-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -.01em;
}
.admin-logo .logo-badge {
  width: 36px; height: 36px; font-size: 15px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
}
.admin-logo strong { font-size: 16px; }
.admin-logo span   { font-size: 11px; color: rgba(255,255,255,.5); display: block; font-weight: 400; letter-spacing: .02em; }

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-header-right a {
  color: rgba(255,255,255,.65);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  transition: all .15s;
  text-decoration: none;
  letter-spacing: .01em;
}
.admin-header-right a:hover {
  color: white;
  background: rgba(255,255,255,.12);
}

/* ── Layout: sidebar + main ─────────────────────────────────────── */
.admin-layout {
  display: block;
  min-height: calc(100vh - 60px);
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Sidebar navigation ─────────────────────────────────────────── */
/* Default (mobile): fixed overlay, hidden off-screen */
.admin-sidebar {
  background: #fcfdfe;
  border-right: 1px solid #e5e9ef;
  padding: 14px 12px 24px;
  scrollbar-width: thin;
  overflow-y: auto;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  z-index: 150;
  height: 100vh;
  transform: translateX(-100%);
  transition: transform .25s ease;
  box-shadow: 4px 0 24px rgba(0,0,0,.2);
}
.admin-sidebar.open {
  transform: translateX(0);
}

/* Desktop: static in grid layout, always visible */
@media (min-width: 961px) {
  .admin-layout {
    display: grid;
    grid-template-columns: 232px 1fr;
  }
  .admin-sidebar {
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    transform: none;
    box-shadow: none;
    width: auto;
    z-index: auto;
    transition: none;
  }
}
/* Group heading: a <summary> that folds its group */
.admin-sidebar-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #8a95a5;
  padding: 6px 10px;
  margin: 14px 0 2px;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.admin-sidebar-label::-webkit-details-marker { display: none; }
.admin-sidebar-label:hover { color: var(--navy); background: #f3f6fa; }
.admin-sidebar-label:focus-visible { outline: 2px solid var(--navy-mid); outline-offset: 1px; }
.admin-nav-chevron { margin-left: auto; width: 14px; height: 14px; transition: transform .15s; flex-shrink: 0; }
.admin-nav-group:not([open]) .admin-nav-chevron { transform: rotate(-90deg); }
.admin-nav-group[open] > summary .admin-nav-badge { display: none; }   /* shown on the item itself */
.admin-nav-group + .admin-nav-group { border-top: 1px solid #eef1f5; padding-top: 2px; }
.admin-nav-group > summary { margin-top: 8px; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 10px 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #475467;
  text-decoration: none;
  transition: background .12s, color .12s;
  margin-bottom: 1px;
  position: relative;
  line-height: 1.3;
}
.admin-nav-item:hover {
  background: #f1f5fa;
  color: var(--navy);
}
.admin-nav-item:focus-visible { outline: 2px solid var(--navy-mid); outline-offset: 1px; }
.admin-nav-item.active {
  background: #e8eff7;
  color: var(--navy);
  font-weight: 700;
}
.admin-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 3px;
  background: var(--navy);
}
.admin-nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #98a2b3;
  transition: color .12s;
}
.admin-nav-item:hover .nav-icon,
.admin-nav-item.active .nav-icon { color: var(--navy); }
.admin-nav-item .nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-nav-badge {
  margin-left: auto;
  background: #e53e3e;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  letter-spacing: 0;
}
.admin-sidebar-label .admin-nav-badge { margin-left: 4px; }
.admin-sidebar-top { display: none; justify-content: flex-end; padding: 0 4px 8px; border-bottom: 1px solid #e5e9ef; margin-bottom: 6px; }
.admin-mobile-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #8492a6; padding: 4px 8px; }
.admin-sidebar-foot { border-top: 1px solid #eef1f5; margin-top: 12px; padding-top: 8px; }
.admin-nav-feedback { width: 100%; text-align: left; background: none; border: none; cursor: pointer; font-family: inherit; color: #667085; }
@media (max-width: 960px) {
  .admin-sidebar-top { display: flex; }
  .admin-nav-item { padding: 10px 12px; font-size: 14px; }   /* bigger tap targets */
}

/* ── Main content area ──────────────────────────────────────────── */
.admin-body {
  padding: 28px 32px;
  min-width: 0;
}

/* ── Page title ─────────────────────────────────────────────────── */
.admin-page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
  letter-spacing: -.02em;
}
.admin-page-sub {
  font-size: 13px;
  color: #8492a6;
  margin-bottom: 24px;
}

/* ── Stat cards ─────────────────────────────────────────────────── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.admin-stat-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #e5e9ef;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: box-shadow .2s, transform .2s;
}
.admin-stat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.admin-stat-icon {
  font-size: 22px;
  margin-bottom: 12px;
}
.admin-stat-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 4px;
}
.admin-stat-label {
  font-size: 12px;
  color: #8492a6;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Tabs (legacy — keep for standalone pages) ──────────────────── */
.admin-tabs {
  display: flex;
  gap: 2px;
  background: white;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.admin-tab {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #8492a6;
  transition: all .15s;
  text-decoration: none;
  letter-spacing: .01em;
}
.admin-tab:hover  { color: var(--navy); background: #f0f4ff; }
.admin-tab.active { background: var(--navy); color: white; box-shadow: 0 2px 8px rgba(26,58,92,.3); }

/* ── Section ────────────────────────────────────────────────────── */
.admin-section { margin-bottom: 32px; }
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.admin-section-header h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.01em;
}

/* ── Search form ────────────────────────────────────────────────── */
.admin-search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-search-form input,
.admin-search-form select {
  padding: 8px 12px;
  border: 1.5px solid #e5e9ef;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: white;
  transition: border-color .15s, box-shadow .15s;
}
.admin-search-form input:focus,
.admin-search-form select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,92,.1);
}

/* ── Table ──────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid #e5e9ef;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  background: #f8fafc;
  padding: 11px 16px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8492a6;
  font-weight: 800;
  border-bottom: 1px solid #e5e9ef;
  white-space: nowrap;
}
.admin-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
  color: #2d3748;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background .1s; }
.admin-table tbody tr:hover td { background: #f8fafc; }
.admin-table code {
  font-size: 11px;
  background: #edf2ff;
  color: #3b5bdb;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.admin-table small { font-size: 11px; color: #a0aab8; display: block; margin-top: 1px; }
.admin-table td:first-child { font-weight: 600; }

/* ── Misc ───────────────────────────────────────────────────────── */
.row-dim { opacity: .45; }
.select-sm {
  padding: 5px 8px;
  border: 1.5px solid #e5e9ef;
  border-radius: 7px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  background: white;
}
.select-sm:focus { border-color: var(--navy); }

/* ── Collapsible category picker popup (admin) ─────────────────────── */
.cpk-trigger {
  font-size: 12px; padding: 4px 8px; border: 1.5px solid #e5e9ef; border-radius: 6px; outline: none;
  max-width: 220px; cursor: pointer; background: #fff; color: #374151; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: inherit;
}
.cpk-trigger.cpk-assigned { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
#cpkPanel {
  display: none; position: fixed; z-index: 9999; width: 280px; max-height: 360px; overflow-y: auto;
  background: #fff; border: 1px solid #e5e9ef; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 6px;
}
#cpkPanel ul { list-style: none; margin: 0; padding: 0; }
#cpkPanel .cpk-children { padding-left: 14px; }
#cpkPanel .cpk-children.collapsed { display: none; }
#cpkPanel .cpk-row { display: flex; align-items: center; gap: 2px; }
#cpkPanel .cpk-toggle {
  background: none; border: none; cursor: pointer; font-size: 9px; color: var(--gray-400);
  width: 16px; height: 20px; flex-shrink: 0; padding: 0; transition: transform .15s;
}
#cpkPanel .cpk-toggle.open { transform: rotate(90deg); }
#cpkPanel .cpk-toggle-spacer { width: 16px; flex-shrink: 0; display: inline-block; }
#cpkPanel .cpk-name { flex: 1; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: #374151; }
#cpkPanel .cpk-name:hover { background: #f0f4f8; color: var(--navy); }

/* Products-tab category filter: main categories as shaded headers, sub-levels indented + lighter */
.cat-filter-select option.cat-opt-d0 { font-weight: 800; color: var(--navy); background: #e8eef6; }
.cat-filter-select option.cat-opt-d1 { font-weight: 600; color: #1f2937; background: #fff; }
.cat-filter-select option.cat-opt-d2 { font-weight: 400; color: #4b5563; background: #fff; }
.cat-filter-select option.cat-opt-d3 { font-weight: 400; color: #6b7280; background: #fff; font-size: 12px; }
.cat-filter-select option.cat-opt-sep { color: #cbd5e1; background: #fff; }

.sync-box { padding: 24px; max-width: 520px; }
.sync-box p { font-size: 14px; color: var(--gray-600); line-height: 1.65; }
/* ── Admin mobile responsiveness ────────────────────────────────── */
.admin-menu-btn {
  display: none;
  background: rgba(255,255,255,.15);
  border: none;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 8px;
  color: white;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 149;
}
.admin-sidebar-overlay.open { display: block; }

@media (max-width: 960px) {
  .admin-menu-btn { display: flex; align-items: center; }
  .admin-desktop-only { display: none !important; }
  .admin-body { padding: 16px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .admin-stat-card { padding: 14px; }
  .admin-stat-val { font-size: 22px; }
  .admin-stat-icon { font-size: 18px; margin-bottom: 8px; }
  .dash-two-col { grid-template-columns: 1fr !important; }
  .admin-logo span { display: none; }
}
@media (max-width: 480px) {
  .admin-page-title { font-size: 18px; }
  .admin-page-sub { font-size: 12px; }
}

/* ── Mobile padding & spacing ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Topbar: tighten and allow wrapping */
  .topbar {
    padding: 6px 16px;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
  }

  /* Hero: reduce large vertical padding */
  .hero-content {
    padding: 48px 0 64px;
  }
  .hero-sub { font-size: 16px; }

  /* Sections: reduce vertical breathing room */
  .section { padding: 36px 0; }

  /* Page header */
  .page-header {
    padding: 24px 0 20px;
  }
  .page-header h1 { font-size: 24px; }

  /* Auth card */
  .auth-card {
    padding: 24px 20px;
  }

  /* Cart & order forms */
  .cart-form { padding: 18px 16px; }
  .order-summary { padding: 14px 16px; }
  .cart-row { padding: 14px 16px; gap: 12px; }

  /* Order detail */
  .order-info-grid { padding: 14px 16px; }
  .order-line-row { padding: 12px 16px; }

  /* Account */
  .account-layout { padding: 20px 0 40px; }
  .account-card { padding: 20px 16px; }
  .account-tabs { width: 100%; }
  .account-tab { flex: 1; text-align: center; padding: 8px 10px; font-size: 13px; }

  /* Contact form */
  .contact-form-card { padding: 20px 16px; }
  .contact-layout { padding: 24px 0 40px; }

  /* Cards with headers */
  .card-header-row { padding: 14px 16px; }

  /* Products layout top spacing */
  .products-layout { padding-top: 20px; padding-bottom: 32px; }
  .cart-layout { padding-top: 20px; padding-bottom: 32px; }

  /* Order rows */
  .order-row { padding: 14px 16px; }
  .orders-list .card { padding: 0; }

  /* Empty state */
  .empty-state { padding: 40px 16px; }

  /* Feature cards */
  .feature-card { padding: 20px 16px; }

  /* Footer */
  .footer-grid { padding: 36px 0 24px; }
}

@keyframes spin { to { transform: rotate(360deg); } }
