:root {
  --primary: #5E8B7E;
  --primary-dark: #3D5A50;
  --primary-light: #DCEFE8;
  --accent: #D9B99B;
  --bg: #F7F4EE;
  --white: #FFFFFF;
  --text: #2B2B2B;
  --muted: #6F7A76;
  --border: #E4E7E5;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

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

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
}

.brand h1 {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.brand p {
  font-size: 0.9rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: var(--text);
  font-weight: 600;
  transition: 0.3s;
}

.main-nav a:hover {
  color: var(--primary);
}

.cart-btn {
  background: var(--primary-dark);
  color: var(--white);
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.cart-btn:hover {
  background: var(--primary);
}

/* HERO */
.hero {
  padding: 70px 0 50px;
  background:
    radial-gradient(circle at top right, rgba(94, 139, 126, 0.18), transparent 30%),
    linear-gradient(180deg, #f8f5ef 0%, #f7f4ee 100%);
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-text h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 18px;
  color: var(--primary-dark);
}

.hero-text p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 26px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn-primary {
  background: var(--primary-dark);
  color: var(--white);
}

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

.btn-secondary {
  background: var(--white);
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #f1f5f3;
}

.hero-card {
  display: flex;
  justify-content: center;
}

.hero-mini-card {
  width: 100%;
  max-width: 360px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero-mini-card h3 {
  color: var(--primary-dark);
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.hero-mini-card p {
  color: var(--muted);
}

/* SECCIONES */
.categories-section,
.featured-section,
.benefits-section {
  padding: 70px 0;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.section-heading p {
  color: var(--muted);
}

/* CATEGORÍAS */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 18px;
  text-align: center;
  font-weight: 700;
  color: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

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

/* PRODUCTOS */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

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

.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: #f2f2f2;
  transition: transform 0.35s ease;
}

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

.product-info {
  padding: 18px;
}

.product-category {
  display: inline-block;
  font-size: 0.8rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-weight: 700;
}

.product-title {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text);
  min-height: 48px;
}

.product-description {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 14px;
}

.product-actions {
  display: flex;
  gap: 10px;
}

.add-to-cart-btn {
  width: 100%;
  border: none;
  padding: 12px;
  border-radius: 12px;
  background: var(--primary-dark);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.add-to-cart-btn:hover {
  background: var(--primary);
}

.view-product-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--primary-dark);
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.3s;
}

.view-product-btn:hover {
  background: #f3f6f4;
}

/* DESTACADOS */
.featured-footer {
  margin-top: 32px;
  text-align: center;
}

.featured-footer p {
  color: var(--muted);
  margin-bottom: 16px;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.7;
}

/* BENEFICIOS */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.benefit-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.benefit-card h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.benefit-card p {
  color: var(--muted);
}

/* CARRITO */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 100%;
  height: 100vh;
  background: var(--white);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-sidebar.active {
  right: 0;
}

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

.cart-header h2 {
  color: var(--primary-dark);
}

.cart-header button {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-footer {
  border-top: 1px solid var(--border);
  padding: 20px;
}

.full-width {
  width: 100%;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 1500;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-item {
  background: #f8f8f8;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.qty-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.qty-btn {
  border: none;
  background: var(--primary-dark);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.qty-btn:hover {
  background: var(--primary);
}

.remove-btn {
  background: #b85c5c;
}

.remove-btn:hover {
  background: #a14c4c;
}

.empty,
.empty-products {
  color: var(--muted);
  padding: 20px 0;
  text-align: center;
}

/* CATÁLOGO */
.catalog-hero {
  padding: 70px 0 30px;
}

.catalog-heading {
  max-width: 760px;
}

.catalog-page-section {
  padding: 20px 0 70px;
}

.catalog-toolbar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box,
.filter-box {
  flex: 1;
  min-width: 220px;
}

.search-box input,
.filter-box select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--white);
  outline: none;
}

.search-box input:focus,
.filter-box select:focus {
  border-color: var(--primary);
}

.toolbar-actions {
  display: flex;
  align-items: stretch;
}

.clear-filters-btn {
  white-space: nowrap;
}

.catalog-status-bar {
  margin-bottom: 24px;
}

.catalog-status-bar p {
  color: var(--muted);
  font-weight: 600;
}

.load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.active-link {
  color: var(--primary-dark);
  font-weight: 700;
}

/* BOTÓN FLOTANTE WHATSAPP */
.floating-whatsapp {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
  z-index: 2100;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.floating-whatsapp:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.4);
}

/* MODAL DE PRODUCTO */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  z-index: 2500;
}

.product-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.product-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(920px, 92%);
  background: var(--white);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  z-index: 2600;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  overflow: hidden;
}

.product-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.product-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 3;
}

.product-modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

.product-modal-image-wrapper {
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.product-modal-image {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: 18px;
}

.product-modal-info {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-modal-category {
  display: inline-block;
  width: fit-content;
  font-size: 0.85rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  font-weight: 700;
}

.product-modal-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.product-modal-badge {
  display: inline-flex;
  align-items: center;
  background: #eef7f2;
  color: #2f6b57;
  border: 1px solid #d8ebe1;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.product-modal-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.product-modal-info h3 {
  font-size: 2rem;
  line-height: 1.1;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.product-modal-description {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 20px;
}

.product-modal-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 24px;
}

.product-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* SECCIÓN CONFIANZA */
.trust-section {
  background: #f7faf9;
  padding: 70px 0;
}

.trust-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.trust-card {
  background: var(--white);
  padding: 28px;
  border-radius: 18px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trust-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.trust-icon {
  font-size: 30px;
  margin-bottom: 12px;
}

.trust-card h3 {
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.trust-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* FOOTER */
.site-footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: 50px 0;
  margin-top: 30px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.site-footer h3,
.site-footer h4 {
  margin-bottom: 12px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .hero-content,
  .products-grid,
  .categories-grid,
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
  }

  .trust-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .products-grid,
  .categories-grid,
  .benefits-grid,
  .trust-container {
    grid-template-columns: 1fr;
  }

  .header-container {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 14px 0;
  }

  .brand h1 {
    font-size: 1.4rem;
  }

  .hero {
    padding-top: 50px;
  }

  .hero-text h2 {
    font-size: 2rem;
  }

  .cart-sidebar {
    width: 100%;
  }

  .floating-whatsapp {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
    font-size: 1.4rem;
  }

  .product-modal-content {
    grid-template-columns: 1fr;
  }

  .product-modal-info {
    padding: 24px;
  }

  .product-modal-info h3 {
    font-size: 1.5rem;
  }

  .product-modal-image {
    max-height: 320px;
  }

  .toolbar-actions {
    width: 100%;
  }

  .clear-filters-btn {
    width: 100%;
  }
}