/**
 * Página de Productos - Diseño Moderno y Profesional
 * Terracem Guatemala
 */

/* =================================
   Products Hero
   ================================= */
.products-hero {
  position: relative;
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.products-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201, 169, 97, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(201, 169, 97, 0.06) 0%, transparent 50%);
  z-index: 1;
}

.products-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: var(--transition);
}

.hero-breadcrumb a:hover {
  color: var(--color-primary);
}

.products-hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--color-white);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.products-hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

/* =================================
   Products Main Section
   ================================= */
.products-main-section {
  background: #f7fafc;
  padding: 4rem 0;
  min-height: calc(100vh - 400px);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

/* =================================
   Sidebar
   ================================= */
.products-sidebar {
  position: relative;
}

.sidebar-sticky {
  position: sticky;
  top: 100px;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sidebar-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin: 0;
}

.category-nav {
  padding: 0.5rem 0;
}

.category-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.5rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.category-nav-item:hover {
  background: rgba(201, 169, 97, 0.05);
  border-left-color: var(--color-primary);
}

.category-nav-item.active {
  background: linear-gradient(90deg, rgba(201, 169, 97, 0.1), transparent);
  border-left-color: var(--color-primary);
}

.category-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-gray-dark);
}

.category-nav-item.active .category-name {
  font-weight: 700;
  color: var(--color-secondary);
}

.category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.5rem;
  background: var(--color-gray-light);
  border-radius: 50px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-gray-dark);
}

.category-nav-item.active .category-count {
  background: var(--color-primary);
  color: var(--color-white);
}

.sidebar-cta {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
  color: var(--color-white);
  text-align: center;
}

.sidebar-cta h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.sidebar-cta p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.btn-sidebar {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--color-white);
  color: var(--color-secondary);
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  text-align: center;
  transition: var(--transition);
}

.btn-sidebar:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* =================================
   Products Content
   ================================= */
.products-content {
  min-height: 600px;
}

.product-category-section {
  margin-bottom: 4rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.product-category-section.hidden {
  display: none;
}

.category-section-header {
  margin-bottom: 2rem;
}

.category-section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.category-section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  border-radius: 2px;
}

.category-section-header p {
  font-size: 1rem;
  color: var(--color-gray-medium);
  margin: 0;
}

/* =================================
   Products Grid Modern
   ================================= */
.products-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card-modern {
  background: var(--color-white);
  border-radius: 12px;
  padding: 2rem;
  border: 2px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card-modern:hover {
  border-color: var(--color-primary);
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.product-card-modern.featured {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.03), rgba(176, 143, 72, 0.02));
}

.featured-badge {
  position: absolute;
  top: -12px;
  right: 1.5rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.product-card-header-modern {
  margin-bottom: 1rem;
}

.product-category-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.375rem 0.75rem;
  background: rgba(201, 169, 97, 0.1);
  border-radius: 4px;
}

.product-title-modern {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 1rem;
  line-height: 1.3;
  min-height: 50px;
}

.product-description-modern {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-gray-medium);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  min-height: 75px;
}

.product-specs-modern {
  border-top: 2px solid rgba(0, 0, 0, 0.06);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.spec-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-gray-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.spec-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-secondary);
  text-align: right;
}

/* =================================
   CTA Footer
   ================================= */
.products-cta-footer {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.products-cta-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201, 169, 97, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(201, 169, 97, 0.06) 0%, transparent 50%);
  z-index: 1;
}

.cta-footer-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.cta-footer-text h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.cta-footer-text p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0;
}

.cta-footer-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.btn-primary-large,
.btn-whatsapp-large {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary-large {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-white);
  border: none;
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(201, 169, 97, 0.4);
}

.btn-whatsapp-large {
  background: #25D366;
  color: var(--color-white);
  border: none;
}

.btn-whatsapp-large:hover {
  background: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

/* =================================
   Responsive Design
   ================================= */
@media (max-width: 1200px) {
  .products-layout {
    grid-template-columns: 260px 1fr;
    gap: 2rem;
  }

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

@media (max-width: 1024px) {
  .products-layout {
    grid-template-columns: 1fr;
  }

  .products-sidebar {
    order: 2;
  }

  .products-content {
    order: 1;
  }

  .sidebar-sticky {
    position: static;
  }

  .category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
  }

  .category-nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 0.625rem 1rem;
    border-left: none;
    border-radius: var(--border-radius);
    border: 2px solid var(--color-gray-light);
  }

  .category-nav-item.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-color: var(--color-primary);
  }

  .category-nav-item.active .category-name {
    color: var(--color-white);
  }

  .category-nav-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
  }

  .products-grid-modern {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .cta-footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .cta-footer-actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .products-hero {
    padding: 4rem 0 3rem;
  }

  .products-hero h1 {
    font-size: 2.5rem;
  }

  .products-hero p {
    font-size: 1rem;
  }

  .container-wide {
    padding: 0 1.5rem;
  }

  .products-main-section {
    padding: 3rem 0;
  }

  .category-section-header h2 {
    font-size: 1.75rem;
  }

  .products-grid-modern {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-card-modern {
    padding: 1.5rem;
  }

  .cta-footer-text h2 {
    font-size: 1.75rem;
  }

  .cta-footer-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary-large,
  .btn-whatsapp-large {
    width: 100%;
    justify-content: center;
  }

  .sidebar-cta {
    display: none;
  }
}

@media (max-width: 480px) {
  .products-hero h1 {
    font-size: 2rem;
  }

  .category-nav-item {
    width: 100%;
  }

  .product-title-modern {
    font-size: 1.125rem;
  }
}
