/**
 * Cartzilla-Inspired Storefront Design System
 * Adapted for SMK Teaching Factory (TeFa) & BLUD Business Center
 */

:root {
  --store-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --store-font-heading: 'Space Grotesk', 'DM Sans', sans-serif;
  --store-bg: #f8fafc;
  --store-card-bg: #ffffff;
  --store-text: #1e293b;
  --store-text-muted: #64748b;
  --store-border: #e2e8f0;
  --store-radius-sm: 8px;
  --store-radius-md: 12px;
  --store-radius-lg: 16px;
  --store-radius-xl: 24px;
  --store-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --store-shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.08);
  --store-shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.12);
  --store-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* TeFa Theme Palette (Amber / Golden Orange & Deep Slate) */
.theme-tefa {
  --store-primary: #f59e0b;
  --store-primary-hover: #d97706;
  --store-primary-dark: #b45309;
  --store-primary-light: #fef3c7;
  --store-primary-rgb: 245, 158, 11;
  --store-accent: #0284c7;
  --store-hero-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --store-badge-bg: #fffbeb;
  --store-badge-color: #b45309;
  --store-badge-border: #fde68a;
}

/* BLUD Theme Palette (Emerald Green & Executive Slate) */
.theme-blud {
  --store-primary: #059669;
  --store-primary-hover: #047857;
  --store-primary-dark: #064e3b;
  --store-primary-light: #d1fae5;
  --store-primary-rgb: 5, 150, 105;
  --store-accent: #0284c7;
  --store-hero-bg: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  --store-badge-bg: #ecfdf5;
  --store-badge-color: #047857;
  --store-badge-border: #a7f3d0;
}

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

/* Top Announcement Strip */
.store-topbar {
  font-size: 0.8125rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.theme-tefa .store-topbar {
  background-color: #0f172a;
  color: #cbd5e1;
}
.theme-blud .store-topbar {
  background-color: #064e3b;
  color: #d1fae5;
}
.store-topbar a {
  color: inherit;
  text-decoration: none;
  transition: var(--store-transition);
}
.store-topbar a:hover {
  color: #ffffff;
}

/* Main Navbar */
.store-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--store-border);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: var(--store-shadow-sm);
}

.store-brand-title {
  font-family: var(--store-font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.store-brand-subtitle {
  font-size: 0.75rem;
  color: var(--store-text-muted);
  font-weight: 500;
}

/* Category Pill Trigger */
.btn-category-dropdown {
  background-color: #f1f5f9;
  border: 1px solid var(--store-border);
  color: #1e293b;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--store-radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--store-transition);
}
.btn-category-dropdown:hover,
.btn-category-dropdown:focus {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* Search Bar (Cartzilla Style) */
.store-search-form {
  position: relative;
  width: 100%;
}
.store-search-input {
  width: 100%;
  padding: 0.65rem 3.5rem 0.65rem 2.75rem;
  font-size: 0.9375rem;
  border: 2px solid #e2e8f0;
  border-radius: 50rem;
  background-color: #f8fafc;
  transition: var(--store-transition);
}
.store-search-input:focus {
  background-color: #ffffff;
  border-color: var(--store-primary);
  box-shadow: 0 0 0 4px rgba(var(--store-primary-rgb), 0.15);
  outline: none;
}
.store-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}
.store-search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--store-primary);
  color: #ffffff;
  border: none;
  border-radius: 50rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--store-transition);
}
.store-search-btn:hover {
  background-color: var(--store-primary-hover);
  color: #ffffff;
}

/* WhatsApp CTA Button */
.btn-store-wa {
  background-color: #25d366;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: 50rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
  transition: var(--store-transition);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}
.btn-store-wa:hover {
  background-color: #20ba5a;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

/* Secondary Mode Switch Pill */
.btn-mode-switch {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 50rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--store-border);
  background: #ffffff;
  color: var(--store-text);
  transition: var(--store-transition);
}
.btn-mode-switch:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

/* Quick Category Bar (Cartzilla Pill Bar) */
.store-cat-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--store-border);
  padding: 0.75rem 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}
.store-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.1rem 0.4rem 0.6rem;
  border-radius: 50rem;
  background-color: #f8fafc;
  color: var(--store-text);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--store-border);
  transition: var(--store-transition);
  margin-right: 0.65rem;
}
.store-cat-pill:hover,
.store-cat-pill.active {
  background-color: var(--store-badge-bg);
  color: var(--store-badge-color);
  border-color: var(--store-badge-border);
}
.store-cat-pill-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--store-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.store-cat-pill.active .store-cat-pill-icon {
  background: var(--store-primary);
  color: #ffffff;
}

/* Cartzilla High-Impact Hero Slider */
.store-hero-slider {
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--store-shadow-md);
  border: 1px solid rgba(0,0,0,0.06);
}
.store-hero-slide {
  min-height: 480px;
  background-size: cover;
  background-position: center right;
  position: relative;
  display: flex;
  align-items: center;
}
.store-hero-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.45) 45%, rgba(15, 23, 42, 0.05) 100%);
  pointer-events: none;
}
.store-hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 3.5rem 3.5rem;
  color: #ffffff;
}
.store-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1.15rem;
}
.store-hero-heading {
  font-family: var(--store-font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.store-hero-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #f1f5f9;
  margin-bottom: 2rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  max-width: 520px;
}
.btn-hero-cta {
  border: 2px solid #ffffff;
  color: #ffffff;
  background: transparent;
  padding: 0.65rem 1.85rem;
  border-radius: 50rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--store-transition);
}
.btn-hero-cta:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Hero Carousel Controls & Indicators */
.store-hero-slider .carousel-indicators {
  margin-bottom: 1.5rem;
  gap: 0.5rem;
}
.store-hero-slider .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  opacity: 1;
}
.store-hero-slider .carousel-indicators .active {
  width: 32px;
  border-radius: 50rem;
  background-color: #ffffff;
}
.store-hero-slider .carousel-control-prev,
.store-hero-slider .carousel-control-next {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  top: 50%;
  transform: translateY(-50%);
  margin: 0 1.5rem;
  opacity: 0;
  transition: var(--store-transition);
}
.store-hero-slider:hover .carousel-control-prev,
.store-hero-slider:hover .carousel-control-next {
  opacity: 0.9;
}
.store-hero-slider .carousel-control-prev:hover,
.store-hero-slider .carousel-control-next:hover {
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
}

/* 3 Mini Promo Banners with Product Images (Cartzilla Style) */
.store-promo-card {
  border-radius: 22px;
  padding: 1.6rem 1.75rem;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--store-border);
  background: #ffffff;
  transition: var(--store-transition);
  box-shadow: var(--store-shadow-sm);
  min-height: 190px;
}
.store-promo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--store-shadow-md);
}
.store-promo-card.highlight-1 {
  background: linear-gradient(135deg, #fff0f3 0%, #ffffff 100%);
  border-color: #ffd6df;
}
.store-promo-card.highlight-2 {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border-color: #bbf7d0;
}
.store-promo-card.highlight-3 {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
  border-color: #bae6fd;
}
.store-promo-content {
  position: relative;
  z-index: 2;
  max-width: 62%;
}
.store-promo-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 0.3rem;
}
.store-promo-card h4 {
  font-family: var(--store-font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: #0f172a;
}
.store-promo-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: 4px solid #ffffff;
  transition: transform 0.35s ease;
  flex-shrink: 0;
}
.store-promo-card:hover .store-promo-img {
  transform: scale(1.08) rotate(3deg);
}

/* Sidebar Components */
.store-sidebar-card {
  background: #ffffff;
  border-radius: var(--store-radius-lg);
  border: 1px solid var(--store-border);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--store-shadow-sm);
}
.store-sidebar-title {
  font-family: var(--store-font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.store-filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.store-filter-item {
  margin-bottom: 0.4rem;
}
.store-filter-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: var(--store-radius-sm);
  color: var(--store-text);
  font-size: 0.875rem;
  text-decoration: none;
  transition: var(--store-transition);
}
.store-filter-link:hover,
.store-filter-link.active {
  background-color: var(--store-badge-bg);
  color: var(--store-badge-color);
  font-weight: 600;
}
.store-filter-count {
  font-size: 0.75rem;
  background-color: #f1f5f9;
  color: #64748b;
  padding: 0.15rem 0.5rem;
  border-radius: 50rem;
  font-weight: 600;
}
.store-filter-link.active .store-filter-count {
  background-color: #ffffff;
  color: var(--store-badge-color);
}

/* Product Cards (Cartzilla Style) */
.store-product-card {
  background: var(--store-card-bg);
  border-radius: var(--store-radius-lg);
  border: 1px solid var(--store-border);
  overflow: hidden;
  transition: var(--store-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--store-shadow-sm);
}
.store-product-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: var(--store-shadow-md);
}

/* Image Aspect Box */
.store-product-img-box {
  position: relative;
  width: 100%;
  padding-top: 85%; /* Aspect Ratio */
  background-color: #f8fafc;
  overflow: hidden;
}
.store-product-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.store-product-card:hover .store-product-img {
  transform: scale(1.05);
}

/* Badges on Image */
.store-badge-top-left {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.store-badge-top-right {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.store-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.store-badge-stock-ready {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.store-badge-stock-preorder {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.store-badge-stage {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.store-badge-blud {
  background-color: #064e3b;
  color: #ffffff;
}

/* Card Body */
.store-product-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.store-product-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.store-product-title {
  font-family: var(--store-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
  text-decoration: none;
}
.store-product-title:hover {
  color: var(--store-primary-hover);
}

.store-rating-stars {
  color: #f59e0b;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.store-rating-count {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: 4px;
}

.store-product-price-box {
  margin-top: auto;
  padding-top: 0.75rem;
}
.store-price-main {
  font-family: var(--store-font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}
.store-price-original {
  font-size: 0.8125rem;
  color: #94a3b8;
  text-decoration: line-through;
  margin-left: 0.4rem;
}
.store-unit-tag {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

/* Card Actions */
.store-product-footer {
  padding: 0 1.15rem 1.15rem 1.15rem;
  display: flex;
  gap: 0.5rem;
}
.btn-store-detail {
  flex: 1;
  background-color: #f8fafc;
  color: #1e293b;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--store-border);
  padding: 0.5rem 0.5rem;
  border-radius: var(--store-radius-md);
  text-align: center;
  text-decoration: none;
  transition: var(--store-transition);
}
.btn-store-detail:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}
.btn-store-quick-buy {
  background-color: #25d366;
  color: #ffffff;
  border: none;
  border-radius: var(--store-radius-md);
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--store-transition);
}
.btn-store-quick-buy:hover {
  background-color: #20ba5a;
  color: #ffffff;
  transform: scale(1.05);
}

/* Detail Page Components */
.store-detail-gallery-main {
  border-radius: var(--store-radius-lg);
  overflow: hidden;
  border: 1px solid var(--store-border);
  background: #ffffff;
  margin-bottom: 1rem;
}
.store-detail-gallery-main img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}
.store-detail-thumbs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
}
.store-detail-thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--store-radius-md);
  overflow: hidden;
  border: 2px solid var(--store-border);
  cursor: pointer;
  opacity: 0.7;
  transition: var(--store-transition);
}
.store-detail-thumb.active,
.store-detail-thumb:hover {
  opacity: 1;
  border-color: var(--store-primary);
}
.store-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-detail-title {
  font-family: var(--store-font-heading);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.store-detail-price {
  font-family: var(--store-font-heading);
  font-weight: 800;
  font-size: 2rem;
  color: #0f172a;
}

.store-info-box-vokasi {
  border-radius: var(--store-radius-md);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.875rem;
}
.theme-tefa .store-info-box-vokasi {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.theme-blud .store-info-box-vokasi {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

/* Quantity Selector */
.store-qty-control {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--store-border);
  border-radius: 50rem;
  background: #ffffff;
  padding: 2px;
}
.store-qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #1e293b;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--store-transition);
}
.store-qty-btn:hover {
  background: #e2e8f0;
}
.store-qty-input {
  width: 50px;
  text-align: center;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  background: transparent;
  outline: none;
}

/* Big WA Checkout Button */
.btn-store-checkout-wa {
  background-color: #25d366;
  color: #ffffff;
  font-family: var(--store-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9rem 1.75rem;
  border-radius: 50rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transition: var(--store-transition);
  width: 100%;
  border: none;
}
.btn-store-checkout-wa:hover {
  background-color: #20ba5a;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}

/* Footer (Cartzilla Inspired) */
.store-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  font-size: 0.875rem;
  border-top: 1px solid #1e293b;
}
.store-footer h5 {
  color: #ffffff;
  font-family: var(--store-font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}
.store-footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--store-transition);
}
.store-footer a:hover {
  color: #ffffff;
}
.store-footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .store-hero {
    padding: 2rem 1.5rem;
  }
  .store-detail-gallery-main img {
    height: 350px;
  }
}

/* ==========================================================================
   MOBILE-FIRST PWA E-COMMERCE STYLES (TEFA MART & BLUD STORE)
   ========================================================================== */

/* 1. Mobile App Topbar (< 992px) */
.store-pwa-mobile-topbar {
  display: none;
}

@media (max-width: 991.98px) {
  /* Safe padding at page bottom so floating nav never covers content */
  body.store-body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .store-pwa-mobile-topbar {
    display: block;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    padding: 8px 14px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
  }

  .store-pwa-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .store-pwa-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    min-width: 0;
    flex: 1;
  }

  .store-pwa-logo-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
  }

  .store-pwa-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .store-pwa-logo-box i {
    font-size: 1.15rem;
  }

  .store-pwa-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .store-pwa-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Space Grotesk', sans-serif;
  }

  .store-pwa-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
  }

  .store-pwa-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  /* Mode Switch Pill on Mobile Topbar */
  .store-pwa-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
  }

  .store-pwa-mode-pill.mode-blud {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
  }
  .store-pwa-mode-pill.mode-blud:active {
    background: #d1fae5;
    transform: scale(0.96);
  }

  .store-pwa-mode-pill.mode-tefa {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
  }
  .store-pwa-mode-pill.mode-tefa:active {
    background: #fef3c7;
    transform: scale(0.96);
  }

  .store-pwa-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
  }

  .store-pwa-btn:active {
    transform: scale(0.93);
    background: #f1f5f9;
  }

  .pwa-mobile-search-collapse {
    padding-top: 8px;
  }
  .pwa-mobile-search-collapse .store-search-form {
    margin-bottom: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

  /* Compact Horizontal Category Pill Scroll on Mobile */
  .store-cat-bar {
    padding: 8px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    background: #ffffff;
  }
  .store-cat-bar .container {
    padding: 0 14px;
  }
  .store-cat-bar .d-flex {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .store-cat-bar .d-flex::-webkit-scrollbar {
    display: none;
  }
  .store-cat-pill {
    padding: 6px 14px;
    font-size: 0.78rem;
    white-space: nowrap;
    border-radius: 999px;
  }
}

/* 2. Docked Bottom Navigation Tweaks for Store */
@media (max-width: 991.98px) {
  body.theme-blud .pwa-bottom-item.active {
    color: #10b981 !important;
  }
  body.theme-blud .pwa-bottom-item.active .pwa-bottom-icon-wrap i {
    color: #10b981 !important;
  }
  body.theme-blud .pwa-bottom-item.active .pwa-bottom-label {
    color: #10b981 !important;
  }
  body.theme-blud .pwa-bottom-item.active::after {
    background: #10b981 !important;
  }

  body.theme-tefa .pwa-bottom-item.active {
    color: #f59e0b !important;
  }
  body.theme-tefa .pwa-bottom-item.active .pwa-bottom-icon-wrap i {
    color: #f59e0b !important;
  }
  body.theme-tefa .pwa-bottom-item.active .pwa-bottom-label {
    color: #f59e0b !important;
  }
  body.theme-tefa .pwa-bottom-item.active::after {
    background: #f59e0b !important;
  }

  .pwa-bottom-item.pwa-bottom-wa-btn .pwa-bottom-icon-wrap i {
    color: #25d366 !important;
    animation: pulseWA 2s infinite ease-in-out;
  }

  @keyframes pulseWA {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
  }

  /* PWA Install Banner Position on Store */
  .pwa-install-banner {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    left: 14px !important;
    right: 14px !important;
    border-radius: 18px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2) !important;
    z-index: 1044 !important;
  }
}

/* 3. Dedicated Store Drawer Header Gradients */
.affan-drawer-header.tefa-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 60%, #b45309 100%) !important;
}

.affan-drawer-header.blud-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 60%, #047857 100%) !important;
}

/* Switcher Card inside Drawer */
.pwa-drawer-mode-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

.pwa-drawer-mode-btn {
  flex: 1;
  text-align: center;
  padding: 7px 4px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.2);
}

.pwa-drawer-mode-btn.active {
  background: #ffffff;
  color: #0f172a !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pwa-drawer-mode-btn.active i {
  color: #f59e0b;
}
.theme-blud .pwa-drawer-mode-btn.active i {
  color: #10b981;
}

/* 4. Quick Category Sheet Modal */
.pwa-category-sheet {
  border-radius: 24px 24px 0 0 !important;
  border: none !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15) !important;
}

.pwa-cat-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 8px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none !important;
  color: #1e293b;
  transition: all 0.2s ease;
  height: 100%;
}

.pwa-cat-grid-item:active {
  transform: scale(0.96);
  background: #eff6ff;
  border-color: #93c5fd;
}

.pwa-cat-grid-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.pwa-cat-grid-label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

/* ==========================================================================
   5. DARK MODE ADAPTATIONS FOR STORE ([data-pwa-theme="dark"])
   ========================================================================== */
[data-pwa-theme="dark"] body.store-body {
  background-color: #0b0f17 !important;
  color: #f1f5f9 !important;
}

[data-pwa-theme="dark"] .store-pwa-mobile-topbar {
  background: rgba(15, 23, 42, 0.94) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-pwa-theme="dark"] .store-pwa-logo-box {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-pwa-theme="dark"] .store-pwa-title {
  color: #ffffff !important;
}

[data-pwa-theme="dark"] .store-pwa-subtitle {
  color: #94a3b8 !important;
}

[data-pwa-theme="dark"] .store-pwa-btn {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
}

[data-pwa-theme="dark"] .store-cat-bar {
  background: #0f172a !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

[data-pwa-theme="dark"] .store-cat-pill {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

[data-pwa-theme="dark"] .store-cat-pill.active {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

[data-pwa-theme="dark"] .product-card-cartzilla {
  background: #131b2a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-pwa-theme="dark"] .product-card-cartzilla:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5) !important;
}

[data-pwa-theme="dark"] .product-title a {
  color: #ffffff !important;
}

[data-pwa-theme="dark"] .product-price-current {
  color: #38bdf8 !important;
}

[data-pwa-theme="dark"] .store-filter-card {
  background: #131b2a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-pwa-theme="dark"] .store-filter-title {
  color: #ffffff !important;
}

[data-pwa-theme="dark"] .store-search-form {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-pwa-theme="dark"] .store-search-input {
  color: #ffffff !important;
}

[data-pwa-theme="dark"] .store-search-input::placeholder {
  color: #64748b !important;
}

[data-pwa-theme="dark"] .store-navbar {
  background: #0f172a !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

[data-pwa-theme="dark"] .store-brand-title {
  color: #ffffff !important;
}

[data-pwa-theme="dark"] .pwa-category-sheet {
  background: #131b2a !important;
  color: #ffffff !important;
}

[data-pwa-theme="dark"] .pwa-cat-grid-item {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
}

[data-pwa-theme="dark"] .pwa-cat-grid-icon {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #38bdf8 !important;
}

