/* =====================================================
   3D Print Shop - Main Stylesheet
   Light, modern, clean design
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --white: #ffffff;
  --bg: #fffaf7;
  --bg-card: #ffffff;
  --surface: #fff1e8;
  --border: #fddcbf;
  --text-primary: #1a0a00;
  --text-secondary: #5c3d1e;
  --text-muted: #a07050;
  --accent: #f97316;
  --accent-hover: #ea6000;
  --accent-light: #fff1e8;
  --accent-2: #ef4444;
  --success: #16a34a;
  --success-light: #dcfce7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --shadow-sm: 0 1px 3px rgba(249,115,22,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(249,115,22,.10);
  --shadow-lg: 0 12px 40px rgba(249,115,22,.14);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Utility ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }

/* ── Typography ── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-secondary); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .02em;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(249,115,22,.35);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249,115,22,.40);
}

.btn-secondary {
  background: var(--white);
  color: var(--accent);
  border: 2px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--surface); color: var(--accent); }

/* ── Navbar ── */
.navbar {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
  position: relative;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
}
.navbar-brand-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: var(--accent-light);
  color: var(--accent);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition);
}
.cart-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--accent-2);
  color: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid white;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Flash Messages ── */
.flash-container {
  position: fixed;
  top: 80px; right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.flash {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideIn .3s ease;
  cursor: pointer;
}

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.flash-success { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
.flash-error { background: var(--danger-light); color: var(--danger); border-left: 3px solid var(--danger); }
.flash-info { background: var(--accent-light); color: var(--accent); border-left: 3px solid var(--accent); }
.flash-warning { background: var(--warning-light); color: var(--warning); border-left: 3px solid var(--warning); }

/* ── Hero Section ── */
.hero {
  background: linear-gradient(135deg, #fff8f2 0%, #fffaf7 50%, #fff5ee 100%);
  padding: 100px 0 80px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(249,115,22,.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(234,96,0,.07) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title { margin-bottom: 20px; }
.hero-title span { color: var(--accent); }

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
}
.hero-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.stat-item { }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}
.stat-label { font-size: 13px; color: var(--text-muted); }

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hero-img-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  transition: transform var(--transition);
}
.hero-img-card:nth-child(1) { margin-top: 24px; background: linear-gradient(135deg, #fff1e8, #fddcbf); }
.hero-img-card:nth-child(2) { background: linear-gradient(135deg, #fff7ed, #fed7aa); }
.hero-img-card:nth-child(3) { background: linear-gradient(135deg, #fff8f2, #fecba0); }
.hero-img-card:nth-child(4) { margin-top: -24px; background: linear-gradient(135deg, #fdf0e0, #fcd9a8); }
.hero-img-card:hover { transform: scale(1.04); }

/* ── Section Headers ── */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 52px; }
.section-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.section-title { margin-bottom: 12px; }
.section-desc { color: var(--text-secondary); max-width: 520px; margin: 0 auto; }

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

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-img {
  aspect-ratio: 1;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
  position: relative;
}
.product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-img img { transform: scale(1.06); }

.product-category {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,.9);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.product-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.product-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.product-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}
.product-price span { font-size: .8rem; font-weight: 500; color: var(--text-muted); }

/* ── Categories Section ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  display: block;
}
.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  background: var(--accent-light);
}
.category-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  display: block;
}
.category-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--text-primary);
}

/* ── Product Detail ── */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-detail-img {
  aspect-ratio: 1;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem;
}
.product-detail-img img {
  width: 100%; height: 100%; object-fit: cover;
}

.product-detail-title { margin-bottom: 8px; }
.product-detail-category {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.product-detail-price {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  margin: 16px 0;
}
.product-detail-desc { line-height: 1.7; margin-bottom: 28px; }

.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
  margin-bottom: 20px;
}
.qty-btn {
  width: 44px; height: 44px;
  background: var(--surface);
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
}
.qty-btn:hover { background: var(--accent-light); color: var(--accent); }
.qty-input {
  width: 60px; height: 44px;
  border: none;
  border-left: 2px solid var(--border);
  border-right: 2px solid var(--border);
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  background: white;
}

/* ── Cart ── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  transition: all var(--transition);
}
.cart-item:hover { box-shadow: var(--shadow); border-color: transparent; }
.cart-item-img {
  width: 88px; height: 88px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  overflow: hidden;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 4px;
}
.cart-item-price { color: var(--text-secondary); font-size: 14px; }
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-qty-form {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cart-qty-btn {
  width: 32px; height: 32px;
  background: var(--surface);
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.cart-qty-btn:hover { background: var(--accent-light); color: var(--accent); }
.cart-qty-input {
  width: 44px; height: 32px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-weight: 600;
  outline: none;
}

.cart-summary {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  position: sticky;
  top: 88px;
}
.cart-summary h3 { margin-bottom: 20px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 16px 0 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 100px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* File upload */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
  position: relative;
}
.file-upload:hover, .file-upload.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.file-upload input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-upload-icon { font-size: 2.4rem; margin-bottom: 10px; }
.file-upload-text { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.file-upload-hint { font-size: 13px; color: var(--text-muted); }

/* ── Checkout ── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.checkout-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 20px;
}
.checkout-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.checkout-card-title .step-num {
  width: 28px; height: 28px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.qr-box {
  text-align: center;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.qr-placeholder {
  width: 180px; height: 180px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  box-shadow: var(--shadow-sm);
}
.qr-instruction {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Page Header ── */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  margin-bottom: 48px;
}
.page-header h1 { margin-bottom: 6px; }
.page-header p { color: var(--text-secondary); }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }

/* ── Filters (Products Page) ── */
.products-filters {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-label { font-weight: 600; font-size: 13px; color: var(--text-secondary); }
.filter-btn {
  padding: 7px 18px;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: white;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.search-bar {
  display: flex;
  gap: 0;
  flex: 1;
  min-width: 220px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: white;
}
.search-bar input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  outline: none;
  font-size: 14px;
}
.search-bar button {
  padding: 10px 18px;
  background: var(--accent);
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--transition);
}
.search-bar button:hover { background: var(--accent-hover); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}
.empty-state-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }

/* ── Custom Print Page ── */
.custom-print-hero {
  background: linear-gradient(135deg, #f0f4ff, #fafbff);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.custom-print-hero-icon { font-size: 5rem; }
.custom-print-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
}

/* ── Admin Panel ── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: #1a0a00;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
}
.admin-sidebar-brand .brand-sub {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
}

.admin-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}
.admin-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 16px 12px 6px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  transition: all var(--transition);
  margin-bottom: 2px;
}
.admin-nav-item:hover, .admin-nav-item.active {
  background: rgba(255,255,255,.1);
  color: white;
}
.admin-nav-item .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }
.admin-nav-badge {
  margin-left: auto;
  background: var(--accent-2);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.admin-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-topbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.admin-content { padding: 32px; flex: 1; }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition);
  min-width: 0;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-card-icon.blue { background: var(--accent-light); }
.stat-card-icon.orange { background: #fff1e8; }
.stat-card-icon.green { background: var(--success-light); }
.stat-card-icon.purple { background: #fdf4ff; }

.stat-card-body { min-width: 0; flex: 1; }
.stat-card-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
  word-break: break-word;
  color: var(--text-primary);
}
.stat-card-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

/* Admin tables */
.admin-table-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-table-header h3 { font-size: 1rem; }

table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 12px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg); }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-pending { background: var(--warning-light); color: var(--warning); }
.badge-paid { background: var(--accent-light); color: var(--accent); }
.badge-payment_received { background: var(--accent-light); color: var(--accent); }
.badge-processing { background: #fdf4ff; color: #9333ea; }
.badge-completed { background: var(--success-light); color: var(--success); }
.badge-cancelled { background: var(--danger-light); color: var(--danger); }

/* Admin Login */
.admin-login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a0a00 0%, #3d1a00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-login-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.admin-login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.admin-login-logo .logo-icon {
  width: 64px; height: 64px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
}

/* ── Footer ── */
.footer {
  background: #1a0a00;
  color: rgba(255,255,255,.7);
  padding: 60px 0 28px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: white;
  margin-bottom: 10px;
}
.footer-desc { font-size: 14px; line-height: 1.6; }
.footer-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 14px; transition: color var(--transition); }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* ── Success Page ── */
.success-page {
  text-align: center;
  padding: 100px 20px;
}
.success-icon {
  width: 88px; height: 88px;
  background: var(--success-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 24px;
  animation: pop .4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* ── Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp .5s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 40px; }
  .admin-sidebar { width: 220px; }
}

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px; }
  .hero-img-card { aspect-ratio: 1; }
  .hero-img-card:nth-child(1) { margin-top: 0; }
  .hero-img-card:nth-child(4) { margin-top: 0; }
  .hero { padding: 60px 0 50px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail-grid { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hamburger { display: flex; }
  .navbar-nav, .navbar-actions { display: none; }
  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: white;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 99;
  }
  .navbar-actions.open {
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 148px; left: 0; right: 0;
    background: white;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .admin-sidebar { display: none; }
  .admin-layout { flex-direction: column; }
  .custom-print-hero { flex-direction: column; padding: 28px; }
  .checkout-card { padding: 20px; }
  .hero-stats { gap: 20px; }
  .section { padding: 50px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* =====================================================
   MOBILE-FIRST RESPONSIVE OVERRIDES
   Replaces and extends previous media queries
   ===================================================== */

/* ── Touch targets: make buttons finger-friendly ── */
@media (max-width: 768px) {
  .btn { min-height: 48px; padding: 12px 22px; font-size: 15px; }
  .btn-sm { min-height: 40px; padding: 10px 16px; font-size: 13px; }
  .btn-lg { min-height: 54px; padding: 14px 28px; font-size: 16px; }
  .btn-full { width: 100%; justify-content: center; }

  /* ── Navbar ── */
  .navbar-inner { height: 60px; }
  .navbar-brand { font-size: 1.1rem; }
  .navbar-brand-icon { width: 32px; height: 32px; font-size: 15px; }
  .hamburger { display: flex; }
  .navbar-nav, .navbar-actions { display: none; }

  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: white;
    padding: 8px 12px 16px;
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 99;
    gap: 4px;
  }
  .navbar-nav.open .nav-link {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--border);
  }
  .navbar-nav.open .nav-link:last-child { border-bottom: none; }

  .navbar-actions.open {
    display: flex;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: white;
    padding: 12px 16px 16px;
    border-bottom: 2px solid var(--border);
    z-index: 98;
    /* shown below nav links when both open */
  }
  /* When nav is also open push actions down */
  .navbar-nav.open ~ .navbar-actions.open {
    top: auto;
  }

  .cart-btn { font-size: 15px; padding: 10px 18px; }

  /* ── Hero ── */
  .hero { padding: 48px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px; }
  .hero-img-card:nth-child(1) { margin-top: 0; }
  .hero-img-card:nth-child(4) { margin-top: 0; }
  .hero-badge { font-size: 12px; }
  .hero-desc { font-size: 15px; margin-bottom: 28px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 24px; margin-top: 32px; flex-wrap: wrap; }
  .stat-num { font-size: 1.5rem; }

  /* ── Section ── */
  .section { padding: 40px 0; }
  .section-header { margin-bottom: 28px; }

  /* ── Categories ── */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .category-card { padding: 20px 12px; }
  .category-icon { font-size: 2rem; margin-bottom: 8px; }
  .category-name { font-size: .85rem; }

  /* ── Products Grid ── */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-body { padding: 12px 14px; }
  .product-name { font-size: .9rem; }
  .product-price { font-size: 1rem; }
  .product-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .product-footer .btn { width: 100%; justify-content: center; }

  /* ── Filters bar ── */
  .products-filters {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }
  .search-bar { width: 100%; }
  .filter-btn { font-size: 12px; padding: 6px 14px; }

  /* ── Page Header ── */
  .page-header { padding: 24px 0; margin-bottom: 24px; }
  .page-header h1 { font-size: 1.6rem; }

  /* ── Product Detail ── */
  .product-detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .product-detail-price { font-size: 1.8rem; }
  .product-detail-img { border-radius: var(--radius); }

  /* ── Cart ── */
  .cart-layout { grid-template-columns: 1fr; gap: 20px; }
  .cart-item {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
  }
  .cart-item-img { width: 70px; height: 70px; }
  .cart-item-info { flex: 1; min-width: 0; }
  .cart-item-name { font-size: .9rem; }
  .cart-item-actions { width: 100%; justify-content: space-between; }
  .cart-summary { position: static; }

  /* ── Checkout ── */
  .checkout-layout { grid-template-columns: 1fr; gap: 16px; }
  .checkout-card { padding: 18px 16px; margin-bottom: 14px; }
  .checkout-card-title { font-size: .95rem; }
  .step-num { width: 24px; height: 24px; font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .qr-placeholder { width: 160px; height: 160px; font-size: 4rem; }
  .qr-box { padding: 20px 14px; }

  /* Delivery options */
  .delivery-option-label { padding: 12px 14px !important; }

  /* ── Custom Print ── */
  .custom-print-hero {
    flex-direction: column;
    padding: 20px 16px;
    gap: 16px;
    text-align: center;
  }
  .custom-print-hero-icon { font-size: 3.5rem; }
  .custom-print-card { padding: 20px 16px; }

  /* ── File Upload ── */
  .file-upload { padding: 24px 16px; }
  .file-upload-icon { font-size: 1.8rem; }

  /* ── Order Success ── */
  .success-page { padding: 48px 16px; }

  /* ── Footer ── */
  .footer { padding: 36px 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; font-size: 12px; }

  /* ── WhatsApp button ── */
  .whatsapp-float { bottom: 16px; right: 16px; padding: 13px; border-radius: 50%; }
  .whatsapp-label { display: none; }

  /* ── Admin ── */
  .admin-layout { flex-direction: column; }
  .admin-sidebar { display: none; }
  .admin-topbar { padding: 0 16px; height: 56px; }
  .admin-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 14px 16px; gap: 12px; }
  .stat-card-icon { width: 40px; height: 40px; font-size: 1.2rem; }
  .stat-card-value { font-size: 1.1rem; }

  /* Admin tables scroll horizontally */
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }
  thead th { padding: 10px 14px; font-size: 11px; }
  tbody td { padding: 10px 14px; font-size: 13px; }

  /* Admin order detail grid */
  div[style*="grid-template-columns:1fr 340px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Admin product form */
  .admin-table-wrap div[style*="padding:28px 32px"] { padding: 16px !important; }
}

/* ── Small phones (≤ 400px) ── */
@media (max-width: 400px) {
  .container { padding: 0 12px; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-body { padding: 10px 10px; }
  .product-name { font-size: .82rem; }
  .categories-grid { gap: 8px; }
  .category-card { padding: 16px 8px; }
  .hero { padding: 36px 0 32px; }
  .hero-actions .btn { font-size: 14px; padding: 12px 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cart-item-img { width: 60px; height: 60px; font-size: 1.6rem; }
  .btn-lg { font-size: 15px; }
  .checkout-card { padding: 14px 12px; }
  .section { padding: 32px 0; }
  .page-header { padding: 20px 0; margin-bottom: 16px; }
  .page-header h1 { font-size: 1.4rem; }
  .whatsapp-float { bottom: 12px; right: 12px; }
}

/* ── Fix: inputs don't zoom on iOS ── */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* ── Mobile Nav Right (cart + hamburger always visible) ── */


/* ── Mobile nav: hamburger visible, desktop links/cart hidden ── */
.mobile-nav-right { display: none; align-items: center; gap: 8px; }

@media (max-width: 768px) {
  .mobile-nav-right   { display: flex !important; }
  .navbar-nav         { display: none; }
  .navbar-actions     { display: none !important; }
  .hamburger          { display: flex !important; }
}

/* ── Mobile Bottom Bar ── */
.mobile-bottom-bar {
  display: none;
}
.mobile-bottom-btn {
  text-decoration: none;
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0,0,0,.12);
    border-top: 1px solid var(--border);
  }
  .mobile-bottom-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: white;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    position: relative;
  }
  .mobile-bottom-btn span:first-child {
    font-size: 20px;
  }
  .mobile-bottom-btn:hover {
    background: var(--bg);
    color: var(--accent);
  }
  .mobile-bottom-btn.mobile-bottom-cart {
    color: white;
    background: var(--accent);
  }
  .mobile-bottom-btn.mobile-bottom-cart:hover {
    background: var(--accent-hover);
  }
  .mobile-bottom-cart-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 18px);
    background: white;
    color: var(--accent);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid var(--accent);
  }

  /* Body padding so content doesn't hide behind bottom bar */
  body {
    padding-bottom: 64px;
  }

  /* Hide the mobile cart from navbar since we have bottom bar */
  .mobile-cart-btn { display: none !important; }

  /* WhatsApp button sits above the bottom bar */
  .whatsapp-float {
    bottom: 72px !important;
  }
}

/* ── Mobile bottom bar ── */
.mobile-bottom-bar { display: none; }
@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex; position: fixed;
    bottom: 0; left: 0; right: 0; z-index: 200;
    border-top: 1.5px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,.12);
  }
  .mobile-bottom-btn {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; padding: 10px 8px; font-size: 11px;
    font-weight: 700; color: var(--text-muted);
    background: white; text-decoration: none; position: relative;
  }
  .mobile-bottom-btn span:first-child { font-size: 20px; }
  .mobile-bottom-btn.mobile-bottom-cart { color: white; background: var(--accent); }
  .mobile-bottom-cart-badge {
    position: absolute; top: 6px; right: calc(50% - 20px);
    background: white; color: var(--accent);
    border-radius: 999px; font-size: 10px; font-weight: 800;
    min-width: 17px; height: 17px; display: flex;
    align-items: center; justify-content: center;
    border: 1.5px solid var(--accent); padding: 0 3px;
  }
  body { padding-bottom: 64px; }
}
