/* Fontenova Shop - Updated CSS matching Homepage Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --primary-blue: #02658C;
    --primary-blue-dark: #10475d;
    --light-blue: #eff6ff;
    --blue-50: #f0f9ff;
    --blue-100: #e0f2fe;
    --blue-600: #0284c7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --green-500: #10b981;
    --yellow-400: #fbbf24;
    --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-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: black;
    background: var(--white);
}

/* Header & Navbar */
.header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    z-index: 1000;
    width: 100%;
}

.logo {
    height: 40px;
    cursor: pointer;
}

.logo a {
    font-weight: 700;
    font-size: 1.5rem;
    color: black;
    text-decoration: none;
}

.nav-menu a {
    display: flex;
    align-items: center;
}

.material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
    padding-right: 2px;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    position: relative;
    z-index: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
    position: relative;
}

.menu-item { position: relative; }
.nav-menu > .menu-item > a {
    text-decoration: none;
    color: black;
    font-weight: 500;
}

.nav-menu > .menu-item > a:hover { 
    color: var(--primary-blue); 
}

.cta-button {
  background: var(--primary-blue);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cta-button:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Mega Menu */
.mega-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    width: 60vw;
    background: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-top: 1px solid var(--gray-200);
    z-index: 999;
    padding: 0;
    justify-content: center;
    overflow-x: auto;
}
.mega-menu .mega-menu-inner {
    width: 100%;
    max-width: 900px; /* antes 1280px, ahora más pequeño */
    margin: 0 auto;
    display: flex;
    gap: 0.5rem; /* antes 1.5rem o 2rem, ahora más pequeño */
    padding: 1.5rem 0.5rem;
    flex-wrap: nowrap;
    justify-content: space-between;
    box-sizing: border-box;
    overflow-x: auto; /* permite scroll si es necesario en pantallas chicas */
}
.menu-item.open .mega-menu {
    display: flex;
}

@media (hover: hover) and (min-width: 769px) {
    .menu-item:hover .mega-menu {
        display: flex;
    }
}
.mega-group { flex: 1; }
.mega-group.wide { flex: 2; }
.mega-columns { display: flex; gap: 2rem; }
.mega-column {
    list-style: none;
    min-width: 140px;
    padding: 0;
    margin: 0;
}
.mega-column li { margin-bottom: 0.5rem; }
.mega-column li a {
    color: black;
    text-decoration: none;
    font-size: 0.9rem;
}
.mega-column li a:hover { color: var(--primary-blue); }
.mega-group .cta {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--primary-blue);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
}

/* Mega Menu Subcategory Styling */
.mega-group h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mega-group .mega-column {
    background: none;
    padding: 0;
    margin-bottom: 0.5rem;
}
.mega-group .mega-column li {
    margin-bottom: 0.25rem;
    padding-left: 0;
}
.mega-group .mega-column li a {
    color: black;
    font-size: 0.97rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: block;
    transition: background 0.15s, color 0.15s;
}
.mega-group .mega-column li a:hover,
.mega-group .mega-column li a:focus {
    background: none;
    color: var(--primary-blue);
    text-decoration: underline;
}
.mega-group .cta {
    margin-top: 0.75rem;
    display: inline-block;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    text-decoration: none;
    transition: background 0.2s;
}
.mega-group .cta:hover {
    background: var(--primary-blue-dark);
}
.mega-group.wide .mega-columns {
    gap: 2rem;
    display: flex;
}
.mega-group.wide .mega-column {
    min-width: 120px;
}

/* Responsive: stack columns on mobile */
@media (max-width: 900px) {
    .mega-menu {
        position: relative;
        left: 0;
        transform: none;
        width: 100%;
        min-width: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }
    .mega-menu .mega-menu-inner {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
        max-width: 100%;
    }
    .mega-group,
    .mega-group.wide {
        width: 100%;
    }
    .mega-group.wide .mega-columns {
        flex-direction: column;
        gap: 0.5rem;
    }
    .mega-group .mega-column {
        min-width: 100%;
    }
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: black;
    border-radius: 2px;
}
@media (max-width:768px){
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem 2rem;
        z-index: 999;
    }
    .nav-menu.active { display: flex; }
    .mega-menu { position: relative; box-shadow: none; flex-direction: column; padding: 0; }
    .mega-columns { flex-direction: column; gap: 0; }
    .mega-column { min-width: 100%; }
    .mobile-menu-toggle { display: flex; }
}

/* Add scroll effect to header exactly like homepage */
.header-scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: var(--shadow-md) !important;
}

/* Hero Section - Matching homepage styling */
.hero {
  position: relative;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin-bottom: 0;
  
  background: 
    linear-gradient(135deg, var(--primary-blue) 0%, var(--blue-600) 100%),
    url('assets/products/herobanner.webp') center/cover no-repeat;
  background-blend-mode: multiply;
}

.hero-content {
  z-index: 1;
  padding: 2rem;
}

.hero h2 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero .btn {
  background: var(--white);
  color: var(--primary-blue);
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-lg);
}

.hero .btn:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Products Section - Matching homepage section styling */
.products {
  padding: 5rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--white);
}

.products h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--gray-900);
}

.section-description {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto 4rem auto;
  text-align: center;
}

#category-title {
  color: var(--gray-900);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1rem;
}

/* Category Grid - EXACTLY matching homepage product cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 150px;
  justify-content: center;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--blue-600));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  text-decoration: none;
}

.card:hover::before {
  opacity: 1;
}

.card img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  flex-shrink: 0;
  color: var(--primary-blue);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--black);
  line-height: 1;
}

/* Products Container - Enhanced layout */
.products-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}

/* Filter Sidebar - Matching homepage card style */
.filter-bar {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: sticky;
  top: 120px;
}

.filter-bar h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

.filter-bar label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

.filter-bar select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background-color: white;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition-fast);
}

.filter-bar select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

#contaminantFilters {
  margin-top: 1rem;
}

#contaminantFilters p {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

#contaminantFilters label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.75rem;
  cursor: pointer;
  font-weight: normal;
  text-align: left;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

#contaminantFilters label:hover {
  background-color: var(--blue-50);
}

#contaminantFilters input[type="checkbox"] {
  margin-right: 0.5rem;
  transform: scale(1.1);
  accent-color: var(--primary-blue);
}

/* Products Grid - Matching homepage style */
#products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
}

/* Product Cards - EXACTLY matching homepage product cards */
.product-card {
  background: white;
  border-radius: 16px;
  padding: 0;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  height: fit-content;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--blue-600));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.product-card:hover::before {
  opacity: 1;
}

.product-image-container {
  padding: 2rem 2rem 1rem 2rem;
  background: var(--gray-50);
}

.product-card img {
  width: 100%;
  max-width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-normal);
}

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

.product-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-card h4 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--gray-900);
  line-height: 1.4;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Enhanced Product Features - Matching homepage style */
.product-specs {
  background: var(--blue-50);
  padding: 1rem;
  border-radius: var(--radius-lg);
  margin: 1rem 0;
  text-align: left;
  font-size: 0.875rem;
  border: 1px solid var(--blue-200);
}

.product-specs small {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Size Variants */
.size-variants {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.size-variants small {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.size-list {
  display: grid;
  gap: 0.5rem;
}

.size-option {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: 0.75rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  gap: 0.5rem;
}

.size-option:hover {
  border-color: var(--primary-blue);
  background: var(--blue-50);
}

.size-option.selected {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
  color: white;
}

.size-option span:nth-child(1) {
  font-weight: 600;
}

.size-option span:nth-child(2) {
  color: var(--primary-blue);
  font-weight: 700;
}

.size-option.selected span:nth-child(2) {
  color: white;
}

.stock-status {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.in-stock {
  background: var(--green-500);
  color: white;
}

.out-stock {
  background: var(--red-500);
  color: white;
}

.size-option.selected .stock-status {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.performance-summary, .applications-summary {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--blue-50);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--primary-blue);
}

.performance-summary small, .applications-summary small {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--gray-800);
  line-height: 1.6;
}

/* Enhanced Price Display - Matching homepage CTA style */
.product-price, .product-card p {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: var(--primary-blue) !important;
  margin: 1rem 0 !important;
  padding: 1rem;
  background: var(--blue-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--blue-200);
  text-align: center;
}

/* WhatsApp Button - Matching homepage CTA button */
.whatsapp-btn {
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-normal);
  margin-top: auto;
  text-decoration: none;
}

.whatsapp-btn:hover {
  background: var(--primary-blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

/* Loading States */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--gray-600);
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--gray-600);
  font-style: italic;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 2rem 2rem;
}
.footer-container { max-width: 1280px; margin: 0 auto; }
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 2rem;
    text-align: center;
    color: var(--gray-400);
}
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}
.social-link {
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}
.social-link:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
}

/* Responsive Design - Matching homepage breakpoints */
@media (max-width: 1024px) {
  .products-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .filter-bar {
    position: static;
    order: -1;
  }
  
  #products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  #navbar {
    padding: 1rem;
  }
  
  #navbar .menu {
    display: none;
  }
  
  .hero {
    height: 60vh;
    padding: 3rem 1rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .products {
    padding: 3rem 1rem;
  }
  
  .products h3 {
    font-size: 2rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  #products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .card, .product-card .product-content {
    padding: 1.5rem;
  }
  
  .filter-bar {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .logo {
    height: 35px;
  }
  
  .hero {
    padding: 2rem 1rem;
  }
  
  #products-grid {
    grid-template-columns: 1fr;
  }
  
  .products h3 {
    font-size: 1.75rem;
  }
}