/* =========================================================
   Neko Paper · Estilos
   Paleta tomada del logo: coral, rosa sakura, crema y marrón.
   ========================================================= */

:root {
  /* Marca */
  --coral-700: #d43a4e;
  --coral-600: #ea4b5e;
  --coral-500: #f4737f;
  --coral-400: #fa97a1;
  --sakura-300: #f9b3c6;
  --sakura-200: #fdd3dd;
  --sakura-100: #fde8ec;
  --cream: #fffaf6;
  --brown: #8a5a3b;
  --yellow: #f8c94a;
  --mint: #a8ded3;
  --lilac: #cdc0f0;

  /* Superficies */
  --bg: #fff6f7;
  --bg-soft: #fdeef1;
  --surface: #ffffff;
  --surface-2: #fff8fa;
  --line: #f6d9df;
  --line-strong: #f0bfc9;

  /* Texto */
  --text: #4a343a;
  --text-soft: #8b6f76;
  --text-inverse: #ffffff;

  /* Formas */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(212, 58, 78, 0.08);
  --shadow-md: 0 10px 26px rgba(212, 58, 78, 0.12);
  --shadow-lg: 0 22px 50px rgba(212, 58, 78, 0.18);

  --font-head: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;

  --header-h: 74px;
}

[data-theme="dark"] {
  /* precios, links y acentos necesitan aclararse sobre fondo oscuro */
  --coral-700: #ff909d;
  --bg: #241a1e;
  --bg-soft: #2c2025;
  --surface: #31232a;
  --surface-2: #3a2a31;
  --line: #4a353e;
  --line-strong: #5c414c;
  --text: #f9e9ec;
  --text-soft: #c3a5ad;
  --sakura-100: #402c34;
  --sakura-200: #4d343d;
  --cream: #31232a;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 26px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 22px 50px rgba(0, 0, 0, 0.45);
}

/* En oscuro bajamos los halos de color para que no se vea turbio. */
[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(249, 179, 198, 0.12), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(205, 192, 240, 0.1), transparent 38%),
    radial-gradient(circle at 70% 92%, rgba(168, 222, 211, 0.08), transparent 40%);
}
[data-theme="dark"] .card__media,
[data-theme="dark"] .modal__media {
  background: linear-gradient(150deg, var(--sakura-200), var(--surface-2));
}
[data-theme="dark"] .card__media::before { background: rgba(255, 255, 255, 0.14); }

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

/* El atributo `hidden` debe ganarle a cualquier display de clase. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(249, 179, 198, 0.35), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(205, 192, 240, 0.28), transparent 38%),
    radial-gradient(circle at 70% 92%, rgba(168, 222, 211, 0.22), transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: 0.2px;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--coral-700); text-decoration: none; }
a:hover { text-decoration: underline; }

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

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--coral-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  background: var(--coral-600);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--r-md) var(--r-md);
  z-index: 200;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ------------------ Botones ------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--coral-500), var(--coral-600));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { box-shadow: var(--shadow-lg); }

.btn--ghost {
  background: var(--surface);
  color: var(--coral-700);
  border-color: var(--sakura-300);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: var(--coral-500); }

.btn--sm { padding: 0.55rem 1.05rem; font-size: 0.92rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem;
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}
.icon-btn:hover {
  transform: translateY(-2px) rotate(-6deg);
  border-color: var(--coral-400);
  background: var(--sakura-100);
}

.badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  background: var(--coral-600);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--r-pill);
  border: 2px solid var(--surface);
}
.badge-count--inline {
  position: static;
  border: none;
  background: rgba(255, 255, 255, 0.28);
}

/* ------------------ Header ------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--line);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  margin-right: auto;
  min-width: 0; /* deja que el nombre se recorte antes de romper el header */
}
.brand__text { min-width: 0; }
.brand__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand:hover { text-decoration: none; }

.brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sakura-100);
  border: 2px solid var(--sakura-200);
  transition: transform 0.3s;
}
.brand:hover .brand__logo { transform: rotate(-8deg) scale(1.05); }

/* Logo provisional (SVG inline) mientras no exista assets/logo.png */
.brand__logo.is-missing,
.hero__logo.is-missing {
  background: transparent;
  border-color: transparent;
  object-fit: contain;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--coral-600);
  letter-spacing: 0.5px;
}
.brand__text small {
  font-size: 0.75rem;
  color: var(--text-soft);
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.site-nav { display: flex; gap: 0.35rem; }
.site-nav a {
  padding: 0.5rem 0.95rem;
  border-radius: var(--r-pill);
  color: var(--text);
  font-weight: 600;
  transition: background 0.16s, color 0.16s;
}
.site-nav a:hover {
  background: var(--sakura-100);
  color: var(--coral-700);
  text-decoration: none;
}

.header-actions { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; }

/* ------------------ Hero ------------------ */
.hero { position: relative; z-index: 2; padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; }

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.35rem 1rem;
  background: var(--surface);
  border: 2px dashed var(--sakura-300);
  border-radius: var(--r-pill);
  color: var(--coral-700);
  font-size: 0.85rem;
  font-weight: 700;
}

.squiggle {
  position: relative;
  color: var(--coral-600);
  white-space: nowrap;
}
.squiggle::after {
  content: "";
  position: absolute;
  left: -0.06em; right: -0.06em; bottom: 0.06em;
  height: 0.3em;
  background: var(--sakura-200);
  border-radius: var(--r-pill);
  z-index: -1;
}

.lede { font-size: 1.08rem; color: var(--text-soft); max-width: 46ch; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

.hero__perks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  padding: 0;
  margin: 1.8rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
}

.hero__art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
}

.hero__logo {
  position: relative;
  width: min(330px, 78%);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 18px 34px rgba(212, 58, 78, 0.22));
  animation: bob 5s ease-in-out infinite;
}

.blob {
  position: absolute;
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  filter: blur(2px);
  opacity: 0.55;
}
.blob--1 {
  width: 320px; height: 320px;
  background: linear-gradient(140deg, var(--sakura-200), var(--coral-400));
  animation: morph 12s ease-in-out infinite;
}
.blob--2 {
  width: 220px; height: 220px;
  right: 4%; bottom: 6%;
  background: linear-gradient(140deg, var(--lilac), var(--mint));
  opacity: 0.4;
  animation: morph 15s ease-in-out infinite reverse;
}

.float {
  position: absolute;
  font-size: 1.9rem;
  filter: drop-shadow(0 6px 10px rgba(212, 58, 78, 0.16));
  animation: bob 4.5s ease-in-out infinite;
}
.float--a { top: 6%; left: 8%; animation-delay: 0.2s; }
.float--b { top: 18%; right: 4%; animation-delay: 0.9s; }
.float--c { bottom: 14%; left: 2%; animation-delay: 1.5s; }
.float--d { bottom: 4%; right: 14%; animation-delay: 2.1s; }

.hero__wave {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  height: 60px;
  background: var(--bg-soft);
  -webkit-mask-image: radial-gradient(28px at 28px 0, transparent 98%, #000);
  mask-image: radial-gradient(28px at 28px 0, transparent 98%, #000);
  -webkit-mask-size: 56px 60px;
  mask-size: 56px 60px;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}
@keyframes morph {
  0%, 100% { border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; transform: rotate(0deg); }
  50% { border-radius: 60% 40% 38% 62% / 42% 58% 42% 58%; transform: rotate(8deg); }
}

/* Pétalos flotando */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.petal {
  position: absolute;
  top: -40px;
  font-size: 1.05rem;
  opacity: 0.5;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-10vh) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.5; }
  100% { transform: translateY(108vh) translateX(60px) rotate(420deg); opacity: 0; }
}

/* ------------------ Secciones ------------------ */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; position: relative; z-index: 2; }
.section--soft { background: var(--bg-soft); }

.section__head { text-align: center; max-width: 60ch; margin: 0 auto 2rem; }
.section__head h2::after {
  content: " 🌸";
  font-size: 0.7em;
}
.section__head p { color: var(--text-soft); }

/* ------------------ Toolbar ------------------ */
.toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.search {
  position: relative;
  flex: 1 1 280px;
  display: flex;
  align-items: center;
}
.search__icon {
  position: absolute;
  left: 1rem;
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.7;
}
.search input {
  width: 100%;
  padding: 0.85rem 2.6rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.search input::placeholder { color: var(--text-soft); }
.search input:focus {
  outline: none;
  border-color: var(--coral-400);
  box-shadow: 0 0 0 4px var(--sakura-100);
}
.search__clear {
  position: absolute;
  right: 0.75rem;
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--sakura-200);
  color: var(--coral-700);
  font-size: 1rem;
  line-height: 1;
}

.select { position: relative; display: flex; }
.select select {
  appearance: none;
  padding: 0.85rem 2.6rem 0.85rem 1.2rem;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
}
.select::after {
  content: "▾";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--coral-600);
}

/* ------------------ Chips ------------------ */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}
.chip {
  padding: 0.5rem 1.1rem;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--text);
  font-weight: 600;
  font-size: 0.93rem;
  transition: all 0.16s ease;
}
.chip:hover {
  border-color: var(--coral-400);
  transform: translateY(-2px);
}
.chip.is-active {
  background: linear-gradient(135deg, var(--coral-500), var(--coral-600));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.result-count {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 1.2rem;
}

/* ------------------ Grid de productos ------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: pop 0.35s ease backwards;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--coral-400);
  box-shadow: var(--shadow-lg);
}
.card.is-out { opacity: 0.72; }

@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  font-size: 3.6rem;
  background: linear-gradient(150deg, var(--sakura-100), var(--surface-2));
  border-bottom: 2px dashed var(--line);
  cursor: pointer;
  overflow: hidden;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card__media::before {
  content: "";
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  filter: blur(24px);
}
.card__emoji { position: relative; transition: transform 0.25s ease; }
.card:hover .card__emoji { transform: scale(1.12) rotate(-6deg); }

.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.05rem 1.1rem;
  flex: 1;
}

.card__cat {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--coral-500);
}

.card__name {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}
.card__name button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}
.card__name button:hover { color: var(--coral-600); }

.card__desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.85rem;
}

.card__price {
  font-family: var(--font-head);
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--coral-700);
}

.card__fav {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--coral-600);
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, background 0.18s;
  z-index: 2;
}
.card__fav:hover { transform: scale(1.14); }
.card__fav.is-on { background: var(--coral-600); color: #fff; }

.tag {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.tag--nuevo { background: var(--mint); color: #16564a; }
.tag--oferta { background: var(--coral-600); }
.tag--ultimas { background: var(--yellow); color: #6b4a00; }
.tag--agotado { background: #9d8c92; }

/* ------------------ Vacío ------------------ */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--surface);
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.empty__face { font-size: 3rem; display: block; margin-bottom: 0.5rem; }

/* ------------------ Instagram ------------------ */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem;
}

.ig-item {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--sakura-100);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ig-item:hover {
  transform: translateY(-5px) rotate(-1deg);
  border-color: var(--coral-400);
  box-shadow: var(--shadow-lg);
}
.ig-item img { width: 100%; height: 100%; object-fit: cover; }

.ig-item__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.6rem 0.75rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #fff;
  background: linear-gradient(to top, rgba(74, 52, 58, 0.88), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ig-item:hover .ig-item__caption,
.ig-item:focus-visible .ig-item__caption { opacity: 1; }

.ig-cta { text-align: center; margin: 1.6rem 0 0; }

@media (max-width: 620px) {
  .ig-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
  /* En táctil no hay hover: el caption estorba más de lo que aporta. */
  .ig-item__caption { display: none; }
}

/* ------------------ Nosotras ------------------ */
.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.about__card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.about__card:hover { transform: translateY(-5px); }
.about__emoji { font-size: 2.4rem; display: block; margin-bottom: 0.5rem; }
.about__card p { color: var(--text-soft); margin: 0; font-size: 0.94rem; }

/* ------------------ Contacto ------------------ */
.contact {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}
.contact__list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: 0.65rem;
}
.contact__list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
}
.contact__list span[aria-hidden] { font-size: 1.2rem; }

.contact__cta {
  text-align: center;
  padding: 2.2rem 1.5rem;
  background: linear-gradient(150deg, var(--sakura-100), var(--surface));
  border: 2px dashed var(--sakura-300);
  border-radius: var(--r-xl);
}
.contact__cat { font-size: 3.2rem; animation: bob 4s ease-in-out infinite; }

/* ------------------ Footer ------------------ */
.site-footer {
  padding: 2rem 0;
  background: var(--surface);
  border-top: 2px solid var(--line);
  text-align: center;
  position: relative;
  z-index: 2;
}
.footer-inner p { margin: 0.2rem 0; }
.footer-brand { font-family: var(--font-head); color: var(--coral-600); font-weight: 700; }
.footer-note { font-size: 0.83rem; color: var(--text-soft); }

/* ------------------ Panel lateral ------------------ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 52, 58, 0.45);
  backdrop-filter: blur(3px);
  z-index: 80;
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(420px, 100%);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 2px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: slide-in 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.75rem;
}
.panel__head h2 { margin: 0; font-size: 1.4rem; }

.panel__tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0 1.25rem 0.9rem;
  border-bottom: 2px solid var(--line);
}
.tab {
  flex: 1;
  padding: 0.55rem 0.5rem;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.9rem;
}
.tab.is-active {
  background: var(--sakura-100);
  border-color: var(--coral-400);
  color: var(--coral-700);
}

.panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.panel__foot {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 2px solid var(--line);
  background: var(--surface-2);
  display: grid;
  gap: 0.7rem;
}

.line-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem;
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
}
.line-item__media {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--sakura-100);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.line-item__media img { width: 100%; height: 100%; object-fit: cover; }
.line-item__name { font-weight: 700; font-size: 0.92rem; line-height: 1.25; }
.line-item__price { font-size: 0.85rem; color: var(--text-soft); }
.line-item__actions { display: flex; align-items: center; gap: 0.3rem; }

.qty {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.1rem;
}
.qty button {
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--coral-700);
  font-weight: 800;
  line-height: 1;
}
.qty button:hover { background: var(--sakura-100); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: 0.9rem; }

.link-remove {
  border: none;
  background: none;
  color: var(--text-soft);
  font-size: 1.05rem;
  padding: 0.2rem;
}
.link-remove:hover { color: var(--coral-600); }

.panel-empty {
  text-align: center;
  color: var(--text-soft);
  padding: 2.5rem 1rem;
}
.panel-empty span { font-size: 2.6rem; display: block; margin-bottom: 0.4rem; }

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
}
.total-row strong { color: var(--coral-700); font-size: 1.4rem; }

/* ------------------ Modal ------------------ */
.modal {
  width: min(720px, calc(100% - 2rem));
  padding: 0;
  border: 2px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: visible;
}
.modal::backdrop {
  background: rgba(74, 52, 58, 0.5);
  backdrop-filter: blur(3px);
}
.modal[open] { animation: pop-in 0.24s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.modal__close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 3;
  background: var(--coral-600);
  color: #fff;
  border-color: var(--surface);
}
.modal__close:hover { background: var(--coral-700); }

.modal__content {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
  border-radius: inherit;
  overflow: hidden;
}
.modal__media {
  display: grid;
  place-items: center;
  min-height: 260px;
  font-size: 6rem;
  background: linear-gradient(150deg, var(--sakura-100), var(--surface-2));
}
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__info { padding: 1.75rem; }
.modal__info h3 { font-size: 1.55rem; margin-bottom: 0.3rem; }
.modal__price {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--coral-700);
  margin: 0.4rem 0 0.8rem;
}
.modal__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.modal__tags li {
  padding: 0.22rem 0.7rem;
  background: var(--sakura-100);
  color: var(--coral-700);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
}
.modal__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }

/* ------------------ Toast ------------------ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 120;
  padding: 0.8rem 1.4rem;
  background: var(--coral-600);
  color: #fff;
  font-weight: 700;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.25s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ------------------ Responsive ------------------ */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__copy .lede { margin-inline: auto; }
  .hero__cta, .hero__perks { justify-content: center; }
  .hero__art { order: -1; min-height: 260px; }
  .contact { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}

@media (max-width: 620px) {
  .wrap { width: min(1180px, 100% - 1.75rem); }
  h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }

  .header-inner { gap: 0.5rem; }
  .brand__logo { width: 42px; height: 42px; }
  .brand__text strong { font-size: 1.1rem; }
  .brand__text small { letter-spacing: 1.6px; font-size: 0.68rem; }
  .icon-btn { width: 38px; height: 38px; }
  .btn__label { display: none; }
  #openCart { padding: 0.5rem 0.75rem; }

  .hero__art { min-height: 200px; }
  .hero__logo { width: min(240px, 62%); }
  .blob--1 { width: 210px; height: 210px; }
  .blob--2 { width: 140px; height: 140px; }
  .float { font-size: 1.4rem; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 0.9rem; }
  .card__media { font-size: 2.8rem; }
  .card__body { padding: 0.8rem 0.85rem 0.9rem; }
  .card__desc { display: none; }
  .card__foot { flex-direction: column; align-items: stretch; }
  .modal__content { grid-template-columns: 1fr; }
  .modal__media { min-height: 180px; font-size: 4.5rem; }
  .modal__info { padding: 1.25rem; }

  /* En columna, el flex-basis del buscador aplicaría a la ALTURA. */
  .toolbar { flex-direction: column; }
  .toolbar .search { flex: 0 0 auto; }
  .toolbar .select select { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .petals { display: none; }
}
