:root {
  /* ShopShout light theme with modern gradients */
  --bg: #f7f9fc;
  --panel: #ffffff;
  --panel-2: #f9fafb;
  --text: #0f172a;
  --muted: #4b5563;
  --brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);          /* primary gradient */
  --brand-gradient-hover: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);   /* hover gradient */
  --brand-solid: #667eea;    /* fallback solid color */
  --brand-solid-hover: #5a6fd8;  /* fallback hover */
  --accent: #eef2f7;         /* subtle surface */
  --accent-2: #e7edf4;       /* hover surface */
  --border: #e5e7eb;
  --danger: #ef4444;
  --success: #10b981;
  --shadow: rgba(16,24,40,.08);
  --ink: #0e1b2a;            /* deep navy for logo chip */
}

* { box-sizing: border-box; }
html, body { min-height: 100vh; height: auto; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, #fcfefe, var(--bg) 60%) fixed;
  display: flex;
  flex-direction: column;
  /* revert to document flow; allow normal page scroll */
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

main.container {
  min-height: calc(100vh - 400px); /* Ensure main content takes up space */
  flex: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--ink), #1a2f47);
  color: var(--brand-solid);
  font-weight: 800;
}
.brand-text { letter-spacing: .2px; color: #0b1220; }

.primary-nav { display: contents; }
.nav-toggle { display: none; }
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0; margin: 0;
}
.nav-list a {
  text-decoration: none;
  color: #334155;
  padding: 8px 10px;
  border-radius: 8px;
}
.nav-list a:hover { color: var(--text); background: var(--accent-2); }
.nav-list a.active { color: var(--text); background: var(--accent); }

.search {
  display: flex; align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  gap: 8px;
  box-shadow: 0 1px 2px var(--shadow);
  position: relative;
}
.search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  width: 220px;
}
.search-icon { color: var(--muted); }

/* Live search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  animation: fadeIn 0.15s ease-in-out;
}

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

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s;
}

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

.search-result-item:hover {
  background: var(--panel-2);
}

.search-result-image {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  padding: 4px;
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-brand {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.search-result-price {
  font-size: 14px;
  font-weight: 700;
  color: #10b981;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.price-row { display:grid; grid-template-columns: auto 1fr; gap:8px 10px; align-items:center; }
.price-row input[type="number"] { width: 100%; background: var(--panel); border:1px solid var(--border); color: var(--text); border-radius:8px; padding:6px 8px; }

/* Heading */
.page-heading {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f7fbff, transparent);
}
.heading-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 0;
}
.page-heading h1 { margin: 0; font-size: 1.8rem; }

.btn {
  background: var(--brand-gradient);
  color: white;
  border: 1px solid var(--brand-solid);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-height: 44px; /* Touch target size */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn:hover { background: var(--brand-gradient-hover); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--accent-2); }
.btn-primary { 
  display: inline-flex; 
  text-decoration: none;
  background: var(--brand-gradient);
  color: white;
  border: 1px solid var(--brand-solid);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-primary:hover { background: var(--brand-gradient-hover); }
.btn-pill { border-radius: 999px; background: var(--panel); color: var(--text); border-color: var(--border); }
.btn-pill.active { background: var(--brand-gradient); color: white; }
.icon-btn { background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 6px; cursor: pointer; }

.lang-switch { display:inline-flex; gap:6px; align-items:center; white-space:nowrap; }
.lang-switch .btn-pill { padding: 6px 10px; }
.lang-switch .flag-icon { width: 18px; height: 12px; margin-right: 6px; border-radius: 2px; box-shadow: 0 0 0 1px var(--border) inset; }

/* Layout */
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; padding: 24px 0; }

/* Filters */
.filters {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  position: sticky; top: 92px; height: fit-content;
  box-shadow: 0 10px 20px var(--shadow);
}

/* The product area is the only scrollable region on desktop */
.content { padding-right: 2px; }
.filters-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters h2 { margin: 0; font-size: 1.1rem; }
.filter-group { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.filter-group h3 { margin: 0 0 10px; font-size: .98rem; color: var(--muted); font-weight: 600; }

.range-label { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--brand-solid); }
/* slider UI removed; revert to number inputs */

.checkbox-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checkbox-list.two-cols { grid-template-columns: 1fr 1fr; }
.checkbox-list.scrollable-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel);
}
.checkbox-list label { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  color: var(--text);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.9rem;
}
.checkbox-list label:hover { background: var(--accent-2); }
.checkbox-list input { 
  accent-color: var(--brand-solid); 
  transform: scale(1.1);
  margin: 0;
}
.checkbox-list input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: var(--brand-solid);
}

.filters-actions { display: flex; gap: 8px; margin-top: 16px; }

/* Deals */
.deals-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* Shops grid */
.shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
  gap: 20px;
  padding: 8px 0;
  justify-content: center;
}

/* Mobile-responsive shops grid */
@media (max-width: 900px) {
  .shops-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    padding: 12px 4px;
  }
}

@media (max-width: 560px) {
  .shops-grid {
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid for smaller screens */
    gap: 14px;
    padding: 16px 8px;
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .shops-grid {
    grid-template-columns: repeat(2, 1fr); /* Keep 2x2 even on very small screens */
    gap: 12px;
    padding: 16px 4px;
  }
}
.shop-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  width: 100%;
  text-decoration: none;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 8px var(--shadow);
  color: #0f172a;
  padding: 12px 20px;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  /* Mobile touch improvements */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.shop-logo { 
  display: flex; 
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.shop-logo img { 
  width: auto; 
  height: 36px; 
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(5%); 
}
.shop-logo-fallback { 
  width: 40px; 
  height: 40px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  background: var(--brand-gradient); 
  color: white; 
  font-weight: 700; 
  font-size: 1rem; 
  border-radius: 8px; 
}
.shop-card:hover { 
  transform: translateY(-1px); 
  background: var(--panel); 
  box-shadow: 0 4px 12px var(--shadow);
}

.shop-card:hover .shop-logo img {
  filter: grayscale(0%);
}

/* Mobile-enhanced shop cards */
@media (max-width: 900px) {
  .shop-card {
    height: 70px;
    border-radius: 12px;
    min-height: 70px;
    padding: 14px 22px;
  }
}

@media (max-width: 560px) {
  .shop-card {
    height: 90px; /* Increased from 80px for bigger logos */
    min-height: 90px;
    padding: 16px; /* Reduced horizontal padding for 2x2 grid */
    border-radius: 14px;
  }
  
  .shop-card:active {
    transform: scale(0.96);
    background: var(--accent-2);
  }
}

@media (max-width: 390px) {
  .shop-card {
    height: 100px; /* Increased from 90px for bigger logos */
    min-height: 100px;
    padding: 16px 12px; /* Optimized padding for 2x2 grid */
    flex-direction: column; /* Keep vertical layout for better logo display */
    justify-content: center;
    gap: 8px;
    text-align: center;
  }
}

/* Mobile-enhanced shop logos - BIGGER for smaller screens */
@media (max-width: 560px) {
  .shop-logo {
    width: 100%; /* Take full width of card */
    height: 100%;
    flex-shrink: 0;
  }
  
  .shop-logo img {
    width: auto;
    height: 48px; /* Increased from 42px to 48px */
    max-width: 140px; /* Increased max-width */
  }
  
  .shop-logo-fallback {
    width: 56px; /* Increased from 54px */
    height: 56px;
    font-size: 1.4rem; /* Increased from 1.3rem */
    font-weight: 700;
  }
}

@media (max-width: 390px) {
  .shop-logo {
    width: 100%; /* Full width in 2x2 grid */
    height: 100%;
    min-width: 64px; /* Ensure minimum size */
  }
  
  .shop-logo img {
    width: auto;
    height: 52px; /* Even bigger on smallest screens */
    max-width: 160px; /* Increased max-width for smallest screens */
  }
  
  .shop-logo-fallback {
    width: 64px; /* Increased from 60px */
    height: 64px;
    font-size: 1.5rem; /* Increased from 1.4rem */
    font-weight: 700;
  }
}

/* Mobile-optimized shops section */
@media (max-width: 560px) {
  .shops-section {
    padding: 20px 0;
  }
  
  .shops-section .section-head {
    text-align: center;
    margin-bottom: 24px;
  }
  
  .shops-section .section-head p {
    font-size: 1.1rem; /* Larger on mobile */
    color: var(--text); /* Main text color instead of muted */
    font-weight: 500;
  }
  
  /* Error and no-shops messages on mobile */
  .no-shops-message, .error-message {
    padding: 30px 16px;
    font-size: 16px;
    line-height: 1.4;
  }
}

@media (max-width: 390px) {
  .shops-section .section-head p {
    font-size: 1rem; /* Responsive font size */
  }
  
  /* Mobile note: Search is hidden on screens < 560px via existing mobile CSS */
  /* This is consistent with the header search behavior on mobile */
}

/* Shop grid messages */
.no-shops-message, .error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 18px;
}
.error-message {
  color: var(--danger);
}

/* Store Detail Page Styles */
.loading-state, .error-state {
  text-align: center;
  padding: 80px 20px;
}

.loading-state .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-state {
  color: var(--text-muted);
}

.error-state .error-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.error-state h2 {
  color: var(--danger);
  margin-bottom: 16px;
}

.store-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Hero Store Section */
.store-hero-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
  overflow: hidden;
}

.store-hero-container {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 32px;
}

.store-image-container {
  flex-shrink: 0;
}

.store-main-image {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.store-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.store-main-image .store-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 48px;
  border-radius: 10px;
}

.store-details-container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
  min-width: 0;
}

.store-badge-section {
  margin: 0 0 6px 0;
}

.store-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  white-space: nowrap;
}

.store-main-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text);
  line-height: 1.2;
}

.store-meta-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
}

.meta-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.meta-label {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
}

.meta-value {
  color: var(--text-muted);
  font-weight: 500;
}

.meta-value.status-active {
  color: #10b981;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.store-pricing-info {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
}

.pricing-section {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pricing-label {
  font-weight: 500;
  color: var(--text);
}

.pricing-value {
  color: #10b981;
  font-weight: 600;
}

.store-action-buttons {
  display: flex;
  gap: 12px;
  margin: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-xl {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  white-space: nowrap;
}

/* Information Cards Section */
.store-info-cards {
  margin-bottom: 40px;
}

.info-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.info-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px var(--shadow);
}

.info-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: var(--text);
}

.statistics-content, .shipping-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-row, .shipping-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child, .shipping-item:last-child {
  border-bottom: none;
}

.stat-label, .shipping-label {
  font-weight: 500;
  color: var(--text);
}

.stat-value, .shipping-value {
  color: var(--text-muted);
  text-align: right;
  font-weight: 500;
}

.btn-accent {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* About Store Section */
.about-store-section {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 12px var(--shadow);
}

.about-store-section h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 24px 0;
  color: var(--text);
}

.about-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text);
}

.about-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Enhanced styling for formatted HTML descriptions */
.about-description {
  /* Ensure content can expand fully */
  overflow: visible;
  max-height: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.about-description h2 {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.about-description h3 {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 20px 0 12px 0;
  line-height: 1.3;
}

.about-description p {
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.about-description strong {
  color: var(--text);
  font-weight: 600;
}

.about-description ul, .about-description ol {
  margin: 12px 0 16px 0;
  padding-left: 24px;
}

.about-description li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.about-description em {
  font-style: italic;
  color: var(--text-muted);
}

.store-features {
  margin-bottom: 24px;
}

.store-features h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text);
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  padding: 8px 0;
  color: var(--text-muted);
  position: relative;
  padding-left: 24px;
}

.features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}


/* Products Section */
.store-products-section {
  margin-bottom: 40px;
}

.products-header {
  text-align: center;
  margin-bottom: 40px;
}

.products-header h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--text);
}

.products-header p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

/* Expand/Collapse Products Link */
.expand-products-link {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.expand-products-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  color:var(--brand-solid);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.expand-products-link a:hover {
  background: var(--bg-secondary);
  color: var(--primary-dark);
}

.expand-products-link a:after {
  content: '→';
  font-size: 18px;
  transition: transform 0.2s ease;
}

.expand-products-link a.show-less-link:after {
  content: '↑';
}

.expand-products-link a:hover:after {
  transform: translateX(4px);
}

.expand-products-link a.show-less-link:hover:after {
  transform: translateY(-2px);
}

/* Product Grid Animation */
#storeProductsGrid {
  transition: opacity 0.3s ease;
}

#storeProductsGrid.updating {
  opacity: 0.6;
}

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

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .store-hero-container {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    text-align: center;
  }
  
  .store-details-container {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
  
  .store-image-container {
    justify-content: center;
  }
  
  .store-main-image {
    width: 100px;
    height: 100px;
  }
  
  .store-main-title {
    font-size: 22px;
  }
  
  .store-action-buttons {
    flex-direction: column;
    margin-left: 0;
    width: 100%;
  }
  
  .btn-xl {
    width: 100%;
  }
  
  .info-cards-container {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .store-main-title {
    font-size: 28px;
  }
  
}

.deal-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: visible;
  display: grid;
  grid-template-rows: 160px auto;
  box-shadow: 0 10px 20px var(--shadow);
  position: relative;
}
.deal-media { background: linear-gradient(120deg, #e9eef5, #f3f5f8); position: relative; }
.product-media { position: relative; } /* Ensure product-media is a positioning context for discount badge */
.deal-body { padding: 14px; display: grid; gap: 8px; }
.deal-category { color: var(--muted); font-size: .85rem; }
.deal-title { margin: 0; font-size: 1.02rem; line-height: 1.35; }
.deal-prices { display: flex; align-items: baseline; gap: 10px; position: relative; }
.price-now { color: var(--text); font-weight: 700; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .9rem; }

/* Discount Badge - FIXED: Positioned on IMAGE area to never overlap text */
.discount-badge {
  background: #ef4444;
  color: white;
  font-size: 1rem; /* Reduced size to fit better */
  font-weight: 700;
  padding: 5px 10px; /* Reduced padding to fit better */
  border-radius: 6px; /* Slightly smaller border radius */
  position: absolute;
  top: 4px; /* Top right corner of image */
  right: 4px; /* Top right corner of image */
  z-index: 20; /* Higher z-index to ensure it's above everything */
  box-shadow: 0 4px 8px rgba(0,0,0,0.25); /* Enhanced shadow for floating effect */
  white-space: nowrap;
  display: inline-block;
  transform: none;
}

/* Affiliate Bonus Badge - Positioned below store discount badge */
.affiliate-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  position: absolute;
  top: 38px; /* Below the discount badge */
  right: 4px;
  z-index: 20;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transform: none;
}

.affiliate-badge::before {
  content: attr(data-text);
  font-size: 0.85em;
}

/* Enhanced pricing when discount is present */
.has-discount .price-now { 
  color: #dc2626 !important; 
  font-weight: 800 !important; 
  font-size: 1.2em !important;
  text-shadow: 0 1px 2px rgba(220,38,38,0.2);
}
.has-discount .price-old { 
  color: #6b7280 !important; 
  text-decoration: line-through !important; 
  font-weight: 500 !important;
  background: #f3f4f6 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  opacity: 0.8;
}
/* Product Detail Page Styles */
.product-detail {
  position: relative;
}
.product-detail .price-now { 
  font-size: 1.8rem; 
  font-weight: 700;
  color: var(--text);
}
.product-detail .has-discount .price-now { 
  font-size: 2rem !important; 
  color: #dc2626 !important;
  font-weight: 900 !important;
}
.product-detail .has-discount .price-old { 
  font-size: 1.3rem !important;
  margin-left: 8px;
  text-decoration: line-through;
  color: var(--muted);
}

/* Two-Panel Product Layout - Image Left, Content Right */
.top-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch; /* Make both columns same height */
  margin-bottom: 24px;
}

.top-panel .detail-media {
  height: 100%; /* Fill the height */
}

.top-panel .detail-body {
  display: flex;
  flex-direction: column;
  height: 100%; /* Fill the height */
}

.bottom-panel {
  width: 100%;
}

.product-description {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 4px var(--shadow);
  width: 100%;
  /* Ensure content can expand fully */
  overflow: visible;
  max-height: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Enhanced styling for formatted HTML product descriptions */
.product-description h3 {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.product-description h4 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 16px 0 8px 0;
  line-height: 1.3;
}

.product-description p {
  margin: 0 0 12px 0;
  line-height: 1.6;
}

.product-description strong {
  color: var(--text);
  font-weight: 600;
}

.product-description ul, .product-description ol {
  margin: 8px 0 12px 0;
  padding-left: 20px;
}

.product-description li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.product-description em {
  font-style: italic;
  color: var(--text-muted);
}

/* Disabled/greyed out button styles */
.btn.disabled {
  background: #9ca3af !important;
  color: #6b7280 !important;
  border-color: #d1d5db !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  pointer-events: none !important;
  text-decoration: none !important;
}

.btn.disabled:hover {
  background: #9ca3af !important;
  color: #6b7280 !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn.disabled:active,
.btn.disabled:focus {
  background: #9ca3af !important;
  color: #6b7280 !important;
  outline: none !important;
}

/* Mobile responsive styles for product detail */
@media (max-width: 768px) {
  .top-panel {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .detail-media {
    min-height: 280px;
    order: -1; /* Image first on mobile */
  }
  
  .detail-body {
    gap: 14px;
    padding: 0;
  }
}

.detail-media {
  min-height: 400px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(120deg, #e9eef5, #f3f5f8);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-media:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

.detail-body .brand-tag {
  order: 1;
}

/* Override order for brand tags inside wrapper */
.brand-wrapper .brand-tag {
  order: 0; /* Reset order inside wrapper */
}

/* Brand wrapper to keep brand and discount badge on same line */
.brand-wrapper {
  order: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row; /* Ensure left-to-right order */
}

/* Discount badge next to brand name in product detail */
.brand-discount {
  background: #ef4444;
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  flex-shrink: 0; /* Prevent shrinking */
}

/* Affiliate bonus badge next to brand name in product detail */
.brand-affiliate {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.brand-affiliate::before {
  content: attr(data-text);
  font-size: 0.85em;
}

/* Progressive Discount Flow - Product Detail Page */
.price-flow-container {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 0;
  box-shadow: 0 4px 12px var(--shadow);
  height: 100%; /* Fill the available height to match image */
  display: flex;
  flex-direction: column;
}

.price-flow-container .store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 16px;
  padding: 4px 10px;
  background: var(--accent);
  border-radius: 6px;
  height: 28px;
}

.price-flow-container .store-badge .store-logo {
  height: 20px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
}

.price-flow-container .store-badge .store-logo-fallback {
  width: 24px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-solid);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 4px;
}

.price-flow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  position: relative;
}

.price-flow-item:not(:last-child) {
  border-bottom: none; /* Remove all border lines between items */
}

.price-flow-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

.price-flow-badge {
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.price-flow-badge.store-discount {
  background: #fee;
  color: #dc2626;
}

.price-flow-badge.affiliate-bonus {
  background: #fef3c7;
  color: #92400e;
}

.price-flow-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-flow-bar {
  display: none; /* Hide all progress bars */
}

.price-flow-bar-fill {
  display: none; /* Hide all progress bars */
}

/* Original price - strikethrough */
.price-flow-item.original .price-flow-price {
  text-decoration: line-through;
  color: var(--muted);
  opacity: 0.7;
  font-size: 1.1rem;
}

/* Store deal price */
.price-flow-item.store-deal .price-flow-price {
  color: #dc2626;
}


/* Final ShopShout price - most prominent */
.price-flow-item.shopshout-final {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #10b981;
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0 0 0;
  border-bottom: 2px solid #10b981; /* Fix: add bottom border back */
  width: 100%; /* Ensure it doesn't overflow */
  box-sizing: border-box; /* Include padding and border in width */
}

.price-flow-item.shopshout-final .price-flow-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #065f46;
}

.price-flow-item.shopshout-final .price-flow-label::before {
  content: '🎉';
  font-size: 1.3em;
}

.price-flow-item.shopshout-final .price-flow-price {
  font-size: 2rem;
  font-weight: 900;
  color: #059669;
  text-shadow: 0 1px 2px rgba(5, 150, 105, 0.2);
}


.price-savings-summary {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: none; /* Remove top border line */
  font-size: 0.9rem;
  color: var(--muted);
}

.price-savings-amount {
  font-weight: 700;
  color: #059669;
  font-size: 1.1em;
}

/* Buttons inside price flow card */
.price-flow-actions {
  display: flex;
  gap: 12px;
  margin-top: auto; /* Push buttons to bottom */
  padding-top: 20px;
  border-top: none; /* Remove top border line */
}

.price-flow-actions .btn {
  flex: 1;
  text-align: center;
  justify-content: center;
}

.price-flow-actions .btn-primary {
  flex: 2; /* Make primary button larger */
}

.detail-body h1 {
  order: 2;
  margin: 0;
}

.detail-body .deal-prices {
  order: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 8px 0;
}

.detail-body .detail-buttons {
  order: 4;
  margin-top: 16px;
}

.detail-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.detail-buttons .btn {
  min-width: 140px;
  justify-content: center;
}

.detail-buttons .btn-primary {
  flex: 1;
  max-width: 200px;
}

.product-detail h1 {
  margin: 0.2rem 0 0;
  font-size: 1.6rem;
  line-height: 1.3;
}

.product-description {
  margin-top: 6px;
}

/* Infinite Scroll Loader */
.infinite-scroll-loader {
  text-align: center;
  padding: 32px 16px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.infinite-scroll-loader p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Spinner animation */
.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid var(--brand-solid);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Fade-in animation for newly loaded products */
.deal-card-v2.fade-in {
  animation: fadeInUp 0.4s ease-out forwards;
}

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

@media (max-width: 860px) {
  .infinite-scroll-loader {
    padding: 28px 12px;
    margin: 20px 0;
    gap: 12px;
  }
  
  .infinite-scroll-loader p {
    font-size: 0.9rem;
  }
  
  .loader-spinner {
    width: 36px;
    height: 36px;
    border-width: 2.5px;
  }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 32px; background: #ffffff; }
.footer-inner { display: grid; grid-template-columns: 1fr 0.8fr 1fr; gap: 32px; padding: 28px 0; }
.footer-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.footer-socials { display: inline-flex; gap: 8px; }
.footer-col h4 { margin-top: 0; margin-bottom: 16px; }
.footer-links, .footer-tags { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a, .footer-tags a { color: var(--muted); text-decoration: none; }
.footer-links a:hover, .footer-tags a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding: 12px 0 28px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Newsletter Form */
.footer-newsletter { 
  display: flex; 
  flex-direction: column; 
  gap: 0;
}

.footer-newsletter h4 {
  margin: 0 0 10px 0;
}

.footer-newsletter p { 
  color: var(--muted); 
  font-size: 0.9rem; 
  line-height: 1.5; 
  margin: 0 0 12px 0;
}

.newsletter-form { 
  display: flex; 
  flex-direction: column; 
  gap: 8px;
  width: 100%;
}

.newsletter-input { 
  width: 100%;
  padding: 8px 12px; 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  font-size: 0.95rem; 
  font-family: inherit;
  background: var(--panel);
  color: var(--text);
  transition: all 0.2s ease;
  box-sizing: border-box;
  min-height: 44px;
}

.newsletter-input:focus { 
  outline: none; 
  border-color: var(--brand-solid);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.newsletter-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.newsletter-btn { 
  width: 100%;
  padding: 8px 12px; 
  background: var(--brand-gradient);
  color: white; 
  border: 1px solid var(--brand-solid);
  border-radius: 8px; 
  font-weight: 600; 
  font-size: 0.95rem;
  cursor: pointer; 
  transition: all 0.2s ease;
  font-family: inherit;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.newsletter-btn:hover { 
  background: var(--brand-gradient-hover);
}

/* Responsive */
@media (max-width: 1000px) {
  .deals-grid { grid-template-columns: 1fr; }
}
/* Landing page */
.hero { background: radial-gradient(1200px 500px at 10% -20%, #f4f8ff, var(--bg) 60%); border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; padding: 48px 0; }
.hero-copy h1 { font-size: 2.2rem; margin: 0 0 10px; line-height: 1.2; }
.hero-copy .highlight { background: var(--brand-gradient); color: white; padding: 2px 6px; border-radius: 6px; }
.hero-copy .muted { margin-bottom: 24px; font-size: 1.05rem; }

/* Hero Signup Form */
.hero-signup-form {
  max-width: 560px;
}

.hero-signup-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.hero-signup-input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--text);
  transition: all 0.2s ease;
  min-height: 48px;
  box-sizing: border-box;
}

.hero-signup-input:focus {
  outline: none;
  border-color: var(--brand-solid);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hero-signup-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.hero-signup-btn {
  white-space: nowrap;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 48px;
  min-width: fit-content;
  width: auto;
}

/* Hero Social Proof */
.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.subscriber-avatars {
  display: flex;
  align-items: center;
}

.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid white;
  margin-left: -10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  transition: transform 0.2s ease;
}

.avatar-img:first-child {
  margin-left: 0;
}

.avatar-img:hover {
  transform: scale(1.1);
  z-index: 10;
}

.social-proof-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.hero-ctas { display: flex; gap: 10px; margin-top: 0; }
.hero-art { position: relative; height: auto; display: flex; justify-content: center; align-items: center; }
.hero-product {
  height: 420px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 12px 28px var(--shadow);
  cursor: pointer;
  position: relative;
}
.product-card.hero-product { grid-template-rows: 245px 1fr; }
.hero-product .product-media { background: #f7fafc; background-size: contain; background-position: center; background-repeat: no-repeat; }
.hero-product { transition: transform .2s ease; }
.hero-product:hover { transform: translateY(-2px); }
/* slimmer CTA inside hero card */
.hero-product .btn-primary {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  justify-self: start;
  background: var(--brand-gradient);
  border-color: var(--brand-solid);
  color: white;
}
.hero-product .btn-primary:hover {
  background: var(--brand-gradient-hover);
}
.hero-product .product-title { font-size: 0.98rem; margin: 2px 0 0; }
.hero-product .brand-tag { font-size: 0.85rem; padding: 2px 6px; }
.product-card.hero-product .product-body {
  align-content: start;
  display: grid;
  grid-template-rows: auto minmax(2.6em, auto) auto auto auto; /* brand, title(2 lines), prices, small spacer, CTA */
  gap: 8px;
  padding: 12px;
  min-height: 180px; /* Ensure minimum space for content */
}
.hero-product .product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: 2.6em; /* reserve 2 lines */
}
.hero-product .brand-tag { white-space: nowrap; }
.hero-product .deal-prices { min-height: 24px; align-items: baseline; }
.hero-product .btn-primary { 
  align-self: start; 
  margin-top: 4px; /* Push button to bottom of available space */
  margin-bottom: 8px; /* Space from card bottom edge */
  padding: 8px 12px;
  justify-self: stretch; /* Make button full width */
}

/* metrics removed on landing */

.brands { border: 0; }
.brands-row {
  display: flex;
  align-items: center;
  justify-content: center; /* center the whole strip */
  gap: 16px;
  padding: 18px 0;
  flex-wrap: wrap;
}
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px; /* 50% bigger: 40px → 60px */
  min-width: 150px; /* 50% bigger: 100px → 150px */
  max-width: 210px; /* 50% bigger: 140px → 210px */
  padding: 12px 24px; /* 50% bigger: 8px 16px → 12px 24px */
  border-radius: 12px; /* Proportionally bigger: 8px → 12px */
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px var(--shadow); /* Enhanced shadow for bigger cards */
  color: #334155;
  font-weight: 600;
  letter-spacing: .2px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
  opacity: .95;
}

.brand-logo img { 
  width: auto;
  height: 36px; /* 50% bigger: 24px → 36px */
  max-width: 90px; /* 50% bigger: 60px → 90px */
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  filter: grayscale(5%);
}

.brand-logo .store-logo-fallback {
  width: 42px; /* 50% bigger: 28px → 42px */
  height: 42px; /* 50% bigger: 28px → 42px */
  border-radius: 9px; /* Proportionally bigger: 6px → 9px */
  background: var(--brand-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem; /* 50% bigger: 0.8rem → 1.2rem */
}

.brand-logo:hover {
  transform: translateY(-1px);
  background: var(--panel);
  box-shadow: 0 6px 18px var(--shadow); /* Enhanced hover shadow for bigger cards */
  color: var(--text);
  opacity: 1;
}

.brand-logo:hover img {
  filter: grayscale(0%);
}

/* Toggle functionality for store details */
.toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 12px 16px;
  margin: 8px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  transition: all 0.2s ease;
}

.toggle-header:hover {
  background: var(--accent-2);
  border-color: var(--brand-solid);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow);
}

.toggle-icon {
  transition: transform 0.3s ease;
  color: var(--muted);
}

.toggle-header.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.toggle-content {
  max-height: none;
  overflow: visible;
  transition: opacity 0.3s ease, padding 0.3s ease;
  opacity: 1;
  padding-top: 16px;
}

.toggle-content.collapsed {
  display: none;
}

.featured { padding: 28px 0; }
.section-head { display:flex; align-items:center; justify-content: space-between; margin-bottom: 12px; }
.link { color: #1f2a37; text-decoration: none; }
.link:hover { text-decoration: underline; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.best-deals { padding: 28px 0; }
.best-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: visible; display: grid; grid-template-rows: 160px 1fr; position: relative; }
.product-media { background: linear-gradient(120deg, #e9eef5, #f3f5f8); }
.product-body { padding: 12px; display: grid; gap: 8px; align-content: start; grid-template-rows: auto minmax(2.6em, auto) 3em 1fr auto; }
.brand-tag { display:inline-flex; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #0f172a; width: fit-content; font-weight: 600; }
.product-title { 
  margin: 0; 
  font-size: 1rem; 
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rating span:first-child { letter-spacing: 1px; color: #667eea; }

.collections { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.collection-track { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 12px; overflow-x: auto; padding: 12px 0 16px; }
.collection-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; font-weight: 600; }

.testimonials { padding: 28px 0; }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.testi { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }

.features { padding: 32px 0; }
.features h2 { margin: 0 0 12px; }
/* feature section removed for marketplace styling */

.cta-section { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; }

/* categories grid */
.categories { padding: 28px 0; border-top: 0; border-bottom: 1px solid var(--border); }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.category-card {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  gap: 10px;
}
.category-card .cat-icon { width: 44px; height: 44px; object-fit: contain; image-rendering: -webkit-optimize-contrast; }
.category-card .cat-label { display: block; }
.category-card:hover { background: var(--accent-2); }

/* Tablet Responsive Design (Medium screens) */
@media (max-width: 1024px) and (min-width: 769px) {
  .container {
    width: min(1200px, 94%);
  }
  
  .hero-inner {
    gap: 28px;
    padding: 40px 0;
  }
  
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .best-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Responsive Design */
@media (max-width: 900px) {
  .hero-inner { 
    grid-template-columns: 1fr; 
    gap: 32px;
    padding: 32px 0;
    text-align: center;
  }
  .hero-copy h1 { 
    font-size: 1.8rem; 
    line-height: 1.2;
  }
  .hero-product {
    max-width: 280px;
    height: 420px; /* Increased height to fit content */
    overflow: visible; /* Ensure content isn't clipped */
  }
  .product-card.hero-product { 
    grid-template-rows: 200px 1fr; /* Reduced image height to give more space to content */
  }
  .hero-signup-inputs {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .hero-signup-input {
    width: 100%;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .hero-signup-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    min-width: unset;
  }
  
  .hero-social-proof {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    text-align: center;
  }
  
  .social-proof-text {
    font-size: 0.85rem;
  }
  
  .subscriber-avatars {
    justify-content: center;
  }
  
  .hero-ctas { 
    justify-content: center; 
    flex-wrap: wrap;
  }
  
  /* Product Detail Mobile Layout */
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .detail-media {
    min-height: 280px;
    order: -1; /* Ensure image appears first on mobile */
  }
  
  .product-detail h1 {
    font-size: 1.4rem;
  }
  
  .product-detail .price-now {
    font-size: 1.4rem;
  }
  
  .detail-buttons {
    gap: 8px;
  }
  
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .best-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 auto 0 0; max-width: 320px; width: 86%; transform: translateX(-120%); transition: transform .25s ease; z-index: 60; }
  .filters.open { transform: translateX(0); }
  .filters::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.15); backdrop-filter: blur(2px); pointer-events: none; }

  /* Enhanced Mobile Header */
  .header-inner {
    grid-template-columns: auto 1fr auto auto;
    gap: 8px;
    padding: 12px 0;
  }
  
  /* Make logo smaller on mobile to prevent overflow */
  .brand {
    order: 1; /* Logo first */
    grid-column: 1;
  }
  .brand img {
    height: 60px !important;
  }
  
  /* Reorder elements: Logo | Search | Lang | Hamburger */
  .primary-nav { 
    position: relative;
    display: contents; /* Keep contents behavior */
  }
  
  .search { 
    padding: 6px 8px;
    order: 2; /* Search in position 2 */
    grid-column: 2;
  }
  .search input { width: 100px; }
  
  .lang-switch { 
    gap: 4px;
    order: 3; /* Lang switch before hamburger */
    grid-column: 3;
    justify-self: end;
  }
  .lang-switch .btn-pill { 
    padding: 4px 8px; 
    font-size: 0.85rem;
  }
  .lang-switch .flag-icon { 
    width: 16px; 
    height: 10px; 
  }
  
  .nav-toggle { 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    background: transparent; 
    border: 1px solid var(--border); 
    color: var(--text); 
    border-radius: 10px; 
    padding: 10px; 
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    transition: all 0.2s ease;
    order: 4; /* Hamburger menu last */
    grid-column: 4;
  }
  .nav-toggle:hover {
    background: var(--accent-2);
    border-color: var(--brand-solid);
  }
  .nav-list { 
    position: absolute; 
    right: 0; 
    top: 110%; 
    background: var(--panel); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 12px; 
    display: none; 
    flex-direction: column; 
    min-width: 200px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    z-index: 100;
    backdrop-filter: blur(10px);
    order: 999; /* Remove from grid flow */
  }
  .nav-list.open { display: flex; animation: slideDown 0.2s ease; }
  .nav-list a {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
  }
  .nav-list a:hover {
    background: var(--brand-gradient);
    color: white;
  }
}
@media (max-width: 560px) {
  /* Mobile-first adjustments for small screens */
  .container {
    width: min(1200px, 95%);
  }
  
  /* Header mobile optimizations */
  .header-inner {
    grid-template-columns: auto 1fr auto auto;
    gap: 8px;
    padding: 12px 0;
  }
  
  /* Reorder elements: Logo | Empty | Lang | Hamburger */
  .brand {
    order: 1; /* Logo first */
    grid-column: 1;
  }
  
  .primary-nav {
    display: contents; /* Keep contents behavior */
  }
  
  .search {
    display: none; /* Hidden on small screens */
  }
  
  .lang-switch {
    display: inline-flex;
    gap: 2px;
    order: 3; /* Lang switch before hamburger */
    grid-column: 3;
    justify-self: end;
  }
  
  .nav-toggle {
    order: 4; /* Hamburger menu last */
    grid-column: 4;
  }
  
  .nav-list {
    display: none;
  }
  .nav-list.open {
    display: flex;
  }
  
  .lang-switch .btn-pill {
    padding: 6px 8px;
    font-size: 0.8rem;
    min-width: 36px;
    min-height: 36px;
  }
  
  .lang-switch .flag-icon {
    width: 14px;
    height: 9px;
    margin-right: 3px;
  }
  
  /* Hero section mobile */
  .hero-inner {
    padding: 24px 0 32px 0; /* Added bottom padding for hero card */
    gap: 24px;
  }
  
  .hero-copy h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }
  
  .hero-copy p {
    font-size: 0.95rem;
  }
  
  /* Hero signup form - mobile optimized */
  .hero-signup-form {
    max-width: 100%;
  }
  
  .hero-signup-inputs {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .hero-signup-input {
    width: 100%;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px 16px;
  }
  
  .hero-signup-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    min-width: unset;
    white-space: normal;
    line-height: 1.3;
  }
  
  .hero-ctas {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero-ctas .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    min-width: 140px;
    font-weight: 600;
  }
  
  .hero-product {
    max-width: 280px;
    height: 400px; /* Sufficient height for content */
    margin: 0 auto;
    overflow: visible;
  }
  
  /* Enhanced Brand Strip Mobile */
  .brands-row {
    gap: 12px;
    padding: 16px 0;
    justify-content: center;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .brands-row::-webkit-scrollbar {
    display: none;
  }
  
  .brand-logo {
    flex-shrink: 0;
    min-width: 120px;
    max-width: 140px;
    height: 50px;
    padding: 8px 12px;
    scroll-snap-align: start;
    border-radius: 10px;
  }
  
  .brand-logo img {
    height: 24px;
    max-width: 70px;
  }
  
  /* Category grid mobile */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .category-card {
    padding: 16px;
    gap: 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
    min-height: 100px;
  }
  
  .category-card:active {
    transform: scale(0.95);
    background: var(--accent-2);
  }
  
  .category-card .cat-icon {
    width: 40px;
    height: 40px;
  }
  
  .category-card .cat-label {
    font-size: 0.9rem;
    font-weight: 600;
  }
  
  /* Enhanced Mobile Product Grids */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 4px;
  }
  
  .best-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 4px;
  }
  
  /* Mobile product cards */
  .product-card {
    border-radius: 16px;
    overflow: visible; /* Keep visible to allow discount badge to show */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    grid-template-rows: 180px 1fr; /* Match the media height */
  }
  
  .product-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .product-card .product-media {
    border-radius: 16px 16px 0 0; /* Match card radius, only round top corners */
  }
  
  .product-card .product-body {
    padding: 16px;
    gap: 10px;
    border-radius: 0 0 16px 16px; /* Match card radius, only round bottom corners */
  }
  
  .product-card .product-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
  }
  
  .product-card .btn-primary {
    width: 100%;
    padding: 12px;
    font-weight: 600;
    border-radius: 10px;
  }
  
  /* Section spacing mobile */
  .featured, .best-deals, .categories {
    padding: 20px 0;
  }
  
  .section-head h2 {
    font-size: 1.4rem;
  }
  
  /* CTA section mobile */
  .cta-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 20px 0;
  }
  
  .cta-inner h2 {
    font-size: 1.4rem;
    margin: 0;
  }
  
  /* Footer mobile */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .footer-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  /* Improved footer mobile layout */
  .footer-col {
    text-align: center;
  }
  
  .footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }
  
  .footer-links {
    gap: 12px;
  }
  
  .footer-links a {
    padding: 8px 0;
    font-size: 0.95rem;
  }
  
  /* Newsletter mobile styles */
  .footer-newsletter {
    padding: 16px 0;
  }
  
  .newsletter-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .newsletter-btn {
    padding: 12px 16px;
  }
  
  /* Product Detail Mobile Optimizations */
  .detail-media {
    min-height: 240px;
  }
  
  .product-detail h1 {
    font-size: 1.3rem;
    line-height: 1.2;
  }
  
  .product-detail .price-now {
    font-size: 1.3rem;
  }
  
  .detail-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .detail-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  
  /* General mobile improvements */
  .deals-grid { grid-template-columns: 1fr; }
  .deal-card { grid-template-rows: 140px auto; }
}

/* Extra small mobile devices */
@media (max-width: 390px) {
  .container {
    width: min(1200px, 92%);
  }
  
  .hero-copy h1 {
    font-size: 1.4rem;
    line-height: 1.2;
  }
  
  .hero-copy p {
    font-size: 0.9rem;
  }
  
  /* Hero signup form - extra small screens */
  .hero-signup-input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 14px;
  }
  
  .hero-signup-btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    white-space: normal;
    line-height: 1.3;
  }
  
  .hero-ctas .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    min-width: 120px;
  }
  
  .hero-product {
    max-width: 260px;
    height: 380px; /* Increased height for smaller screens */
    overflow: visible;
  }
  
  /* Extra mobile spacing for hero product */
  .product-card.hero-product {
    grid-template-rows: 180px 1fr; /* Smaller image area */
  }
  
  .hero-product .product-body {
    padding: 12px;
    gap: 6px;
    min-height: 180px;
  }
  
  .hero-product .btn-primary {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .brand-logo {
    min-width: 100px;
    height: 45px;
    padding: 6px 10px;
  }
  
  .brand-logo img {
    height: 20px;
    max-width: 60px;
  }
  
  .product-card .product-body {
    padding: 12px;
  }
  
  .product-card .product-title {
    font-size: 1rem;
  }
  
  .section-head h2 {
    font-size: 1.2rem;
  }
  
  .featured, .best-deals, .categories {
    padding: 16px 0;
  }
}

/* Enhanced Mobile Animations */
@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skeleton Loading Styles */
.skeleton {
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--accent) 50%, var(--panel-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: 4px;
}

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

/* Hero Product Skeleton */
.hero-product-skeleton {
  height: 420px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px var(--shadow);
  display: grid;
  grid-template-rows: 245px 1fr;
}

.hero-product-skeleton .skeleton-media {
  background: var(--panel-2);
  border-radius: 0;
}

.hero-product-skeleton .skeleton-body {
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.hero-product-skeleton .skeleton-brand {
  width: 60px;
  height: 20px;
  border-radius: 999px;
}

.hero-product-skeleton .skeleton-title {
  width: 100%;
  height: 16px;
  margin: 2px 0;
}

.hero-product-skeleton .skeleton-title-2 {
  width: 80%;
  height: 16px;
  margin: 2px 0;
}

.hero-product-skeleton .skeleton-price {
  width: 120px;
  height: 20px;
  margin: 8px 0;
}

.hero-product-skeleton .skeleton-button {
  width: 100px;
  height: 32px;
  border-radius: 8px;
  margin-top: auto;
}

/* Product Detail Skeleton */
.product-detail-skeleton {
  margin-bottom: 32px;
}

/* Accessibility enhancements for skeleton */
.product-detail-skeleton[role="status"] {
  /* Ensure focus management during loading */
  position: relative;
}

.product-detail-skeleton[aria-busy="true"] {
  /* Visual indication that content is loading */
  pointer-events: none;
}

.product-detail-skeleton .top-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 24px;
}

.product-detail-skeleton .skeleton-media {
  min-height: 400px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--accent) 50%, var(--panel-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.product-detail-skeleton .skeleton-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

.product-detail-skeleton .skeleton-brand {
  width: 80px;
  height: 20px;
  border-radius: 999px;
}

.product-detail-skeleton .skeleton-title {
  width: 100%;
  height: 28px;
  margin: 2px 0;
}

.product-detail-skeleton .skeleton-title-2 {
  width: 75%;
  height: 28px;
  margin: 2px 0;
}

.product-detail-skeleton .skeleton-price {
  width: 140px;
  height: 32px;
  margin: 8px 0;
}

.product-detail-skeleton .skeleton-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.product-detail-skeleton .skeleton-button-primary {
  width: 140px;
  height: 44px;
  border-radius: 8px;
}

.product-detail-skeleton .skeleton-button-secondary {
  width: 180px;
  height: 44px;
  border-radius: 8px;
}

.product-detail-skeleton .skeleton-description {
  width: 100%;
  height: 120px;
  border-radius: 8px;
}

/* Mobile responsive for product detail skeleton */
@media (max-width: 768px) {
  .product-detail-skeleton .top-panel {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .product-detail-skeleton .skeleton-media {
    min-height: 280px;
    order: -1;
  }
  
  .product-detail-skeleton .skeleton-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .product-detail-skeleton .skeleton-button-primary,
  .product-detail-skeleton .skeleton-button-secondary {
    width: 100%;
  }
}

/* Product Card Skeleton */
.product-card-skeleton {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: visible;
  display: grid;
  grid-template-rows: 160px auto;
  box-shadow: 0 4px 12px var(--shadow);
}

.product-card-skeleton .skeleton-media {
  background: var(--panel-2);
  border-radius: 0;
}

.product-card-skeleton .skeleton-body {
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.product-card-skeleton .skeleton-brand {
  width: 50px;
  height: 18px;
  border-radius: 999px;
}

.product-card-skeleton .skeleton-title {
  width: 100%;
  height: 14px;
}

.product-card-skeleton .skeleton-title-2 {
  width: 70%;
  height: 14px;
}

.product-card-skeleton .skeleton-price {
  width: 80px;
  height: 18px;
  margin: 4px 0;
}

.product-card-skeleton .skeleton-button {
  width: 70px;
  height: 28px;
  border-radius: 6px;
  margin-top: 4px;
}

/* Grid Loading States */
.product-grid-loading {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.best-grid-loading {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Enhanced Content Loading States */
.loading .hero-product { display: none; }
.loading #featuredGrid { display: none; }
.loading #bestGrid { display: none; }

/* Content reveal animations */
.content-loaded {
  animation: fadeInUp 0.4s ease forwards;
}

  /* Hero product mobile fixes */
  .hero-product .product-body {
    padding: 14px;
    gap: 6px;
    min-height: 170px;
  }
  
  .hero-product .btn-primary {
    padding: 10px 14px;
    font-size: 0.9rem;
    margin-top: 0px;
  }
  
  .hero-product .product-title {
    font-size: 0.95rem;
    line-height: 1.25;
  }
  
  .hero-product .brand-tag {
    font-size: 0.8rem;
    padding: 3px 7px;
  }
  
  /* Mobile touch improvements */
@media (max-width: 560px) {
  .btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  .product-card {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  .hero-product {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  /* Improve touch targets */
  .nav-list a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  
  .lang-switch .btn-pill {
    min-width: 40px;
    min-height: 40px;
  }
}

/* Responsive skeleton grids */
@media (max-width: 1024px) and (min-width: 769px) {
  .product-grid-loading {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .best-grid-loading {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .product-grid-loading {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .best-grid-loading {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .product-grid-loading, .best-grid-loading {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Fade-in animation for loaded content */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Contact Page Styles */
.contact-hero {
  padding: 40px 0 60px;
  text-align: center;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.contact-hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

.contact-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.contact-info-section {
  padding: 60px 0;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow);
  border-color: var(--brand-solid);
}

.contact-card-icon {
  width: 64px;
  height: 64px;
  background: var(--brand-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: white;
}

.contact-card-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}

.contact-card-content p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--brand-solid);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.contact-link:hover {
  background: var(--brand-solid);
  color: white;
  transform: translateY(-1px);
}

.contact-faq-section {
  padding: 60px 0;
  background: var(--panel);
  border-top: 1px solid var(--border);
}

.faq-header {
  text-align: center;
  margin-bottom: 48px;
}

.faq-header h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}

.faq-header p {
  color: var(--muted);
  font-size: 1.1rem;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.faq-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}

.faq-item p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Mobile Responsive for Contact Page */
@media (max-width: 768px) {
  .contact-hero-content h1 {
    font-size: 2rem;
  }
  
  .contact-subtitle {
    font-size: 1rem;
  }
  
  .contact-cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .contact-card {
    padding: 24px;
  }
  
  .contact-info-section,
  .contact-faq-section {
    padding: 40px 0;
  }
  
  .faq-header h2 {
    font-size: 1.6rem;
  }
}

/* Privacy Page Styles */
.privacy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.privacy-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.privacy-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.privacy-last-updated {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

.privacy-lang-content {
  display: none;
}

.privacy-lang-content.active {
  display: block;
}

.privacy-section {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.privacy-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.privacy-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 20px 0 12px;
  color: var(--text);
}

.privacy-section h4 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 16px 0 8px;
  color: var(--text);
}

.privacy-section p {
  line-height: 1.6;
  margin: 0 0 16px;
  color: var(--text);
}

.privacy-section p:last-child {
  margin-bottom: 0;
}

.privacy-section ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.privacy-section li {
  line-height: 1.6;
  margin-bottom: 8px;
  color: var(--text);
}

.privacy-company-info {
  background: var(--accent-2);
  padding: 16px;
  border-radius: 6px;
  border-left: 4px solid var(--brand-solid);
  margin: 16px 0;
}

.privacy-company-info p {
  margin: 0 0 8px;
  font-weight: 500;
}

.privacy-company-info p:last-child {
  margin-bottom: 0;
}

.privacy-company-info a {
  color: var(--brand-solid);
  text-decoration: none;
}

.privacy-company-info a:hover {
  text-decoration: underline;
}

.privacy-section a {
  color: var(--brand-solid);
  text-decoration: none;
}

.privacy-section a:hover {
  text-decoration: underline;
}

/* Mobile Responsive for Privacy Page */
@media (max-width: 768px) {
  .privacy-content {
    padding: 24px 0;
  }
  
  .privacy-header h1 {
    font-size: 2rem;
  }
  
  .privacy-section {
    padding: 16px;
    margin-bottom: 20px;
  }
  
  .privacy-section h2 {
    font-size: 1.3rem;
  }
  
  .privacy-section h3 {
    font-size: 1.1rem;
  }
}

/* Shops Page Specific Styles */
.shops-section {
  padding: 40px 0;
}

.shops-section .section-head {
  text-align: center;
  margin-bottom: 32px; /* Reduced margin since no h1 */
}

.shops-section .section-head p {
  font-size: 1.3rem; /* Increased size to be more prominent */
  color: var(--text); /* Changed from muted to main text color */
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 500; /* Added weight for better prominence */
}

/* Mobile responsive for shops section */
@media (max-width: 768px) {
  .shops-section {
    padding: 24px 0;
  }
  
  .shops-section .section-head {
    margin-bottom: 24px; /* Adjusted margin without h1 */
  }
  
  .shops-section .section-head p {
    font-size: 1.2rem; /* Larger on tablet */
  }
}

.content-loaded {
  animation: fadeIn 0.4s ease-out;
}

/* Extra small screens - Improved touch and readability */
@media (max-width: 375px) {
  .container {
    width: min(1200px, 96%);
  }
  
  .hero-copy h1 {
    font-size: 1.4rem;
  }
  
  .hero-product {
    max-width: 240px;
    height: 340px;
  }
  
  .category-card {
    padding: 12px;
  }
  
  .category-card .cat-icon {
    width: 32px;
    height: 32px;
  }
  
  .brand-logo {
    min-width: 90px;
    font-size: 0.85rem;
  }
  
  .btn {
    min-height: 48px; /* Larger touch targets for very small screens */
    padding: 12px 14px;
  }
  
  .hero-ctas .btn {
    padding: 12px 20px;
    font-size: 0.85rem;
  }
  
  /* Extra Small Product Detail */
  .detail-media {
    min-height: 220px;
  }
  
  .product-detail h1 {
    font-size: 1.2rem;
  }
  
  .product-detail .price-now {
    font-size: 1.2rem;
  }
  
  .brand-tag {
    font-size: 0.8rem;
    padding: 3px 8px;
  }
}

/* New Deal Card Styles */
.deal-card-v2 {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 12px var(--shadow);
  position: relative;
}
.deal-v2-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.deal-v2-media {
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f2f5;
}
.deal-v2-media img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.deal-v2-cta-container {
  display: grid;
  gap: 8px;
}
.btn-deal {
  background: var(--brand-gradient);
  color: white;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.btn-deal:hover { background: var(--brand-gradient-hover); }
.btn-details {
  background: #334155;
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.btn-details:hover { background: #1e293b; }

.deal-v2-right {
  display: flex;
  flex-direction: column;
}
.deal-v2-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 4px;
}
.deal-v2-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}
.deal-v2-expiry {
  background: var(--danger);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}
.deal-v2-shoplink {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.deal-v2-shoplink:hover { text-decoration: underline; }

.deal-v2-details-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  align-items: center;
}
.deal-v2-discount {
  grid-column: 1 / 2;
  background: #3b82f6;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  justify-self: start;
}
.deal-v2-validity {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--muted);
}
.deal-v2-validity span { display: flex; align-items: center; gap: 6px; }
.deal-v2-prices {
  grid-column: 1 / 2;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-old-v2 {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: line-through;
  background: #f3f4f6;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 500;
}
.price-now-v2 {
  font-weight: 700;
  color: #dc2626;
}
.deal-v2-description {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 8px 0 0;
}

/* Mobile optimizations for deal cards */
@media (max-width: 860px) {
  /* Hide descriptions on mobile for cleaner, faster UX */
  .deal-v2-description {
    display: none;
  }
  
  /* Optimize grid layout without descriptions */
  .deal-v2-details-grid {
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    align-items: center;
  }
  
  /* Enhanced mobile layout for deal cards */
  .deal-card-v2 {
    grid-template-columns: 180px 1fr;
    gap: 16px;
    padding: 16px;
  }
  
  .deal-v2-title {
    font-size: 1.1rem;
    line-height: 1.3;
  }
  
  .deal-v2-header {
    gap: 12px;
    margin-bottom: 8px;
  }
  
  /* FIXED: Discount badge on image area - mobile */
  .deal-card-v2 .discount-badge {
    top: 4px; /* Top right corner */
    right: 4px;
    font-size: 0.9rem; /* Slightly smaller on mobile */
    padding: 4px 8px; /* Adjusted padding */
  }
  
  .deal-card-v2 .affiliate-badge,
  .product-card .affiliate-badge {
    top: 34px;
    right: 4px;
    font-size: 0.8rem;
    padding: 3px 6px;
  }
  
  /* Specific adjustment for regular product cards (featured/related products) */
  .product-card .discount-badge {
    top: 4px; /* Top right corner */
    right: 4px;
    font-size: 0.9rem;
    padding: 4px 8px;
  }
  
  .price-flow-container {
    padding: 16px;
  }
  
  .price-flow-container .store-badge {
    font-size: 0.85rem;
    padding: 5px 10px;
  }
  
  .price-flow-item {
    flex-direction: row; /* Keep row layout - label and price on same line */
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  
  .price-flow-label {
    font-size: 0.875rem;
    flex: 0 1 auto; /* Allow label to shrink if needed */
  }
  
  .price-flow-price {
    font-size: 1.2rem;
    flex: 0 0 auto; /* Don't shrink the price */
    text-align: right;
  }
  
  .price-flow-item.shopshout-final .price-flow-price {
    font-size: 1.6rem;
  }
  
  .price-savings-summary {
    font-size: 0.85rem;
  }
  
  .price-flow-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .price-flow-actions .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  /* Optimize for smaller mobile screens */
  .deal-card-v2 {
    grid-template-columns: 160px 1fr;
    gap: 14px;
    padding: 14px;
  }
  
  .deal-v2-title {
    font-size: 1rem;
    line-height: 1.25;
  }
  
  .deal-v2-details-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .deal-v2-validity {
    grid-column: 1;
    grid-row: auto;
  }
  
  .deal-v2-discount {
    grid-column: 1;
    justify-self: start;
  }
  
  .deal-v2-prices {
    grid-column: 1;
  }
  
  /* Enhanced mobile CTA buttons */
  .btn-deal, .btn-details {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  .deal-v2-cta-container {
    gap: 10px;
    margin-top: 8px;
  }
  
  /* FIXED: Discount badge on image area - smaller screens */
  .deal-card-v2 .discount-badge {
    top: 8px; /* Top right corner */
    right: 8px;
    font-size: 0.85rem; /* Smaller font */
    padding: 4px 8px; /* Smaller padding */
  }
  
  .deal-card-v2 .affiliate-badge,
  .product-card .affiliate-badge {
    top: 32px;
    right: 8px;
    font-size: 0.75rem;
    padding: 3px 6px;
  }
  
  /* Additional adjustment for product cards on smaller screens */
  .product-card .discount-badge {
    top: 8px; /* Top right corner */
    right: 8px;
    font-size: 0.85rem;
    padding: 4px 8px;
  }
}

@media (max-width: 390px) {
  /* Extra small screens optimization */
  .deal-card-v2 {
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 12px;
  }
  
  .deal-v2-title {
    font-size: 0.95rem;
    line-height: 1.2;
  }
  
  .deal-v2-expiry {
    font-size: 0.75rem;
    padding: 3px 6px;
  }
  
  /* FIXED: Discount badge on image area - very small screens */
  .deal-card-v2 .discount-badge {
    top: 8px; /* On image area with spacing */
    right: 8px;
    font-size: 0.75rem; /* Smallest font size */
    padding: 3px 6px; /* Minimal padding */
  }
  
  .deal-card-v2 .affiliate-badge,
  .product-card .affiliate-badge {
    top: 30px;
    right: 8px;
    font-size: 0.7rem;
    padding: 2px 5px;
  }
  
  /* Maximum adjustment for product cards on smallest screens */
  .product-card .discount-badge {
    top: 8px; /* On image area with spacing */
    right: 8px;
    font-size: 0.75rem;
    padding: 3px 6px;
  }
  
  .deal-v2-shoplink {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }
  
  /* Extra small screen CTA optimization */
  .btn-deal, .btn-details {
    padding: 10px 14px;
    font-size: 0.85rem;
    min-height: 42px;
  }
  
  .deal-v2-cta-container {
    gap: 8px;
  }
}

/* Skeleton Loading Animations */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

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

.skeleton-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px var(--shadow);
}

.skeleton-media {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
  margin-bottom: 12px;
}

.skeleton-text {
  height: 16px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text.wide { width: 100%; }
.skeleton-text.medium { width: 75%; }
.skeleton-text.narrow { width: 50%; }

.skeleton-price {
  height: 20px;
  width: 80px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin: 8px 0;
}

.skeleton-button {
  height: 36px;
  width: 120px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 6px;
  margin-top: 12px;
}

/* Grid skeleton layout */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

/* Content loaded animation */
.content-loaded {
  animation: content-fade-in 0.4s ease-out;
}

@keyframes content-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced image lazy loading */
.product-image-lazy {
  transition: opacity 0.3s ease;
  opacity: 0;
}

.product-image-lazy.loaded {
  opacity: 1;
}

.product-image-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}

/* Affiliate Link Modal/Popup - Compact Coupon Site Style */
.affiliate-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: modal-fade-in 0.2s ease forwards;
}

@keyframes modal-fade-in {
  to {
    opacity: 1;
  }
}

.affiliate-modal {
  background: var(--panel);
  border-radius: 12px;
  max-width: 650px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: scale(0.9) translateY(20px);
  animation: modal-slide-in 0.3s ease forwards;
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
}

@keyframes modal-slide-in {
  to {
    transform: scale(1) translateY(0);
  }
}

.affiliate-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  display: none; /* Hidden on desktop - users can click outside */
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1;
}

.affiliate-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text);
}

.affiliate-modal-header {
  padding: 28px 20px;
  text-align: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.affiliate-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: var(--brand-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.affiliate-modal-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.affiliate-modal-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
}

.affiliate-modal-price-comparison {
  margin-top: 16px;
  background: white;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--border);
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.price-row.price-original {
  opacity: 0.6;
}

.price-row.price-original .price-value {
  text-decoration: line-through;
}

.price-row.price-shopshout {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 4px;
}

.price-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.price-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.price-value.price-highlight {
  font-size: 1.1rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.price-savings {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 0.7rem;
  color: var(--success);
  text-align: center;
  font-weight: 500;
}

.affiliate-modal-body {
  padding: 28px 24px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.affiliate-modal-highlight {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 10px;
  padding: 20px 16px;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  flex-shrink: 0;
}

.affiliate-modal-highlight::before {
  content: '🎁';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  padding: 0 8px;
  font-size: 20px;
}

.affiliate-modal-discount {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1;
  letter-spacing: -1px;
}

.affiliate-modal-discount-text {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 6px 0 0;
  font-weight: 500;
}

.affiliate-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
}

.affiliate-modal-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
}

.affiliate-modal-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--panel);
  transition: all 0.2s;
}

.affiliate-modal-input:focus {
  outline: none;
  border-color: var(--brand-solid);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

.affiliate-modal-input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.affiliate-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  flex-shrink: 0;
}

.affiliate-modal-btn {
  padding: 13px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.affiliate-modal-btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.affiliate-modal-btn-primary:hover {
  background: var(--brand-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
}

.affiliate-modal-btn-primary:active {
  transform: translateY(0);
}

.affiliate-modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 16px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.affiliate-modal-divider::before,
.affiliate-modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.affiliate-modal-divider span {
  padding: 0 12px;
  opacity: 0.6;
}

.affiliate-modal-email-section {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  opacity: 0.85;
  flex-shrink: 0;
}

.affiliate-modal-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.affiliate-modal-email-group {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.affiliate-modal-email-group .affiliate-modal-input {
  flex: 1;
  margin-bottom: 0;
  padding: 9px 12px;
  font-size: 0.85rem;
}

.affiliate-modal-btn-small {
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
  background: var(--accent-2);
  color: var(--text);
  white-space: nowrap;
}

.affiliate-modal-btn-small:hover {
  background: var(--brand-solid);
  color: white;
  transform: translateY(-1px);
}

.affiliate-modal-note {
  font-size: 0.65rem;
  color: var(--muted);
  text-align: left;
  margin-top: 6px;
  margin-bottom: 0;
  line-height: 1.4;
  opacity: 0.7;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .affiliate-modal {
    max-width: 100%;
    margin: 12px;
    grid-template-columns: 1fr;
    border-radius: 10px;
  }
  
  .affiliate-modal-header {
    padding: 20px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .affiliate-modal-body {
    padding: 20px 16px 10px;
  }
  
  .affiliate-modal-title {
    font-size: 1.1rem;
  }
  
  .affiliate-modal-subtitle {
    font-size: 0.8rem;
  }
  
  .affiliate-modal-discount {
    font-size: 1.8rem;
  }
  
  .affiliate-modal-discount-text {
    font-size: 0.75rem;
  }
  
  .affiliate-modal-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
    margin-bottom: 10px;
  }
  
  .affiliate-modal-highlight {
    padding: 16px 12px;
    margin-bottom: 14px;
  }
  
  .affiliate-modal-highlight::before {
    font-size: 16px;
    top: -12px;
  }
  
  .affiliate-modal-btn {
    padding: 12px 18px;
    font-size: 0.9rem;
  }
  
  .affiliate-modal-email-section {
    padding-top: 12px;
  }
  
  .affiliate-modal-label {
    font-size: 0.65rem;
  }
  
  .affiliate-modal-email-group .affiliate-modal-input {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  
  .affiliate-modal-btn-small {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
  
  .affiliate-modal-note {
    font-size: 0.6rem;
    margin-top: 5px;
  }
  
  .affiliate-modal-close {
    display: flex; /* Show on mobile screens */
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
  
  /* Price comparison on mobile */
  .affiliate-modal-price-comparison {
    margin-top: 12px;
    padding: 10px;
  }
  
  .price-row {
    padding: 5px 0;
  }
  
  .price-label {
    font-size: 0.7rem;
  }
  
  .price-value {
    font-size: 0.85rem;
  }
  
  .price-value.price-highlight {
    font-size: 1rem;
  }
  
  .price-savings {
    margin-top: 8px;
    padding-top: 6px;
    font-size: 0.65rem;
  }
}