/* ═══════════════════════════════════════════════════════════════════════════
   Сад Мечты ПМР — Main Stylesheet
   ═══════════════════════════════════════════════════════════════════════════ */

/* Google Fonts are loaded via <link> in the header template */

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --primary:       #1a472a;
  --primary-dark:  #0f2d1a;
  --secondary:     #2d6a4f;
  --accent:        #52b788;
  --accent-light:  #b7e4c7;
  --bg-light:      #f4faf6;
  --cream:         #fefae0;
  --gold:          #d4a017;
  --text:          #1a2e1e;
  --text-muted:    #6b7f70;
  --border:        #d8edd0;
  --white:         #ffffff;
  --shadow-sm:     0 2px 8px rgba(26,71,42,0.08);
  --shadow-md:     0 4px 20px rgba(26,71,42,0.12);
  --shadow-lg:     0 8px 40px rgba(26,71,42,0.16);
  --radius:        12px;
  --radius-sm:     8px;
  --transition:    all 0.3s ease;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

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

ul, ol { list-style: none; }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-dark);
}

/* ── Typography ────────────────────────────────────────────────────────────── */
.text-primary   { color: var(--primary); }
.text-accent    { color: var(--accent); }
.text-muted     { color: var(--text-muted); }
.text-gold      { color: var(--gold); }
.text-center    { text-align: center; }

.section-title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

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

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
  height: 70px;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.logo:hover { color: var(--accent-light); }
.logo-icon { font-size: 1.6rem; }

.main-nav { display: flex; align-items: center; gap: 8px; }

.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.cart-btn {
  position: relative;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.cart-btn:hover { background: var(--secondary); transform: translateY(-1px); }

.cart-badge {
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 4px;
}
.cart-badge.hidden { display: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero Section ──────────────────────────────────────────────────────────── */
.hero {
  min-height: 85vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 80px 20px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(82,183,136,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(212,160,23,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-particle {
  position: absolute;
  font-size: 2rem;
  opacity: 0.12;
  animation: floatParticle 15s infinite linear;
}
.hero-particle:nth-child(1)  { left: 5%;  top: 20%; animation-delay: 0s;    animation-duration: 20s; }
.hero-particle:nth-child(2)  { left: 15%; top: 70%; animation-delay: 3s;    animation-duration: 18s; }
.hero-particle:nth-child(3)  { left: 25%; top: 40%; animation-delay: 6s;    animation-duration: 22s; }
.hero-particle:nth-child(4)  { left: 70%; top: 15%; animation-delay: 1s;    animation-duration: 17s; }
.hero-particle:nth-child(5)  { left: 85%; top: 60%; animation-delay: 4s;    animation-duration: 19s; }
.hero-particle:nth-child(6)  { left: 90%; top: 35%; animation-delay: 8s;    animation-duration: 21s; }

@keyframes floatParticle {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.12; }
  50%  { opacity: 0.2; }
  100% { transform: translateY(-80px) rotate(360deg); opacity: 0.12; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 750px;
}

.hero-badge {
  display: inline-block;
  background: rgba(82,183,136,0.2);
  border: 1px solid rgba(82,183,136,0.4);
  color: var(--accent-light);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeInDown 0.8s ease;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--white);
  margin-bottom: 20px;
  animation: fadeInDown 1s ease 0.1s both;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 580px;
  margin: 0 auto 36px;
  animation: fadeInDown 1s ease 0.2s both;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.3s both;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--primary);
}

.btn-sm { padding: 8px 18px; font-size: 0.9rem; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

.btn-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.btn-danger:hover { background: #c82333; border-color: #c82333; color: #fff; }

.btn-success { background: #28a745; color: #fff; border-color: #28a745; }
.btn-success:hover { background: #218838; border-color: #218838; color: #fff; }

/* ── Sections ──────────────────────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-light { background: var(--bg-light); }
.section-cream { background: var(--cream); }
.section-dark  { background: var(--primary-dark); color: var(--white); }
.section-dark .section-title { color: var(--white); }
.section-dark .section-subtitle { color: rgba(255,255,255,0.7); }

/* ── Category Cards ────────────────────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.category-card:hover::before { transform: scaleX(1); }

.category-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: block;
  transition: var(--transition);
}
.category-card:hover .category-icon { transform: scale(1.15) rotate(-5deg); }

.category-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.category-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.category-count {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

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

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.product-image-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-light);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-image-wrap img { transform: scale(1.05); }

.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, var(--bg-light), var(--accent-light));
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-badge-sale {
  background: #e74c3c;
}

.product-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.product-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.product-prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.product-old-price {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.btn-add-cart {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-add-cart:hover {
  background: var(--accent);
  transform: scale(1.05);
}
.btn-add-cart.added {
  background: var(--accent);
}

.product-stock {
  font-size: 0.78rem;
  margin-top: 6px;
}
.in-stock  { color: #28a745; font-weight: 600; }
.low-stock { color: var(--gold); font-weight: 600; }
.no-stock  { color: #dc3545; font-weight: 600; }

/* ── Product Detail Page ───────────────────────────────────────────────────── */
.product-detail { padding: 40px 0 80px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--text-muted); }

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-image-main {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-light);
  box-shadow: var(--shadow-md);
}
.product-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-placeholder-large {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10rem;
  background: linear-gradient(135deg, var(--bg-light), var(--accent-light));
  border-radius: var(--radius);
}

.product-info {}

.product-info-category {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.product-info-title {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

.product-info-prices {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
}
.price-current {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
}
.price-old {
  font-size: 1.2rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.price-discount {
  background: #e74c3c;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
}

.product-info-stock {
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.add-to-cart-form {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 40px;
  height: 44px;
  background: var(--bg-light);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--primary);
  font-weight: 600;
}
.qty-btn:hover { background: var(--accent-light); }
.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;
  color: var(--primary);
  background: white;
}
.qty-input:focus { outline: none; }

.btn-add-to-cart-main {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-add-to-cart-main:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Product tabs */
.product-tabs { margin-top: 40px; }
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover  { color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.product-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

/* ── Catalog Layout ────────────────────────────────────────────────────────── */
.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
  padding: 40px 0 80px;
}

.catalog-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: sticky;
  top: 90px;
}

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.category-tree { margin-bottom: 8px; }

.cat-link {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.92rem;
  transition: var(--transition);
  font-weight: 500;
}
.cat-link:hover { background: var(--bg-light); color: var(--primary); }
.cat-link.active { background: var(--accent-light); color: var(--primary); font-weight: 600; }

/* Parent category row: flex to fit arrow button */
.cat-parent-row {
  display: flex;
  align-items: center;
  gap: 0;
}
.cat-parent-row .cat-link {
  flex: 1;
  font-weight: 600;
  color: var(--primary-dark);
}
.cat-toggle-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 10px;
  height: 38px;
  color: var(--text-muted);
  font-size: 0.72rem;
  transition: transform 0.2s ease, color 0.2s ease;
  line-height: 1;
}
.cat-toggle-btn:hover { color: var(--primary); }
.cat-toggle-btn.open { transform: rotate(180deg); color: var(--primary); }

/* Children container with tree line */
.cat-children {
  padding-left: 16px;
  margin-left: 14px;
  border-left: 2px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}
.cat-children.open {
  max-height: 600px;
}
.cat-child-link {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}
.cat-child-link::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--border);
}
.cat-child-link:hover { background: var(--bg-light); color: var(--primary); }
.cat-child-link.active { background: var(--accent-light); color: var(--primary); font-weight: 600; }

.sidebar-search input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
  color: var(--text);
}
.sidebar-search input:focus { border-color: var(--accent); }

.catalog-main {}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.catalog-title { font-size: 1.6rem; color: var(--primary-dark); }
.catalog-count { font-size: 0.9rem; color: var(--text-muted); }

.catalog-search {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 400px;
}
.catalog-search input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}
.catalog-search input:focus { border-color: var(--accent); }
.catalog-search button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}
.catalog-search button:hover { background: var(--accent); }

/* ── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--text);
  font-weight: 600;
  transition: var(--transition);
  font-size: 0.9rem;
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* ── Cart Sidebar ──────────────────────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(3px);
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: var(--white);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  color: white;
}
.cart-header h3 {
  font-size: 1.2rem;
  color: white;
}
.cart-close {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.cart-close:hover { background: rgba(255,255,255,0.3); }

.cart-items { flex: 1; overflow-y: auto; padding: 16px; }

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.cart-empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.4; }
.cart-empty p { font-size: 1rem; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  animation: slideInRight 0.3s ease;
}

.cart-item-thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; color: var(--primary-dark); }
.cart-item-price { color: var(--accent); font-weight: 700; font-size: 1rem; }

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.cart-qty-btn {
  width: 28px;
  height: 28px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  color: var(--primary);
}
.cart-qty-btn:hover { background: var(--accent-light); }
.cart-qty-display {
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
  background: none;
  border: none;
}
.cart-item-remove:hover { color: #e74c3c; }

.cart-footer {
  padding: 20px 24px;
  border-top: 2px solid var(--border);
  background: var(--bg-light);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cart-total-label { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.cart-total-value { font-size: 1.4rem; font-weight: 700; color: var(--primary); }

.btn-checkout {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
}
.btn-checkout:hover { background: var(--accent); color: white; }

/* ── Checkout Page ─────────────────────────────────────────────────────────── */
.checkout-page { padding: 60px 0; }
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

.checkout-form-section,
.checkout-summary-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.checkout-section-title {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 8px;
}
.form-label .required { color: #e74c3c; margin-left: 4px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  color: var(--text);
  background: var(--white);
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(82,183,136,0.15); }
.form-control.error { border-color: #e74c3c; }
.form-error { font-size: 0.82rem; color: #e74c3c; margin-top: 4px; }

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

/* ── Order Success Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 20px;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: scale(1); }

.modal-icon { font-size: 4rem; margin-bottom: 16px; }
.modal-title { font-size: 1.8rem; color: var(--primary-dark); margin-bottom: 12px; }
.modal-text { color: var(--text-muted); font-size: 1rem; line-height: 1.6; margin-bottom: 24px; }
.modal-order-id { font-size: 1.1rem; color: var(--primary); font-weight: 700; margin-bottom: 24px; }

/* ── Toast Notifications ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--primary-dark);
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: slideInToast 0.3s ease;
  border-left: 4px solid var(--accent);
}
.toast.success { border-left-color: #28a745; }
.toast.error   { border-left-color: #e74c3c; }
.toast.warning { border-left-color: var(--gold); }

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes fadeOutToast {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* ── Advantages Section ────────────────────────────────────────────────────── */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.advantage-item {
  text-align: center;
  padding: 32px 20px;
}
.advantage-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}
.advantage-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.advantage-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Contact Section ───────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.contact-item {
  text-align: center;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.contact-icon { font-size: 2.5rem; margin-bottom: 16px; }
.contact-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.contact-value { color: var(--text-muted); font-size: 0.95rem; }
.contact-value a { color: var(--accent); }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 16px;
  display: inline-flex;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
}

.footer-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-link:hover { color: var(--accent); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}
.footer-contact-icon { flex-shrink: 0; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Loading Spinner ───────────────────────────────────────────────────────── */
.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.spinner-overlay.show { opacity: 1; visibility: visible; }

.spinner {
  width: 52px;
  height: 52px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.fade-in { animation: fadeIn 0.6s ease both; }
.fade-in-up { animation: fadeInUp 0.6s ease both; }

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

.admin-sidebar {
  width: 260px;
  background: var(--primary-dark);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.admin-sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: white;
  font-weight: 700;
}
.admin-logo-sub { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-top: 2px; }

.admin-nav { padding: 16px 0; flex: 1; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border-left: 3px solid transparent;
}
.admin-nav-item:hover { color: white; background: rgba(255,255,255,0.07); }
.admin-nav-item.active {
  color: white;
  background: rgba(255,255,255,0.1);
  border-left-color: var(--accent);
}
.admin-nav-icon { font-size: 1.1rem; width: 20px; }

.admin-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  background: white;
  padding: 16px 32px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.admin-topbar-title { font-size: 1.2rem; font-weight: 700; color: var(--primary-dark); }
.admin-topbar-actions { display: flex; align-items: center; gap: 12px; }

.admin-content { padding: 32px; flex: 1; }

/* Admin stats cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.stat-icon-green  { background: #dcfce7; }
.stat-icon-blue   { background: #dbeafe; }
.stat-icon-orange { background: #ffedd5; }
.stat-icon-red    { background: #fee2e2; }

.stat-label { font-size: 0.82rem; color: #64748b; font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--primary-dark); line-height: 1; }

/* Admin table */
.admin-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
}
.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-card-title { font-size: 1.1rem; font-weight: 700; color: var(--primary-dark); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: #64748b;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: var(--text);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8fafc; }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-new        { background: #dbeafe; color: #1d4ed8; }
.status-processing { background: #fef3c7; color: #d97706; }
.status-shipped    { background: #ede9fe; color: #7c3aed; }
.status-delivered  { background: #dcfce7; color: #16a34a; }
.status-cancelled  { background: #fee2e2; color: #dc2626; }

.badge-active   { background: #dcfce7; color: #16a34a; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }

/* Admin form */
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.admin-form-group { margin-bottom: 0; }
.admin-form-group.full-width { grid-column: 1 / -1; }

.admin-form-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 6px;
}
.admin-form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
  color: var(--text);
  background: white;
}
.admin-form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(82,183,136,0.1); }

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Image preview */
.image-preview-box {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-light);
  cursor: pointer;
  transition: var(--transition);
  font-size: 2rem;
}
.image-preview-box:hover { border-color: var(--accent); }
.image-preview-box img { width: 100%; height: 100%; object-fit: cover; }

/* Admin login */
.admin-login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-login-card {
  background: white;
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.admin-login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.admin-login-logo .logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--primary-dark);
  font-weight: 700;
  margin-top: 12px;
}
.admin-login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-error   { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #16a34a; border: 1px solid #86efac; }
.alert-warning { background: #fef3c7; color: #d97706; border: 1px solid #fcd34d; }

/* ── Mobile filter bar (hidden on desktop) ─────────────────────────────────── */
.mobile-filter-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.btn-filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px;
}
.btn-filter-toggle:hover,
.btn-filter-toggle.active { border-color: var(--accent); background: var(--accent-light); }
.btn-filter-toggle .filter-icon { transition: transform 0.3s ease; }
.btn-filter-toggle.active .filter-icon { transform: rotate(180deg); }

/* ── Hamburger animation ────────────────────────────────────────────────────── */
.nav-toggle { transition: var(--transition); }
.nav-toggle span { transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav overlay (mobile backdrop) */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 998;
  backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* ── Cart button mobile (icon-only) ─────────────────────────────────────────── */
.cart-btn-text { display: inline; }

/* ── Admin sidebar mobile toggle ────────────────────────────────────────────── */
.admin-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.admin-mobile-toggle:hover { background: var(--accent-light); }
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.admin-sidebar-overlay.open { display: block; }

/* ── Scrollable table wrapper ───────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .categories-grid    { grid-template-columns: repeat(2, 1fr); }
  .products-grid      { grid-template-columns: repeat(3, 1fr); }
  .advantages-grid    { grid-template-columns: repeat(2, 1fr); }
  .footer-grid        { grid-template-columns: 1fr 1fr; }
  .catalog-layout     { grid-template-columns: 240px 1fr; }
  .admin-stats        { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* ── Header ── */
  .header-inner     { padding: 0 16px; height: 60px; }
  .logo             { font-size: 1.2rem; }
  .logo-icon        { font-size: 1.3rem; }
  .cart-btn         { padding: 8px 12px; font-size: 0.9rem; }
  .cart-btn-text    { display: none; }

  /* ── Mobile nav ── */
  .main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    padding: 12px 8px 20px;
    z-index: 999;
    gap: 4px;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    pointer-events: none;
  }
  .main-nav.mobile-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-toggle { display: flex; }

  /* ── Hero ── */
  .hero             { min-height: 65vh; padding: 60px 20px 50px; }
  .hero-title       { font-size: clamp(1.7rem, 6vw, 2.4rem); }
  .hero-subtitle    { font-size: 1rem; }
  .hero-actions     { flex-direction: column; align-items: center; gap: 12px; }
  .hero-actions .btn { width: 100%; max-width: 320px; justify-content: center; }

  /* ── Categories/Products ── */
  .categories-grid  { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-card    { padding: 20px 16px; }
  .category-icon    { font-size: 2.5rem; }
  .products-grid    { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .advantages-grid  { grid-template-columns: 1fr 1fr; gap: 20px; }
  .contact-grid     { grid-template-columns: 1fr; gap: 16px; }

  /* ── Catalog ── */
  .catalog-layout   { grid-template-columns: 1fr; gap: 0; padding: 20px 0 60px; }
  .mobile-filter-bar { display: flex; }
  .catalog-sidebar  {
    position: static;
    display: none;
    margin-bottom: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }
  .catalog-sidebar.mobile-open { display: block; }
  .catalog-header   { flex-direction: column; align-items: flex-start; gap: 12px; }
  .catalog-search   { max-width: 100%; width: 100%; }

  /* ── Product detail ── */
  .product-detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .product-info-title    { font-size: 1.5rem; }
  .price-current         { font-size: 1.8rem; }
  .add-to-cart-form      { flex-wrap: wrap; }
  .btn-add-to-cart-main  { width: 100%; justify-content: center; }

  /* ── Cart sidebar ── */
  .cart-sidebar     { width: 100vw; max-width: 100vw; }
  .cart-header      { padding: 16px 20px; }
  .cart-items       { padding: 12px; }
  .cart-footer      { padding: 16px 20px; }
  .cart-qty-btn     { width: 36px; height: 36px; font-size: 1.1rem; }
  .cart-item-thumb  { width: 60px; height: 60px; font-size: 1.6rem; }

  /* ── Checkout ── */
  .checkout-page    { padding: 32px 0; }
  .checkout-layout  { grid-template-columns: 1fr; gap: 20px; }
  .checkout-summary-section { order: -1; }
  .checkout-form-section,
  .checkout-summary-section { padding: 20px; }
  .checkout-section-title   { font-size: 1.2rem; margin-bottom: 16px; }

  /* ── Toasts ── */
  .toast-container  { bottom: 16px; right: 12px; left: 12px; align-items: stretch; }
  .toast            { max-width: 100%; }

  /* ── Footer ── */
  .footer-grid      { grid-template-columns: 1fr; gap: 24px; }
  .site-footer      { padding: 40px 0 0; }
  .footer-bottom    { flex-direction: column; text-align: center; }

  /* ── Sections ── */
  .section          { padding: 50px 0; }
  .section-title    { font-size: 1.8rem; }
  .section-subtitle { margin-bottom: 2rem; }

  /* ── Admin ── */
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }
  .admin-sidebar.open  { transform: translateX(0); }
  .admin-main          { margin-left: 0; }
  .admin-topbar        { padding: 12px 16px; }
  .admin-content       { padding: 16px; }
  .admin-stats         { grid-template-columns: 1fr 1fr; gap: 12px; }
  .admin-form-grid     { grid-template-columns: 1fr; }
  .stat-card           { padding: 16px; }
  .stat-value          { font-size: 1.5rem; }
  .admin-mobile-toggle { display: flex; }
}

@media (max-width: 480px) {
  /* ── Header ── */
  .logo span:not(.logo-icon) { display: none; }

  /* ── Categories ── */
  .categories-grid  { grid-template-columns: 1fr 1fr; gap: 10px; }
  .category-card    { padding: 16px 10px; }
  .category-icon    { font-size: 2rem; margin-bottom: 10px; }
  .category-name    { font-size: 0.95rem; }
  .category-desc    { display: none; }

  /* ── Products ── */
  .products-grid    { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-image-wrap { height: 160px; }
  .product-placeholder { font-size: 3.5rem; }
  .product-body     { padding: 10px; }
  .product-name     { font-size: 0.92rem; }
  .product-price    { font-size: 1rem; }
  .product-footer   { flex-direction: column; align-items: flex-start; gap: 8px; }
  .btn-add-cart     { width: 100%; justify-content: center; font-size: 0.82rem; padding: 8px 12px; }
  .product-desc     { display: none; }

  /* ── Hero ── */
  .hero             { min-height: 55vh; padding: 50px 16px 40px; }
  .hero-title       { font-size: 1.6rem; }
  .hero-badge       { font-size: 0.75rem; }
  .hero-actions .btn { max-width: 100%; }

  /* ── Advantages ── */
  .advantages-grid  { grid-template-columns: 1fr 1fr; gap: 12px; }
  .advantage-item   { padding: 20px 12px; }
  .advantage-icon   { font-size: 2rem; }

  /* ── Cart ── */
  .cart-sidebar     { width: 100vw; }
  .cart-item        { gap: 8px; }

  /* ── Checkout ── */
  .form-row         { grid-template-columns: 1fr; }
  .checkout-form-section,
  .checkout-summary-section { padding: 16px; }

  /* ── Admin ── */
  .admin-stats      { grid-template-columns: 1fr; }
  .admin-card       { padding: 16px; overflow-x: auto; }
  .admin-table      { min-width: 500px; }

  /* ── Section ── */
  .section          { padding: 36px 0; }
  .section-title    { font-size: 1.5rem; }
  .container        { padding: 0 14px; }
}

/* ── Utility Classes ───────────────────────────────────────────────────────── */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* Related products */
.related-products { padding: 60px 0; background: var(--bg-light); }
.related-title { font-size: 1.6rem; color: var(--primary-dark); margin-bottom: 32px; }

/* Flash messages */
.flash-message {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  animation: fadeInDown 0.4s ease;
}

/* Order expand */
.order-items-detail {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 8px;
  display: none;
}
.order-items-detail.show { display: block; }
.order-items-detail table {
  width: 100%;
  font-size: 0.85rem;
}
.order-items-detail td { padding: 6px 8px; }

/* Status select */
.status-select {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  background: white;
  color: var(--text);
  outline: none;
}
.status-select:focus { border-color: var(--accent); }
