/* ================= RESET & VARIABLES ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand-teal: #44858f;
  --brand-teal-dark: #44858f;
  --brand-cream: #f6e0c5;
  --brand-cream-soft: #fef5e8;
  --text-main: #24454b;
  --text-muted: #5a7074;
  --shadow-light: 0 6px 18px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 14px 40px rgba(0, 0, 0, 0.06);
  --shadow-heavy: 0 18px 40px rgba(0, 0, 0, 0.08);
  --border-radius: 22px;
  --border-radius-small: 12px;
}

/* ================= BASE STYLES ================= */
body {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: var(--text-main);
  position: relative;
}

/* ================= HEADER ================= */
header {
  padding: 1.1rem 1rem 1rem;
  background: var(--brand-teal);
  color: var(--brand-cream);
  text-align: center;
}

.brand-title {
  display: inline-block;
  line-height: 1.05;
  margin-bottom: 6px;
}

.brand-title .sweet {
  display: block;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.brand-title .harmony {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

header .linea {
  border: none;
  border-top: 2px solid var(--brand-cream);
  width: 70%;
  max-width: 260px;
  min-width: 140px;
  margin: 6px auto;
}

header p {
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ================= LAYOUT ================= */
.container {
  max-width: 1200px;
  margin: 2.5rem auto 4rem;
  padding: 2.5rem 2rem 3.5rem;
  background: #f7fbfc;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-heavy);
}

/* ================= PRODUCT GRID ================= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
}

/* ================= PRODUCT CARD ================= */
.product-card {
  background: rgba(0, 128, 96, 0.12);
  border-radius: var(--border-radius);
  padding: 1.8rem 1.6rem 2.2rem;
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(0, 128, 96, 0.12);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Product Header */
.product-header {
  margin-bottom: 1.2rem;
}

.product-header h2 {
  font-size: 1.6rem;
  margin: 0.35rem 0;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brand-teal);
  margin-bottom: 0.4rem;
}

.product-desc {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Pill */
.pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-teal);
  color: #ffffff;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Product Body */
.product-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: start;
}

/* ================= IMAGE GALLERY ================= */
.hero-image-card {
  background: var(--brand-cream-soft);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  touch-action: pan-y;
}

.product-image {
  width: 100%;
  max-height: 360px;
  border-radius: var(--border-radius-small);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.2s ease, opacity 0.35s ease;
  will-change: transform;
}

/* Fade animations for images */
.product-image.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.product-image.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

/* Thumbnails - MEJORADO CON LOADING */
.thumbs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.3s ease;
  position: relative;  /* Para ::after */
}

.thumbs.loading {
  opacity: 0.6;
}

.thumbs.loading::after {
  content: 'Cargando miniaturas...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  z-index: 2;
}

.thumb {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  border: 2px solid transparent;
  transition: all 0.25s ease;
}

.thumbs:not(.loading) .thumb {
  opacity: 0.6;  /* Default no-active */
}

.thumbs:not(.loading) .thumb.active {
  opacity: 1;  /* Solo active full */
}

.thumb:hover {
  opacity: 0.9 !important;
  transform: translateY(-1px);
}

.thumb.active {
  border-color: var(--brand-teal);
}

/* ================= PRODUCT INFO ================= */
.product-info p {
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 0.45rem;
  color: #465e62;
}

/* ================= COLOR PICKER ================= */
.color-picker {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.color-label {
  font-size: 0.85rem;
  margin-right: 0.4rem;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

/* Color definitions */
.color-dot[data-color="negro"] { background: #111; }
.color-dot[data-color="rojo"] { background: #d81515; }
.color-dot[data-color="verde"] { background: #abd5c0; }
.color-dot[data-color="rosa"] { background: #d9a0a5; }
.color-dot[data-color="mandarina"] { background: #ffd3ac; }
.color-dot[data-color="burgundy"] { background: #6b1f2b; }
.color-dot[data-color="babyblue"] { background: #8fb6d8; }
.color-dot[data-color="beige"] { background: #e5d2b0; }
.color-dot[data-color="chocolate"] { background: #5a3a28; }

.color-dot.active {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(68, 133, 143, 0.25);
}

/* ================= BUTTONS ================= */
.btn-primary {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: var(--brand-teal);
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--brand-teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ================= BENEFITS SECTION ================= */
.section-title {
  font-size: 1.3rem;
  margin: 2.8rem 0 1rem;
  text-align: center;
}

.fit-info {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  color: var(--text-muted);
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.2rem;
}

.feature {
  background: #ffffff;
  border-radius: var(--border-radius-small);
  padding: 1rem;
  box-shadow: var(--shadow-light);
  font-size: 0.9rem;
  border: 1px solid rgba(68, 133, 143, 0.08);
}

/* ================= ANIMATIONS ================= */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= WHATSAPP BUTTON ================= */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--brand-teal);
  color: #ffffff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 100;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(68, 133, 143, 0.35); }
  70% { transform: scale(1.07); box-shadow: 0 0 0 12px rgba(68, 133, 143, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(68, 133, 143, 0); }
}

/* ================= TEXTURE & EFFECTS ================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url("/?originalUrl=https%3A%2F%2Fsweeth.com.co%2F%2523n")' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

header,
.container,
.product-card,
section,
footer {
  position: relative;
  z-index: 1;
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent, rgba(0, 128, 96, 0.12), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.product-card:hover::after {
  opacity: 1;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
  .product-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    background: #ffffff;
  }
  
  /* Cambiar las características a 1 columna */
  .features {
    grid-template-columns: 1fr !important; /* Fuerza 1 columna */
    gap: 1.2rem;
  }
  
  /* Ajustes para móvil */
  .product-card {
    padding: 16px;
    border-radius: 16px;
  }
  
  .product-header {
    text-align: center;
  }
  
  .product-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
  }
  
  .product-desc {
    font-size: 14px;
    line-height: 1.4;
  }
  
  .product-image {
    max-width: 320px;
    margin: 16px auto;
  }
  
  .thumbs {
    gap: 8px;
    margin-top: 10px;
  }
  
  .thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
  }
  
  .color-picker {
    justify-content: center;
  }
  
  .color-dot {
    width: 26px;
    height: 26px;
  }
  
  .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: 30px;
    margin-top: 16px;
  }
  
  .btn-primary:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }
}

@media (max-width: 480px) {
  .brand-title .sweet {
    font-size: 1.5rem;
  }
  
  .brand-title .harmony {
    font-size: 1.6rem;
  }
  
  .container {
    padding: 1.5rem 1rem 2.5rem;
    margin: 1.5rem auto 3rem;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .product-card {
    padding: 1.2rem 1rem 1.8rem;
  }
  
  /* Asegurar que características sea 1 columna en móvil muy pequeño */
  .features {
    grid-template-columns: 1fr !important;
  }
}

/* ================= FOOTER DE MARCA ================= */

.brand-footer {
  margin-top: 4rem;
  padding: 3rem 1.5rem 2.5rem;
  background: var(--brand-cream-soft);
  text-align: center;
}

.brand-footer-content {
  max-width: 520px;
  margin: 0 auto;
}

/* TITULO */

.brand-footer-title {
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.brand-footer-title .sweet {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  font-weight: 500; /* Medium */
  letter-spacing: 0.22em;
  color: var(--text-main);
}

.brand-footer-title .harmony {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.9rem;
  font-weight: 700; /* Bold */
  letter-spacing: 0.22em;
  color: var(--text-main);
}

/* LINEA */

.brand-footer-line {
  border: none;
  border-top: 2px solid var(--brand-teal);
  width: 160px;
  margin: 0.8rem auto 0.9rem;
  opacity: 0.6;
}

/* ESTUDIO */

.brand-footer-studio {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

/* CONTACTO */

.brand-footer-contact {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.brand-footer-contact a {
  font-size: 0.8rem;
  text-decoration: none;
  letter-spacing: 0.12em;
  color: var(--brand-teal);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-footer-contact a:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}

/* MOBILE */

@media (max-width: 480px) {
  .brand-footer {
    padding: 2.4rem 1rem 2rem;
  }

  .brand-footer-title .sweet {
    font-size: 1.5rem;
  }

  .brand-footer-title .harmony {
    font-size: 1.6rem;
  }
}

.brand-footer-location a {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.brand-footer-location a:hover {
  opacity: 1;
}

.brand-footer-legal {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 1rem;
}

.brand-footer-credits {
  font-size: 0.7rem;
  opacity: 0.55;
  margin-top: 0.4rem;
  letter-spacing: 0.4px;
}
.brand-footer-signature {
  margin-top: 0.8rem;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.45;
  font-family: 'Montserrat', system-ui, sans-serif;
}
