/* ============================================================
   PIZZERIA ONLINE — Material Design System (theme-driven)
   Colors/radius/font are overridden at runtime by app.js -> applyTheme()
   ============================================================ */

:root {
  --red:        #E8392A;
  --red-dark:   #C42E20;
  --red-light:  #FDECEA;
  --red-rgb-glow: rgba(232,57,42,0.35);
  --orange:     #F5A623;
  --gold:       #D4A017;
  --dark:       #1A1A2E;
  --dark2:      #16213E;
  --surface:    #FFFFFF;
  --surface2:   #F6F7F9;
  --surface3:   #EEF0F3;
  --border:     #E3E6EA;
  --text:       #1A1A1A;
  --text2:      #555;
  --text3:      #949494;
  --green:      #2ECC71;
  --blue:       #3498DB;

  /* Material elevation shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.10);
  --shadow-md:  0 2px 4px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 16px rgba(0,0,0,0.10), 0 16px 40px rgba(0,0,0,0.18);
  --shadow-fab: 0 4px 10px rgba(0,0,0,0.20), 0 2px 4px rgba(0,0,0,0.14);

  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  20px;
  --radius-btn: 8px;
  --radius-chip: 999px;

  --font:       'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Georgia', 'Times New Roman', serif;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --md-emphasis: cubic-bezier(0.2, 0, 0, 1);

  --sidebar-w: 260px;
  --header-h: 72px;
  --topbar-h: 38px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--surface2);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ---- Utility ---- */
.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }

/* ============================================================
   MATERIAL RIPPLE
   ============================================================ */
.ripple-surface { position: relative; overflow: hidden; }
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transform: scale(0);
  animation: ripple-anim 0.65s var(--md-emphasis);
  pointer-events: none;
}
.btn.btn-secondary .ripple-effect,
.chip .ripple-effect { background: rgba(0,0,0,0.12); }
@keyframes ripple-anim {
  to { transform: scale(1); opacity: 0; }
}

/* ---- Buttons (Material) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn-primary   { background: var(--red); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 4px 14px var(--red-rgb-glow); transform: translateY(-1px); }
.btn-success   { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-success:hover { background: #27AE60; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--surface3); color: var(--text); }
.btn-secondary:hover { background: var(--border); }
.btn-danger    { background: #E74C3C; color: #fff; }
.btn-danger:hover { background: #C0392B; }
.btn-sm { padding: 7px 15px; font-size: 0.8rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

body.shape-pill .btn:not(.btn-sm) { border-radius: 999px; }
body.shape-square .btn { border-radius: 4px; }

/* ---- Form Controls ---- */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-light);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-pending   { background: #FEF3C7; color: #92400E; }
.badge-preparing { background: #DBEAFE; color: #1E40AF; }
.badge-ready     { background: #D1FAE5; color: #065F46; }
.badge-delivered { background: #F3F4F6; color: #374151; }
.badge-cancelled { background: #FEE2E2; color: #991B1B; }
.badge-confirmed { background: #D1FAE5; color: #065F46; }
.badge-completed { background: #E0E7FF; color: #3730A3; }

/* ---- Stock badge ---- */
.stock-badge { font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.stock-badge.in-stock  { background: #E7F8EE; color: #1E824C; }
.stock-badge.low-stock { background: #FFF2D9; color: #A15C00; }

/* ---- Toast Notifications ---- */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--dark);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: all;
  min-width: 280px;
  max-width: 380px;
}
.toast.show { transform: translateX(0); }
.toast.toast-success { background: #065F46; border-left: 4px solid var(--green); }
.toast.toast-error   { background: #7F1D1D; border-left: 4px solid #EF4444; }
.toast.toast-info    { background: #1E3A5F; border-left: 4px solid var(--blue); }
.toast.toast-order   { background: #713F12; border-left: 4px solid var(--orange); }
.toast-icon { font-size: 1.3rem; flex-shrink: 0; }
.toast-msg  { flex: 1; }
.toast-close { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 1.1rem; padding: 0; }

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,15,20,0.6);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.modal-box-lg { max-width: 720px; }
@keyframes slideUp { from { transform: translateY(30px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-header h2 { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.modal-close {
  background: var(--surface3);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  color: var(--text2);
}
.modal-close:hover { background: var(--border); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================================
   HEADER — top marquee contact bar + main nav row
   ============================================================ */
.top-contact-bar {
  background: var(--header-bg, var(--dark));
  color: rgba(255,255,255,0.85);
  height: var(--topbar-h);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.marquee-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll linear infinite;
  will-change: transform;
}
.marquee-track .marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.site-header {
  background: linear-gradient(135deg, var(--header-bg, var(--dark)) 0%, var(--dark2) 100%);
  color: #fff;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-md);
  gap: 20px;
}
.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.site-header .logo span { color: var(--orange); }

.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.site-nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-btn);
  transition: all var(--transition);
}
.site-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.lang-switcher { display: flex; gap: 2px; background: rgba(255,255,255,0.08); border-radius: 999px; padding: 3px; }
.lang-btn { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.75rem; font-weight: 700; padding: 5px 9px; border-radius: 999px; transition: all var(--transition); }
.lang-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.lang-btn.active { background: var(--red); color: #fff; }

.lang-fields-box {
  margin-top: 16px; padding: 14px 16px; background: var(--surface2);
  border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
}
.lang-fields-header { font-size: 0.75rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }

.rich-editor-wrap { border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-top: 4px; }
.rich-editor-toolbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 6px 8px; background: var(--surface2); border-bottom: 1px solid var(--border);
}
.rich-editor-toolbar button {
  min-width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); cursor: pointer; font-size: 0.8rem; color: var(--text2);
}
.rich-editor-toolbar button:hover { background: var(--red); color: #fff; border-color: var(--red); }
.rich-editor-toolbar select { height: 28px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.75rem; background: var(--surface); }
.rich-editor-toolbar input[type="color"] { width: 28px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.rich-sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }
.rich-editor-content {
  min-height: 120px; max-height: 320px; overflow-y: auto; padding: 12px 14px;
  font-family: var(--font); font-size: 0.9rem; line-height: 1.6; color: var(--text);
  background: var(--surface); outline: none;
}
.rich-editor-content:empty::before { content: attr(data-placeholder); color: var(--text3); }

.modal-tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.modal-tab {
  padding: 10px 16px; border: none; background: none; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; color: var(--text3);
  border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; transition: all var(--transition);
}
.modal-tab:hover { color: var(--text); }
.modal-tab.active { color: var(--red); border-bottom-color: var(--red); }
.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }

.mobile-menu-toggle, .mobile-filter-toggle {
  display: none;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ---- Cart Badge Button ---- */
.cart-trigger {
  position: relative;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  font-family: var(--font);
}
.cart-trigger:hover { background: rgba(255,255,255,0.2); }
.cart-count-badge {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   BANNER CAROUSEL
   ============================================================ */
.banner-carousel {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: var(--dark);
  perspective: 1400px;
}
.banner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 60px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s var(--md-emphasis);
  background-size: cover;
  background-position: center;
}
.banner-slide.active { opacity: 1; pointer-events: auto; z-index: 2; }
.banner-slide-overlay {
  position: absolute; inset: 0; pointer-events: none;
}
.banner-slide-content { position: relative; z-index: 1; max-width: 560px; }
.banner-slide-emoji { font-size: 3rem; margin-bottom: 10px; }
.banner-slide h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 10px; line-height: 1.2; }
.banner-slide p { font-size: 1rem; opacity: 0.9; margin-bottom: 18px; }

/* animation: fade */
.banner-carousel[data-anim="fade"] .banner-slide { transform: none !important; }

/* animation: slide */
.banner-carousel[data-anim="slide"] .banner-slide { transform: translateX(40px); }
.banner-carousel[data-anim="slide"] .banner-slide.active { transform: translateX(0); }
.banner-carousel[data-anim="slide"] .banner-slide.leaving { transform: translateX(-40px); }

/* animation: zoom */
.banner-carousel[data-anim="zoom"] .banner-slide { transform: scale(1.12); }
.banner-carousel[data-anim="zoom"] .banner-slide.active { transform: scale(1); }

/* animation: flip */
.banner-carousel[data-anim="flip"] { perspective: 1400px; }
.banner-carousel[data-anim="flip"] .banner-slide { transform: rotateY(90deg); transform-origin: center; }
.banner-carousel[data-anim="flip"] .banner-slide.active { transform: rotateY(0deg); }

/* animation: cube */
.banner-carousel[data-anim="cube"] { perspective: 1600px; }
.banner-carousel[data-anim="cube"] .banner-slide { transform: rotateY(60deg) translateZ(80px); }
.banner-carousel[data-anim="cube"] .banner-slide.active { transform: rotateY(0deg) translateZ(0); }

.banner-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.banner-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.4); cursor: pointer; padding: 0; transition: all var(--transition);
}
.banner-dots button.active { background: #fff; width: 24px; border-radius: 999px; }
.banner-nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  font-size: 1.2rem; z-index: 3; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.banner-nav-arrow:hover { background: rgba(255,255,255,0.3); }
.banner-nav-prev { left: 16px; }
.banner-nav-next { right: 16px; }

/* ---- Hero Banner (fallback text hero, still used on category pages) ---- */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #2D1B35 100%);
  color: #fff;
  padding: 44px 24px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.15;
}
.hero h1 span { color: var(--orange); }
.hero p { font-size: 1rem; color: rgba(255,255,255,0.75); max-width: 440px; margin: 0 auto 20px; }
.hero-stats { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.4rem; color: var(--orange); font-weight: 800; }
.hero-stat span { font-size: 0.78rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Promotions ---- */
.promos-section { padding: 24px; }
.promos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.promo-card {
  border-radius: var(--radius);
  padding: 20px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.promo-card::before {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.promo-card h3 { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.promo-card p  { font-size: 0.85rem; opacity: 0.92; }

/* ============================================================
   LAYOUT — left sidebar filter + main content
   ============================================================ */
.shop-layout { display: flex; align-items: flex-start; }

.filter-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 20px 16px;
}
.filter-sidebar h3 {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 12px;
  padding: 0 6px;
}
.sidebar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: var(--radius-btn); padding: 0 12px; margin-bottom: 20px;
}
.sidebar-search input { border: none; background: none; padding: 10px 0; font-size: 0.875rem; font-family: var(--font); outline: none; width: 100%; color: var(--text); }
.sidebar-search .search-icon { color: var(--text3); font-size: 0.9rem; }

.filter-cat-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 24px; }
.filter-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text2);
  transition: all var(--transition); border: none; background: none; width: 100%; text-align: left;
  position: relative; overflow: hidden; text-decoration: none;
}
.filter-cat-item:hover { background: var(--surface2); color: var(--text); }
.filter-cat-item.active { background: var(--red-light); color: var(--red); }
.filter-cat-item .cat-count { font-size: 0.72rem; background: var(--surface3); padding: 2px 8px; border-radius: 999px; color: var(--text3); }
.filter-cat-item.active .cat-count { background: var(--red); color: #fff; }

.sidebar-sort select { width: 100%; }

.filter-sidebar-overlay { display: none; }

/* Main content column */
.shop-main { flex: 1; min-width: 0; padding-bottom: 32px; }

.menu-toolbar {
  padding: 20px 24px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.menu-toolbar h2 { font-size: 1.25rem; font-weight: 800; flex: none; margin-right: auto; }

.sort-select {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

/* Category chips (mobile fallback, hidden on desktop since sidebar covers it) */
.category-chips { display: none; gap: 8px; flex-wrap: wrap; padding: 12px 24px 0; }
.chip {
  padding: 7px 16px;
  border-radius: var(--radius-chip);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
}
.chip:hover, .chip.active { background: var(--red); color: #fff; border-color: var(--red); }
.chip.chip-inactive { background: transparent; color: var(--text3); border-style: dashed; opacity: 0.6; }
.chip.chip-inactive:hover { opacity: 1; background: var(--surface2); color: var(--text2); border-color: var(--border); }

.quick-filter-bar { padding: 14px 24px 6px; display: flex; flex-direction: column; gap: 10px; }
.quick-filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.quick-filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-search-box { margin-bottom: 0; width: 260px; max-width: 100%; flex: 0 0 auto; }

/* ---- Category Sections ---- */
.category-section { padding: 8px 24px 8px; }
.category-section-title {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 1.15rem; font-weight: 800; margin: 18px 0 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.category-section-title .count { font-size: 0.78rem; font-weight: 600; color: var(--text3); }

/* ---- Products Grid ---- */
.products-section { padding: 0 24px 8px; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 8px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
body.card-flat .product-card,
body.card-flat .promo-card,
body.card-flat .stat-card,
body.card-flat .admin-card,
body.card-flat .banner-admin-card { box-shadow: none; border: 1px solid var(--border); }
body.card-flat .product-card:hover { box-shadow: none; transform: none; }
body.card-outlined .product-card,
body.card-outlined .stat-card,
body.card-outlined .admin-card,
body.card-outlined .banner-admin-card { box-shadow: none; border: 1.5px solid var(--border); }

.product-img {
  height: 160px;
  background: linear-gradient(135deg, #FFD88A 0%, #FF9B5E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.product-img-emoji { position: relative; z-index: 1; }
.product-category-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-chip);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-stock-tag { position: absolute; top: 10px; right: 10px; }

.product-promo-badge {
  position: absolute; bottom: 10px; left: 10px;
  font-size: 0.68rem; font-weight: 800; padding: 4px 10px;
  border-radius: var(--radius-chip); text-transform: uppercase; letter-spacing: 0.04em;
  color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.product-promo-badge.badge-discount      { background: #E8392A; }
.product-promo-badge.badge-promo         { background: #F5A623; }
.product-promo-badge.badge-reduced_price { background: #2ECC71; }
.product-promo-badge.badge-set_discount  { background: #8E44AD; }
.product-promo-badge.badge-new           { background: #3498DB; }

.product-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.product-desc { font-size: 0.8rem; color: var(--text3); line-height: 1.5; margin-bottom: 10px; 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: auto;
}
.product-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--red);
}
.product-weight { font-size: 0.75rem; color: var(--text3); }
.add-btn {
  background: var(--red);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.add-btn:hover { background: var(--red-dark); transform: scale(1.1); box-shadow: 0 4px 12px var(--red-rgb-glow); }
body.shape-square .add-btn { border-radius: var(--radius-sm); }

/* ---- Product Modal (client) ---- */
.pmodal-img {
  height: 240px;
  background: linear-gradient(135deg, #FFD88A 0%, #FF9B5E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  position: relative;
}
.pmodal-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pmodal-emoji { position: relative; z-index: 1; }
.pmodal-content { padding: 24px; }
.pmodal-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.pmodal-meta { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.pmodal-meta span { font-size: 0.8rem; color: var(--text3); display: flex; align-items: center; gap: 4px; }
.pmodal-desc { color: var(--text2); margin-bottom: 20px; line-height: 1.6; }
.pmodal-price { font-size: 2rem; font-weight: 800; color: var(--red); margin-bottom: 20px; }
.qty-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.qty-box { display: flex; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-box button {
  background: var(--surface3);
  border: none;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  transition: background var(--transition);
}
.qty-box button:hover { background: var(--border); }
.qty-box input {
  width: 52px;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
}
.pmodal-comment input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  margin-top: 6px;
}
.pmodal-comment input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-light); }

/* ---- Cart Drawer ---- */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 800;
  backdrop-filter: blur(2px);
}
.cart-overlay.open { display: block; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: min(480px, 100vw);
  height: 100vh;
  background: var(--surface);
  z-index: 801;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-drawer.open { right: 0; }
.cart-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-header h3 { font-size: 1.1rem; font-weight: 700; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { text-align: center; color: var(--text3); padding: 60px 20px; font-size: 0.95rem; }
.cart-empty .empty-icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-emoji { width: 44px; height: 44px; background: linear-gradient(135deg, #FFD88A, #FF9B5E); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; overflow: hidden; }
.cart-item-emoji img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-comment { font-size: 0.75rem; color: var(--text3); font-style: italic; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.cart-item-price { font-size: 0.9rem; font-weight: 700; color: var(--red); }
.cart-item-qty-controls { display: flex; align-items: center; gap: 6px; }
.cart-item-qty-controls button {
  background: var(--surface3);
  border: 1px solid var(--border);
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.cart-item-qty-controls button:hover { background: var(--border); }
.cart-item-qty-controls span { font-size: 0.85rem; font-weight: 700; min-width: 20px; text-align: center; }
.cart-remove { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 1rem; padding: 2px; }
.cart-remove:hover { color: var(--red); }

.cart-footer { padding: 16px 24px 24px; border-top: 1px solid var(--border); flex-shrink: 0; }
.cart-total-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.9rem; color: var(--text2); }
.cart-total-row.final { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-top: 10px; padding-top: 10px; border-top: 1.5px solid var(--border); }

/* ---- Checkout Modal ---- */
.checkout-modal-box .modal-body { padding: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.delivery-toggle { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; }
.delivery-toggle input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--red); }
.delivery-toggle span { font-weight: 600; color: var(--text); }

/* ---- Order Confirmed Modal ---- */
.order-confirmed-box { text-align: center; padding: 48px 32px; }
.order-confirmed-box .checkmark { font-size: 4rem; margin-bottom: 16px; }
.order-confirmed-box h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.order-confirmed-box p { color: var(--text2); max-width: 400px; margin: 0 auto; }

/* Empty cart hint on FAB */
.fab-checkout {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--red); color: #fff;
  border: none; border-radius: 999px;
  padding: 14px 24px; font-weight: 700; font-size: 0.9rem;
  box-shadow: var(--shadow-fab); cursor: pointer;
  display: none; align-items: center; gap: 8px; z-index: 300;
  font-family: var(--font);
}
.fab-checkout.show { display: flex; }

/* ============================================================
   ADMIN STYLES (base — page-specific bits in admin.css)
   ============================================================ */
.admin-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-logo span { color: var(--orange); }

.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.35); padding: 12px 8px 6px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: var(--red); color: #fff; font-weight: 700; }
.nav-item .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; padding: 2px 7px; font-size: 0.7rem; font-weight: 700; }
.nav-item.active .nav-badge { background: rgba(255,255,255,0.3); }

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

/* Admin Main */
.admin-main { flex: 1; padding: 32px; overflow-x: hidden; }

.admin-page { display: none; }
.admin-page.active { display: block; }

.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.page-subtitle { color: var(--text3); font-size: 0.875rem; margin-bottom: 28px; }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card .s-icon { font-size: 1.8rem; }
.stat-card .s-value { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.stat-card .s-label { font-size: 0.78rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .s-delta { font-size: 0.78rem; color: var(--green); font-weight: 600; }

/* Orders Table */
.table-wrap { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-toolbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.table-toolbar h3 { font-size: 1rem; font-weight: 700; flex: none; margin-right: auto; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }

.status-select {
  padding: 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font);
  cursor: pointer;
  background: var(--surface);
}

/* Products Admin */
.products-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.product-admin-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.product-admin-card:hover { box-shadow: var(--shadow-md); }
.product-admin-img {
  height: 140px;
  background: linear-gradient(135deg, #FFD88A 0%, #FF9B5E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.product-admin-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.product-admin-body { padding: 14px 16px; }
.product-admin-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.product-admin-meta { font-size: 0.8rem; color: var(--text3); margin-bottom: 10px; }
.product-admin-price { font-size: 1.2rem; font-weight: 800; color: var(--red); margin-bottom: 12px; }
.product-admin-actions { display: flex; gap: 8px; }

/* Image Upload */
.img-upload-box {
  display: block;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}
.img-upload-box:hover, .img-upload-box.drag-over {
  border-color: var(--red);
  background: var(--red-light);
}
.img-upload-box input { display: none; }
.img-upload-box .upload-icon { font-size: 2.5rem; color: var(--text3); margin-bottom: 8px; }
.img-upload-box p { font-size: 0.85rem; color: var(--text3); }
.img-preview { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius-sm); margin-top: 12px; display: none; }

/* Admin Login */
.admin-login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-logo { font-size: 3rem; margin-bottom: 8px; }
.admin-login-card h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.admin-login-card p { color: var(--text3); font-size: 0.85rem; margin-bottom: 28px; }

/* Notification pulse */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.notification-ring {
  display: inline-block;
  animation: pulse 1.4s infinite;
}

/* Menu items admin */
.menu-section-admin { background: var(--surface3); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; }
.menu-section-admin .menu-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.menu-section-admin h4 { font-size: 0.9rem; font-weight: 700; }
.menu-section-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 0.85rem; }
.menu-section-item a { color: var(--red); text-decoration: none; font-weight: 600; cursor: pointer; }
.menu-section-item a:hover { text-decoration: underline; }

/* Notification bell animation for admin */
.new-order-indicator {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--orange);
  color: var(--dark);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  display: none;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.new-order-indicator.show { display: flex; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--footer-bg, var(--dark));
  color: var(--footer-text, #C7C9D9);
  margin-top: 40px;
  padding: 40px 24px 20px;
}
.site-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px;
  padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-footer-brand { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.site-footer-col p { margin-bottom: 8px; font-size: 0.9rem; }
.site-footer-col a { color: var(--footer-text, #C7C9D9); text-decoration: none; display: block; margin-bottom: 8px; font-size: 0.9rem; transition: color var(--transition); }
.site-footer-col a:hover { color: #fff; }
.site-footer-col h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.site-footer-social { display: flex; gap: 12px; margin-top: 8px; }
.site-footer-social a { display: inline-flex; align-items: center; margin: 0; font-weight: 600; }
.site-footer-bottom {
  max-width: 1100px; margin: 0 auto; padding-top: 18px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 0.78rem; opacity: 0.7;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .admin-sidebar { display: none; }
  .admin-sidebar.mobile-open {
    display: flex;
    position: fixed;
    left: 0; top: 0;
    z-index: 500;
    height: 100vh;
  }
  .admin-main { padding: 20px 16px; }

  .filter-sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    height: 100vh;
    z-index: 850;
    box-shadow: var(--shadow-lg);
    transition: left 0.28s var(--md-emphasis);
  }
  .filter-sidebar.open { left: 0; }
  .filter-sidebar-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 840;
  }
  .filter-sidebar-overlay.open { display: block; }
  .mobile-filter-toggle { display: flex; }
  .site-nav { display: none; }
  .mobile-menu-toggle { display: flex; }
}

@media (max-width: 900px) {
  .ec-products-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 600px) {
  .ec-products-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 700px) {
  .product-page-grid { grid-template-columns: 1fr !important; }
  .hero { padding: 36px 20px; }
  .menu-toolbar { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .banner-carousel { height: 260px; }
  .banner-slide { padding: 0 24px; }
  .site-header { padding: 0 14px; height: auto; min-height: 60px; flex-wrap: wrap; gap: 6px 0; padding-top: 8px; padding-bottom: 8px; }
  .site-header .logo img { max-height: 40px !important; }
  .header-actions { gap: 6px; }
  .lang-switcher { padding: 2px; }
  .lang-btn { padding: 4px 7px; font-size: 0.68rem; }
  .cart-trigger { font-size: 0.8rem; padding: 6px 10px; }
  .top-contact-bar { height: auto; padding: 6px 10px; flex-wrap: wrap; }
  .marquee-track { animation: none !important; white-space: normal !important; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
  .filter-sidebar-content, .modal-box { max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  .marquee-track .marquee-item { padding: 0 18px; font-size: 0.7rem; }
  .site-header .logo span { font-size: 0.85rem; }
  .modal-box-lg { width: 100% !important; max-width: 100% !important; border-radius: 0 !important; max-height: 100vh !important; }
}
