@import url("galeria.css");

/* ==================================================
   MENU PAGE
================================================== */

.menu {
  margin: 40px 0;
}

.menu-section {
  margin-bottom: 45px;
  animation: fadeIn 1s ease forwards;
}

.menu-section h2 {
  color: var(--pink-dark);
  letter-spacing: 3px;
  margin-bottom: 15px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* Card del menú */
.menu-card {
  background: var(--pink-soft);
  border-radius: 25px;
  padding: 20px 25px;
  position: relative;
  animation: float 6s ease-in-out infinite;
  transition: transform .35s var(--ease-kawaii),
              box-shadow .35s var(--ease-soft);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(229,92,138,.25);
}

.menu-card h3 {
  margin: 0;
  color: var(--text);
}

.menu-card p {
  font-size: 13px;
  opacity: .8;
  margin: 6px 0 10px;
}

/* Precio */
.price {
  position: absolute;
  top: 18px;
  right: 20px;
  background: var(--pink-dark);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
}

.menu-card.featured {
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.menu-card-inner {
  display: flex;
  gap: 14px;
  align-items: center;
}

.menu-cover-wrapper {
  position: relative;
  width: 65px;
  height: 95px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.menu-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  animation: coverPulse 3.5s ease-in-out infinite;
  transition: transform .4s ease;
}

.menu-card:hover .menu-cover {
  transform: rotate(-3deg) scale(1.05);
}

/* ==================================================
   DETALLE DEL PLATO / DISH DETAIL
================================================== */

.dish-detail {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid transparent;
}

.dish-detail:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: #ffd700;
}

.dish-title {
  font-size: 2.5rem;
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  letter-spacing: -1px;
  border-bottom: 2px solid #f7b9e6;
  display: table;
  margin-left: auto;
  margin-right: auto;
}

.dish-content {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.pro-con-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 25px;
}

.pro-column, 
.con-column {
  padding: 15px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.pro-column { 
  background: #e6fffa; 
  border: 1px solid #b2f5ea; 
}

.con-column { 
  background: #fff5f5; 
  border: 1px solid #feb2b2; 
}

.pro-con-grid h5 { 
  margin-bottom: 10px; 
  margin-top: 0; 
}

.pro-con-grid ul { 
  padding-left: 20px; 
  margin: 0; 
}

/* Imágenes */
.dish-images {
  position: relative;
  padding: 10px;
  background: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transform: rotate(-2deg);
}

.dish-images::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 30px;
  background: rgba(235, 147, 194, 0.3);
  backdrop-filter: blur(2px);
}

.dish-images img {
  max-width: 300px;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.dish-images img:hover {
  transform: scale(1.02);
}

/* Información */
.dish-info {
  flex: 1 1 70%;
}

/* Rankings */
.dish-rankings {
  background: #fef4fb;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 4px solid #e3b8dd;
}

.rank-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.stars {
  color: #ffb400;
  letter-spacing: 2px;
  font-size: 1.1rem;
}

/* Descripción */
.dish-description {
  line-height: 1.6;
  color: #444;
  font-size: 1.05rem;
  padding: 20px;
  border-radius: 0 15px 15px 0;
  font-family: 'Georgia', serif;
  font-style: italic;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.03);
  margin-top: 25px;
  position: relative;
}

.dish-description::before {
  content: '"';
  font-size: 3rem;
  position: absolute;
  top: -10px;
  left: 10px;
  opacity: 0.1;
}

/* ==================================================
   LINKS / PLATAFORMAS
================================================== */

.music-platforms {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.music-platforms a {
  padding: 8px 18px;
  background: var(--pink-soft);
  color: var(--text);
  text-decoration: none;
  border-radius: 25px;
  font-size: 13px;
  transition: transform .3s var(--ease-kawaii),
              box-shadow .3s var(--ease-soft),
              background .3s;
}

.music-platforms a:hover {
  background: var(--pink-dark);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(229,92,138,.25);
}

/* ==================================================
   ARCHIVE GRID (FORZADO A 2 COLUMNAS MÍNIMO)
================================================== */

.archive {
  margin: 60px 0;
  text-align: center;
}

.archive-sub {
  font-size: 13px;
  opacity: .5;
  margin-bottom: 10px;
}

.archive-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100%;
}

/* En pantallas más grandes se permiten más columnas */
@media (min-width: 700px) {
  .archive-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  }
}

/* ==================================================
   ARCHIVE CARD — FLIP CARD (frente: imagen / dorso: datos)
================================================== */

/* Contenedor de la card: solo da el "perspective" 3D y el tamaño en el grid */
.archive-card {
  background: transparent;
  border-radius: 14px;
  padding: 0;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  perspective: 1200px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .35s var(--ease-kawaii);
}

.archive-card:hover {
  transform: translateY(-4px);
}

/* Este es el que realmente rota */
.card-flip-inner {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 14px;
  transition: transform .6s var(--ease-kawaii);
  transform-style: preserve-3d;
}

.archive-card.flipped .card-flip-inner {
  transform: rotateY(180deg);
}

/* Caras (frente y dorso) */
.card-front,
.card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* FRENTE — la imagen completa, sin recortar */
.card-front {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
}

.card-front img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--pink-dark);
  border-radius: 6px;
  box-sizing: border-box;
}

/* Ícono de "tocá para voltear" — mano/dedo, bien visible */
.card-front::after {
  content: "👆";
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 3px 8px rgba(0,0,0,.2);
  border: 1.5px solid var(--pink-dark);
  pointer-events: none;
  animation: tapHint 1.8s ease-in-out infinite;
}

@keyframes tapHint {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* DORSO — los datos que antes iban debajo de la imagen */
.card-back {
  background: var(--pink-soft);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 6px;
  padding: 14px 12px;
  overflow-y: auto;
}

/* Centra verticalmente el contenido SOLO si entra completo;
   si no entra, los márgenes auto colapsan y se puede
   scrollear hasta ver todo (arriba y abajo) */
.card-back > *:first-child {
  margin-top: auto;
}

.card-back > *:last-child {
  margin-bottom: auto;
}

.card-back::-webkit-scrollbar {
  width: 4px;
}

.card-back::-webkit-scrollbar-thumb {
  background-color: rgba(229,92,138,.4);
  border-radius: 10px;
}

.card-back h3 {
  font-size: 14px;
  margin: 0;
  color: var(--text);
  line-height: 1.25;
}

.card-back .type {
  font-size: 10.5px;
  opacity: .7;
  line-height: 1.3;
}

.card-back .stars {
  color: var(--pink-dark);
  font-size: 15px;
  margin: 2px 0;
}

.card-back .card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 4px;
}

/* Botón "View full review" — solo en el reverso de las cards destacadas.
   Es la ÚNICA forma de navegar a la página completa. Se ve como un
   botón real (rectangular, ancho completo), no como un tag. */
.card-go-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 9px 10px;
  background: #ff2f7e;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-radius: 8px;
  border-bottom: 3px solid #c2185b;
  box-shadow: 0 3px 8px rgba(194, 24, 91, 0.35);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-bottom-width .15s ease;
}

.card-go-btn:hover {
  background: #ff447f;
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(194, 24, 91, 0.4);
}

.card-go-btn:active {
  transform: translateY(2px);
  border-bottom-width: 0;
  box-shadow: 0 1px 3px rgba(194, 24, 91, 0.4);
}

/* ==================================================
   FILTROS / CONTROLES
================================================== */

.archive-wrapper {
  padding: 60px 30px;
}

.archive-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

#search {
  flex: 1;
  min-width: 0;
  padding: 10px 18px;
  border-radius: 25px;
  border: none;
  background: var(--pink-soft);
  font-size: 13px;
}

.filters button {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--pink-soft);
  background: transparent;
  cursor: pointer;
  transition: all .3s ease;
}

.filters button.active,
.filters button:hover {
  background: var(--pink-dark);
  color: white;
}

.archive-filters {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.archive-filters select {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: var(--pink-soft);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: transform .3s var(--ease-kawaii),
              box-shadow .3s var(--ease-soft);
}

.archive-filters select:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(229,92,138,.25);
}

.archive-filters select:focus {
  outline: none;
}

.archive-filters select.changed {
  animation: selectPop .5s var(--ease-kawaii);
}

@keyframes selectPop {
  0%   { transform: scale(1); box-shadow: 0 0 0 rgba(229,92,138,0); }
  50%  { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(229,92,138,.35); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(229,92,138,0); }
}

/* ==================================================
   TAGS
================================================== */

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: bold;
  animation: tagPop 1.6s cubic-bezier(.68,-0.55,.27,1.55) infinite,
             tagGlow 1.6s ease-in-out infinite;
}

.tag.romance      { background: #ffd6e8; color: #a83d6f; }
.tag.fantasia     { background: #e0f7ff; color: #2b7a8a; }
.tag.drama        { background: #e6d9ff; color: #5a3ea1; }
.tag.accion       { background: #ffe0e0; color: #8a2b2b; }
.tag.deporte      { background: #e0ffe6; color: #2b8a3e; }
.tag.comedia      { background: #fff3c4; color: #8a6b00; }
.tag.oscuro       { background: #2f2f3a; color: #f2c2d4; }
.tag.lgbtq        { background: #ffe6f2; color: #b23c7c; }
.tag.tabu         { background: #ffcccc; color: #a81c4a; }
.tag.recomendado  { background: #ea148d; color: #f9ebf3; }

.archive-card:hover .tag {
  filter: brightness(1.15);
}

@keyframes tagPop {
  0%   { transform: scale(1) translateY(0); }
  60%  { transform: scale(0.95) translateY(1px); }
}

@keyframes tagGlow {
  0%,100% { box-shadow: 0 0 0 rgba(0,0,0,0); }
  50%     { box-shadow: 0 0 20px rgba(229,92,138,.45); }
}

/* ==================================================
   CARD DESTACADA / RECOMENDACIÓN
================================================== */

.archive-card.featured {
  position: relative;
}



.archive-card.featured::after {
  content: '★ TOP ★';
  position: absolute;
  top: 15px;
  right: -35px;
  width: 130px;
  background-color: #ffd700;
  color: #000;
  font-weight: bold;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 0;
  text-align: center;
  transform: rotate(45deg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 5;
  pointer-events: none;
}

/* Overlay rosado solo para destacados */
.archive-card.featured .menu-cover-wrapper::after,
.menu-card.featured .menu-cover-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(234,20,141,.15),
    rgba(120,20,70,.45)
  );
  opacity: 0;
  transition: opacity .4s ease;
}

.archive-card.featured:hover .menu-cover-wrapper::after,
.menu-card.featured:hover .menu-cover-wrapper::after {
  opacity: 1;
}

@keyframes coverPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

/* ==================================================
   MENÚ LATERAL FLOTANTE (PESTAÑAS DERECHA)
================================================== */

.floating-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  z-index: 99999;
  background: none;
  padding: 0;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.menu-btn {
  pointer-events: auto;
  padding: 10px 14px 10px 10px;
  width: 80px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  text-transform: lowercase;
  color: #f27fc2;
  background-color: #ffffff;
  border: 2px solid #ffb6c1;
  border-radius: 15px 0 0 15px;
  box-shadow: -3px 3px 0px #ffe4e1;
  cursor: pointer;
  text-align: right;
  margin-right: -2px;
  transition: all 0.4s cubic-bezier(0.68, -0.60, 0.32, 1.60);
  animation: tiernoVibrar 4s ease-in-out infinite;
}

.menu-btn:nth-child(2) { animation-delay: 0.2s; }
.menu-btn:nth-child(3) { animation-delay: 0.4s; }
.menu-btn:nth-child(4) { animation-delay: 0.6s; }
.menu-btn:nth-child(5) { animation-delay: 0.8s; }
.menu-btn:nth-child(6) { animation-delay: 1.0s; }

.menu-btn:hover {
  color: #ff8da1;
  background-color: #fff0f5;
  border-color: #ffb6c1;
  transform: translateX(-22px);
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-right: -25px;
  padding-right: 35px;
  box-shadow: -7px 7px 0px #ffb6c1;
  animation-play-state: paused;
}

.menu-btn:active {
  transform: translateX(-6px);
  margin-right: -10px;
  font-size: 11px;
  box-shadow: -2px 2px 0px #ffb6c1;
  transition: all 0.1s ease;
}

@keyframes tiernoVibrar {
  0%, 100% { transform: translateX(0); }
  26% { transform: translateX(-3px) rotate(-1deg); }
  28% { transform: translateX(2px) rotate(1deg); }
  30% { transform: translateX(-3px) rotate(-1deg); }
  32% { transform: translateX(2px) rotate(0deg); }
  34% { transform: translateX(0); }
}

/* ==================================================
   OVERLAY Y MODAL
================================================== */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 182, 193, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  backdrop-filter: blur(5px);
}

.card-modal {
  background-color: #ffffff;
  padding: 35px 25px 25px 25px;
  border-radius: 20px;
  border: 3px solid #ffb6c1;
  max-width: 450px;
  width: 85%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 15px 35px rgba(255, 182, 193, 0.3);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #ffb6c1;
  line-height: 1;
  transition: transform 0.2s, color 0.2s;
  z-index: 10;
}

.close-btn:hover {
  color: #ff69b4;
  transform: scale(1.1);
}

#card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* La card clonada dentro del modal SIEMPRE se muestra "desplegada"
   (imagen + datos apilados), sin el efecto de volteo */
#card-content .archive-card {
  cursor: default;
  perspective: none;
}

#card-content .card-flip-inner {
  position: static;
  transform: none !important;
  transition: none;
  height: auto;
  box-shadow: none;
  animation: none !important;
}

#card-content .card-front,
#card-content .card-back {
  position: static;
  transform: none !important;
  backface-visibility: visible;
  height: auto;
  overflow: visible;
  border-radius: 12px;
}

#card-content .card-front::after {
  display: none;
}

#card-content > *,
#card-content .card-front,
#card-content .card-back {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
  background: transparent !important;
  border: none !important;
}

#card-content img {
  display: block;
  max-width: 100% !important;
  max-height: 350px !important;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
  border-radius: 12px;
  margin: 0 auto 15px auto !important;
}

#card-content .card-back {
  padding: 0;
  gap: 8px;
}

#card-content .card-back h3 {
  font-size: 20px;
}

#card-content .card-back .type {
  font-size: 13px;
}

#card-content .card-back .stars {
  font-size: 18px;
}

.card-modal::-webkit-scrollbar {
  width: 6px;
}

.card-modal::-webkit-scrollbar-thumb {
  background-color: #ffe4e1;
  border-radius: 10px;
}

/* Título del modal */
.modal-intro-title {
  font-family: inherit;
  font-size: 28px;
  font-weight: 900;
  color: #ff69b4;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 10px 0 25px 0;
  text-shadow: 3px 3px 0px #ffe4e1;
  animation: entradaRebote 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.sparkle {
  display: inline-block;
  color: #ffd700;
  text-shadow: none;
  animation: estrellaGiratoria 2s infinite linear;
}

@keyframes entradaRebote {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.7);
  }
  60% {
    transform: translateY(-5px) scale(1.1);
  }
  80% {
    transform: translateY(2px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes estrellaGiratoria {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Botón de reintento */
#reroll-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #ff69b4;
  border: 2px solid #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(255, 105, 180, 0.4);
  z-index: 100;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s;
}

#reroll-btn:hover {
  background-color: #ff8da1;
  transform: scale(1.1) rotate(180deg);
}

#reroll-btn:active {
  transform: scale(0.95);
}

/* ==================================================
   BOTÓN VERTICAL IZQUIERDO (TODO / PESTAÑA)
================================================== */

.btn-todo-vertical {
  position: fixed;
  top: 45%;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 10px 20px 6px;
  background: linear-gradient(135deg, rgba(186, 255, 240, 0.9), rgba(158, 255, 232, 0.95));
  backdrop-filter: blur(4px);
  border: 3px solid #ff527b;
  border-left: none;
  border-radius: 0 16px 16px 0;
  text-decoration: none;
  box-shadow: 4px 4px 0px rgba(255, 82, 123, 0.2);
  z-index: 99999;
  animation: deslizarPestaña 4s infinite ease-in-out;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.todo-text-vertical {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 900;
  color: #cc0052;
  text-transform: lowercase;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.5px;
}

.todo-icon-bounce {
  font-size: 16px;
  display: inline-block;
  filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

.btn-todo-vertical:hover {
  padding-left: 18px;
  background: linear-gradient(135deg, #9effe8, #bafff0);
  box-shadow: 6px 6px 0px #ff527b;
  transform: translateY(0);
}

.btn-todo-vertical:hover .todo-icon-bounce {
  transform: rotate(-20deg) scale(1.15);
}

@keyframes deslizarPestaña {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

/* ==================================================
   RESPONSIVE
================================================== */

/* Tablet */
@media (max-width: 900px) {
  .menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
  }

  .archive-wrapper {
    padding: 40px 20px;
  }

  .dish-title {
    font-size: 2rem;
  }

  .dish-images img {
    max-width: 260px;
  }
}

/* Móvil */
@media (max-width: 768px) {
  .menu {
    margin: 25px 0;
  }

  .menu-section {
    margin-bottom: 30px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .menu-card {
    padding: 16px 18px;
  }

  .price {
    top: 14px;
    right: 14px;
    font-size: 12px;
    padding: 5px 12px;
  }

  /* Dish detail */
  .dish-detail {
    margin: 25px 12px;
    padding: 16px;
  }

  .dish-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  .dish-content {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .dish-images {
    transform: rotate(0);
  }

  .dish-images img {
    max-width: 100%;
  }

  .pro-con-grid {
    grid-template-columns: 1fr;
  }

  .dish-description {
    padding: 16px;
    font-size: 1rem;
  }

  /* Archive */
  .archive {
    margin: 40px 0;
  }

  .archive-wrapper {
    padding: 30px 14px;
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .card-flip-inner {
    height: 170px;
  }

  .archive-controls {
    flex-direction: column;
  }

  #search {
    width: 100%;
  }

  .archive-filters {
    gap: 10px;
  }

  .archive-filters select {
    flex: 1;
    min-width: 120px;
  }

  /* Music platforms */
  .music-platforms {
    gap: 10px;
    justify-content: center;
  }

  .music-platforms a {
    font-size: 12px;
    padding: 7px 14px;
  }

  /* Floating side menu */
  .floating-menu {
    gap: 10px;
  }

  .menu-btn {
    width: 58px;
    padding: 8px 10px 8px 8px;
    font-size: 10px;
  }

  .menu-btn:hover {
    transform: translateX(-14px);
    margin-right: -18px;
    padding-right: 22px;
  }

  /* Botón vertical izquierdo */
  .btn-todo-vertical {
    padding: 16px 7px 14px 4px;
    top: 40%;
  }

  .todo-text-vertical {
    font-size: 10px;
  }

  .todo-icon-bounce {
    font-size: 14px;
  }

  /* Modal */
  .card-modal {
    width: 92%;
    max-width: 100%;
    padding: 28px 16px 20px;
    max-height: 88vh;
  }

  .modal-intro-title {
    font-size: 20px;
    letter-spacing: 1px;
  }

  #card-content img {
    max-height: 260px !important;
  }

  #reroll-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
    bottom: 12px;
    right: 12px;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .menu-section h2 {
    font-size: 1.3rem;
    letter-spacing: 2px;
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .card-flip-inner {
    height: 155px;
  }

  .card-back h3 {
    font-size: 12.5px;
  }

  .tag {
    font-size: 9px;
    padding: 3px 8px;
  }

  .dish-title {
    font-size: 1.35rem;
  }

  .dish-rankings {
    padding: 12px;
  }

  .rank-item {
    font-size: 0.9rem;
  }

  .menu-btn {
    width: 50px;
    font-size: 9px;
    padding: 7px 8px 7px 6px;
  }

  .btn-todo-vertical {
    padding: 12px 5px 12px 3px;
  }

  .todo-text-vertical {
    font-size: 9px;
    line-height: 1.2;
  }

  .card-modal {
    width: 95%;
    padding: 24px 12px 18px;
    border-radius: 16px;
  }

  .modal-intro-title {
    font-size: 17px;
  }

  .close-btn {
    font-size: 24px;
    top: 6px;
    right: 10px;
  }
}

/* Ultra pequeños */
@media (max-width: 380px) {
  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .card-flip-inner {
    height: 140px;
  }

  .menu-btn {
    width: 36px;
    font-size: 8px;
  }

 .btn-todo-vertical {
    display: flex !important;
    padding: 10px 4px 10px 3px;
    top: 38%;
  }

  .todo-text-vertical {
    font-size: 8px;
    line-height: 1.15;
  }

  .todo-icon-bounce {
    font-size: 13px;
  }

  .floating-menu {
    gap: 8px;
  }

  .dish-detail {
    margin: 16px 8px;
    padding: 12px;
  }

  .card-modal {
    width: 96%;
    max-height: 90vh;
  }
}

/* Preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .menu-card,
  .archive-card,
  .card-flip-inner,
  .card-front::after,
  .card-go-btn,
  .menu-btn,
  .btn-todo-vertical,
  .menu-cover,
  .tag,
  .modal-intro-title,
  .sparkle {
    animation: none !important;
  }

  .card-flip-inner {
    transition: none !important;
  }

  .menu-card:hover,
  .archive-card:hover,
  .menu-btn:hover {
    transform: none;
  }
}


@media (max-width: 768px) {

  .archive-wrapper {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .archive-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .archive-card {
    width: 48% !important;
    max-width: 48% !important;
    min-width: 48% !important;
    flex: 0 0 48% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .card-flip-inner {
    height: 150px;
  }
}

@media (max-width: 400px) {
  .archive-card {
    width: 48% !important;
    max-width: 48% !important;
    min-width: 48% !important;
    flex: 0 0 48% !important;
  }

  .card-flip-inner {
    height: 135px;
  }
}

/* ==================================================
   BACK TO TOP BUTTON
================================================== */

.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: #ffffff;
  color: #f27fc2;
  border: 2px solid #ffb6c1;
  border-radius: 30px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: .5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.25);
  z-index: 99999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity .35s var(--ease-soft),
              transform .35s var(--ease-kawaii),
              background-color .3s, box-shadow .3s;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background-color: #fff0f5;
  border-color: #ff8da1;
  box-shadow: 0 8px 20px rgba(255, 105, 180, 0.35);
  transform: translateY(-4px);
}

.back-to-top:active {
  transform: translateY(-1px) scale(0.96);
}

.back-to-top-icon {
  font-size: 15px;
  line-height: 1;
  animation: floatArrow 1.8s ease-in-out infinite;
}

@keyframes floatArrow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 16px;
    left: 14px;
    padding: 9px 14px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top,
  .back-to-top-icon {
    animation: none !important;
    transition: none !important;
  }
}