/* ===== Variables (design tokens) ===== */
:root {
  --color-primary: #4a6fa6;
  --color-text: #1a1a1a;
  --color-text-muted: #969696;
  --color-white: #ffffff;
  --color-overlay: rgba(255, 255, 255, 0.35);
  --font-heading: 'Codec Pro', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-body-alt: 'Geist', 'Noto Sans', 'Inter', system-ui, sans-serif;
  --radius-sm: 40px;
  --radius-tag: 100px;
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.1);
  --max-width: 1920px;
  --section-gap: clamp(60px, 8vw, 120px);
  --container-padding: clamp(20px, 5vw, 80px);
}

/* ===== Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
}

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

/* Ocultar visualmente manteniendo en el árbol para SEO y lectores de pantalla */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Layout principal ===== */
.lp-desktop {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--color-white);
}

/* ===== Banner ===== */
.banner {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 10px 20px;
}

.banner p {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(10px, 1.2vw, 12px);
  letter-spacing: 1.44px;
  font-weight: 400;
}

/* ===== Hero ===== */

.hero {
  position: relative;
  min-height: min(600px, 65vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0px 0px 60px;
  overflow: hidden;
}

.hero-bg {
  inset: 0;
  pointer-events: none;
}

.hero-bg-mobile {
  display: none;
}

.hero-bg img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

.hero-logo {
  position: absolute;
  z-index: 1;
  width: min(312px, 80vw);
  max-width: 100%;
}

.hero-logo img {
  width: 100%;
  height: auto;
}

.hero-products {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 2vw, 24px);
  flex-wrap: wrap;
  margin-top: 20px;
  width: 100%;
}

.hero-product {
  width: 100%;
  object-fit: cover;
}

/* ===== Secciones genéricas ===== */
.section {
  padding: var(--section-gap) var(--container-padding);
}

.section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 164px);
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.section-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 600 / 685;
}

.section-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-text {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.5;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--color-primary);
}

.section-text-right {
  text-align: right;
}

/* Primera sección: imagen a la izquierda, texto a la derecha (orden natural del grid) */
.section-image-text .section-text {
  text-align: right;
}

/* ===== Sección ingredientes ===== */
.section-ingredients {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--section-gap) var(--container-padding);
}

.ingredients-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ingredients-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ingredients-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.ingredients-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 400;
  letter-spacing: 4.8px;
  color: var(--color-text);
}

.ingredients-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 7px;
  justify-content: flex-end;
}

.ingredient-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 40px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-tag);
  font-family: var(--font-heading);
  font-size: clamp(12px, 1vw, 16px);
  letter-spacing: 2.4px;
  color: var(--color-text);
  white-space: nowrap;
}

/* ===== Sección productos ===== */
.section-products {
  padding: var(--section-gap) var(--container-padding);
}

.products-tabs {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.products-tab {
  font-family: var(--font-heading);
  font-size: clamp(18px, 1.5vw, 24px);
  letter-spacing: 1.44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  color: var(--color-text-muted);
  position: relative;
}

.products-tab.is-active {
  color: var(--color-text);
}

.products-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--color-text);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1680px;
  margin: 0 auto;
}

.products-grid.is-hidden {
  display: none;
}

.product-card {
  display: flex;
  gap: 12px;
  padding: 20px 40px;
  background: var(--color-white);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  text-align: left;
}

.product-card-image {
  flex-shrink: 0;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-image img {
  max-height: 320px;
  width: auto;
  object-fit: contain;
}

.product-card-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
  justify-content: center;
}

.product-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(18px, 1.4vw, 24px);
  font-weight: 700;
  letter-spacing: 3.6px;
  color: var(--color-primary);
  line-height: 1.2;
}

.product-subtitle {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(14px, 1vw, 16px);
  letter-spacing: 2.4px;
  color: var(--color-primary);
}

.product-desc {
  margin: 0;
  font-family: var(--font-body-alt);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.64px;
  color: var(--color-text);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px var(--container-padding);
  overflow: hidden;
}

.footer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.footer-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-logo {
  width: min(340px, 60vw);
}

.footer-logo img {
  width: 100%;
  height: auto;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-body);
  font-size: clamp(14px, 1vw, 16.627px);
  color: var(--color-text);
}

.footer-contact p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-contact a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.icon-pin {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.icon-ig {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2'%3E%3Crect x='2' y='2' width='20' height='20' rx='5'/%3E%3Cpath d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z'/%3E%3Cline x1='17.5' y1='6.5' x2='17.51' y2='6.5'/%3E%3C/svg%3E");
}

.icon-mail {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
}

/* ===== Responsive: tablet ===== */
@media (max-width: 1024px) {
  .section-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section-image-text .section-inner .section-media {
    order: 1;
  }

  .section-image-text .section-inner .section-text {
    order: 2;
  }

  .section-text-image .section-inner .section-text {
    order: 1;
  }

  .section-text-image .section-inner .section-media {
    order: 2;
  }

  .ingredients-content {
    max-width: 100%;
    align-items: center;
    padding-top: 25px;
  }

  .ingredients-tags {
    justify-content: center;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .product-card-image {
    width: 100%;
    max-width: 280px;
  }
  .product-desc{
    line-height: 1.1;
  }
}

/* ===== Responsive: mobile ===== */
@media (max-width: 768px) {
  .hero-products {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .section-ingredients{
    flex-direction: column;
  }

  #section-ingredientes-eficacia{
    order: 2 !important;
  }

  .section-media{
    order: 1 !important;
  }

  .hero-product {
    height: 100px;
  }

  .section-media {
    aspect-ratio: 4/5;
  }

  .ingredients-bg{
    position: static;
  }

  .ingredients-tags {
    gap: 6px 10px;
  }

  .product-card {
    padding: 24px;
  }

  .product-card-body {
    gap: 20px;
  }

  .ingredient-tag {
    padding: 8px 16px;
    font-size: 12px;
  }

  .products-tabs {
    align-items: center;
  }
  .hero-bg-mobile {
    display: block;
  }
  .hero-bg-desktop {
    display: none;
  }
  .ingredients-bg{
    position: static;
  }
}
