@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Outfit:wght@300;400;600;800&family=Permanent+Marker&display=swap');

:root {
  /* Brand Colors - V3 (Etiqueta de Piñata) */
  --color-primary: #FF6B5B;
  /* Coral sandía */
  --color-secondary: #7C6FF0;
  /* Violeta uva */
  --color-accent: #FFC24B;
  /* Mostaza / marigold */
  --color-bubblegum: #FF9ECD;
  /* Chicle — toques puntuales */
  --color-dark: #2B2438;
  /* Tinta ciruela */
  --color-light: #FFF3E2;
  /* Crema profundo (tarjetas sobre fondo blanco) */
  --color-brown: #6B5D42;
  /* Marrón kraft cálido */
  --color-success: #3FA66B;
  /* Verde tinta — mismo verde que el sello "Popular" */

  /* UI Colors */
  --color-bg: #FFF8EF;
  /* Papel crema */
  --color-text: var(--color-dark);
  --color-text-light: #756B85;
  --color-white: #ffffff;
  --color-border: #F0E4D2;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Typography */
  --font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-family-logo: 'Fredoka', cursive, sans-serif;
  --font-family-accent: 'Permanent Marker', cursive;
  /* Trazo de rotulador — reservado a 1-2 palabras por sección */
  --font-size-base: 18px;
  --font-weight-normal: 400;
  --font-weight-bold: 700;
  --font-weight-extra-bold: 800;

  /* Effects — sombras tintadas de tinta ciruela en vez de negro puro */
  --shadow-sm: 0 4px 6px rgba(43, 36, 56, 0.06);
  --shadow-md: 0 10px 20px rgba(43, 36, 56, 0.10);
  --shadow-lg: 0 20px 35px rgba(43, 36, 56, 0.14);
  --radius-md: 16px;
  --radius-lg: 24px;
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}


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

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Header */
.header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: 2px dashed var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--spacing-xs) 0;
}

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

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

.logo img {
  height: 120px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

.nav {
  display: flex;
  gap: var(--spacing-md);
}

.nav-link {
  font-weight: var(--font-weight-bold);
  color: var(--color-dark);
  transition: color 0.2s;
  font-size: 1.1rem;
}

.nav-link:hover {
  color: var(--color-primary);
}

.lang-select {
  padding: 0.5rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  color: var(--color-dark);
  background-color: var(--color-white);
  cursor: pointer;
  transition: all 0.2s;
}

.lang-select:hover,
.lang-select:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-dark);
  margin: 5px 0;
  transition: 0.3s;
}

/* Hamburger Animation */
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero V2 - Split Layout */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background-color: var(--color-primary);
  overflow: hidden;
  padding-top: var(--spacing-md);
  /* + 44px: clearance for .bunting-divider, which is absolutely
     positioned at the bottom edge and would otherwise overlap the
     hero-buttons whenever hero-text grows taller than hero-visual. */
  padding-bottom: calc(var(--spacing-md) + 44px);
}

/* Soft layered depth in the corner — flat color stays confident, this keeps it from feeling like a plain block.
   Skipped on .product-hero, which is a full-bleed photo with its own overlay. */
.hero:not(.product-hero)::after {
  content: "";
  position: absolute;
  top: -15%;
  right: -10%;
  width: 55%;
  aspect-ratio: 1;
  background: var(--color-bubblegum);
  opacity: 0.35;
  border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
  filter: blur(2px);
  z-index: 0;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
  width: 100%;
  z-index: 1;
}

.hero-text {
  text-align: left;
  color: var(--color-white);
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: var(--font-weight-extra-bold);
}

.hero h1 span {
  position: relative;
  display: inline-block;
  font-family: var(--font-family-accent);
  font-weight: 400;
  color: var(--color-accent);
  font-size: 1.1em;
  margin-top: 0.15em;
  transform: rotate(-2deg);
}

/* Hand-drawn underline, as a pseudo-element so it survives the i18n
   engine overwriting h1's innerHTML on every language switch. */
.hero h1 span::after {
  content: "";
  position: absolute;
  left: 2%;
  bottom: -0.28em;
  width: 96%;
  height: 0.28em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M2,10 C20,2 35,18 50,10 S80,2 95,10 S125,18 140,10 S170,2 185,10 S198,14 198,10' fill='none' stroke='%23FFF8EF' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
  max-width: 90%;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-start;
  position: relative;
  z-index: 1;
}

.hero .btn-primary {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.hero .btn-primary:hover {
  background-color: #3a3049;
  box-shadow: 0 15px 25px rgba(43, 36, 56, 0.35);
}

/* .btn-secondary's hover normally fills with --color-primary — on the
   hero that's the same as the background, so the button would vanish. */
.hero .btn-secondary:hover {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 108%;
  aspect-ratio: 1;
  border: 3px dashed rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  animation: spin-slow 40s linear infinite;
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.blob-shape {
  width: 100%;
  max-width: 550px;
  aspect-ratio: 1;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border: 4px solid rgba(255, 255, 255, 0.3);
  animation: morph 8s ease-in-out infinite;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.blob-shape img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes morph {

  0%,
  100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  }

  34% {
    border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
  }

  67% {
    border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
  }
}

.floating-shape {
  position: absolute;
  background: var(--color-accent);
  border-radius: 50%;
  opacity: 0.6;
  z-index: -1;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 0%;
  right: 10%;
  animation: float 6s ease-in-out infinite;
}

.shape-2 {
  width: 50px;
  height: 50px;
  bottom: 10%;
  left: 5%;
  background: var(--color-secondary);
  animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
  width: 36px;
  height: 36px;
  top: 55%;
  right: -2%;
  background: transparent;
  border: 4px solid var(--color-bubblegum);
  opacity: 0.7;
  animation: float 7s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Bunting garland — the same "hung from a string" idea as the product
   gift-tags, strung along the seam between hero and catalog. */
.bunting-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 2;
}

.bunting-divider svg {
  display: block;
  width: 100%;
  height: 44px;
}

@media (max-width: 600px) {
  .bunting-divider svg {
    height: 30px;
  }
}

@media (max-width: 968px) {
  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .hero-split {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column-reverse;
    gap: var(--spacing-md);
    text-align: center;
  }

  .hero-text {
    text-align: center;
    padding-bottom: var(--spacing-lg);
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .blob-shape {
    max-width: 320px;
  }
}

/* Internal Page Hero (Small) — full-bleed photo with a scrim, not a
   side-by-side split: .hero-bg had no sizing rules before, so on
   narrow viewports the image rendered at its native pixel width and
   pushed the heading off-screen entirely. */
.hero-small {
  min-height: 38vh !important;
  padding-top: var(--spacing-lg) !important;
  padding-bottom: var(--spacing-lg) !important;
  align-items: center;
  justify-content: center;
  background-color: var(--color-dark);
}

.hero-small .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-small .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-small .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(43, 36, 56, 0.72) 0%, rgba(255, 107, 91, 0.55) 100%);
}

.hero-small .hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.hero-small h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: var(--font-weight-extra-bold);
  color: var(--color-white);
}

.hero-small h1 span {
  color: var(--color-accent);
  display: block;
  font-size: 0.9em;
}

.hero-small p {
  font-size: 1.5rem;
  margin-bottom: 0;
  opacity: 0.95;
  font-weight: 700;
  color: var(--color-white);
}

@media (min-width: 700px) {
  .hero-small p {
    white-space: nowrap;
  }
}


/* Buttons V2 */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px rgba(255, 107, 91, 0.4);
  background-color: #E85643;
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 25px rgba(255, 107, 91, 0.3);
  color: var(--color-white);
  background-color: var(--color-primary);
}

.btn-outline {
  background-color: var(--color-white);
  color: var(--color-dark);
  border: 2px solid var(--color-dark);
  box-shadow: none;
}

.btn-outline:hover {
  border-color: var(--color-dark);
  background-color: var(--color-dark);
  color: var(--color-white);
}

/* Catalog V2 */
.catalog {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-bg);
  /* Contain the balloon decorations below — at narrow widths they don't
     fit next to the title and would otherwise cause horizontal scroll. */
  overflow-x: clip;
}

@media (min-width: 1400px) {
  .catalog .container {
    max-width: 1400px;
  }
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.catalog-balloon {
  height: 155px;
  width: auto;
  mix-blend-mode: multiply;
  animation: bobbing 3s ease-in-out infinite;
}

.catalog-balloon.right {
  animation-delay: 1.5s;
  /* Offset animation for natural feel */
  transform: scaleX(-1);
  /* Mirror the right balloon */
}

@media (max-width: 768px) {
  .catalog-balloon {
    height: 70px;
  }
}

@media (max-width: 480px) {
  .catalog-balloon {
    display: none;
  }
}

@keyframes bobbing {

  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

/* Handle mirroring for the right balloon within the animation */
.catalog-balloon.right {
  animation-name: bobbing-right;
}

@keyframes bobbing-right {

  0%,
  100% {
    transform: scaleX(-1) translateY(0) rotate(2deg);
  }

  50% {
    transform: scaleX(-1) translateY(-10px) rotate(-2deg);
  }
}

@media (max-width: 768px) {
  .catalog h2 {
    font-size: 2rem !important;
  }
}

.catalog h2 {
  text-align: center;
  margin-bottom: 0;
  /* Removed margin as it's handled by header gap */
  color: var(--color-dark);
  font-size: 3rem;
  font-family: var(--font-family-logo);
  font-weight: var(--font-weight-extra-bold);
}

.hero-eyebrow {
  font-weight: var(--font-weight-bold);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--spacing-xs);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .hero-eyebrow {
    white-space: normal;
    font-size: 0.8rem;
  }
}

.catalog-eyebrow {
  text-align: center;
  font-weight: var(--font-weight-bold);
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.catalog-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-lg);
}

/* Filter pills read as little stickers peeled onto the page — same
   hard-shadow language as the cookie banner's accept button. */
.filter-pill {
  padding: 0.75rem 1.7rem;
  border-radius: 999px;
  border: 2px solid var(--color-dark);
  background-color: var(--color-white);
  color: var(--color-dark);
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--color-dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.filter-pill:nth-child(1) {
  transform: rotate(-1.5deg);
}

.filter-pill:nth-child(2) {
  transform: rotate(1deg);
}

.filter-pill:nth-child(3) {
  transform: rotate(-1deg);
}

.filter-pill:hover {
  transform: translate(-2px, -2px) rotate(0deg);
  box-shadow: 5px 5px 0 var(--color-dark);
}

.filter-pill.active {
  color: var(--color-white);
  transform: translate(2px, 2px) rotate(0deg);
  box-shadow: 1px 1px 0 var(--color-dark);
}

.filter-pill.active[data-filter="all"] {
  background-color: var(--color-dark);
}

.filter-pill.active[data-filter="escritura"] {
  background-color: var(--color-primary);
}

.filter-pill.active[data-filter="juegos"] {
  background-color: var(--color-brown);
}

.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
}

.product-grid .product-card {
  flex: 0 0 100%;
}

.product-grid.is-filtering .product-card {
  animation: catalog-fade-in 0.35s ease both;
}

@keyframes catalog-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 600px) {
  .product-grid .product-card {
    flex-basis: calc((100% - var(--spacing-md)) / 2);
  }
}

@media (min-width: 1024px) {
  .product-grid .product-card {
    flex-basis: calc((100% - 3 * var(--spacing-md)) / 4);
  }
}

/* At this width the catalog container widens to 1400px (see .catalog .container),
   giving enough room for 5 columns — a perfect fit for the 10-product catalog
   and each 5-product category filter, with no orphaned last row. */
@media (min-width: 1400px) {
  .product-grid .product-card {
    flex-basis: calc((100% - 4 * var(--spacing-md)) / 5);
  }
}

/* Product Card V3 — a gift tag, not a generic e-commerce card. The
   colored strip is the tag's stub, the little circle is the punched
   hole, the dashed line is where you'd tear it off the bag. */
.product-card {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--color-border);
}

/* display:contents makes the wrapping <a> transparent to the flex layout —
   its children (tag-strip, image, product-info) stay direct flex items of
   .product-card, exactly as when the card itself had the onclick handler. */
.product-card-link {
  display: contents;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.product-card:nth-child(odd):hover {
  transform: translateY(-10px) rotate(-1deg);
}

.product-card:nth-child(even):hover {
  transform: translateY(-10px) rotate(1deg);
}

/* Contrast comes from a category-tinted glow + a border that pops to
   full brand color — not just a neutral shadow getting a bit bigger. */
.product-card.category-escritura:hover {
  border-color: var(--color-primary);
  box-shadow: 0 22px 40px -12px rgba(255, 107, 91, 0.5), var(--shadow-lg);
}

.product-card.category-juegos:hover {
  border-color: var(--color-brown);
  box-shadow: 0 22px 40px -12px rgba(107, 93, 66, 0.5), var(--shadow-lg);
}

.product-card:hover .product-image {
  transform: scale(1.08);
}

.product-card:hover .tag-strip {
  filter: brightness(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .product-card {
    transition: box-shadow 0.35s ease, border-color 0.35s ease;
  }

  .product-card:hover {
    transform: none;
  }
}

.tag-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem var(--spacing-md) 0.85rem;
  color: var(--color-white);
  font-family: var(--font-family-accent);
  font-size: 1.15rem;
  font-weight: var(--font-weight-normal);
  text-transform: none;
  letter-spacing: 0.3px;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.55);
}

.product-card.category-escritura .tag-strip {
  background-color: var(--color-primary);
}

.product-card.category-juegos .tag-strip {
  background-color: var(--color-brown);
}

.tag-hole {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: inset 0 1px 2px rgba(43, 36, 56, 0.35);
  flex-shrink: 0;
}

/* Shared Hover Effect */
.card-hover {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.card-hover:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

/* Badge as a rotated rubber stamp instead of a generic pill */
.product-badge {
  position: absolute;
  top: 26px;
  right: 14px;
  z-index: 10;
  width: 66px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  border-radius: 50%;
  font-family: var(--font-family-accent);
  font-size: 0.7rem;
  line-height: 1.05;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--color-white);
  transform: rotate(-9deg);
  box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6);
}

/* Badges */
.product-badge.popular {
  background-color: #3FA66B;
  animation: pulse-badge 2.4s infinite;
}

.product-badge.new {
  background-color: #E2574C;
  animation: pulse-badge-red 2.4s infinite;
}

.product-badge.coming-soon {
  background-color: var(--color-accent);
  color: var(--color-dark);
  animation: pulse-badge-yellow 2.4s infinite;
}

@keyframes pulse-badge {
  0% {
    box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 0 rgba(63, 166, 107, 0.6);
  }

  70% {
    box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 8px rgba(63, 166, 107, 0);
  }

  100% {
    box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 0 rgba(63, 166, 107, 0);
  }
}

@keyframes pulse-badge-red {
  0% {
    box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 0 rgba(226, 87, 76, 0.6);
  }

  70% {
    box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 8px rgba(226, 87, 76, 0);
  }

  100% {
    box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 0 rgba(226, 87, 76, 0);
  }
}

@keyframes pulse-badge-yellow {
  0% {
    box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 0 rgba(255, 194, 75, 0.6);
  }

  70% {
    box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 8px rgba(255, 194, 75, 0);
  }

  100% {
    box-shadow: var(--shadow-md), inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 0 rgba(255, 194, 75, 0);
  }
}

.product-image {
  width: 100%;
  height: 350px;
  object-fit: contain;
  background-color: #fff;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-info {
  padding: var(--spacing-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
  color: var(--color-dark);
  font-weight: var(--font-weight-bold);
}

.product-description {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
  line-height: 1.6;
}

.product-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: auto;
}

.product-actions .btn {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
}

/* Its own color, deliberately not category-primary — "Ver Detalles" sits
   right below the coral "Escritura" tag on those cards, so it needs a
   color that doesn't just repeat the header above it. */
.product-actions .btn-primary {
  background-color: var(--color-secondary);
}

.product-actions .btn-primary:hover {
  background-color: #6a5ce0;
  box-shadow: 0 15px 25px rgba(124, 111, 240, 0.4);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal V2 */
.modal-content {
  background: var(--color-white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-light);
}

/* Footer V2 */
.footer {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: var(--spacing-lg) 0;
  margin-top: 0;
  border-top: 3px dashed rgba(255, 255, 255, 0.15);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--color-white);
}

.footer-logo img {
  height: 40px;
  filter: brightness(0) invert(1);
  /* Make logo white */
}

.footer-links {
  margin-bottom: var(--spacing-md);
}

.footer-links a {
  margin: 0 var(--spacing-sm);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-secondary);
}

.footer p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero {
    min-height: 50vh;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    align-items: center;
    gap: 1.5rem;
  }

  .nav.active {
    transform: translateY(0);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  }

  .mobile-menu-btn {
    display: block;
  }

  /* Cookie Banner Mobile Fixes */
  .cookie-banner {
    width: 95%;
    padding: 1rem;
    bottom: 1rem;
  }

  .cookie-content {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 1rem;
  }

  .cookie-text h3 {
    font-size: 1.3rem;
  }

  .cookie-text p {
    font-size: 0.9rem;
  }
}

/* Contact Form V2 - Split Card */
.contact {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-light);
  position: relative;
  background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
  background-size: 30px 30px;
}

.contact-card {
  display: flex;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 3px solid var(--color-dark);
  box-shadow: 12px 12px 0 var(--color-dark);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 600px;
}

.contact-info {
  flex: 1;
  background-color: var(--color-dark);
  padding: var(--spacing-lg);
  color: var(--color-white);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.info-content {
  position: relative;
  z-index: 2;
}

.contact-info-title {
  position: relative;
  display: inline-block;
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  font-weight: var(--font-weight-extra-bold);
  color: var(--color-white);
}

.contact-info-underline {
  display: block;
  width: 100%;
  height: 0.5em;
  margin-top: -0.3em;
}

.contact-info-underline path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

.contact.in-view .contact-info-underline path {
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .contact-info-underline path {
    transition: none;
    stroke-dashoffset: 0;
  }
}

.contact-info p {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.contact-item .icon-box {
  width: 42px;
  height: 42px;
  background: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 2px rgba(43, 36, 56, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-item a {
  color: var(--color-white);
  text-decoration: underline;
  font-weight: bold;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--color-accent);
}

.contact-item .item-text {
  display: flex;
  flex-direction: column;
}

.item-text .label {
  font-size: 0.8rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}

.item-text a,
.item-text span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-white);
}

.info-decoration {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  opacity: 0.1;
  pointer-events: none;
  z-index: 1;
}

.contact-form-wrapper {
  flex: 1.2;
  padding: var(--spacing-lg);
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-header h3 {
  font-size: 1.8rem;
  color: var(--color-dark);
  margin-bottom: var(--spacing-md);
  font-weight: var(--font-weight-bold);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-dark);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: all 0.2s;
  background-color: #f9f9f9;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background-color: #fff;
  box-shadow: 4px 4px 0 var(--color-accent);
}

.captcha-section {
  background-color: #FFF6E0;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 2px dashed var(--color-accent);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: rotate(-1deg);
}

.captcha-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  color: var(--color-dark);
}

.captcha-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#captcha-input {
  width: 60px;
  padding: 0.5rem;
  text-align: center;
  border: 2px solid var(--color-border);
  border-radius: 8px;
}

#refresh-captcha {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-primary);
  transition: transform 0.3s;
}

#refresh-captcha:hover {
  transform: rotate(180deg);
}

.btn-block {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
}

.form-status {
  margin-top: var(--spacing-sm);
  text-align: center;
  font-weight: bold;
}

.form-status.success {
  color: var(--color-success);
}

.form-status.error {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .contact-card {
    flex-direction: column;
    box-shadow: 6px 6px 0 var(--color-dark);
  }

  .contact-info {
    padding: var(--spacing-md);
    text-align: center;
  }

  .contact-info-title {
    font-size: 2rem;
  }

  .contact-details {
    align-items: center;
  }

  .info-decoration {
    display: none;
  }

  .contact-form-wrapper {
    padding: var(--spacing-md);
  }

  .captcha-section {
    transform: none;
  }
}

/* Cookie Banner - Vintage/Childish Style */
.cookie-banner {
  position: fixed;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 950px;
  background-color: var(--color-bg);
  border: 3px dashed var(--color-primary);
  /* Dashed playful border */
  border-radius: var(--radius-lg);
  padding: 1rem 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideUp 0.5s ease-out;
}

.cookie-banner.hidden {
  display: none;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: nowrap;
  justify-content: space-between;
  text-align: left;
  width: 100%;
}

.cookie-icon {
  animation: bounce 2s infinite;
}

.cookie-icon img {
  width: 80px;
  height: auto;
  display: block;
}

.cookie-text h3 {
  font-family: 'Outfit', sans-serif;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.cookie-text p {
  font-size: 0.95rem;
  color: var(--color-brown);
  margin: 0;
}

.btn-cookie {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: 2px solid var(--color-dark);
  box-shadow: 4px 4px 0 var(--color-dark);
  font-weight: 800;
  padding: 0.5rem 1.5rem;
  transition: all 0.2s;
}

.btn-cookie:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--color-dark);
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }

  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 600px) {
  .cookie-content {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
}

/* Reviews Section — a corkboard of hand-pinned thank-you notes, echoing
   the sticker/stamp language already used for filter pills and badges. */
.reviews-section {
  position: relative;
  padding: var(--spacing-lg) 0 var(--spacing-xl) 0;
  background-color: var(--color-white);
  background-image: radial-gradient(var(--color-border) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  overflow: hidden;
}

.reviews-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.reviews-eyebrow {
  font-weight: var(--font-weight-bold);
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-xs);
}

.reviews-title {
  position: relative;
  display: inline-block;
  font-family: var(--font-family-logo);
  font-size: 3rem;
  font-weight: var(--font-weight-extra-bold);
  color: var(--color-dark);
}

.reviews-underline {
  display: block;
  width: 100%;
  height: 0.6em;
  margin-top: -0.35em;
}

.reviews-underline path {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

.reviews-section.in-view .reviews-underline path {
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .reviews-underline path {
    transition: none;
    stroke-dashoffset: 0;
  }
}

@media (max-width: 600px) {
  .reviews-title {
    font-size: 2.1rem;
  }
}

@keyframes bounce-title {

  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes rubber-band {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.25, 0.75);
  }

  40% {
    transform: scale(0.75, 1.25);
  }

  50% {
    transform: scale(1.15, 0.85);
  }

  65% {
    transform: scale(0.95, 1.05);
  }

  75% {
    transform: scale(1.05, 0.95);
  }

  100% {
    transform: scale(1);
  }
}

.playful-title {
  text-align: center !important;
  font-family: var(--font-family-logo) !important;
  font-size: 2.5rem !important;
  color: var(--color-primary) !important;
  margin-bottom: var(--spacing-lg) !important;
  text-shadow: 2px 2px 0px var(--color-accent) !important;
  animation: bounce-title 2s infinite ease-in-out !important;
  display: block !important;
  width: 100% !important;
}

.playful-title-alt {
  animation: heartbeat 1.5s ease-in-out infinite !important;
  transform-origin: center center;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.1);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.1);
  }

  70% {
    transform: scale(1);
  }
}

.reviews-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--spacing-lg) var(--spacing-md);
  margin-top: var(--spacing-lg);
}

/* Postcard-style review card: hard sticker shadow + a strip of washi
   tape pinning it down, each one tilted slightly like it was placed
   by hand. Straightens and lifts on hover instead of sitting flat. */
.review-card {
  position: relative;
  background: var(--color-light);
  padding: var(--spacing-md) var(--spacing-sm) var(--spacing-sm);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-dark);
  box-shadow: 5px 5px 0 var(--color-dark);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.review-tilt-0 {
  transform: rotate(-2deg);
}

.review-tilt-1 {
  transform: rotate(1.5deg) translateY(10px);
}

.review-tilt-2 {
  transform: rotate(-1deg) translateY(4px);
}

.review-card:hover {
  transform: translateY(-6px) rotate(0deg) !important;
  box-shadow: 8px 8px 0 var(--color-dark);
}

.review-tape {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 68px;
  height: 26px;
  margin-left: -34px;
  background: var(--color-accent);
  opacity: 0.85;
  transform: rotate(-3deg);
  box-shadow: var(--shadow-sm);
}

.review-tilt-1 .review-tape {
  background: var(--color-bubblegum);
  transform: rotate(4deg);
}

.review-tilt-2 .review-tape {
  background: var(--color-secondary);
  transform: rotate(-5deg);
}

.review-quote-mark {
  position: absolute;
  top: -6px;
  right: 12px;
  font-family: var(--font-family-accent);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--color-dark);
  opacity: 0.08;
  pointer-events: none;
}

.review-stars {
  color: var(--color-accent);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: var(--spacing-xs);
}

.review-text {
  position: relative;
  font-style: italic;
  color: var(--color-dark);
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

.review-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: var(--spacing-xs);
  border-top: 2px dashed var(--color-border);
}

.review-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-logo);
  font-weight: var(--font-weight-bold);
  font-size: 0.95rem;
  color: var(--color-white);
  background: var(--color-primary);
}

.review-tilt-1 .review-avatar {
  background: var(--color-secondary);
}

.review-tilt-2 .review-avatar {
  background: var(--color-bubblegum);
}

.review-author {
  font-weight: var(--font-weight-bold);
  color: var(--color-dark);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg) var(--spacing-sm);
  }

  .review-tilt-1,
  .review-tilt-2 {
    transform: rotate(-1deg) translateY(0);
  }

  .review-text {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .review-card {
    transition: box-shadow 0.35s ease;
  }
}

/* Product Page Styles */
.product-page .hero {
  min-height: 50vh;
  /* Increased slightly to give more room */
}

.product-page .hero-bg img {
  object-position: 50% 20%;
  /* Focus more on the top-center where faces usually are */
}

.product-details-section {
  padding: var(--spacing-lg) 0;
  background-color: var(--color-light);
}

.product-layout {
  display: grid;
  /* minmax(0, 1fr), not 1fr: the thumbnail strip's fixed-width, non-shrinking
     items would otherwise force this column past its fair share (grid's
     "blowout" — an auto-min track grows to fit a flex child's content
     instead of letting its own overflow-x:auto engage). */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--spacing-lg);
  align-items: start;
}

/* Gallery */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.gallery-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #fff;
  border: 1px solid var(--color-border);
  aspect-ratio: 1 / 1;
}

.gallery-main img,
.gallery-main video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  color: var(--color-dark);
}

.gallery-nav:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.gallery-nav.prev {
  left: 10px;
}

.gallery-nav.next {
  right: 10px;
}

.gallery-thumbnails {
  display: flex;
  gap: var(--spacing-xs);
  overflow-x: auto;
  padding-bottom: 5px;
}

.gallery-thumb-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  opacity: 0.7;
  overflow: hidden;
  /* Ensure content stays inside */
  flex-shrink: 0;
  /* Prevent shrinking */
  /* Es un <button>, no un <div>: quita el chrome nativo del navegador. */
  padding: 0;
  background: none;
  font: inherit;
  display: block;
}

.gallery-thumb-wrapper:hover,
.gallery-thumb-wrapper.active {
  border-color: var(--color-primary);
  opacity: 1;
}

.gallery-thumb-img,
.gallery-thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Product Info */
.product-info-block h1 {
  font-size: 2.5rem;
  color: var(--color-dark);
  margin-bottom: var(--spacing-sm);
  font-weight: var(--font-weight-extra-bold);
}

.product-info-block p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.product-editorial-section {
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--color-border);
}

.product-editorial {
  max-width: 800px;
}

.product-editorial h2 {
  font-size: 1.8rem;
  color: var(--color-dark);
  margin-bottom: var(--spacing-sm);
  font-weight: var(--font-weight-extra-bold);
}

.product-editorial p {
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: var(--spacing-sm);
}

.not-found-section {
  padding: 6rem 1rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.not-found-section h1 {
  font-size: 2.5rem;
  color: var(--color-dark);
  margin-bottom: var(--spacing-sm);
}

.not-found-section p {
  font-size: 1.1rem;
  color: var(--color-text-light);
}

.product-price {
  font-size: 2rem;
  font-weight: var(--font-weight-extra-bold);
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.product-price-asterisk {
  font-size: 1.1rem;
  vertical-align: super;
}

.product-price-disclaimer {
  font-size: 0.85rem !important;
  color: var(--color-text-light);
  margin-top: 0.75rem;
}

/* Callout linking to the figures guide (tangram/snake pages) — the whole
   thing is one link with one consistent color (no half-underlined,
   half-plain text), styled like the sticker/hard-shadow cards used
   elsewhere so it reads as a real highlighted block, not muted body copy. */
.product-info-block a.product-related-guide {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  max-width: 100%;
  background-color: #FFF6E0;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-md);
  box-shadow: 4px 4px 0 var(--color-dark);
  padding: 0.75rem 1.25rem;
  margin: var(--spacing-md) auto 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--color-dark);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-related-guide-text {
  text-align: center;
}

.product-related-guide-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.product-related-guide-highlight {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.product-related-guide-line2 {
  display: block;
  margin-top: 0.2rem;
  font-weight: var(--font-weight-normal);
  font-size: 0.95rem;
  color: var(--color-dark);
}

.product-info-block a.product-related-guide:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--color-dark);
  border-color: var(--color-dark);
}

#pack-content-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

#product-content-list {
  list-style: none;
  padding-left: 0;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#product-content-list li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.5;
}

#product-content-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

.product-actions-large {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.product-actions-large .btn {
  width: 100%;
  text-align: center;
  padding: 1rem;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .product-layout {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
    max-width: 100%;
  }

  .product-gallery {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    /* Prevent flex item overflow */
  }

  .product-page .hero {
    min-height: auto;
    padding: var(--spacing-xl) 0 var(--spacing-md);
  }

  .product-page .hero h1 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
    padding: 0 var(--spacing-sm);
  }

  .product-details-section {
    padding: var(--spacing-md) 0;
    overflow-x: hidden;
    /* Safety net */
  }

  .product-info-block {
    width: 100%;
    padding: 0 var(--spacing-xs);
    min-width: 0;
    /* Prevent flex item overflow */
  }

  .product-info-block h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .product-info-block p {
    font-size: 1rem;
  }

  .gallery-main {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1/1;
    /* Keep square for better visibility of product */
    max-height: 400px;
    margin: 0 auto;
  }

  .gallery-main img {
    max-width: 100%;
    height: auto;
    max-height: 100%;
  }
}

/* Product Page Hero (Global) */
.product-hero {
  min-height: 40vh !important;
  padding: 0 !important;
  align-items: center;
  justify-content: center;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: none !important;
  /* Remove gradient */
}

.product-hero .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Bring to front */
}

.product-hero .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  /* Crop top/bottom */
}

/* Used by the two resource/guide pages (Tangrams, Magic Snake) — their H1
   sits directly on a busy photo with no scrim, so it needs both a dark
   overlay and explicit white text to stay legible regardless of the image. */
.product-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(43, 36, 56, 0.55) 0%, rgba(255, 107, 91, 0.35) 100%);
}

.product-hero .hero-content {
  position: relative;
  z-index: 1;
}

.product-hero .hero-content h1 {
  color: var(--color-white);
}

/* Product Gallery Hover (Global) */
.product-gallery {
  transition: all 0.3s ease;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm);
}


/* Resource Page Styles */
.resource-section {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-bg);
}

.resource-container {
  max-width: 800px;
  margin: 0 auto;
}

.resource-card {
  background: var(--color-white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--spacing-xl);
  border: 1px solid var(--color-border);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.resource-card::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius-lg) + 3px);
  background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #FFE66D, #FF6B6B);
  background-size: 300% 300%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: gradient-border 4s ease infinite;
}

@keyframes gradient-border {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: transparent;
}

.resource-card:hover::before {
  opacity: 1;
}

.resource-card h2 {
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
  font-size: 1.8rem;
  animation: slideInLeft 1s ease-out;
}

.resource-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.resource-list {
  list-style: none;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1.8;
}

.resource-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.resource-download {
  margin-top: var(--spacing-lg);
  text-align: center;
  animation: pulse-area 3s infinite;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  background-color: rgba(var(--color-primary-rgb), 0.05);
}

@keyframes pulse-area {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.resource-tips {
  margin-bottom: var(--spacing-xl);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.resource-tips h3 {
  color: var(--color-secondary);
  margin-bottom: var(--spacing-md);
  grid-column: 1 / -1;
  text-align: center;
  font-size: 2rem;
}

.resource-tip-item {
  background: var(--color-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-secondary);
  transition: transform 0.3s ease;
}

.resource-tip-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background-color: #FFE0B2;
  /* Pastel Orange */
}

.resource-tip-item h4 {
  font-family: var(--font-family-logo);
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.resource-tip-item p {
  font-family: var(--font-family-logo);
  /* Playful font for text too */
  font-size: 1.1rem;
  color: var(--color-text);
  line-height: 1.6;
  font-weight: 400;
}

.resource-feedback {
  text-align: center;
  background: var(--color-light);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-secondary);
}

.resource-feedback h3 {
  margin-bottom: var(--spacing-md);
  color: var(--color-secondary);
  font-family: var(--font-family-logo);
  font-size: 2rem;
}

.resource-feedback p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-light);
}

.fun-text {
  font-family: var(--font-family-logo);
  font-size: 1.4rem !important;
  color: var(--color-primary) !important;
  text-shadow: 1px 1px 0 var(--color-secondary);
  animation: gentle-bounce 2s infinite;
  display: block;
  margin-bottom: var(--spacing-lg) !important;
}

@keyframes gentle-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* About Page — Story + Values ------------------------------------ */

.about-story {
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  background-color: var(--color-bg);
}

.about-story-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.about-story-text h2 {
  font-family: var(--font-family-logo);
  font-size: 2.1rem;
  color: var(--color-dark);
  margin-bottom: var(--spacing-sm);
}

.about-story-text p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
}

.about-story-text p:last-child {
  margin-bottom: 0;
}

.about-highlight {
  position: relative;
  font-weight: var(--font-weight-bold);
  color: var(--color-dark);
  white-space: nowrap;
}

.about-highlight::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 2px;
  height: 0.5em;
  background: var(--color-accent);
  opacity: 0.5;
  z-index: -1;
  transform: skewX(-6deg);
}

/* A tilted, tape-pinned illustration — same paper-craft language as the
   review postcards, so the two sections read as one design system. */
.about-story-art {
  position: relative;
  justify-self: center;
  transform: rotate(2deg);
}

.about-story-art img {
  display: block;
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-dark);
  box-shadow: 8px 8px 0 var(--color-secondary);
}

.about-story-art-tape {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 84px;
  height: 30px;
  margin-left: -42px;
  background: var(--color-accent);
  opacity: 0.85;
  transform: rotate(-4deg);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

@media (max-width: 900px) {
  .about-story-grid {
    grid-template-columns: 1fr;
  }

  .about-story-art {
    order: -1;
    max-width: 260px;
    margin: 0 auto var(--spacing-sm);
  }
}

.about-values {
  padding: var(--spacing-lg) 0 var(--spacing-xl);
  background-color: var(--color-white);
}

.about-values-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.about-values-title {
  position: relative;
  display: inline-block;
  font-family: var(--font-family-logo);
  font-size: 2.4rem;
  font-weight: var(--font-weight-extra-bold);
  color: var(--color-dark);
}

.about-values-underline {
  display: block;
  width: 100%;
  height: 0.6em;
  margin-top: -0.3em;
}

.about-values-underline path {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

.about-values.in-view .about-values-underline path {
  stroke-dashoffset: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-lg);
  max-width: 1080px;
  margin: 0 auto;
}

.value-card {
  position: relative;
  background: var(--color-light);
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-dark);
  box-shadow: 6px 6px 0 var(--color-dark);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.value-tilt-0 {
  transform: rotate(-1.5deg);
}

.value-tilt-1 {
  transform: rotate(1.5deg);
}

.value-tilt-2 {
  transform: rotate(-1deg);
}

.value-card:hover {
  transform: translateY(-6px) rotate(0deg) !important;
  box-shadow: 9px 9px 0 var(--color-dark);
}

.value-icon-badge {
  position: absolute;
  top: -22px;
  left: var(--spacing-md);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-dark);
  box-shadow: var(--shadow-sm);
}

.value-card h3 {
  font-family: var(--font-family-logo);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.value-tilt-1 h3 {
  color: var(--color-secondary);
}

.value-tilt-2 h3 {
  color: var(--color-brown);
}

.value-tilt-2 .value-icon-badge {
  background: var(--color-bubblegum);
}

.value-card p {
  color: var(--color-text-light);
  line-height: 1.7;
}

@media (max-width: 600px) {
  .about-values-title {
    font-size: 1.8rem;
  }

  .value-tilt-0,
  .value-tilt-1,
  .value-tilt-2 {
    transform: rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {

  .about-values-underline path,
  .value-card {
    transition: none;
  }

  .about-values-underline path {
    stroke-dashoffset: 0;
  }
}