/* ==========================================================================
   Helha (حِلها) E-Commerce Store - Modern Arabic RTL Stylesheet
   ========================================================================== */

:root {
  color-scheme: light only !important;
  forced-color-adjust: none !important;
  --primary: #175349;
  --primary-hover: #0f3d35;
  --primary-light: #e8f4f2;
  --primary-glow: rgba(23, 83, 73, 0.15);
  
  --secondary: #f3a824;
  --secondary-hover: #e09618;
  --secondary-light: #fef7ec;
  
  --coral: #e85d5d;
  --coral-hover: #d24646;
  --coral-light: #fdf0f0;
  
  --dark: #1e293b;
  --dark-soft: #334155;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --bg-page: #faf8f5;
  --bg-card: #ffffff;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px -2px rgba(23, 83, 73, 0.08), 0 2px 6px -1px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 28px -6px rgba(23, 83, 73, 0.12), 0 4px 12px -2px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 48px -12px rgba(23, 83, 73, 0.18);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif;
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  color-scheme: light only !important;
  forced-color-adjust: none !important;
  background-color: var(--bg-page) !important;
  color: var(--dark) !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  position: relative;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  position: relative;
  line-height: 1.6;
  color-scheme: light only !important;
  forced-color-adjust: none !important;
  background-color: var(--bg-page) !important;
  color: var(--dark) !important;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Announcement Bar
   -------------------------------------------------------------------------- */
.top-bar {
  background: linear-gradient(90deg, #175349 0%, #1e6b5e 50%, #175349 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0;
  text-align: center;
  position: relative;
  z-index: 100;
}

.top-bar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.top-bar .badge-gold {
  background: var(--secondary);
  color: #1a1a1a;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Main Navigation
   -------------------------------------------------------------------------- */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--primary-light);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 700;
}

/* Search Bar */
.search-wrapper {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-input-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  transition: var(--transition);
}

.search-input-group:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.search-icon {
  color: var(--gray);
  margin-left: 0.65rem;
  font-size: 1.1rem;
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--dark);
  outline: none;
}

.search-input::placeholder {
  color: var(--gray-light);
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--gray);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn:hover {
  background: #e2e8f0;
  color: var(--dark);
}

/* Instant Live Search Dropdown */
.search-live-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(23, 83, 73, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1.5px solid var(--border);
  z-index: 10000;
  overflow: hidden;
  animation: searchDropIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchDropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-dropdown-header {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 700;
}

.search-dropdown-header strong {
  color: var(--primary);
}

.search-dropdown-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.4rem 0;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover,
.search-dropdown-item.active {
  background: #f0fdf4;
}

.search-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.search-item-details {
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-sub {
  font-size: 0.78rem;
  color: var(--gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-price-col {
  text-align: left;
  flex-shrink: 0;
}

.search-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.search-item-old-price {
  font-size: 0.75rem;
  color: var(--gray);
  text-decoration: line-through;
}

.search-dropdown-footer {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.search-dropdown-footer:hover {
  background: #e2e8f0;
  color: var(--primary-hover);
}

.search-dropdown-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--gray);
}

.search-dropdown-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.search-highlight {
  background: #fef08a;
  color: #854d0e;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 800;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-size: 1.15rem;
  position: relative;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.btn-icon:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.cart-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--coral);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.btn-admin-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark-soft);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.btn-admin-link:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 1.5rem 0 2rem;
}

.hero-banner-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #ffffff;
  border: 1px solid rgba(23, 83, 73, 0.1);
  display: flex;
  flex-direction: column;
}

.hero-img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fdfbf7;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  width: 100%;
  height: auto;
  max-height: 580px;
  display: block;
  object-fit: contain;
  object-position: top center;
  transition: transform 0.4s ease;
}

.hero-banner-card:hover .hero-img {
  transform: scale(1.015);
}

.hero-bottom-bar {
  background: linear-gradient(135deg, #175349 0%, #1e6b5e 100%);
  color: #ffffff;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-text-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.hero-text-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-primary {
  background: var(--secondary);
  color: #1a1a1a;
  font-weight: 700;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(243, 168, 36, 0.35);
}

.btn-primary:hover {
  background: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(243, 168, 36, 0.45);
}

.btn-outline-white {
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #ffffff;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.btn-outline-white:hover {
  background: #ffffff;
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   Trust Badges (المميزات)
   -------------------------------------------------------------------------- */
.features-strip {
  padding: 1rem 0 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.feature-box {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.feature-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
}

.feature-info p {
  font-size: 0.8rem;
  color: var(--gray);
}

/* --------------------------------------------------------------------------
   Categories & Filter Tabs
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-wrap h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.section-title-wrap p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

.category-tabs {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--dark-soft);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

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

.cat-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* --------------------------------------------------------------------------
   Products Grid
   -------------------------------------------------------------------------- */
.products-section {
  padding: 1rem 0 3.5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.6rem;
}

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

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(23, 83, 73, 0.25);
}

.product-thumb {
  position: relative;
  width: 100%;
  padding-top: 85%; /* 4:3 aspect ratio */
  background: #f8fafc;
  overflow: hidden;
  cursor: pointer;
}

.product-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.product-card:hover .product-thumb img {
  transform: scale(1.06);
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--coral);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(232, 93, 93, 0.3);
}

.badge-demo {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(30, 41, 59, 0.85);
  color: #f1f5f9;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  z-index: 2;
}

.product-details {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category-tag {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
  cursor: pointer;
}

.product-title:hover {
  color: var(--primary);
}

.product-subtitle {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.35;
  margin-bottom: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 0.85rem;
}

.product-rating {
  color: #f59e0b;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.product-price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  margin-bottom: 0.85rem;
}

.price-box {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.current-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

.current-price small {
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 2px;
}

.old-price {
  font-size: 0.85rem;
  color: var(--gray-light);
  text-decoration: line-through;
}

.stock-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #10b981;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.btn-add-cart {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.btn-add-cart:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-quick-view {
  background: var(--primary-light);
  color: var(--primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: var(--transition);
}

.btn-quick-view:hover {
  background: var(--primary);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Empty / Loading State
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 3.5rem;
  color: var(--gray-light);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--gray);
  max-width: 400px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Cart Drawer (Slide-Over)
   -------------------------------------------------------------------------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  z-index: 1001;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-overlay.active .cart-drawer {
  transform: translateX(0);
}

.cart-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cart-header-title h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.btn-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-size: 1.1rem;
  transition: var(--transition);
}

.btn-close:hover {
  background: var(--coral-light);
  color: var(--coral);
}

.free-shipping-bar {
  background: var(--secondary-light);
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(243, 168, 36, 0.2);
  color: #85530a;
}

.free-shipping-progress {
  height: 6px;
  background: #fde8b8;
  border-radius: var(--radius-full);
  margin-top: 0.4rem;
  overflow: hidden;
}

.free-shipping-progress-fill {
  height: 100%;
  background: var(--secondary);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.3s ease;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  gap: 0.95rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--dark);
  background: #ffffff;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.qty-value {
  width: 32px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.btn-remove-item {
  color: var(--gray-light);
  font-size: 0.82rem;
  transition: var(--transition);
}

.btn-remove-item:hover {
  color: var(--coral);
}

.cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 0.4rem;
}

.cart-total-line {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
  margin-bottom: 1rem;
}

.btn-checkout {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-checkout:hover {
  background: var(--primary-hover);
}

/* --------------------------------------------------------------------------
   Modal Dialogs (Quick View & Checkout)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.modal-body {
  padding: 1.5rem;
}

/* Quick View Layout */
.quick-view-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
}

.quick-view-img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  object-fit: cover;
  max-height: 360px;
}

.features-list {
  list-style: none;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.features-list li {
  font-size: 0.88rem;
  color: var(--dark-soft);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.features-list li::before {
  content: '✓';
  color: #10b981;
  font-weight: bold;
}

/* Checkout Form */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.35rem;
}

.form-label span.req {
  color: var(--coral);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--dark);
  transition: var(--transition);
  background: #f8fafc;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.order-review-box {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.payment-notice {
  background: var(--secondary-light);
  border: 1px solid rgba(243, 168, 36, 0.3);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #85530a;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

/* Success Order Modal */
.success-box {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.25rem;
  animation: bounce 0.6s ease;
}

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

.order-code {
  display: inline-block;
  background: #f1f5f9;
  border: 1px dashed var(--border);
  padding: 0.35rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.85rem 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #113832;
  color: #ffffff;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

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

.footer-brand h4 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary);
  transform: translateX(-4px);
}

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

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  animation: slideIn 0.3s ease;
  border-right: 4px solid var(--secondary);
}

.toast.success { border-right-color: #10b981; }
.toast.error { border-right-color: var(--coral); }

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

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .quick-view-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal spill from container */
  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Top Announcement Bar */
  .top-bar {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .top-bar-content {
    font-size: 0.78rem;
    gap: 0.35rem;
    padding: 0 0.5rem;
    flex-wrap: wrap;
  }
  #announcement-extra {
    display: none !important;
  }

  /* Main Navbar Containment */
  .navbar {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .nav-container {
    padding: 0.5rem 0.85rem;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .brand {
    gap: 0.5rem;
    max-width: 62%;
    flex-shrink: 1;
  }
  .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .brand-title {
    font-size: 1.2rem;
    line-height: 1.15;
  }
  .brand-tagline {
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-actions {
    gap: 0.45rem;
    flex-shrink: 0;
    align-items: center;
  }
  /* In top bar on mobile, hide the text links (Deals & Track) because they are prominent in the bottom bar dock! */
  .nav-actions .btn-admin-link:not(#nav-pwa-btn) {
    display: none !important;
  }
  #nav-pwa-btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    gap: 0.25rem;
    white-space: nowrap;
  }
  #nav-cart-btn {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }

  .search-wrapper {
    order: 3;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0;
  }
  .search-input-group {
    padding: 0.35rem 0.85rem;
  }
  .search-input {
    font-size: 0.88rem;
  }

  /* Standalone Pages Header */
  .site-header {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .site-header nav {
    display: none !important; /* Fully handled by prominent mobile bottom app bar */
  }

  .hero-bottom-bar {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }
  .hero-actions {
    width: 100%;
    justify-content: center;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .products-grid {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 1.1rem;
  }
  .brand-tagline {
    display: none;
  }
  #nav-pwa-btn span:last-child {
    display: none; /* Icon only on extra small mobile screens to prevent squeeze */
  }
  #nav-pwa-btn {
    padding: 0.45rem 0.55rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   PWA Floating Install Banner Styles
   -------------------------------------------------------------------------- */
.pwa-banner-card {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: 24px;
  max-width: 500px;
  margin: 0 auto;
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(23, 83, 73, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 10000000 !important;
  animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pwaSlideUp {
  from { transform: translateY(80px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pwaSlideDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(80px); opacity: 0; }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.pwa-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  flex-shrink: 0;
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
}

.pwa-banner-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary);
}

.pwa-banner-sub {
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.3;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pwa-btn-install {
  background: linear-gradient(135deg, var(--primary) 0%, #0f3d35 100%);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(23, 83, 73, 0.2);
  transition: var(--transition);
}

.pwa-btn-install:hover {
  background: var(--secondary);
  color: var(--dark);
  transform: translateY(-2px);
}

.pwa-btn-close {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.pwa-btn-close:hover {
  background: #e2e8f0;
  color: var(--dark);
}

@media (max-width: 768px) {
  .pwa-banner-card {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px !important;
    left: 12px !important;
    max-width: 480px !important;
    z-index: 10000000 !important;
  }
}

@media (max-width: 540px) {
  .pwa-banner-card {
    flex-direction: column;
    align-items: stretch;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    right: 10px !important;
    left: 10px !important;
    padding: 0.85rem !important;
    z-index: 10000000 !important;
  }
  .pwa-banner-actions {
    justify-content: space-between;
    margin-top: 0.5rem;
    width: 100%;
  }
  .pwa-btn-install {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   FORCE 100% LIGHT MODE (OVERRIDE ANY OS / MOBILE DARK MODE)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root, html, body {
    color-scheme: light only !important;
    forced-color-adjust: none !important;
    background-color: #faf8f5 !important;
    color: #1e293b !important;
  }

  .site-header, .site-footer, .modal-dialog, .slide-drawer,
  .product-card, .category-card, .feature-card, .order-card,
  .form-control, .form-input, .checkout-input, .checkout-select,
  .checkout-textarea, .panel-card, .settings-box, .pwa-banner-card,
  .quick-view-box, .success-box, .mobile-bottom-nav {
    color-scheme: light only !important;
    forced-color-adjust: none !important;
  }
}

/* ==========================================================================
   CHECKOUT RETURN POLICY AGREEMENT CHECKBOX COMPONENT
   ========================================================================== */
.checkout-agreement-wrap {
  margin: 1.15rem 0 1rem 0;
  padding: 0.95rem 1.1rem;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm, 10px);
  transition: var(--transition, all 0.25s ease);
}

.checkout-agreement-wrap:hover {
  border-color: #0284c7;
  background: #f0f9ff;
}

.checkout-agreement-wrap.has-error {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  animation: shakeAgreement 0.4s ease;
}

.checkout-agreement-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #1e293b;
  font-weight: 700;
  user-select: none;
}

.checkout-agreement-checkbox {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  accent-color: #0284c7;
  cursor: pointer;
  border-radius: 4px;
}

.checkout-agreement-link {
  color: #0284c7 !important;
  background: #e0f2fe;
  border: 1.5px solid #7dd3fc;
  padding: 3px 10px;
  border-radius: 6px;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  font-weight: 900 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
}

.checkout-agreement-link:hover {
  background: #bae6fd;
  color: #0369a1 !important;
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}

.policy-error-msg {
  display: none;
  color: #dc2626;
  font-size: 0.88rem;
  font-weight: 800;
  margin-top: 0.5rem;
  padding-right: 0.25rem;
  animation: fadeIn 0.25s ease;
}

@keyframes shakeAgreement {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ==========================================================================
   MOBILE BOTTOM APP NAVIGATION BAR (PROMINENT NATIVE APP EXPERIENCE)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
    background: #ffffff !important;
    border-top: 2px solid #e2e8f0 !important;
    box-shadow: 0 -4px 25px rgba(23, 83, 73, 0.12), 0 -1px 4px rgba(0, 0, 0, 0.06) !important;
    z-index: 9999999 !important;
    padding: 6px 0.35rem env(safe-area-inset-bottom, 0px) 0.35rem !important;
    justify-content: space-around !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .mobile-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    height: 100% !important;
    color: #64748b !important;
    text-decoration: none !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    position: relative !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
    gap: 3px !important;
    border-radius: 12px !important;
    padding: 3px 2px !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mobile-nav-item .nav-icon-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 30px !important;
    border-radius: 16px !important;
    transition: all 0.25s ease !important;
    position: relative !important;
  }

  .mobile-nav-item .nav-svg {
    width: 22px !important;
    height: 22px !important;
    transition: transform 0.22s ease, stroke 0.22s ease, fill 0.22s ease !important;
  }

  .mobile-nav-item .nav-svg-fire {
    color: #f97316 !important;
    fill: #f97316 !important;
  }

  .mobile-nav-item .nav-label {
    line-height: 1.15 !important;
    transition: color 0.2s ease, font-weight 0.2s ease !important;
  }

  /* Active & Hover States */
  .mobile-nav-item:hover,
  .mobile-nav-item.active {
    color: var(--primary, #175349) !important;
  }

  .mobile-nav-item.active {
    font-weight: 800 !important;
  }

  .mobile-nav-item.active .nav-icon-wrap {
    background: #e8f4f2 !important;
    color: var(--primary, #175349) !important;
    transform: translateY(-2px) !important;
  }

  .mobile-nav-item.active .nav-svg {
    stroke: var(--primary, #175349) !important;
    transform: scale(1.08) !important;
  }

  .mobile-nav-item.active .nav-svg-fire {
    color: #ea580c !important;
    fill: #ea580c !important;
  }

  .mobile-nav-item.active::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    width: 32px !important;
    height: 3.5px !important;
    background: var(--primary, #175349) !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 2px 6px rgba(23, 83, 73, 0.4) !important;
  }

  /* Cart Badge */
  .mobile-nav-badge {
    position: absolute !important;
    top: -2px !important;
    right: -6px !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 4px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #ffffff !important;
    line-height: 1 !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4) !important;
  }
}


