:root {
  color-scheme: light;
  --bg: #fff6f6;
  --card: #fffafa;
  --ink: #2b1619;
  --muted: #7a4a51;
  --accent: #ef3e4a;
  --accent-soft: #ffd6d2;
  --accent-dark: #c42433;
  --rose-gold: #d9a07f;
  --line: #f6dede;
  --shadow: 0 12px 30px rgba(239, 62, 74, 0.15);
  font-size: clamp(15px, 0.95rem + 0.2vw, 18px);
}

/* Asegura que los elementos con atributo hidden no se muestren,
   incluso si alguna regla les asigna display */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

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

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

button {
  font: inherit;
  border: none;
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(255, 246, 246, 0.95);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem clamp(1rem, 6vw, 6rem);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo img {
  height: 3.4rem;
  width: 3.4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(239, 62, 74, 0.4);
  filter: drop-shadow(0 6px 12px rgba(239, 62, 74, 0.25));
}

.logo p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.main-nav a {
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.social-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.25rem;
}

.social-icons .icon {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.social-icons .icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.social-icons .icon-img {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.social-icons .icon.cart {
  position: relative;
  color: var(--rose-gold);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  display: grid;
  place-items: center;
}

.social-icons .icon.ig svg {
  fill: var(--accent);
}

.social-icons .icon.wa svg {
  fill: #25d366;
}

.social-icons .icon:hover {
  border-color: var(--accent-soft);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: none;
}

.menu-toggle span {
  width: 1.5rem;
  height: 2px;
  background: var(--ink);
}

/* Asegura que el botón Volver en admin quede visible y a la derecha */
.site-header .admin-back {
  margin-left: auto;
}

main {
  padding: clamp(2rem, 8vw, 6rem);
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 5vw, 6rem);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-card {
  background: linear-gradient(150deg, #fff, rgba(255, 214, 210, 0.4));
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-card ul {
  padding-left: 1rem;
  color: var(--muted);
}

.hero-card li {
  margin-bottom: 0.4rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent-dark);
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

.lead {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

.hero-badges {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-badges div {
  background: rgba(255, 214, 210, 0.35);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--line);
  min-width: 130px;
}

.badge-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
}

.pill-button {
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.pill-button.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 20px rgba(239, 62, 74, 0.35);
}

.pill-button.secondary {
  background: rgba(255, 214, 210, 0.3);
  color: var(--accent-dark);
  border: 1px solid var(--accent-soft);
}

.pill-button.admin-launcher {
  background: linear-gradient(120deg, var(--accent), var(--rose-gold));
  color: white;
  box-shadow: 0 10px 25px rgba(217, 160, 127, 0.4);
}

.pill-button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.header-cta {
  margin-left: 0.25rem;
}

.pill-button.small {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.pill-button.large {
  font-size: 1rem;
  padding: 0.85rem 1.8rem;
}

.pill-button:active {
  transform: translateY(1px);
}

.product-showcase {
  background: var(--card);
  border-radius: 2rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(217, 160, 127, 0.1);
}

.section-heading {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.filters {
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chip {
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 214, 210, 0.45);
  padding: 0.35rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  transition: all 0.2s ease;
}

.chip.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* Cards de showrooms reutilizan estilos de product-card */
.showroom-card .cover {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
}
.showroom-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox de showrooms */
#showroomDialog .sr-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  max-height: 70vh;
}

#srMainImg {
  max-width: 100%;
  max-height: 70vh;
  display: block;
}

#showroomDialog .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

#showroomDialog .nav.prev { left: 0.5rem; }
#showroomDialog .nav.next { right: 0.5rem; }

.sr-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.sr-thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 2px solid transparent;
  cursor: pointer;
}

.sr-thumbs img.active { border-color: var(--accent); }

.product-card {
  background: #fff8f6;
  border-radius: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 240px; /* evita que una foto muy apaisada/vertical ocupe toda la pantalla */
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(239, 62, 74, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
}

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

.product-card .title-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: 600;
  color: var(--accent);
}

.tag {
  display: inline-block;
  background: rgba(239, 62, 74, 0.12);
  color: var(--accent-dark);
  border-radius: 0.75rem;
  padding: 0.25rem 0.9rem;
  font-size: 0.8rem;
}

.tag.stock-out {
  background: rgba(239, 62, 74, 0.18);
  color: #8f3c1d;
}

.kits-section {
  background: linear-gradient(120deg, #fff0f5, #ffe7e2 60%);
  border-radius: 2rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
}

.kits-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kit-benefits {
  padding-left: 1.2rem;
  color: var(--muted);
}

.kits-card {
  border-radius: 1.75rem;
  border: 1px dashed rgba(217, 160, 127, 0.6);
  padding: 1.75rem;
  background: #fff7f4;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 15px 35px rgba(217, 160, 127, 0.14);
}

.kit-palette {
  display: flex;
  gap: 0.75rem;
}

.swatch {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
}

.swatch.terracotta {
  background: #ef3e4a;
}

.swatch.honey {
  background: #ff9aa2;
}

.swatch.sage {
  background: #ffd6d2;
}

.swatch.cloud {
  background: #f0c6b5;
  border: 1px solid rgba(217, 160, 127, 0.5);
}

.kit-includes ul {
  padding-left: 1.1rem;
  margin: 0.3rem 0 0;
}

.creators {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.creator-card {
  background: #fff7f5;
  border-radius: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.creator-card .avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: rgba(239, 62, 74, 0.12);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-weight: 600;
}

.creator-card .avatar.photo {
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  border: 2px solid rgba(239, 62, 74, 0.25);
  color: transparent;
}

.creator-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.creator-card a:hover {
  text-decoration: underline;
}

/* Proveedoras */
.brands {
  background: var(--card);
  border-radius: 2rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(217, 160, 127, 0.1);
}

.brands-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.brand-card {
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  height: 120px;
  box-shadow: 0 10px 20px rgba(217,160,127,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.brand-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(217,160,127,0.14);
  border-color: rgba(239, 62, 74, 0.25);
}

.brand-card img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--rose-gold);
  background: #fff;
  padding: 6px;
  object-fit: contain;
  display: block;
  box-shadow: 0 8px 20px rgba(217, 160, 127, 0.25);
}

.account-section {
  background: linear-gradient(135deg, #fff, rgba(255, 214, 210, 0.5));
  border-radius: 2rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line);
}

.account-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  justify-content: center;
  align-items: center;
}

/* Centrar botón de Google en la landing */
#googleButtonContainerLanding {
  display: flex;
  justify-content: center;
  align-items: center;
}

.material-icon {
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(239, 62, 74, 0.35);
}

.helper-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  padding: 2rem clamp(1rem, 6vw, 6rem) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  background: rgba(255, 214, 210, 0.25);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-note {
  width: 100%;
  margin: 0;
  text-align: right;
  font-size: 0.85rem;
  color: var(--accent-dark);
}

/* Footer minimal centrado */
.site-footer.minimal {
  justify-content: center;
  align-items: center;
}

.footer-center {
  margin: 0;
  text-align: center;
}

.footer-love {
  margin: 3rem 0 0; /* mucho más abajo */
  text-align: center;
  font-size: 0.7rem; /* más pequeño */
  color: var(--muted);
  opacity: 0.75;
}

dialog {
  border: none;
  border-radius: 1.5rem;
  padding: 0;
  box-shadow: var(--shadow);
  width: min(90vw, 420px);
}

dialog::backdrop {
  background: rgba(30, 27, 22, 0.45);
}

.dialog-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dialog-content.admin {
  gap: 1.5rem;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.close-button {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  padding: 0.55rem 0.8rem;
  font: inherit;
  background: #fffdfc;
}

.admin-auth {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#teamProfile {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 214, 210, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-status {
  margin: 0;
}

#teamEmail {
  font-size: 0.85rem;
  color: var(--muted);
}

#googleButtonContainer {
  display: flex;
  justify-content: center;
}

.team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-form .two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.inventory-panel {
  border: 1px dashed var(--accent-soft);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 214, 210, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inventory-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inventory-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inventory-panel li {
  background: #fff;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.inventory-panel .two-col input[type="number"] {
  width: 100%;
}

.inventory-panel li span {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Thumbnails para inventario admin */
.inventory-panel .inv-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.inventory-thumb {
  width: 56px;
  height: 56px;
  border-radius: 0.5rem;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}

.inventory-thumb.placeholder {
  background: linear-gradient(120deg, #fff0f5, #ffe7e2);
}

.inventory-panel .inv-meta strong {
  display: block;
}

/* Cart simple */
#cartPanel {
  margin-top: 1rem;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

.toast {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: min(90vw, 380px);
}

.toast .toast-action {
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
}

/* Cart icon bump animation */
.cart-bump { animation: cart-bump 300ms ease; }
@keyframes cart-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@media (max-width: 900px) {
  .main-nav {
    position: absolute;
    inset: 4.2rem 1rem auto;
    background: var(--card);
    border-radius: 1rem;
    padding: 1rem;
    flex-direction: column;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10; /* por debajo del toggle */
  }

  .main-nav.open {
    opacity: 1;
    pointer-events: all;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
    position: relative;
    z-index: 20; /* por encima del menú desplegado */
  }

  .header-cta {
    order: 3;
  }
}

/* Backdrop para el menú móvil */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 22, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 8; /* debajo del menú (10) y del toggle (20) */
}
.nav-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
  }

  .hero-badges {
    flex-direction: column;
  }

  .account-actions {
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-note {
    text-align: left;
  }

  /* Mostrar iconos sociales también en móvil */
  .social-icons { display: flex; }

  /* Header minimalista en móvil: ocultar CTA secundario */
  .header-cta { display: none; }

  /* Imágenes de producto un poco más compactas en móvil */
  .product-media { max-height: 200px; }
}
