/* ==========================================================================
   Apex Hardware Premium Storefront - Light Retail Tech Theme
   Inspired by Compulago & professional e-commerce stores
   ========================================================================== */

/* --- 1. Custom Properties & Layout Grid System --- */
:root {
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-secondary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Color Palette (Clean White, Soft Grays, and Vibrant Lime Green Accents) */
  --bg-deep: #f6f6f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #fafafc;
  --border-subtle: #e5e7eb;
  --border-active: #84b819;
  
  /* Brand Accent Colors */
  --brand-green: #84b819; /* Compulago Lime Green */
  --brand-green-hover: #72a113;
  --brand-blue: #0066ff;
  
  /* Text Contrast Hierarchy */
  --text-pure: #111827; /* Dark gray for primary text */
  --text-sub: #4b5563;  /* Medium gray */
  --text-dim: #9ca3af;  /* Light gray */
  
  /* Shadow & Glow Systems */
  --shadow-flat: 0 4px 15px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.07);
  --shadow-modal: 0 25px 60px rgba(0, 0, 0, 0.12);
  
  /* Radii & Timing */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition-normal: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 0.15s ease-out;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  font-family: var(--font-primary);
  color: var(--text-pure);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  position: relative;
}

body.drawer-open {
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-green);
}

/* --- 3. Top Announcement Info Bar --- */
.top-announcement-bar {
  background: #111827; /* Dark slate header bar */
  font-family: var(--font-secondary);
  font-size: 0.72rem;
  color: #e5e7eb;
  padding: 0.55rem 1rem;
  z-index: 101;
}

.top-bar-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: #e5e7eb;
  transition: color var(--transition-fast);
}

.contact-item:hover {
  color: var(--brand-green);
}

.top-bar-icon {
  width: 12px;
  height: 12px;
  color: var(--brand-green);
}

.divider {
  color: rgba(255, 255, 255, 0.2);
}

.help-text {
  color: #9ca3af;
}

.top-bar-links span {
  font-weight: 500;
}

/* --- 4. Floating Island Navigation Header (Light Glass navbar) --- */
.main-header {
  position: sticky;
  top: 1rem;
  z-index: 99;
  max-width: 1300px;
  width: calc(100% - 2rem);
  margin: 1rem auto 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-flat);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.main-header:hover {
  border-color: rgba(132, 184, 25, 0.2);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.header-container {
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-pure);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  transition: var(--transition-normal);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: var(--transition-normal);
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.logo-container:hover .logo-icon {
  transform: rotate(5deg) scale(1.05);
}

.logo-text {
  font-family: var(--font-primary);
}

.text-accent {
  color: var(--brand-green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Live Badge Indicator */
.connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f3f4f6;
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-secondary);
  color: var(--text-sub);
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--brand-green);
  border-radius: 50%;
  position: relative;
}

.status-pulse-dot::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 50%;
  background-color: var(--brand-green);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Header Cart Button */
.header-cart-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f3f4f6;
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-pure);
  cursor: pointer;
  outline: none;
  font-family: var(--font-secondary);
  font-weight: 600;
  position: relative;
  transition: all var(--transition-normal);
}

.header-cart-btn:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.cart-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-pure);
}

.cart-icon-wrapper svg {
  width: 16px;
  height: 16px;
}

.cart-badge-count {
  background: var(--brand-green);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(132, 184, 25, 0.3);
}

/* --- 5. Hero Section --- */
.hero-section {
  max-width: 1300px;
  margin: 3rem auto 1.5rem;
  padding: 0 1rem;
}

.hero-badge {
  font-family: var(--font-secondary);
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-sub);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-flat);
}

.hero-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: 0.5rem;
  color: var(--text-pure);
}

.gradient-text {
  color: var(--brand-green);
}

.hero-description {
  font-family: var(--font-secondary);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: var(--text-sub);
  max-width: 600px;
  line-height: 1.6;
}

/* --- 6. Sleek Promotional Banner (Retail Style) --- */
.promo-slider-section {
  max-width: 1300px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
}

.promo-container {
  background: linear-gradient(135deg, #e8f5cb 0%, #ffffff 100%);
  border: 1px solid #d2e4a6;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-flat);
}

.promo-slide {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2rem;
  padding: 3rem;
  align-items: center;
}

.promo-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.promo-tag {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-green-hover);
  letter-spacing: 1.5px;
  margin-bottom: 0.75rem;
}

.promo-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  color: #111827;
}

.promo-subtitle {
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 1.75rem;
  max-width: 500px;
}

.promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #111827;
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all var(--transition-normal);
}

.promo-btn:hover {
  background: #1f2937;
  transform: translateY(-2px);
}

.promo-btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-normal);
}

.promo-btn:hover svg {
  transform: translateX(3px);
}

.promo-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Floating animation for setup art */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.promo-vector {
  width: 100%;
  max-width: 170px;
  height: auto;
  animation: float 4s ease-in-out infinite;
}

/* --- 7. Controls Section (Search Input) --- */
.catalog-section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1rem 5rem;
  width: 100%;
}

.controls-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-flat);
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 450px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: var(--transition-normal);
}

.search-icon svg {
  width: 16px;
  height: 16px;
}

#search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  background: #f9fafb;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-secondary);
  color: var(--text-pure);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-normal);
}

#search-input:focus {
  border-color: var(--brand-green);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(132, 184, 25, 0.1);
}

#search-input:focus + .search-icon {
  color: var(--brand-green);
}

.clear-search-btn {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 50%;
  transition: var(--transition-normal);
}

.clear-search-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-pure);
}

.clear-search-btn svg {
  width: 12px;
  height: 12px;
}

.stats-wrapper {
  font-family: var(--font-secondary);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* --- 8. Custom Category Capsules Grid (Inspired by Compulago) --- */
.categories-wrapper {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.85rem;
  padding: 0.25rem 0.25rem 1.25rem;
  margin-bottom: 2rem;
  scrollbar-width: none;
}

.categories-wrapper::-webkit-scrollbar {
  display: none;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-flat);
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.category-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--text-sub);
  transition: all var(--transition-normal);
}

.category-icon-wrapper svg {
  width: 18px;
  height: 18px;
}

.category-label {
  font-family: var(--font-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all var(--transition-normal);
}

/* Hover & Active states */
.category-btn:hover {
  background: var(--bg-surface-hover);
  border-color: #d1d5db;
  color: var(--text-pure);
}

.category-btn:hover .category-icon-wrapper {
  color: var(--brand-green);
}

.category-btn.active {
  background: rgba(132, 184, 25, 0.08);
  border-color: var(--brand-green);
  color: var(--brand-green-hover);
  box-shadow: 0 4px 10px rgba(132, 184, 25, 0.1);
}

.category-btn.active .category-icon-wrapper {
  color: var(--brand-green);
}

/* --- 9. Minimalist Product Cards Grid (Light mode) --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-flat);
  transition: all var(--transition-normal);
  position: relative;
  cursor: pointer;
}

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

.card-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1.35;
  overflow: hidden;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal), filter var(--transition-normal);
}

.product-card:hover .card-image {
  transform: scale(1.03);
}

/* Fallback default block */
.image-fallback-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: var(--text-dim);
  gap: 0.5rem;
}

.image-fallback svg {
  width: 38px;
  height: 38px;
  opacity: 0.5;
}

.fallback-text {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-sub);
}

/* Category Badge Card */
.card-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-subtle);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-sub);
  backdrop-filter: blur(4px);
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Content Details block */
.card-content {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.card-brand {
  font-family: var(--font-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

/* Stock status indicators with Pulsing dot micro-animations */
.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-secondary);
  font-size: 0.68rem;
  font-weight: 700;
}

.stock-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: relative;
}

/* Pulse animation on status dots */
@keyframes dotPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

.stock-badge.in-stock { color: #10b981; }
.stock-badge.in-stock .dot { background-color: #10b981; }
.stock-badge.in-stock .dot::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 50%;
  background-color: #10b981;
  animation: dotPulse 2s infinite ease-in-out;
}

.stock-badge.low-stock { color: #ff9800; }
.stock-badge.low-stock .dot { background-color: #ff9800; }
.stock-badge.low-stock .dot::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 50%;
  background-color: #ff9800;
  animation: dotPulse 2s infinite ease-in-out;
}

.stock-badge.order-stock { color: #3b82f6; }
.stock-badge.order-stock .dot { background-color: #3b82f6; }

.stock-badge.out-of-stock { color: #ef4444; }
.stock-badge.out-of-stock .dot { background-color: #ef4444; }

/* Stars Rating */
.rating-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  color: var(--text-sub);
}

.stars-row {
  display: flex;
  gap: 1px;
}

.rating-text {
  font-weight: 600;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 0.5rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3rem;
}

.card-description {
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3.8rem;
}

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

.card-price-container {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-family: var(--font-secondary);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-pure);
}

/* Buy / Add to Cart Action Button */
.card-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(132, 184, 25, 0.08);
  border: 1px solid rgba(132, 184, 25, 0.15);
  color: var(--brand-green);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.product-card:hover .card-action-btn {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(132, 184, 25, 0.25);
}

.card-action-btn svg {
  width: 16px;
  height: 16px;
}

/* --- 10. Skeletal Loaders --- */
.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 380px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-flat);
}

.skeleton-thumb {
  width: 100%;
  aspect-ratio: 1.35;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loadingPulse 1.5s infinite;
}

.skeleton-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.skeleton-line {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loadingPulse 1.5s infinite;
  border-radius: 3px;
}

.skeleton-title { height: 18px; width: 75%; margin-bottom: 0.75rem; }
.skeleton-desc-1 { height: 12px; width: 100%; margin-bottom: 0.5rem; }
.skeleton-desc-2 { height: 12px; width: 85%; margin-bottom: 1.25rem; }
.skeleton-price { height: 16px; width: 70px; }
.skeleton-btn { height: 34px; width: 34px; border-radius: var(--radius-sm); }

@keyframes loadingPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- 11. Empty and Error States --- */
.status-state-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-flat);
}

.state-icon {
  margin-bottom: 1.25rem;
  color: var(--text-dim);
}

.state-icon svg { width: 44px; height: 44px; }
.state-icon.error-icon { color: #ef4444; }
.state-icon.empty-icon { color: var(--brand-blue); }

.state-title {
  font-size: 1.30rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.state-message {
  font-family: var(--font-secondary);
  color: var(--text-sub);
  max-width: 380px;
  line-height: 1.5;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: #111827;
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  background: #1f2937;
}

.btn-primary svg { width: 14px; height: 14px; }

/* --- 12. Native Modal (<dialog>) styling --- */
.modal {
  border: none;
  background: transparent;
  max-width: 800px;
  width: calc(100% - 2rem);
  margin: auto;
  padding: 0;
  outline: none;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out forwards;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  width: 100%;
  box-shadow: var(--shadow-modal);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: #f3f4f6;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-normal);
}

.modal-close-btn:hover {
  background: #e5e7eb;
  color: var(--text-pure);
  transform: rotate(90deg);
}

.modal-close-btn svg { width: 14px; height: 14px; }

.modal-body { padding: 2rem; }

.modal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.25rem;
  align-items: start;
}

.modal-gallery {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  aspect-ratio: 1.25;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
}

.modal-details-info { display: flex; flex-direction: column; }

.modal-product-badge {
  font-family: var(--font-secondary);
  display: inline-flex;
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  background: #f3f4f6;
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-product-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-pure);
  line-height: 1.25;
  margin-top: 0.75rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.5px;
}

.modal-product-date {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.modal-product-date svg { width: 12px; height: 12px; }

.modal-product-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 1.25rem;
}

/* Modal Quantity Selector */
.modal-qty-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.modal-qty-label {
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.modal-qty-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.modal-qty-btn:hover {
  background: #e5e7eb;
  color: var(--text-pure);
}

.modal-qty-value {
  width: 40px;
  text-align: center;
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-pure);
}

/* Modal Add to Cart primary button */
.modal-add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--brand-green);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 10px rgba(132, 184, 25, 0.2);
  transition: all var(--transition-normal);
  width: 100%;
}

.modal-add-to-cart-btn:hover {
  background: var(--brand-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(132, 184, 25, 0.3);
}

.modal-add-to-cart-btn svg {
  width: 18px;
  height: 18px;
}

.modal-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-sub);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-product-description {
  font-family: var(--font-secondary);
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.55;
  margin-bottom: 1.75rem;
  white-space: pre-line;
}

.specs-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #f9fafb;
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
}

.spec-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-family: var(--font-secondary);
}

.spec-label { color: var(--text-sub); }
.spec-value { color: var(--text-pure); font-weight: 700; }

/* Dialog animation scale-in */
dialog[open] {
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- 13. Shopping Cart Side Drawer Layout (Light) --- */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.cart-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  max-width: 100%;
  height: 100%;
  background: #ffffff;
  border-left: 1px solid var(--border-subtle);
  z-index: 200;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  transition: right var(--transition-normal);
}

.cart-drawer.open {
  right: 0;
}

.cart-drawer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.cart-drawer-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-pure);
}

.cart-drawer-close {
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.cart-drawer-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-pure);
}

.cart-drawer-close svg { width: 14px; height: 14px; }

/* Drawer List Body scroll */
.cart-drawer-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Empty Cart State inside Drawer */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  height: 100%;
  color: var(--text-dim);
  gap: 1rem;
}

.cart-empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.cart-empty-text {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* Cart Item card */
.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cart-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-pure);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-pure);
}

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

/* Quantity selector */
.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.qty-btn:hover {
  background: #e5e7eb;
  color: var(--text-pure);
}

.qty-value {
  width: 28px;
  text-align: center;
  font-family: var(--font-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-pure);
}

/* Trash Item */
.btn-cart-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-normal);
}

.btn-cart-remove:hover {
  color: #ef4444;
}

.btn-cart-remove svg {
  width: 14px;
  height: 14px;
}

/* Cart Footer section */
.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: #f9fafb;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.total-label {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-sub);
}

.total-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-pure);
}

.cart-disclaimer {
  font-family: var(--font-secondary);
  font-size: 0.72rem;
  color: var(--text-sub);
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.btn-checkout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem;
  background: #25d366; /* Official WhatsApp green */
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
  transition: all var(--transition-normal);
}

.btn-checkout:hover {
  background: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
}

/* --- 14. Minimalist Footer --- */
.main-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem 2.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.footer-tagline {
  font-family: var(--font-secondary);
  color: var(--text-sub);
  font-size: 0.85rem;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-secondary);
  font-size: 0.78rem;
  color: var(--text-sub);
  flex-wrap: wrap;
  gap: 1rem;
}

.status-badge-footer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #f3f4f6;
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-sub);
}

.pulse-dot-green {
  width: 6px;
  height: 6px;
  background-color: var(--brand-green);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulse-dot-green::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--brand-green);
  animation: pulse 2s infinite ease-in-out;
}

/* --- 14. Floating WhatsApp Button --- */
.whatsapp-floating {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 0 10px rgba(37, 211, 102, 0.1);
  z-index: 98;
  transition: all var(--transition-normal);
}

.whatsapp-floating:hover {
  transform: scale(1.1) translateY(-2px);
  background-color: #20ba59;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-floating svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
  stroke: none;
}

/* --- 15. Responsive Adaptations --- */
@media (max-width: 992px) {
  .promo-slide {
    padding: 2.25rem;
  }
}

@media (max-width: 768px) {
  .top-announcement-bar {
    font-size: 0.68rem;
    text-align: center;
  }
  .top-bar-container {
    justify-content: center;
  }
  
  .main-header {
    top: 0.5rem;
  }
  
  .promo-slide {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    text-align: center;
  }
  
  .promo-content {
    align-items: center;
  }
  
  .promo-vector {
    max-width: 140px;
  }
  
  .cart-drawer {
    width: 100%;
    right: -100%;
  }
  
  .modal-qty-container {
    justify-content: space-between;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
  }
}
