:root {
  --primary: #c27a8b;
  --dark: #3a3a49;
  --soft: #ede6e8;
  --softer: #f4ebec;
  --ink: #171717;
  --muted: #6b6b76;
  --line: #e7e5e6;
  --star: #fec43d;
  --sale: #df5169;
  --wrap: 1280px;
  --heading: "Albert Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: #fff; }
body.locked { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--heading); margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.section { padding-top: 32px; padding-bottom: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-head h2 { font-size: 20px; font-weight: 700; }
.section-head a { font-size: 14px; color: var(--muted); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Cabecera */
.announce { position: relative; background: var(--dark); color: #fff; text-align: center; padding: 8px 48px; font-size: 14px; font-weight: 500; }
.announce button { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: #fafafa; color: #404040; display: grid; place-items: center; }
.announce .icon { width: 16px; height: 16px; }
.site-header { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.header-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-top: 6px; padding-bottom: 6px; }
.logo { grid-column: 2; }
.logo img { height: 46px; width: auto; margin: 6px 0; }
.header-tools { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 16px; }
.search-mini { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.search-mini input { border: 0; outline: 0; width: 120px; font-size: 14px; background: none; }
.cart-btn { position: relative; display: grid; place-items: center; }
.cart-count { position: absolute; top: -8px; right: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.header-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 8px; padding-bottom: 8px; }
.nav-links { display: flex; gap: 24px; font-size: 15px; }
.nav-links > a, .nav-links button { padding: 2px 0; }
.nav-links a:hover, .nav-links button:hover { color: var(--primary); }
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 40; min-width: 220px; padding: 8px 0; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 8px 16px; font-size: 14px; }
.rating-link { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.rating-link em { font-style: normal; color: var(--primary); }
.stars { color: var(--star); letter-spacing: 1px; font-size: 18px; line-height: 1; }

/* Banner */
.banner { position: relative; height: clamp(240px, 37vw, 520px); background: var(--primary); overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner h3 { position: absolute; top: 50%; left: 46%; right: 16px; transform: translateY(-50%); color: #fff; font-size: 24px; font-weight: 600; text-shadow: 0 1px 8px rgb(0 0 0 / .35); }

/* Carruseles */
.carousel { position: relative; }
.track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; flex: none; }
.arrow { position: absolute; top: 40%; z-index: 5; width: 36px; height: 36px; border-radius: 50%; background: rgb(255 255 255 / .85); box-shadow: 0 2px 6px rgb(0 0 0 / .15); display: grid; place-items: center; }
.arrow.prev { left: 8px; }
.arrow.next { right: 8px; }

.featured-item { width: calc((100% - 24px) / 3); background: var(--soft); display: flex; flex-direction: column; }
.featured-item img { width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; }
.featured-item div { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 16px; text-align: center; font-size: 14px; }

.promo-card { position: relative; width: 100%; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; border: 1px solid var(--line); padding: 0 32px; min-height: 240px; }
.promo-card img { width: 100%; height: 100%; max-height: 240px; object-fit: cover; }
.promo-badge { position: absolute; top: 0; left: 0; background: var(--primary); color: #fff; font-size: 13px; padding: 10px 14px; }
.promo-card h3 { font-size: 16px; font-weight: 600; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.promo-card p { font-size: 14px; color: var(--muted); margin: 0; }

.cat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 760px; margin: 0 auto; }
.cat-chip { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.cat-chip img { width: 64px; height: 64px; object-fit: cover; }

/* Tarjetas de producto */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 16px; }
.track .card { width: 200px; }
.card { position: relative; display: flex; flex-direction: column; font-size: 14px; }
.card-img { position: relative; aspect-ratio: 4 / 5; background: var(--softer); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-off { position: absolute; top: 8px; left: 8px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.card-tag { align-self: flex-start; margin-top: 8px; background: var(--primary); color: #fff; font-size: 11px; padding: 2px 8px; }
.card-tag.soldout { background: var(--dark); }
.card-name { margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 600; margin-top: auto; }
.price.sale { color: var(--sale); }
.price s { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }

.best-title { text-align: center; font-size: 28px; font-weight: 700; padding: 32px 16px; border-top: 1px solid var(--line); }
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; margin-bottom: 48px; }
.showcase.flip .showcase-cover { order: 2; }
.showcase-cover { display: block; }
.showcase-cover img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.showcase-cover div { background: var(--soft); text-align: center; padding: 24px; }
.showcase-cover h3 { font-size: 18px; margin-bottom: 8px; }
.showcase-cover span { font-size: 13px; color: var(--muted); }
.showcase .product-grid { grid-template-columns: repeat(3, 1fr); }

.review-card { width: 260px; background: var(--soft); padding: 24px; text-align: center; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.review-card p { flex: 1; margin: 0; }
.review-card strong { font-weight: 600; }

.about-block { display: grid; grid-template-columns: 1fr 1fr; background: var(--softer); align-items: stretch; }
.about-block img { width: 100%; height: 100%; object-fit: cover; }
.about-block div { padding: 40px; font-size: 15px; }
.about-block h2 { font-size: 24px; margin-bottom: 4px; }
.about-block h3 { font-size: 16px; font-weight: 500; color: var(--muted); margin-bottom: 16px; }

/* Listados */
.page-hero { background: var(--soft); text-align: center; padding: 40px 16px; }
.page-hero h1 { font-size: 36px; color: var(--dark); margin-bottom: 20px; }
.hero-search { display: flex; max-width: 500px; margin: 0 auto; background: #fff; padding: 4px; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 8px 12px; }
.btn { display: inline-block; background: var(--primary); color: #fff; padding: 10px 20px; font-weight: 600; font-size: 14px; text-align: center; }
.btn:hover { filter: brightness(.95); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.list-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; margin-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-bar select { border: 1px solid var(--line); padding: 6px 8px; background: #fff; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.promo-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; border: 1px solid var(--line); margin-top: 24px; }
.promo-hero img { width: 100%; max-height: 320px; object-fit: cover; }
.promo-hero div { padding: 24px; font-size: 14px; white-space: pre-line; }
.promo-hero h1 { font-size: 22px; margin-bottom: 8px; }

/* Ficha de producto */
.product { display: grid; grid-template-columns: 80px 1fr 1fr; gap: 16px 24px; padding: 24px 16px; align-items: start; }
.thumbs { display: flex; flex-direction: column; gap: 8px; }
.thumbs button { border: 2px solid transparent; }
.thumbs button.on { border-color: var(--primary); }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.main-img { aspect-ratio: 1; background: var(--softer); }
.main-img img { width: 100%; height: 100%; object-fit: cover; }
.product h1 { font-size: 28px; font-weight: 500; padding-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.chip { background: var(--soft); padding: 2px 8px; font-size: 12px; }
.unit { font-size: 14px; }
.product .price { font-size: 18px; margin-bottom: 12px; }
.promo-box { border: 1px dashed var(--line); padding: 12px; max-width: 200px; margin: 8px 0 16px; font-size: 13px; }
.promo-box a { display: block; text-align: center; border: 1px solid var(--line); padding: 4px; margin-top: 8px; }
.field { display: block; margin-bottom: 12px; font-size: 14px; }
.field select { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--line); background: #fff; }
.buy { display: flex; gap: 16px; align-items: flex-end; }
.buy .btn { flex: 1; padding: 12px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; line-height: 1; }
.qty span { min-width: 20px; text-align: center; font-size: 14px; }
.product-desc { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 32px; }
.product-desc h2 { font-size: 18px; margin-bottom: 8px; }
.product-desc p { white-space: pre-line; margin: 0; font-size: 15px; }

/* Reseñas y acerca de */
.reviews-head { padding: 32px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.reviews-head h1 { font-size: 24px; margin-bottom: 4px; }
.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 32px; }
.review-row { border: 1px solid var(--line); padding: 16px; font-size: 14px; }
.review-row header { display: flex; justify-content: space-between; color: var(--muted); }
.review-row header strong { color: var(--ink); }
.review-row p { margin: 8px 0; }
.review-thumbs { display: flex; gap: 6px; margin-top: 8px; }
.review-thumbs img { width: 48px; height: 48px; object-fit: cover; border: 1px solid var(--line); }
.prose { max-width: 760px; margin: 0 auto; padding: 40px 16px; }
.prose h1 { font-size: 30px; margin-bottom: 20px; }
.prose img { width: 100%; margin-bottom: 24px; }

/* Pie */
.site-footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 40px 0 24px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 32px; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 12px; }
.footer-desc { max-height: 200px; overflow-y: auto; white-space: pre-line; margin-top: 8px; }
.site-footer h4 { font-size: 14px; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0 0 24px; padding: 0; }
.site-footer li { padding: 4px 0; }

/* Capas */
.wa { position: fixed; right: 20px; bottom: 20px; z-index: 35; width: 52px; height: 52px; border-radius: 50%; background: #25a35a; color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgb(0 0 0 / .25); }
.wa svg { width: 26px; height: 26px; fill: currentColor; }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .5); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: min(420px, 100%); background: #fff; display: flex; flex-direction: column; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.cart-lines { flex: 1; overflow-y: auto; padding: 0 16px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-line img { width: 64px; height: 64px; object-fit: cover; }
.cart-line small { display: block; color: var(--muted); }
.cart-line .remove { font-size: 12px; color: var(--muted); text-decoration: underline; }
.cart-sum { padding: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.cart-sum div { display: flex; justify-content: space-between; padding: 2px 0; }
.cart-sum .total { font-size: 18px; font-weight: 700; padding-top: 8px; }
.cart-sum p { margin: 8px 0; color: var(--muted); font-size: 13px; }
.cart-sum .btn { display: block; width: 100%; padding: 12px; }
.checkout { flex: 1; overflow-y: auto; padding: 16px 16px 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.checkout > label, .checkout fieldset { display: flex; flex-direction: column; gap: 4px; }
.checkout input:not([type=radio]), .checkout textarea { border: 1px solid var(--line); padding: 10px; font: inherit; }
.checkout fieldset { border: 1px solid var(--line); padding: 8px 12px 12px; margin: 0; }
.checkout .radio { flex-direction: row; display: flex; gap: 8px; align-items: center; }
.checkout .cart-sum { margin: auto -16px 0; }
.form-error { color: var(--sale); margin: 0; }
.coupon-row { display: flex; gap: 8px; align-items: flex-end; }
.coupon-row label { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.coupon-row input { text-transform: uppercase; }
.btn.ghost { background: #fff; color: var(--dark); border: 1px solid var(--line); }
.coupon-msg { margin: -4px 0 0; color: #3f7a55; font-size: 13px; min-height: 1em; }
.coupon-msg.form-error { color: var(--sale); }
.checkout .cart-sum p { font-size: 12px; }
.checkout .cart-sum a { text-decoration: underline; }
.cart-line a:hover { text-decoration: underline; }
.prose h2 { font-size: 18px; margin: 24px 0 6px; }
.prose p { line-height: 1.65; }
.done p { color: var(--ink); font-size: 15px; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 51; width: min(320px, calc(100% - 32px)); background: #fff; text-align: center; }
.modal img { width: 100%; aspect-ratio: 32 / 25; object-fit: cover; object-position: top; }
.modal h3 { font-size: 20px; padding: 32px 24px; }
.modal button { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgb(0 0 0 / .6); color: #fff; display: grid; place-items: center; }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .showcase, .showcase.flip { grid-template-columns: 1fr; }
  .showcase.flip .showcase-cover { order: 0; }
  .about-block, .promo-hero { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .header-main { grid-template-columns: auto 1fr; }
  .logo { grid-column: 1; }
  .header-tools { grid-column: 2; }
  .search-mini input { display: none; }
  .logo img { height: 32px; }
  .announce { font-size: 12px; }
  .rating-link { display: none; }
  .banner h3 { left: 16px; font-size: 20px; }
  .product-grid, .showcase .product-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-item { width: 80%; }
  .promo-card { grid-template-columns: 1fr; padding: 0 0 16px; gap: 12px; }
  .promo-card > div { padding: 0 16px; }
  .cat-row { grid-template-columns: 1fr 1fr; }
  .product { grid-template-columns: 1fr; }
  .thumbs { flex-direction: row; order: 2; }
  .thumbs button { width: 64px; }
  .main-img { order: 1; }
  .product-info { order: 3; }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 28px; }
  .best-title { font-size: 22px; }
}
