:root {
  --bg: #fffaf7;
  --surface: #ffffff;
  --text: #2e2428;
  --muted: #766a70;
  --accent: #b66d84;
  --accent-dark: #8e4f63;
  --soft: #f5e7ec;
  --line: #eadde1;
  --shadow: 0 18px 45px rgba(77, 44, 55, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.topbar {
  min-height: 72px;
  padding: 0 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.topbar nav { display: flex; gap: 24px; }
.brand { font-family: Georgia, serif; font-size: 1.45rem; font-weight: 700; }

.hero {
  min-height: 68vh;
  display: grid;
  align-items: center;
  padding: 8vw;
  background:
    radial-gradient(circle at 82% 18%, #f2dce4 0, transparent 31%),
    radial-gradient(circle at 70% 80%, #efe3d8 0, transparent 27%),
    linear-gradient(135deg, #fffaf7, #f7ecef);
}
.hero > div { max-width: 820px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .76rem;
  color: var(--accent-dark);
  font-weight: 800;
}
h1, h2, h3 { font-family: Georgia, serif; line-height: 1.08; }
h1 { font-size: clamp(2.7rem, 7vw, 5.6rem); margin: 16px 0 22px; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); margin: 8px 0 0; }
.hero p, .section-copy, .product-description {
  color: var(--muted);
  line-height: 1.7;
}
.hero p { max-width: 650px; font-size: 1.08rem; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 8px;
}
.hero-stats > div {
  min-width: 150px;
  padding: 15px 18px;
  border: 1px solid rgba(182,109,132,.22);
  background: rgba(255,255,255,.72);
  border-radius: 18px;
}
.hero-stats strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.8rem;
}
.hero-stats span { color: var(--muted); font-size: .88rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  border: 0;
  cursor: pointer;
}
.button:hover { background: var(--accent-dark); }

.section { padding: 78px 6vw; max-width: 1500px; margin: auto; }
.section-heading { margin-bottom: 28px; }
.model-heading { display: flex; justify-content: space-between; gap: 20px; }
.section-copy { margin: 10px 0 0; }

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(190px,300px);
  gap: 14px;
  margin-bottom: 30px;
}
.catalog-toolbar input,
.catalog-toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: white;
  color: var(--text);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 54px rgba(77,44,55,.14);
}
.model-image-wrap { position: relative; }
.product-image {
  aspect-ratio: 4 / 5;
  background: var(--soft);
  object-fit: cover;
  width: 100%;
}
.product-placeholder {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, var(--soft), #f9f2f4);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.badge {
  position: absolute;
  left: 14px;
  top: 14px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: .76rem;
  font-weight: 800;
}
.product-body { padding: 19px; }
.product-body h3 { margin: 0; font-size: 1.35rem; }
.model-title-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.model-code, .model-code-detail { color: var(--muted); font-size: .82rem; }
.price { font-weight: 900; font-size: 1.14rem; margin-top: 10px; }
.old-price { color: var(--muted); text-decoration: line-through; margin-left: 8px; }
.color-row {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.swatches { display: flex; align-items: center; gap: 5px; min-height: 24px; }
.color-dot {
  --swatch: #eadde1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0,0,0,.14);
}
.color-extra, .color-count, .muted-small {
  color: var(--muted);
  font-size: .78rem;
}
.view-model {
  display: inline-block;
  margin-top: 16px;
  font-size: .84rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.status { text-align: center; color: var(--muted); padding: 20px; }
footer {
  border-top: 1px solid var(--line);
  padding: 36px 6vw;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

/* Detalle */
.product-page { padding-top: 54px; }
.product-detail {
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(340px,.95fr);
  gap: 56px;
  align-items: start;
}
.gallery-main {
  border-radius: 28px;
  overflow: hidden;
  background: var(--soft);
  aspect-ratio: 4/5;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.thumb-button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.thumbnail {
  width: 76px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid transparent;
}
.thumb-button:hover .thumbnail { border-color: var(--accent); }

.product-info { position: sticky; top: 100px; }
.product-info h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); margin-bottom: 10px; }
.detail-price { display: flex; align-items: baseline; gap: 4px; margin: 16px 0 18px; }
.detail-price .price { font-size: 1.55rem; }
.material-line { color: var(--muted); }

.variant-section {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 26px;
}
.variant-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 15px;
  margin-bottom: 16px;
}
.variant-heading h2 { font-size: 1.65rem; margin-top: 5px; }
.stock-pill {
  display: inline-flex;
  padding: 7px 10px;
  background: var(--soft);
  border-radius: 999px;
  font-size: .78rem;
  color: var(--muted);
}
.variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.variant-card {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 9px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  color: var(--text);
  cursor: pointer;
}
.variant-card:hover, .variant-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(182,109,132,.10);
}
.variant-card strong, .variant-card small { display: block; }
.variant-card small { color: var(--muted); margin-top: 3px; }
.variant-preview {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
  display: grid;
  place-items: center;
}
.variant-preview img { width: 100%; height: 100%; object-fit: cover; }
.variant-swatch {
  --swatch: #eee;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}
.empty-colors { color: var(--muted); font-size: .9rem; }
.whatsapp {
  background: #228b55;
  width: 100%;
  margin-top: 22px;
}
.whatsapp:hover { background: #176a40; }

@media (max-width: 800px) {
  .topbar nav { display: none; }
  .hero { min-height: 60vh; padding: 70px 7vw; }
  .section { padding: 54px 5vw; }
  .catalog-toolbar { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .product-card { border-radius: 18px; }
  .product-body { padding: 14px; }
  .product-body h3 { font-size: 1.08rem; }
  .color-row { align-items: flex-start; flex-direction: column; }
  .view-model { font-size: .78rem; }
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
  .product-info { position: static; }
  .variant-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

@media (max-width: 440px) {
  .products-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .product-body { padding: 12px; }
  .model-code { display: none; }
  .color-dot { width: 15px; height: 15px; }
}

.product-description { white-space:pre-line; }
[hidden] { display:none !important; }
