:root {
  --primary: #4D3194;
  --primary-light: #6445B3;
  --secondary: #B8B3AB;
  --text-dark: #1E293B;
  --text-light: #64748B;
  --bg-color: #F8FAFC;
  --white: #FFFFFF;
  --border-color: #E2E8F0;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 32px;
}

.contact-btn {
  background-color: var(--primary);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
  box-shadow: var(--shadow-sm);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-btn {
  background-color: #25D366;
  color: var(--white);
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-btn:hover {
  background-color: #1daf58;
}

.print-btn {
  background: transparent;
  color: var(--text-dark);
  border: 1.5px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.print-btn:hover {
  background: var(--bg-color);
  border-color: var(--primary);
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg-color) 100%);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background-color: rgba(77, 49, 148, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.highlight {
  color: var(--primary);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Catalog */
.catalog-container {
  padding: 20px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.category-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-title::before {
  content: '';
  display: block;
  width: 6px;
  height: 28px;
  background-color: var(--secondary);
  border-radius: 4px;
}

.subgroup {
  margin-bottom: 40px;
}

.subgroup-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* Card Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  align-items: start;
}

/* Product Card */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.product-image-container {
  width: 100%;
  height: 200px;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

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

.product-info {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(77, 49, 148, 0.08);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.product-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  line-height: 1.3;
}

/* ─── Image zoom button ─────────────────────────────────────────────────── */
.product-image-container {
  position: relative;
}

.zoom-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  color: var(--primary);
  padding: 0;
}

.product-card:hover .zoom-btn {
  opacity: 1;
}

.zoom-btn:hover {
  background: var(--white);
}

/* ─── Badge-style variant rows (no table, no scroll) ────────────────────── */
.variants-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.variant-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

.variant-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.vr-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
}

.vr-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vr-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.vr-tag.opt {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.vr-tag.dealer {
  background: rgba(77, 49, 148, 0.1);
  color: var(--primary);
}

.vr-tag.retail {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-light);
}

/* ─── Lightbox ──────────────────────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#lightbox.active {
  display: flex;
}

#lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  animation: lb-fade 0.2s ease;
}

#lb-box {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lb-zoom 0.25s ease;
}

#lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

#lb-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 1.25rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#lb-close:hover {
  background: rgba(255,255,255,0.3);
}

@keyframes lb-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lb-zoom {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* Footer */
.footer {
  background-color: var(--white);
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-logo {
  height: 24px;
  margin-bottom: 16px;
  opacity: 0.5;
  filter: grayscale(100%);
}

.footer p {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* ─── Mobile Responsive ─────────────────────────────────────────────────── */

/* Prevent ANY horizontal overflow */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

*, *::before, *::after {
  max-width: 100%;
}

@media (max-width: 640px) {
  /* Navbar — compact icon-only buttons on mobile */
  .navbar {
    padding: 12px 0;
  }

  .logo {
    height: 26px;
  }

  .nav-actions {
    gap: 8px;
  }

  /* Print button: icon only, no text */
  .print-btn .btn-label {
    display: none;
  }

  .print-btn {
    padding: 10px;
    width: 40px;
    height: 40px;
    justify-content: center;
  }

  /* WhatsApp button: compact with shorter text */
  .contact-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
    gap: 6px;
    white-space: nowrap;
  }

  /* Hide WhatsApp icon long text, keep icon + short text */
  .contact-btn .wa-text {
    display: none;
  }

  /* Hero */
  .hero {
    padding: 40px 0 30px;
  }

  .hero h1 {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
  }

  .hero p {
    font-size: 0.9rem;
  }

  /* Category title */
  .category-title {
    font-size: 1.35rem;
  }

  /* Single column on phone */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Image height bigger on phone */
  .product-image-container {
    height: 240px;
  }

  /* Zoom button always visible on phone (no hover on touch screens) */
  .zoom-btn {
    opacity: 1;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }

  /* Catalog padding */
  .catalog-container {
    gap: 40px;
  }

  .category-section {
    gap: 16px;
  }

  .subgroup {
    margin-bottom: 24px;
  }

  /* Badge prices wrap nicely */
  .vr-prices {
    gap: 5px;
  }
}

@media (max-width: 768px) and (min-width: 641px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .category-title { font-size: 1.5rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
}
