/* CS Car Care - Official Brand Styling
   Colors matched to official CS Car Care logo: Racing Crimson Red (#dc2626), Chrome Silver (#94a3b8), Carbon Slate.
   Default light luxury automotive studio background with dark mode toggle. */

:root {
  /* Default: Lighter Background Theme */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fcfdfe;
  --bg-accent: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  /* CS Car Care Official Logo Colors */
  --brand-red: #dc2626;
  --brand-red-dark: #b91c1c;
  --brand-red-light: #ef4444;
  --brand-red-glow: rgba(220, 38, 38, 0.25);
  --brand-red-subtle: #fef2f2;
  
  --chrome-highlight: #ffffff;
  --chrome-silver: #94a3b8;
  --chrome-mid: #64748b;
  --chrome-dark: #334155;
  --carbon-black: #0b0f19;
  
  --accent-gold: #d97706;
  --accent-emerald: #059669;
  --accent-blue: #2563eb;
  
  --border-subtle: #e2e8f0;
  --border-focus: #dc2626;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(220, 38, 38, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Optional Dark Mode (via Toggle) */
[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #151d30;
  --bg-card-hover: #1c263e;
  --bg-accent: #1f293d;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --brand-red-subtle: rgba(220, 38, 38, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-focus: #ef4444;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--chrome-silver);
  border-radius: 4px;
}

/* Mobile Simulator Outer Wrap */
.simulator-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
  background: var(--bg-primary);
  transition: padding 0.3s ease;
}

.simulator-wrap.active-mobile-frame {
  padding: 30px 16px 60px;
  background: radial-gradient(circle at top, #1e293b 0%, #090d16 100%);
}

.phone-frame {
  width: 100%;
  max-width: 100%;
  position: relative;
  transition: var(--transition);
}

.simulator-wrap.active-mobile-frame .phone-frame {
  max-width: 440px;
  border: 10px solid #1e293b;
  border-radius: 44px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background-color: var(--bg-primary);
}

.phone-notch {
  display: none;
}
.simulator-wrap.active-mobile-frame .phone-notch {
  display: flex;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 24px;
  background: #1e293b;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 100;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.phone-notch .speaker {
  width: 40px;
  height: 4px;
  background: #334155;
  border-radius: 2px;
}
.phone-notch .camera {
  width: 8px;
  height: 8px;
  background: #0f172a;
  border-radius: 50%;
  border: 1px solid #475569;
}

/* Top Announcement Ticker - Racing Red & Chrome */
.ticker-bar {
  background: linear-gradient(90deg, #111827 0%, #dc2626 50%, #991b1b 100%);
  color: #ffffff;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ticker-content {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  animation: slideTicker 28s linear infinite;
}
@keyframes slideTicker {
  0% { transform: translateX(10%); }
  50% { transform: translateX(-35%); }
  100% { transform: translateX(10%); }
}

/* Header & TableQR Banner */
.menu-header {
  position: relative;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 18px 14px;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.brand-logo-img {
  height: 48px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

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

.action-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.action-btn:hover {
  background: var(--bg-accent);
  border-color: var(--brand-red);
}

.action-btn.active-pill {
  background: var(--brand-red);
  color: #ffffff;
  border-color: var(--brand-red);
  box-shadow: 0 2px 8px var(--brand-red-glow);
}

/* Admin Button Specific Highlight */
.action-btn.admin-btn {
  background: #111827;
  color: #f8fafc;
  border-color: #374151;
}
.action-btn.admin-btn:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

/* Store Profile Banner */
.store-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.store-profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
}

.store-meta-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.store-info h1 {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.store-tagline {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 3px;
  font-weight: 500;
}
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-red-subtle);
  color: var(--brand-red);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.meta-badge.rating {
  background: rgba(217, 119, 6, 0.12);
  color: var(--accent-gold);
  border-color: rgba(217, 119, 6, 0.25);
}

.meta-badge.distributor {
  background: #111827;
  color: #f8fafc;
  border-color: #374151;
}

/* Counter / Table Selector Pill */
.table-selector-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-accent);
  border: 1px dashed var(--brand-red);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-red);
  cursor: pointer;
  margin-top: 10px;
  transition: var(--transition);
}
.table-selector-pill:hover {
  background: var(--brand-red-subtle);
}

/* Quick Search Bar */
.search-container {
  margin-top: 14px;
  position: relative;
}
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.95rem;
}
.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 11px 40px 11px 42px;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.search-input:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px var(--brand-red-glow);
}
.search-clear {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
  font-size: 0.9rem;
}
.search-clear.visible {
  display: block;
}

/* Sticky Brand Bar (TableQR Category Slider Style) */
.brand-nav-section {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-primary);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 0 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px 8px;
}
.brand-section-title {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-scroll-track {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 2px 18px 10px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.brand-scroll-track::-webkit-scrollbar {
  display: none;
}

/* Brand Card Pill */
.brand-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  min-width: 90px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  user-select: none;
  box-shadow: var(--shadow-sm);
}
.brand-pill:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  border-color: rgba(220, 38, 38, 0.3);
  box-shadow: var(--shadow-md);
}

.brand-pill.active {
  border-color: var(--brand-red);
  background: linear-gradient(180deg, var(--brand-red-subtle) 0%, var(--bg-card) 100%);
  box-shadow: 0 0 16px var(--brand-red-glow);
}

.brand-avatar-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  position: relative;
}
.brand-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.brand-pill-name {
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-pill-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Category Filter Chips */
.category-chips-track {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 6px 18px 8px;
  scrollbar-width: none;
}
.category-chips-track::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.category-chip:hover {
  border-color: var(--brand-red);
  color: var(--text-primary);
}
.category-chip.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

/* Active Brand Spotlight Banner */
.brand-spotlight {
  margin: 12px 18px 4px;
  background: linear-gradient(135deg, var(--brand-red-subtle) 0%, var(--bg-card) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.brand-spotlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-red);
}

.spotlight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.spotlight-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.spotlight-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Main Products Section */
.products-wrapper {
  padding: 14px 18px 100px;
}

.results-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.results-count b {
  color: var(--brand-red);
}

.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  outline: none;
}

/* Product Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .simulator-wrap:not(.active-mobile-frame) .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1380px) {
  .simulator-wrap:not(.active-mobile-frame) .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Restaurant Menu Styled Product Card */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: var(--shadow-md);
}

.card-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
}
[data-theme="dark"] .card-image-box {
  background: radial-gradient(circle at center, #1e293b 0%, #0a0f1d 100%);
}

.card-image-box img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.product-card:hover .card-image-box img {
  transform: scale(1.05);
}

.badge-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-tag.hot {
  background: var(--brand-red);
  color: #ffffff;
}
.badge-tag.pro {
  background: #111827;
  color: #ffffff;
}
.badge-tag.safe {
  background: var(--accent-emerald);
  color: #ffffff;
}

.brand-watermark {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.85);
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
[data-theme="dark"] .brand-watermark {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.85);
}

.card-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title-row {
  cursor: pointer;
  margin-bottom: 4px;
}
.card-product-name {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}
.spec-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-accent);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--border-subtle);
}

.card-desc {
  font-size: 0.77rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.variant-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.variant-chips-row::-webkit-scrollbar {
  display: none;
}

.v-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border-subtle);
  background: var(--bg-accent);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.v-chip.active {
  border-color: var(--brand-red);
  background: var(--brand-red-subtle);
  color: var(--brand-red);
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.price-block {
  display: flex;
  flex-direction: column;
}
.price-current {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--brand-red);
  letter-spacing: -0.02em;
}
.price-mrp-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.price-mrp {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.price-discount {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

/* ADD Button & Quantity Counter */
.btn-add-item {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border: none;
  font-weight: 900;
  font-size: 0.8rem;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  box-shadow: 0 2px 8px var(--brand-red-glow);
}
.btn-add-item:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  transform: translateY(-1px);
}

.qty-counter-control {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1.5px solid var(--brand-red);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.qty-btn {
  background: transparent;
  border: none;
  color: var(--brand-red);
  font-size: 1rem;
  font-weight: 900;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.qty-btn:hover {
  background: var(--brand-red);
  color: #ffffff;
}
.qty-num {
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--text-primary);
  min-width: 24px;
  text-align: center;
}

/* Floating TableQR Cart Bar */
.floating-cart-bar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 36px);
  max-width: 440px;
  background: linear-gradient(90deg, #111827 0%, #dc2626 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
  z-index: 60;
  cursor: pointer;
  transition: var(--transition);
}
.simulator-wrap:not(.active-mobile-frame) .floating-cart-bar {
  max-width: 520px;
}
.floating-cart-bar:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 14px 35px rgba(220, 38, 38, 0.5);
}
.floating-cart-bar.hidden {
  display: none;
}

.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-bar-icon {
  background: rgba(255, 255, 255, 0.2);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}
.cart-bar-details {
  display: flex;
  flex-direction: column;
}
.cart-bar-count {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cart-bar-total {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.1;
}

.cart-bar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 900;
}

/* Modal Overlay & Bottom Sheet */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  background: var(--bg-secondary);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-overlay.open .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle-bar {
  width: 48px;
  height: 5px;
  background: var(--chrome-silver);
  border-radius: 3px;
  margin: 10px auto 4px;
}

.sheet-header {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.sheet-title {
  font-size: 1.15rem;
  font-weight: 900;
}
.btn-close-sheet {
  background: var(--bg-accent);
  border: none;
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.sheet-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.product-hero-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: radial-gradient(circle, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}
[data-theme="dark"] .product-hero-preview {
  background: radial-gradient(circle, #1e293b 0%, #0a0f1d 100%);
}

.product-hero-preview img {
  max-height: 220px;
  width: auto;
  object-fit: contain;
}

.detail-section-title {
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin: 16px 0 8px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature-list li {
  font-size: 0.83rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.feature-list li::before {
  content: "✓";
  color: var(--brand-red);
  font-weight: 900;
}

/* Dilution Calculator Box */
.dilution-calc-box {
  background: var(--bg-card);
  border: 1.5px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}
.calc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--brand-red);
  margin-bottom: 12px;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.calc-input-group label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.calc-select, .calc-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-primary);
  font-size: 0.82rem;
  outline: none;
}
.calc-result {
  margin-top: 12px;
  background: var(--brand-red-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--brand-red);
  text-align: center;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.sheet-footer {
  padding: 14px 22px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 12px;
}
.sheet-footer .btn-whatsapp {
  flex: 1;
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.sheet-footer .btn-whatsapp:hover {
  background: #20bd5a;
}
.sheet-footer .btn-add-cart {
  flex: 1.2;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px var(--brand-red-glow);
}
.sheet-footer .btn-add-cart:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Cart Items & Form */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}
.cart-item-img {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: var(--bg-accent);
  object-fit: contain;
  border: 1px solid var(--border-subtle);
}
.cart-item-info {
  flex: 1;
}
.cart-item-title {
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.25;
}
.cart-item-variant {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.cart-item-price {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--brand-red);
  margin-top: 2px;
}

.cart-form-section {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.form-group {
  margin-bottom: 12px;
}
.form-group label {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.84rem;
  color: var(--text-primary);
  outline: none;
}
.form-control:focus {
  border-color: var(--brand-red);
}

.promo-row {
  display: flex;
  gap: 8px;
}
.btn-apply-promo {
  background: #111827;
  border: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.bill-summary {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 14px;
  font-size: 0.84rem;
}
.bill-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}
.bill-row.total-row {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
  border-top: 1.5px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: 4px;
}

/* ==============================================================
   ADMIN PANEL STYLING
   ============================================================== */
.admin-modal-wrap {
  width: 100%;
  max-width: 900px !important;
  max-height: 94vh !important;
  border-radius: 20px !important;
}

.admin-nav-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 22px;
  background: var(--bg-accent);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}
.admin-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.admin-tab-btn.active {
  background: #111827;
  color: #ffffff;
}

/* Admin Stats Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--brand-red);
  margin-top: 4px;
}

/* Admin Table */
.admin-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}
.admin-table th {
  background: #111827;
  color: #ffffff;
  padding: 10px 12px;
  font-weight: 800;
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.admin-table tr:hover {
  background: var(--bg-accent);
}

.table-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: contain;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
}

.action-icon-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition);
}
.action-icon-btn:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}
.action-icon-btn.delete:hover {
  background: var(--brand-red);
  color: #ffffff;
}

/* Image Upload Dropzone */
.image-upload-box {
  border: 2px dashed rgba(220, 38, 38, 0.4);
  background: var(--brand-red-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 14px;
}
.image-upload-box:hover {
  border-color: var(--brand-red);
  background: rgba(220, 38, 38, 0.08);
}
.upload-preview-img {
  max-height: 120px;
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
}

/* Variant Repeater in Admin Form */
.variant-repeater-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .variant-repeater-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Toast Notification */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111827;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 800;
  border-left: 4px solid var(--brand-red);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.25s ease;
  pointer-events: none;
}
.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Print Tent Card Preview */
.tent-card-preview {
  background: #ffffff;
  color: #0f172a;
  border-radius: 18px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  margin: 10px 0;
  border: 3px solid #dc2626;
}
.tent-header-badge {
  background: #dc2626;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.tent-logo-img {
  height: 60px;
  width: auto;
  margin-bottom: 8px;
  border-radius: 8px;
}
.tent-qr-box {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 16px;
  display: inline-block;
  margin: 12px 0;
}
.tent-qr-box img {
  width: 170px;
  height: 170px;
  display: block;
}
.tent-table-pill {
  font-size: 0.95rem;
  font-weight: 900;
  color: #dc2626;
  background: var(--brand-red-subtle);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  display: inline-block;
}

/* Print Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .ticker-bar, .menu-header, .brand-nav-section, .floating-cart-bar, .phone-notch, .action-btn {
    display: none !important;
  }
  .simulator-wrap {
    padding: 0 !important;
    background: none !important;
  }
  .phone-frame {
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
  }
  .tent-card-preview {
    border: 3px solid #000000 !important;
    page-break-inside: avoid;
    margin: 40px auto !important;
    max-width: 400px !important;
  }
}
