@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #fffdf9;
  --text: #3d3430;
  --muted: #8b8078;
  --primary: #7bc9bc;
  --primary-600: #5fb0a1;
  --primary-100: #e7f6f2;
  --secondary: #ffcdb8;
  --secondary-600: #ffb392;
  --accent: #fbf3ea;
  --accent-yellow: #ffe9b0;
  --accent-lavender: #e6def7;
  --accent-pink: #ffd7e0;
  --ring: rgba(123, 201, 188, 0.35);
  --card: #fffefb;
  --alt: #f6faf8;
  --danger: #e8836a;
  --success: #4fae9d;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow-soft: 0 14px 34px -10px rgba(61, 52, 48, 0.16);
  --shadow-softer: 0 6px 18px -8px rgba(61, 52, 48, 0.12);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

/* Several elements set their own `display` (flex/grid/inline-flex) and also
   get toggled via the plain `hidden` attribute; without this, the author
   rule's `display` would beat the UA stylesheet's `[hidden]{display:none}`
   and the element would never actually disappear. */
[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Nunito, ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; border-radius: var(--radius); }
a { color: inherit; text-decoration: none; }

.container { width: 92%; max-width: 1100px; margin: 0 auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.lead { font-size: 1.15rem; color: var(--muted); white-space: pre-line; }

h1, h2, h3, h4 {
  line-height: 1.18;
  margin: 0 0 10px;
  font-family: Fraunces, Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

.section { padding: 60px 0; }
.section-alt { background: linear-gradient(180deg, #f3faf8 0%, #fdf6f2 100%); }
.section-intro { color: var(--muted); margin-top: -8px; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.gap-lg { gap: 32px; }

@media (min-width: 560px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) {
  .grid-2 { grid-template-columns: 1.1fr 0.9fr; gap: 48px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  h1 { font-size: 2.6rem; }
  h2 { font-size: 1.95rem; }
}

/* Scroll-reveal animation hooks (see animate.js) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.no-reveal-animations .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: #FAF7F2; backdrop-filter: saturate(180%) blur(10px); box-shadow: 0 1px 0 rgba(61, 52, 48, 0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.brand-mark svg { display: block; width: 24px; height: 24px; transition: transform 0.3s var(--ease-bounce); }
.brand:hover .brand-mark svg { transform: rotate(-12deg) scale(1.08); }
.brand-name { display:none;font-family: Fraunces, serif; font-size: 21px; letter-spacing: 0.2px; }
.brand-logo { height: 34px; width: auto; border-radius: 0; display: block; }
@media (min-width: 760px) { .brand-logo { height: 44px; } }

/* Brand banner shown inside pages */
.brand-banner { background: #FAF7F2; display: flex; justify-content: center; align-items: center; padding: 18px 0; }
.brand-banner img { height: 64px; width: auto; border-radius: 0; }
@media (min-width: 760px) { .brand-banner img { height: 80px; } }

.header-actions { display: flex; align-items: center; gap: 8px; }

.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: none; background: transparent; cursor: pointer; color: var(--text); transition: background 0.15s ease; }
.nav-toggle:hover { background: var(--primary-100); }
.nav-toggle svg { width: 22px; height: 22px; }

.main-nav { display: none; gap: 6px; }
.nav-link { padding: 9px 14px; border-radius: 999px; transition: background 0.18s ease, color 0.18s ease; }
.nav-link:hover { background: var(--primary-100); }
.nav-link.is-active { background: var(--primary); color: #fff; }

.cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 999px; background: var(--accent); transition: transform 0.18s var(--ease-bounce), background 0.18s ease; }
.cart-link:hover { background: var(--secondary); transform: translateY(-1px); }
.cart-icon svg { display: block; width: 18px; height: 18px; }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--primary-600); color: white; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 6px; min-width: 18px; text-align: center; }

@media (min-width: 760px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

@media (max-width: 759px) {
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: #fffefb;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    padding: 10px 5% 16px;
    gap: 4px;
    box-shadow: var(--shadow-soft);
  }
  .main-nav.is-open .nav-link { padding: 13px 14px; }
}

/* Hero carousel: fullscreen, configurable from the backoffice. Sits above
   the existing hero, right under the sticky header (66px in all breakpoints,
   see .header-inner), so together they fill the viewport on load. */
.hero-carousel {
  position: relative;
  width: 100%;
  height: calc(100vh - 66px);
  min-height: 440px;
  max-height: 900px;
  overflow: hidden;
  background: var(--accent);
}
@supports (height: 100dvh) {
  .hero-carousel { height: calc(100dvh - 66px); }
}

.hero-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s var(--ease-smooth);
}
.hero-carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.42) 0%, rgba(20, 20, 20, 0.32) 50%, rgba(20, 20, 20, 0.48) 100%);
}
.hero-carousel-content { position: relative; z-index: 1; color: #fff; padding: 28px 6%; max-width: 620px; margin: 0 auto; text-align: center; }
.hero-carousel-content h1,
.hero-carousel-content h2 { color: #fff; margin: 0 0 10px; font-size: 1.7rem; }
.hero-carousel-content p { color: rgba(255, 255, 255, 0.92); margin: 0 auto 18px; }
.hero-carousel-content .btn { box-shadow: var(--shadow-soft); }
@media (min-width: 760px) {
  .hero-carousel-content { padding: 40px 6%; }
  .hero-carousel-content h1,
  .hero-carousel-content h2 { font-size: 2.6rem; }
  .hero-carousel-content p { font-size: 1.1rem; max-width: 520px; margin-left: auto; margin-right: auto; }
}

.hero-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-softer);
  transition: background 0.18s ease, transform 0.18s var(--ease-bounce);
}
.hero-carousel-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.hero-carousel-arrow svg { width: 20px; height: 20px; }
.hero-carousel-prev { left: 12px; }
.hero-carousel-next { right: 12px; }
@media (min-width: 760px) {
  .hero-carousel-arrow { width: 48px; height: 48px; }
  .hero-carousel-prev { left: 24px; }
  .hero-carousel-next { right: 24px; }
}

.hero-carousel-dots { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 2; display: flex; justify-content: center; gap: 8px; }
.hero-carousel-dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.5); cursor: pointer; padding: 0; transition: background 0.18s ease, transform 0.18s var(--ease-bounce); }
.hero-carousel-dot:hover { background: rgba(255, 255, 255, 0.8); }
.hero-carousel-dot.is-active { background: #fff; transform: scale(1.3); }

.hero-carousel-single .hero-carousel-arrow,
.hero-carousel-single .hero-carousel-dots { display: none; }

.hero-carousel:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) {
  .hero-carousel-track { transition: none; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #f1fbf7 0%, #fffdf9 55%, #fff6f2 100%); }
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
  animation: blob-float 16s ease-in-out infinite alternate;
}
.hero::before { width: 320px; height: 320px; background: var(--accent-lavender); top: -100px; right: -70px; }
.hero::after { width: 260px; height: 260px; background: var(--accent-yellow); bottom: -110px; left: 4%; animation-delay: -8s; }
.hero .container { position: relative; z-index: 1; }
@keyframes blob-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(24px, -18px) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
}

.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }

/* Category tiles */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
.category-tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; box-shadow: var(--shadow-softer); transition: box-shadow 0.25s ease, transform 0.25s var(--ease-smooth); }
.category-tile:hover { box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.category-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s var(--ease-smooth); }
.category-tile:hover img { transform: scale(1.07); }
.category-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 20, 20, 0) 45%, rgba(20, 20, 20, 0.6) 100%); }
.category-label { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; font-weight: 700; z-index: 1; font-size: 0.95rem; }

/* Icon-based category tiles (used on the home grid — no dedicated photo per
   category yet, so these read as clean, colorful nav chips instead). */
.category-grid--icons { grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .category-grid--icons { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .category-grid--icons { grid-template-columns: repeat(5, 1fr); } }
.category-tile--icon {
  aspect-ratio: auto;
  box-shadow: none;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 12px;
  text-align: center;
}
.category-tile--icon:hover { box-shadow: var(--shadow-softer); transform: translateY(-3px); border-color: var(--primary-100); }
.category-tile--icon::after { content: none; }
.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-100);
  color: var(--primary-600);
}
.category-icon svg { width: 24px; height: 24px; }
.category-tile--icon .category-label { position: static; color: var(--text); font-family: Fraunces, serif; font-weight: 600; font-size: 0.92rem; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 0.35s var(--ease-smooth); }
.gallery-grid img:hover { transform: scale(1.03); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-family: Nunito, sans-serif;
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-softer); }
.btn:active { transform: translateY(0) scale(0.96); box-shadow: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: var(--secondary); color: #6b3a22; }
.btn-secondary:hover { background: var(--secondary-600); }
.btn-ghost { background: transparent; border-color: #e4d9cf; }
.btn-ghost:hover { background: var(--accent); }
.btn-danger { background: var(--danger); color: white; }
.btn.success { background: var(--success); color: white; }
.btn.full { width: 100%; }

/* Features */
.features .feature { background: var(--card); padding: 22px 18px; border-radius: var(--radius); box-shadow: var(--shadow-softer); transition: box-shadow 0.25s ease, transform 0.25s var(--ease-smooth); }
.features .feature:hover { box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.features .icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; background: var(--primary-100); color: var(--primary-600); }
.features .icon svg { width: 26px; height: 26px; }
.features .feature:nth-child(4n+2) .icon { background: var(--accent-lavender); color: #7c5cc4; }
.features .feature:nth-child(4n+3) .icon { background: var(--accent-yellow); color: #a3780a; }
.features .feature:nth-child(4n+4) .icon { background: var(--accent-pink); color: #cf5f88; }

/* Flat icons (replace emoji everywhere) */
.icon { width: 1.1em; height: 1.1em; vertical-align: -0.2em; margin-right: 6px; flex-shrink: 0; }
.icon-trailing { margin-right: 0; margin-left: 6px; }
.btn .icon { margin-right: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: 1fr; gap: 12px; counter-reset: step; padding-left: 0; }
.steps li { list-style: none; padding: 16px 16px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-softer); font-weight: 600; counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: Fraunces, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
@media (min-width: 560px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* Product grid */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 560px) { .product-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

/* Search + filters (productos.html) — a single top-to-bottom column on
   every screen size: search, then sort/filters controls, then the (optional)
   filters panel, then the results. No side-by-side sidebar+grid layout, so
   there's never a second independent scroll area competing with the page's
   own scroll. */
.products-search-row { margin: 18px 0 10px; }
.search-input {
  width: 100%;
  padding: 13px 18px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  outline: none;
  font: inherit;
  background: var(--card);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.search-input:focus { box-shadow: 0 0 0 4px var(--ring); border-color: var(--primary); }

.products-controls-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.sort-select {
  padding: 11px 16px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  outline: none;
  font: inherit;
  background: var(--card);
  color: var(--text);
}
.filters-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.filters-panel {
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filters-head h2 { font-size: 1.05rem; margin: 0; }
.btn-small { padding: 6px 12px; font-size: 0.8rem; }

.filters-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.filters-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.filters-switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  transition: background 0.18s ease;
  flex-shrink: 0;
}
.filters-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-softer);
  transition: transform 0.18s var(--ease-smooth);
}
.filters-switch input:checked + .filters-switch-track { background: var(--primary); }
.filters-switch input:checked + .filters-switch-track .filters-switch-thumb { transform: translateX(16px); }
.filters-switch input:focus-visible + .filters-switch-track { outline: 2px solid var(--primary); outline-offset: 2px; }
.filters-switch-text { font-size: 0.9rem; font-weight: 700; }

.filters-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 16px; }
@media (min-width: 620px) { .filters-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .filters-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .filters-grid { grid-template-columns: repeat(6, 1fr); } }

.filters-clear-row { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 12px; border-top: 1px solid var(--accent); }

.filter-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.filter-group h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin: 0; font-family: Nunito, sans-serif; font-weight: 700; }
.filter-options { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; padding-right: 4px; }
.filter-chip { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; cursor: pointer; }
.filter-chip input { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }
.filter-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.filter-toggle input { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }
#results-count { margin: 0 0 12px; }

.product-card { position: relative; background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-softer); transition: box-shadow 0.25s ease, transform 0.25s var(--ease-smooth); }
.product-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-4px); }
.product-badge { position: absolute; top: 12px; left: 12px; background: var(--primary); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; z-index: 2; box-shadow: var(--shadow-softer); }
.product-badge.is-discount { background: var(--danger); }

/* Reusable image carousel: small inside product cards, large on the product
   detail page. No autoplay — swipe/arrows/dots only. */
.img-carousel { position: relative; overflow: hidden; background: var(--accent); }
.img-carousel-track { display: flex; width: 100%; height: 100%; transition: transform 0.4s var(--ease-smooth); }
.img-carousel-slide { flex: 0 0 100%; width: 100%; height: 100%; }
.img-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }

.img-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
  box-shadow: var(--shadow-softer);
}
.img-carousel:hover .img-carousel-arrow,
.img-carousel:focus-within .img-carousel-arrow { opacity: 1; }
.img-carousel-arrow:hover { background: #fff; }
.img-carousel-arrow svg { width: 16px; height: 16px; }
.img-carousel-prev { left: 6px; }
.img-carousel-next { right: 6px; }

.img-carousel-dots { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 2; display: flex; justify-content: center; gap: 5px; }
.img-carousel-dot { width: 6px; height: 6px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.7); cursor: pointer; padding: 0; box-shadow: 0 0 0 1px rgba(20,20,20,0.08); transition: background 0.15s ease, transform 0.15s ease; }
.img-carousel-dot.is-active { background: #fff; transform: scale(1.35); }

/* Card variant: fills the product card's image slot */
.product-card .img-carousel--card { height: 200px; }

/* Gallery variant: bigger, used on the product detail page */
.img-carousel--gallery { border-radius: var(--radius); aspect-ratio: 1 / 1; box-shadow: var(--shadow-softer); }
@media (min-width: 560px) { .img-carousel--gallery { aspect-ratio: 4 / 3; } }
.img-carousel--gallery .img-carousel-arrow { width: 44px; height: 44px; opacity: 1; }
.img-carousel--gallery .img-carousel-arrow svg { width: 20px; height: 20px; }
.img-carousel--gallery .img-carousel-dot { width: 8px; height: 8px; }
.img-carousel--gallery .img-carousel-dots { bottom: 14px; }

/* Skeleton loading state */
.skeleton-card { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-softer); }
.skeleton-img, .skeleton-line { background: linear-gradient(90deg, var(--primary-100) 25%, #f7faf9 37%, var(--primary-100) 63%); background-size: 400% 100%; animation: skeleton-pulse 1.4s ease infinite; border-radius: 6px; }
.skeleton-img { height: 200px; border-radius: 0; }
.skeleton-lines { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-line { height: 12px; }
.skeleton-line.short { width: 55%; }
.skeleton-line.price { width: 35%; height: 16px; margin-top: 4px; }
@keyframes skeleton-pulse { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.product-card .content { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.product-card h3 { margin: 0; font-size: 1.1rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.25em * 2); }
.product-card .content p { margin: 0; }
.product-card .desc-wrap { display: flex; flex-direction: column; gap: 4px; }
.product-card p.desc { color: var(--muted); font-size: 0.95rem; line-height: 1.4; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-card p.desc.is-expanded { display: block; -webkit-line-clamp: unset; overflow: visible; }
.product-card .read-more-btn { align-self: flex-start; background: none; border: none; padding: 0; margin: 0; color: var(--primary-600); font-weight: 700; font-size: 0.85rem; cursor: pointer; text-decoration: underline; }
.product-card p.stamp-hint { min-height: 1.3em; }
.product-card .price { font-weight: 800; color: var(--primary-600); font-size: 1.05rem; margin-top: auto; }
.product-card .cart-row { display: flex; align-items: flex-start; justify-content: flex-start; gap: 12px; flex-direction: column; }
.product-card .actions { margin-top: 0; display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; }
.product-card .actions .btn { width: 100%; }
.product-card .qty { justify-content: space-between; width: 100%; }

/* Cart summary */
.cart-summary { display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-softer); transition: box-shadow 0.2s ease; }
.cart-item:hover { box-shadow: var(--shadow-soft); }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-item .cart-thumbs { position: relative; display: block; }
.cart-item .stamp-thumb { position: absolute; right: -6px; bottom: -6px; width: 32px; height: 32px; border-radius: 9px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(61, 52, 48, 0.2); }
.cart-item h4 { margin: 0; font-size: 1rem; font-family: Fraunces, serif; font-weight: 600; }
.cart-count-line { margin: 0 0 2px; }
.qty { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); border-radius: 999px; padding: 4px 8px; }
.qty button { background: transparent; border: none; cursor: pointer; font-size: 18px; padding: 6px; color: var(--primary-600); font-weight: 700; transition: transform 0.15s var(--ease-bounce); }
.qty button:hover { transform: scale(1.15); }
.cart-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cart-totals { margin-top: 8px; padding-top: 10px; border-top: 2px dashed var(--primary-100); display: grid; gap: 6px; }
.cart-subtotal-row, .cart-discount-row { display: flex; justify-content: space-between; font-size: 0.92rem; color: var(--muted); }
.cart-discount-row { color: var(--success); font-weight: 700; }
.cart-total { display: flex; justify-content: space-between; font-family: Fraunces, serif; font-size: 1.1rem; }
.cart-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.cart-actions .btn { flex: 1; min-width: 160px; }

.empty-cart { text-align: center; padding: 40px 16px; border-radius: var(--radius); background: var(--accent); display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* Form */
.confirm-form { display: grid; gap: 12px; background: var(--card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow-softer); }
.confirm-form label { font-weight: 700; font-size: 0.9rem; }
.confirm-form input, .confirm-form select { padding: 13px 14px; border-radius: var(--radius-sm); border: 2px solid var(--accent); outline: none; font-family: Nunito, sans-serif; font-size: 1rem; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.confirm-form input:focus, .confirm-form select:focus { box-shadow: 0 0 0 4px var(--ring); border-color: var(--primary); }

/* Footer */
.site-footer { background: #f4f8f7; margin-top: 32px; box-shadow: inset 0 1px 0 rgba(61, 52, 48, 0.06); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 32px 0; }
.footer-bottom { padding: 8px 0 28px 0; color: var(--muted); font-size: 0.95rem; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.2fr 0.8fr 1fr; } }
.brand-footer { margin-bottom: 8px; }
.footer-story { color: var(--muted); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  bottom: 24px;
  background: var(--text);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Checkout overlay: shown while the order is being submitted, so the user
   isn't left staring at an unresponsive button during the network round trip. */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 15, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.checkout-overlay.show { opacity: 1; }
.checkout-overlay[hidden] { display: none; }

.checkout-overlay-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 32px;
  max-width: 320px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.checkout-spinner { display: flex; gap: 8px; height: 20px; align-items: center; }
.checkout-spinner span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  animation: checkout-bounce 1.1s ease-in-out infinite;
}
.checkout-spinner span:nth-child(1) { animation-delay: 0s; }
.checkout-spinner span:nth-child(2) { animation-delay: 0.12s; }
.checkout-spinner span:nth-child(3) { animation-delay: 0.24s; }
.checkout-spinner span:nth-child(4) { animation-delay: 0.36s; }
@keyframes checkout-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-10px); opacity: 1; }
}

.checkout-overlay-text {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  min-height: 1.4em;
}

.checkout-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  overflow: hidden;
}
.checkout-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .checkout-spinner span { animation: none; opacity: 1; }
}

/* Utilities */
.quote { background: var(--accent); padding: 18px 20px; border-radius: var(--radius); font-family: Fraunces, serif; font-size: 1.05rem; }

/* Product detail - stamp selector. Each tile is a plain (non-clickable)
   container — the two overlaid icon buttons are the only actions, so
   there's no ambiguity between "zoom in" and "pick this one". */
.stamp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
@media (min-width: 560px) { .stamp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stamp-option { display: grid; gap: 6px; padding: 10px; border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--shadow-softer); font: inherit; text-align: center; transition: box-shadow 0.2s ease; }
.stamp-option .stamp-visual { position: relative; display: block; }
.stamp-option .stamp-visual img { width: 100%; height: 90px; object-fit: cover; border-radius: 10px; }
.stamp-option .stamp-name { font-size: 0.95rem; text-align: center; font-weight: 600; }
.stamp-option .stamp-code { font-size: 0.72rem; color: var(--muted); }
.stamp-option.is-selected { box-shadow: 0 0 0 3px var(--primary); background: var(--primary-100); }

.stamp-tile-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 6px 6px;
  background: linear-gradient(to top, rgba(30, 25, 20, 0.55), rgba(30, 25, 20, 0));
  border-radius: 0 0 10px 10px;
}
.stamp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s var(--ease-bounce), background 0.15s ease, color 0.15s ease;
}
.stamp-icon-btn:hover { transform: translateY(-1px) scale(1.06); }
.stamp-icon-btn .icon { width: 16px; height: 16px; margin: 0; }

/* Flat icon buttons: solid color blocks instead of outline glyphs, so
   "zoom" and "select" read as two distinct, unmistakable actions. */
.stamp-icon-btn.stamp-zoom-btn { background: #fff; color: var(--text); }
.stamp-icon-btn.stamp-select-btn { background: var(--primary-100); color: var(--primary-600); }
.stamp-icon-btn.stamp-select-btn.is-selected { background: var(--primary); color: #fff; }

/* Stamp catalog modal: opened from "Ver más estampados" on producto.html */
.no-scroll { overflow: hidden; }
.stamp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 25, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.stamp-modal {
  background: var(--card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 780px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.stamp-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--accent); }
.stamp-modal-head-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stamp-modal-head h2 { margin: 0; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stamp-modal-back,
.stamp-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: none; border-radius: 999px; background: var(--accent); color: var(--text); cursor: pointer; flex-shrink: 0; }
.stamp-modal-back:hover,
.stamp-modal-close:hover { background: var(--primary-100); }
.stamp-modal-body { padding: 16px 20px 20px; overflow-y: auto; }

.stamp-modal-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 480px) { .stamp-modal-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 640px) { .stamp-modal-categories { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stamp-modal-category-btn { display: grid; gap: 6px; padding: 10px; border: none; border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; font: inherit; text-align: center; transition: box-shadow 0.2s ease, transform 0.2s var(--ease-smooth); }
.stamp-modal-category-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-softer); }
.stamp-modal-category-thumb { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1 / 1; }
.stamp-modal-category-thumb img { width: 100%; height: 100%; object-fit: cover; }
.stamp-modal-category-name { font-size: 0.95rem; font-weight: 700; }
.stamp-modal-category-count { font-size: 0.78rem; color: var(--muted); }

.stamp-modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 480px) { .stamp-modal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 640px) { .stamp-modal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stamp-modal-grid .stamp-option { background: var(--bg); }

/* Full-screen stamp zoom viewer, opened from the magnifier icon on any
   stamp tile. Stacks above the catalog modal (higher z-index) since it can
   be opened from inside it. */
.stamp-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 25, 20, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 220;
}
.stamp-zoom-modal {
  background: var(--card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.stamp-zoom-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--accent); }
.stamp-zoom-head h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stamp-zoom-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  touch-action: none;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stamp-zoom-viewport img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.stamp-zoom-viewport.is-zoomed img { cursor: grab; }
.stamp-zoom-viewport.is-dragging img { cursor: grabbing; }
.stamp-zoom-controls { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--accent); }
.stamp-zoom-controls button#stamp-zoom-in,
.stamp-zoom-controls button#stamp-zoom-out {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
}
.stamp-zoom-controls button#stamp-zoom-in:hover,
.stamp-zoom-controls button#stamp-zoom-out:hover { background: var(--primary-100); }
#stamp-zoom-level { font-size: 0.85rem; color: var(--muted); min-width: 44px; text-align: center; }

/* Product detail - orientation + trust microcopy */
.back-link { display: inline-flex; align-items: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; font-weight: 600; transition: color 0.15s ease, transform 0.15s ease; }
.back-link:hover { color: var(--primary-600); transform: translateX(-2px); }
.trust-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.trust-list li { display: flex; align-items: center; color: var(--muted); font-size: 0.88rem; }
#qty-subtotal { margin-top: 8px; font-weight: 700; color: var(--primary-600); }

.related-products { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--accent); }
.related-products h2 { font-size: 1.3rem; margin: 0 0 18px; }
