/* ==========================================================
   BeMuse — Página de productos
   Se carga DESPUÉS de styles.css (reutiliza header, footer y
   la paleta). Tonos crema para las superficies, rosas del
   proyecto para botones y detalles.
   ========================================================== */

:root {
  --cream: #fff8f3;
  --cream-soft: #fbefe6;
  --cream-deep: #f9e6dc;
  --pink: #df7883;       /* = --color-light */
  --pink-soft: #fecaca;  /* = --color-dark  */
  --rose: #b8145d;       /* = --color-muted */
  --sand: #e3c1b4;       /* = --color-accent */
  --ink: #5b2a3a;        /* texto de lectura, más suave que el rosa fuerte */
}

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/Fonts/Montserrat/Montserrat-VariableFont_wght.woff2')format('woff2');
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: 'Magnolia script';
  src: url('/assets/Fonts/magnolia_script/Magnolia Script.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
}

[hidden] {
  display: none !important;
}

/* ---------- Base de la página ---------- */

body.catalog-page {
  background: var(--cream);
  color: var(--ink);
}



/* El fondo difuminado es fijo y cubre toda la pantalla; sin esto taparía
   el fondo rosa del footer al llegar al final de la página. */
.catalog-page .site-footer {
  position: relative;
  z-index: 1;
}

/* Logo en su propio contenedor, fuera del flujo del header (position: absolute).
   El logo conserva el tamaño original de styles.css (150x110, igual que en el index)
   y no puede cambiar la altura del navbar. */
/* TAMAÑO DEL LOGO (solo página de productos; el index usa el de styles.css) */
.catalog-page {
  --logo-width: 130px;
  --logo-height: 94px;
}





/* Como el logo ya no ocupa espacio en el header, el menú se alinea a la derecha */
.catalog-page .main-navigation {
  margin-left: auto;
}

.catalog-page .main-navigation a {
  padding: 0.5rem 0.9rem;
}


/* Forzar fondo sólido en el navbar solo en la página de productos */
.catalog-page .site-header {
  background: linear-gradient(to bottom, rgba(255, 248, 243, 0.95), rgba(255, 248, 243, 0.85));
  box-shadow: 0 2px 10px rgba(184, 20, 93, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}


/* ---------- Fondo difuminado a pantalla completa ---------- */

.catalog {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  isolation: isolate;
  padding: 7rem 5vw 5rem;
}

.page-bg {
  position: absolute; /* ocupa todo el alto de la página y se mueve con el scroll */
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background: var(--cream);
}

/* IMAGEN DE FONDO: se estira por toda la página y se difumina */
.page-bg::before {
  position: fixed;
  inset: 0;
  background: url("/assets/Fotos para diseño/Banners/IMG_0067 copia.webp") center / cover no-repeat;
  filter: blur(2px);
  transform: scale(1.1); /* evita bordes claros que deja el blur */
  content: "";
}

/* Velo crema liso sobre la imagen para que el texto se lea (sin degradado) */
.page-bg::after {
  position: absolute;
  inset: 0;
  background: rgb(255 248 243 / 65%);
  content: "";
}

.catalog__inner {
  width: 100%;
}

/* ---------- Encabezado ---------- */

.catalog__intro {
  margin-bottom: 2.5rem;
  text-align: center;
}

.catalog__title {
  margin-bottom: 0.5rem;
  color: var(--rose);
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  font-family: 'Montserrat';
  font-weight: 400;
  line-height: 1.05;
}

.catalog__lead {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  opacity: 0.8;
}

/* ---------- Buscador y filtros ---------- */

.catalog-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.catalog-search {
  position: relative;
  width: min(32rem, 100%);
}

.catalog-search__icon {
  position: absolute;
  top: 50%;
  left: 1.2rem;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--pink);
  pointer-events: none;
  transform: translateY(-50%);
}

.catalog-search__input {
  width: 100%;
  height: 3.2rem;
  padding: 0 1.4rem 0 3.2rem;
  border: 1px solid var(--sand);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.catalog-search__input::placeholder {
  color: #a8707e;
}

.catalog-search__input:focus {
  border-color: var(--pink);
  background: #fff;
  box-shadow: 0 0 0 4px rgb(223 120 131 / 22%);
  outline: none;
}

/* Quita la "x" nativa del input search para mantener el diseño limpio */
.catalog-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.catalog-chip {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--pink);
  border-radius: 999px;
  background: transparent;
  color: var(--rose);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.catalog-chip:hover {
  background: var(--pink-soft);
}

.catalog-chip[aria-pressed="true"] {
  border-color: var(--rose);
  background: var(--rose);
  color: var(--cream);
}

.catalog-chip:focus-visible,
.catalog-card__cart:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}

/* ---------- Categorías y productos ---------- */

.catalog-section {
  margin-bottom: 4rem;
  scroll-margin-top: 7rem; /* deja espacio bajo el header fijo al llegar desde el inicio */
}

.catalog-section__title {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  color: var(--rose);
  font-family: 'Montserrat';
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.catalog-section__title::after {
  flex: 1;
  height: 1px;
  background: var(--sand);
  content: "";
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-card {
  display: flex;
  cursor: pointer;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgb(227 193 180 / 55%);
  border-radius: 1rem;
  background: rgb(255 252 249 / 78%);
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.catalog-card:hover {
  box-shadow: 0 0.8rem 1.8rem rgb(184 20 93 / 14%);
  transform: translateY(-3px);
}

.catalog-card__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, var(--cream-soft), var(--cream-deep));
}

.catalog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.catalog-card:hover .catalog-card__image {
  transform: scale(1.04);
}

.catalog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem 1.2rem 1.2rem;
}

.catalog-card__name {
  margin: 0;
  color: var(--rose);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.25;
}

.catalog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.catalog-card__price {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
}

.catalog-card__cart {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 2px solid var(--rose);
  border-radius: 50%;
  background: var(--rose);
  color: var(--pink-soft);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.catalog-card__cart:hover {
  background: transparent;
  color: var(--rose);
}

.catalog-card__cart-icon {
  width: 1.2rem;
  height: 1.2rem;
}

/* ---------- Detalle de producto (modal) ---------- */

.catalog-card__open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.catalog-card__open:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}

/* El navegador centra el <dialog> solo; el reset global * de styles.css quita sus
   márgenes automáticos, por eso se declaran aquí. */
.product-modal {
  width: min(58rem, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--sand);
  border-radius: 1.25rem;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 2rem 4rem rgb(91 42 58 / 28%);
}

.product-modal[open] {
  animation: modal-in 220ms ease;
}

.product-modal::backdrop {
  background: rgb(91 42 58 / 45%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

/* Evita que la página se mueva por detrás mientras el modal está abierto */
html:has(.product-modal[open]) {
  overflow: hidden;
}

.product-modal__close {
  position: absolute; /* CAMBIADO: A posicionamiento absoluto */
  top: 1rem;
  right: 1rem;
  z-index: 10; /* Aseguramos que siempre esté por encima */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0; /* ELIMINADO: Margen negativo problemático */
  padding: 0;
  border: 1px solid var(--sand);
  border-radius: 50%;
  background: var(--cream);
  color: var(--rose);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.product-modal__close:hover {
  background: var(--rose);
  color: var(--cream);
}

.product-modal__close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.product-modal__close:focus-visible,
.product-modal__add:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}

.product-modal__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.product-modal__media {
  min-height: 100%;
  background: var(--cream-deep);
}

.product-modal__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 24rem;
  object-fit: cover;
}

.product-modal__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2.5rem 2.25rem 2.25rem;
}

.product-modal__category {
  margin: 0;
  color: var(--pink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-modal__name {
  margin: 0;
  color: var(--rose);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.product-modal__name:focus {
  outline: none;
}

.product-modal__price {
  margin: auto 0 0; /* empuja precio + botón al fondo de la ventana */
  font-size: 1.35rem;
  font-weight: 700;
}

.product-modal__description {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
  white-space: pre-line;
}

.product-modal__group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.product-modal__group legend {
  margin-bottom: 0.6rem;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-modal__group legend span {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.product-modal__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Opciones (radios reales, estilizados): tallas */
.option-chip,
.option-swatch {
  position: relative;
  cursor: pointer;
}

.option-chip input,
.option-swatch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.option-chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  height: 2.6rem;
  padding: 0 0.9rem;
  border: 1px solid var(--sand);
  border-radius: 999px;
  background: rgb(255 255 255 / 70%);
  color: var(--rose);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.option-chip:hover span {
  background: var(--pink-soft);
}

.option-chip input:checked + span {
  border-color: var(--rose);
  background: var(--rose);
  color: var(--cream);
}

/* Opciones: colores */
.option-swatch span {
  display: block;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgb(91 42 58 / 25%);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 4px transparent;
  transition: box-shadow 200ms ease;
}

.option-swatch input:checked + span {
  box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--rose);
}

.option-chip input:focus-visible + span,
.option-swatch input:focus-visible + span {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}

.product-modal__feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.product-modal__view-cart {
  padding: 0;
  border: 0;
  background: none;
  color: var(--rose);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.product-modal__view-cart:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
}

.product-modal__status {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
}

.product-modal__status[data-state="error"] {
  color: var(--rose);
}

.product-modal__status[data-state="ok"] {
  color: #2f7d4f;
}

.product-modal__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.95rem 1.5rem;
  border: 2px solid var(--rose);
  border-radius: 999px;
  background: var(--rose);
  color: var(--cream);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.product-modal__add:hover {
  background: transparent;
  color: var(--rose);
}

.product-modal__add svg {
  width: 1.2rem;
  height: 1.2rem;
}

@media (max-width: 700px) {
  .product-modal__layout {
    grid-template-columns: 1fr;
  }

  .product-modal__image {
    height: 38svh;
    min-height: 0;
  }

  .product-modal__content {
    padding: 1.5rem 1.4rem 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-modal[open] {
    animation: none;
  }
}

/* ---------- Opciones agotadas / producto agotado ---------- */

.product-modal__groups {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option-chip.is-unavailable,
.option-chip.is-unavailable input,
.option-swatch.is-unavailable,
.option-swatch.is-unavailable input {
  cursor: not-allowed;
}

.option-chip.is-unavailable span {
  border-style: dashed;
  background: transparent;
  color: rgb(91 42 58 / 45%);
  text-decoration: line-through;
}

.option-chip.is-unavailable:hover span {
  background: transparent;
}

.option-swatch span {
  position: relative;
}

.option-swatch.is-unavailable span {
  opacity: 0.45;
}

.option-swatch.is-unavailable span::after {
  position: absolute;
  top: 50%;
  right: -2px;
  left: -2px;
  height: 2px;
  background: var(--rose);
  transform: rotate(-45deg);
  content: "";
}

.catalog-card__media {
  position: relative;
}

.catalog-card--soldout .catalog-card__image {
  opacity: 0.55;
}

.catalog-card__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--rose);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-modal__add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-modal__add:disabled:hover {
  background: var(--rose);
  color: var(--cream);
}

/* ---------- Sin resultados ---------- */

.catalog-empty {
  margin: 3rem 0;
  color: var(--rose);
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-align: center;
}

/* ---------- Accesibilidad ---------- */

.catalog-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}



.catalog-subsection {
  margin-top: 2.5rem;
  scroll-margin-top: 7rem;
}

.catalog-section__title + .catalog-subsection {
  margin-top: 0;
}

.catalog-subsection__title {
  margin: 0 0 1.25rem;
  color: var(--rose);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.catalog-filters--sub {
  margin-top: -0.5rem;
}

.catalog-filters--sub .catalog-chip {
  padding: 0.4rem 1rem;
  border-color: var(--sand);
  font-size: 0.72rem;
}

.catalog-filters--sub .catalog-chip[aria-pressed="true"] {
  border-color: var(--rose);
}

@media (max-width: 700px) {
  .catalog-filters--sub .catalog-chip {
    padding: 0.55rem 0.9rem;
  }
}

/* ---------- Pantallas pequeñas ---------- */


@media (max-width: 700px) {
  .catalog {
    padding-top: 1rem;
  }

  .catalog-section {
    scroll-margin-top: 7rem;
  }

  .catalog-chip {
    padding: 0.45rem 1rem;
    font-size: 0.72rem;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .catalog-card__body {
    padding: 0.9rem;
  }

  .catalog-card__name {
    font-size: 1rem;
  }
}

@media (max-width: 460px) {
  /* El header se apila en columna (logo arriba, menú en 2 filas) y ocupa más alto */
  .catalog-page .site-header {
    height: auto;
  }

  /* Al apilarse en columna, el logo vuelve al flujo con una caja de 64px de alto */
  .catalog-page .site-brand {
    display: flex;
    align-items: center;
    position: static;
    height: 64px;
    transform: none;
  }

  .catalog-page .site-brand .site-logo {
    flex: none;
  }

  .catalog {
    padding-top: 11rem;
  }

  .catalog-section {
    scroll-margin-top: 11rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-card:hover {
    transform: none;
  }
}


@media (max-width: 700px) {

.product-modal {
    overflow-x: hidden; 
  }

  /* 2. Aseguramos que el contenedor de la imagen no se desborde */
  .product-modal__media {
    width: 100%;
    overflow: hidden;
  }

  /* 3. Ajustamos tu imagen (le añadimos width y max-width) */
  .product-modal__image {
    width: 100% !important; /* Obliga a la imagen a quedarse en su caja */
    max-width: 100%;
    height: 55svh;
    min-height: 0;
    object-position: top;
  }

  .catalog-page .main-navigation ul {
    flex-wrap: nowrap;
    gap: 0.15rem;
  }

  .catalog-page .main-navigation a,
  .catalog-page .main-navigation a:hover {
    padding: 0.6rem 0.45rem;
    font-size: 0.68rem;
  }

  .catalog-chip {
    padding: 0.65rem 1rem;
  }

  /* MODIFICACIÓN: Imagen más grande y vertical en móviles */
  .product-modal__image {
    height: 55svh; /* Aumentamos el alto para darle protagonismo */
    min-height: 0;
    object-position: top; /* Asegura que la parte importante de la imagen se vea si se recorta */
  }

  /* MODIFICACIÓN: Reducimos padding y ajustamos textos/opciones */
  .product-modal__content {
    gap: 0.6rem; /* Reducimos el espacio entre elementos */
    padding: 1rem 1rem 1.2rem; /* Menos relleno para aprovechar el espacio */
  }

  .product-modal__name {
    font-size: 1.4rem; /* Nombre un poco más pequeño */
  }

  .product-modal__description {
    font-size: 0.85rem; /* Descripción más pequeña */
    line-height: 1.4;
  }

  .product-modal__group legend {
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
  }

  .option-chip span {
    min-width: 2.4rem; /* Botones de talla más pequeños */
    height: 2.2rem;
    padding: 0 0.6rem;
    font-size: 0.75rem;
  }

  .option-swatch span {
    width: 1.8rem; /* Botones de color más pequeños */
    height: 1.8rem;
  }
  
  .product-modal__price {
    font-size: 1.1rem;
  }

  .product-modal__add {
    padding: 0.75rem 1.2rem; /* Botón de añadir más fino */
    font-size: 0.75rem;
  }
}

@media (max-width: 460px) {
  .catalog-page .main-navigation,
  .catalog-page .main-navigation ul {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 700px) {
  .catalog-page .main-navigation ul {
    flex-wrap: nowrap; /* Mantiene todos los enlaces en la misma línea estricta */
    justify-content: flex-end;
    gap: 0.2rem; /* Reducimos la separación para que no falte espacio en la pantalla */
  }
  
  .catalog-page .site-brand .site-logo {
    /* Achicamos el logo en móvil */
    width: 90px;
    height: 65px; 
  }
}

@media (max-width: 460px) {
  /* El header se apila en columna (logo arriba, menú en 2 filas) y ocupa más alto */
  .catalog-page .site-header {
    height: auto;
    flex-direction: column; /* Apilamos logo y menú */
    align-items: center; /* Centramos el logo */
    
  }

  .catalog-page .site-brand {
    height: auto; 
    margin-bottom: 1rem; /* Separación con el menú */
  }

  .catalog-page .main-navigation,
  .catalog-page .main-navigation ul {
    width: 100%;
    justify-content: center; /* Centramos el menú */
    gap: 0.8rem;
  }
  
  .catalog {
    padding-top: 5rem; /* Ajustamos el espacio superior para compensar el header más alto */
  }

  .catalog-section {
    scroll-margin-top: 5rem;
  }
}

/* =========================================================
   AJUSTES DEL NAVBAR Y LOGO PARA PC (Página Productos)
   ========================================================= */
@media (min-width: 701px) {
  /* 1. Controlamos la altura total de la barra de navegación */
  .catalog-page .site-header {
    height: 5rem; /* Puedes subir o bajar este valor (ej. 4.5rem o 6rem) para adelgazar el navbar */
    padding: 0 4vw; /* Eliminamos el relleno vertical para que la altura sea exacta */
  }

  /* 2. Reducimos el tamaño del logo para que encaje de forma elegante */
  .catalog-page .site-logo {
    width: 110px; /* Reducido desde los 150px originales */
    height: 80px; /* Reducido desde los 110px originales */
  }
}


.product-modal__media {
  position: relative;
}

.product-modal__thumbs {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem;
  overflow-x: auto;
  border-radius: 0.9rem;
  background: rgb(255 248 243 / 78%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.product-modal__thumb {
  flex: 0 0 auto;
  width: 3.4rem;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 0.6rem;
  background: var(--cream-deep);
  opacity: 0.75;
  cursor: pointer;
  transition: opacity 200ms ease, border-color 200ms ease;
}

.product-modal__thumb:hover {
  opacity: 1;
}

.product-modal__thumb[aria-pressed="true"] {
  border-color: var(--rose);
  opacity: 1;
}

.product-modal__thumb:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 2px;
}

.product-modal__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 700px) {
  .product-modal__thumb {
    width: 2.6rem;
  }
}


@keyframes skeleton-sweep {
  to {
    background-position: -200% 0;
  }
}

.skeleton,
.catalog-card__media.is-loading,
.product-modal__media.is-loading {
  background: linear-gradient(100deg, rgb(227 193 180 / 38%) 30%, rgb(255 255 255 / 65%) 50%, rgb(227 193 180 / 38%) 70%);
  background-size: 200% 100%;
  animation: skeleton-sweep 1.4s linear infinite;
}

.skeleton--line {
  display: block;
  height: 1rem;
  border-radius: 999px;
}

.skeleton--title {
  width: min(12rem, 50%);
  height: 2rem;
  margin-bottom: 1.75rem;
  border-radius: 0.6rem;
}

.skeleton--circle {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
}

.catalog-skeleton {
  margin-bottom: 4rem;
}

.catalog-card--skeleton,
.catalog-card--skeleton:hover {
  box-shadow: none;
  transform: none;
  cursor: default;
  pointer-events: none;
}

.catalog-card__image {
  transition: transform 400ms ease, opacity 350ms ease;
}

.product-modal__image {
  transition: opacity 300ms ease;
}

.catalog-card__media.is-loading .catalog-card__image,
.product-modal__media.is-loading .product-modal__image {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton,
  .catalog-card__media.is-loading,
  .product-modal__media.is-loading {
    animation: none;
  }
}



/* ==========================================
   BEMUSE - BOTÓN Y MODAL GUÍA DE TALLAS
   ========================================== */

/* --- Diseño del Botón Guía de Tallas (Minimalista Compacto) --- */
.size-guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 9rem;
  
  /* Separación arriba y abajo */
  margin-top: 1rem; 
  margin-bottom: 0.8rem;
  
  /* CAMBIO: Reducimos el padding horizontal para hacerlo menos ancho */
  background: transparent;
  padding: 0.4rem 1rem; /* Antes era 0.6rem 1.2rem */
  
  /* Borde fino */
  border: 1px solid var(--ink, #333333);
  border-radius: 2rem; 
  
  /* Tipografía minimalista */
  color: var(--ink, #333333); 
  font-family: var(--font-body, Arial, sans-serif);
  font-size: 0.7rem; /* Un poco más pequeño y sutil */
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  
  cursor: pointer;
  transition: all 300ms ease;
}

/* Efecto al pasar el ratón (Hover) */
.size-guide-btn:hover {
  background: var(--rose); 
  color: var(--cream, #FBF8F1);
  border-color: var(--rose); /* NUEVA LÍNEA: Cambia el borde a rosa */
}

/* Efecto al hacer clic o navegar con teclado */
.size-guide-btn:focus-visible {
  outline: 2px solid var(--rose, #b8145d);
  outline-offset: 4px;
}

/* --- Diseño de la Ventana Modal --- */
.size-guide-dialog {
  width: min(45rem, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--sand);
  border-radius: 1.25rem;
  /* CAMBIO: Fondo crema en lugar de oscuro */
  background: var(--cream, #FBF8F1); 
  /* CAMBIO: Texto por defecto oscuro */
  color: var(--ink, #333333);
  box-shadow: 0 2rem 4rem rgb(0 0 0 / 20%); /* Sombra un poco más suave */
}

/* El fondo desenfocado (el velo) que está detrás del modal */
.size-guide-dialog::backdrop {
  background: rgb(91 42 58 / 30%); /* Velo un poco más transparente */
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.size-guide-dialog[open] {
  animation: modal-in 220ms ease;
}

.size-guide-dialog__inner {
  padding: 2.5rem 2.25rem;
  position: relative;
}

.size-guide-dialog .product-modal__close {
  /* Elimina todo el código redundante de posicionamiento y tamaño */
  background: transparent;
  border: 1px solid var(--ink, #333333);
  color: var(--ink, #333333);
}

.size-guide-dialog .product-modal__close:hover {
  /* CAMBIO: Al pasar el ratón, se invierte */
  background: var(--ink, #333333);
  color: var(--cream, #FBF8F1);
}

.size-guide-title {
  margin: 0 0 1.5rem 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.8rem;
  /* CAMBIO: Título en color oscuro */
  color: var(--ink, #333333);
  text-align: center;
}

/* ==========================================
   BEMUSE - DISEÑO DE TABLAS UNIVERSAL (Sin Scroll)
   ========================================== */

/* --- Contenedor Principal --- */
.bemuse-size-guide {
  width: 100%;
  max-width: 850px; /* Le ponemos un tope para que no se estire demasiado en PC */
  margin: 1.5rem auto; /* El 'auto' a los lados es lo que centra la tabla perfectamente */
  background: transparent; 
  overflow-x: hidden; 
}

.bemuse-size-guide--second {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem; /* Un poco de aire abajo para que no se pegue al final */
}

/* --- Estructura de Tabla Fluida --- */
.size-table {
  width: 100%;
  table-layout: fixed; 
  border-collapse: collapse;
  text-align: center;
  font-family: var(--font-body, Arial, sans-serif);
  /* CAMBIO: Todo el texto base de la tabla es oscuro ahora */
  color: var(--ink, #333333); 
}

/* --- Celdas y Textos --- */
.size-table th,
.size-table td {
  padding: 0.3rem 0.1rem; 
  font-size: clamp(0.6rem, 1vw, 0.85rem); 
  /* CAMBIO CRÍTICO: Quita el word-wrap: break-word; */
  /* Reemplázalo por normal o elimínalo para que las palabras no se rompan por la mitad */
  word-wrap: normal; 
  word-break: normal;
  hyphens: auto; /* Permite guiones de separación si el idioma está configurado, pero no rompe letras sueltas */
  line-height: 1.2;
}

/* Encabezados Generales (Primera Tabla) */
.size-table thead th {
  border: none;
  font-weight: 700;
  vertical-align: bottom;
}

.size-table tbody th {
  border: none;
  font-weight: 700;
  vertical-align: middle;
  text-align: right;
  padding-right: 0.3rem;
  /* CAMBIO: Permite que esta columna sea un poco más ancha para evitar saltos */
  white-space: nowrap; 
}

.size-table th span {
  font-weight: 400;
  font-size: clamp(0.65rem, 0.8vw, 0.75rem);
  display: block; 
}

/* Celdas interiores (Tallas XXS, XS, etc.) */
.size-table tbody td {
  /* CAMBIO: Las líneas de la cuadrícula ahora son oscuras (tinta) */
  border: 1px solid var(--ink, #333333); 
  font-size: 10px;
  font-weight: 800;
}

/* Colores específicos según la tabla */
.size-table:not(.size-table--compression) tbody td {
  color: var(--pink, #df7883); 
}

.size-table--compression tbody td {
  /* CAMBIO: Las tallas de la tabla 2 (XS, S) ahora son oscuras porque el fondo es claro */
  color: var(--ink, #333333); 
  font-size: clamp(0.7rem, 1.2vw, 0.95rem); 
}

/* --- Esquinas y Títulos Principales --- */
.chart-corner,
.chart-corner-second {
  vertical-align: top;
  text-align: center;
}

.chart-corner-second {
  vertical-align: middle;
  /* CAMBIO: Borde oscuro para la tabla 2 */
  border: 1px solid var(--ink, #333333);
}

.medidas-title,
.medidas-title-second {
  color: var(--pink, #df7883); 
  font-weight: 800;
  font-size: clamp(0.8rem, 1.5vw, 1.1rem);
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
  /* CAMBIO: Obliga a la palabra "MEDIDAS" a quedarse en una sola línea */
  white-space: nowrap; 
}

.axis-labels,
.axis-labels-second {
  /* CAMBIO: Textos secundarios en color oscuro */
  color: var(--ink, #333333);
  font-weight: 700;
  font-size: clamp(0.55rem, 0.9vw, 0.7rem);
  letter-spacing: 0.02em;
}

.axis-labels {
  display: flex;
  flex-direction: column;
}

.cintura {
  margin-left: 0.5rem;
}

/* --- Ajustes Específicos Tabla 2 --- */
.compression-header {
  color: var(--pink, #df7883) !important;
  font-weight: 800 !important;
}

.compression-header span {
  font-weight: 400 !important;
  /* CAMBIO: Letra secundaria de los títulos en oscuro */
  color: var(--ink, #333333) !important;
}

.size-table--compression tbody th {
  text-align: left;
  /* CAMBIO: Borde lateral oscuro */
  border: 1px solid var(--ink, #333333);
  font-weight: 400;
  padding-left: 0.4rem;
  white-space: normal; /* A esta celda sí le dejamos saltar línea para que quepa "Cintura / Cadera" */
}

.size-table--compression tbody th span {
  font-weight: 700;
  font-size: clamp(0.65rem, 1vw, 0.85rem);
  display: inline; 
}

/* ==========================================
   AJUSTES DEL MODAL PARA PANTALLAS PEQUEÑAS
   ========================================== */
@media (max-width: 700px) {
  /* Hacemos que la ventana ocupe más ancho en celulares para que quepa la tabla */
  .size-guide-dialog {
    width: 96%; 
  }
  
  .size-guide-dialog__inner {
    padding: 1.5rem 0.5rem; 
  }

  .size-guide-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
}

/* ==========================================
   BEMUSE - CUADRAR LA TABLA 1 (Celdas perfectas)
   ========================================== */

/* 1. Evitamos que la tabla se estire infinitamente en monitores muy grandes */
.size-table:not(.size-table--compression) {
  max-width: 850px;
  margin: 0 auto; /* La centra si la pantalla es muy ancha */
}

/* 2. Le damos un 22% de ancho a la primera columna para proteger los textos */
.size-table:not(.size-table--compression) th:first-child {
  width: 22%;
}

/* 3. Las 7 columnas de tallas se reparten equitativamente el resto del espacio */
.size-table:not(.size-table--compression) th:not(:first-child) {
  width: 11.1%;
}

/* 4. Forzamos la altura de las celdas para que formen cuadrados */
.size-table:not(.size-table--compression) td {
  height: 4rem; /* Altura en PC para hacer el cuadrado */
  padding: 0; /* Quitamos el relleno interno para que el texto quede en el centro exacto */
  vertical-align: middle;
}

/* 5. Ajustamos el tamaño de los cuadrados para pantallas de celular */
@media (max-width: 700px) {
  .size-table:not(.size-table--compression) td {
    height: 2.5rem; /* Cuadrados proporcionados al tamaño del celular */
  }
}

/* ==========================================
   BEMUSE - CUADRATURA EXACTA DE LA TABLA 2
   ========================================== */

/* 1. Proporciones exactas: Columna 1 = 50%, Columna 2 = 25%, Columna 3 = 25% */
.size-table--compression th:first-child,
.size-table--compression tbody th {
  width: 50%;
  /* Centrar el texto horizontal y verticalmente */
  text-align: center !important; 
  vertical-align: middle;
}

.size-table--compression thead th:not(:first-child),
.size-table--compression tbody td {
  width: 25%;
  text-align: center !important;
  vertical-align: middle;
}

/* 2. Forzar forma cuadrada de la tabla completa (PC) */
.size-table--compression {
  max-width: 500px; /* Limitamos el ancho total para que no sea un rectángulo largo */
  margin: 0 auto;   /* La centramos en la pantalla */
}

/* 3. Forzar altura de las celdas para que formen cuadrados y rectángulos exactos */
.size-table--compression th,
.size-table--compression td {
  height: 3.5rem; /* Altura fija para hacer el bloque simétrico */
  padding: 0 !important; /* Quitamos rellenos para que el height sea exacto */
}

/* 4. Ajustar el texto de medidas (ahora centrado) para que no se apriete */
.size-table--compression tbody th {
  font-size: clamp(0.6rem, 1.2vw, 0.75rem);
  line-height: 1.4; /* Separa un poco Cintura de Cadera verticalmente */
}

.size-table--compression tbody th span {
  font-size: clamp(0.7rem, 1.3vw, 0.85rem);
}

/* 5. Mantener la proporción cuadrada en celulares */
@media (max-width: 700px) {
  .size-table--compression {
    max-width: 95%; /* Ocupa casi todo el ancho del celular */
  }
  
  .size-table--compression th,
  .size-table--compression td {
    height: 3rem; /* Celdas un poco más bajitas para no comer tanta pantalla */
  }
  
  .size-table--compression tbody th {
    font-size: 0.6rem;
  }
  
  .size-table--compression tbody th span {
    font-size: 0.65rem;
  }
}


/* ==========================================================
   BEMUSE - ESTILOS PARA PRECIOS DE REBAJA
   ========================================================== */

/* Precio regular (tachado y en color sutil) */
.price-regular {
  text-decoration: line-through;
  color: #888888;
  margin-right: 0.5rem;
  font-size: 0.9em;
  font-weight: 400; /* Normal */
}

/* Precio en oferta (resaltado con el color de la marca) */
.price-sale {
  color: var(--rose, #B8145D); /* Usamos la variable de tu marca */
  font-weight: 700;
}

/* ==========================================================
   BEMUSE - CARTEL DE OFERTA
   ========================================================== */

/* El cartel de "Agotado" usa fondo claro y letra oscura. 
   Para la "Oferta", invertimos los colores para que resalte más. */
.catalog-card__tag--sale {
  background-color: var(--rose, #B8145D);
  color: var(--cream, #fff8f3);
  box-shadow: 0 4px 10px rgba(184, 20, 93, 0.2); /* Una sombra sutil para darle profundidad */
}


/* ==========================================================
   BEMUSE - COLORES DISPONIBLES EN LA TARJETA
   ========================================================== */

.catalog-card__colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  /* El gap del card__body ya separa esto del título y del pie, 
     pero podemos ajustar el margen superior si es necesario */
  margin-top: -0.2rem; 
}

.catalog-card__swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--swatch);
  border: 1px solid rgb(91 42 58 / 25%); /* Un borde sutil para que los colores blancos no se pierdan */
  box-shadow: 0 0 0 2px var(--cream, #fff8f3);
}


/* ==========================================================
   BEMUSE - AJUSTE DE PRECIOS PARA MÓVILES
   ========================================================== */

@media (max-width: 700px) {
  /* 1. Hacemos el precio tachado más pequeño */
  .price-regular {
    font-size: 0.75em; 
    margin-right: 0.2rem; 
  }

  /* 2. Reducimos ligeramente el tamaño base del precio en móviles */
  .catalog-card__price {
    font-size: 0.95rem; 
    
    /* 3. Magia Flexbox: Si no caben horizontalmente, el precio tachado 
       saltará automáticamente arriba del precio en oferta */
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.3rem;
    row-gap: 0;
  }
}

/* Ajuste extremo para celulares muy estrechos (ej. iPhone SE) */
@media (max-width: 400px) {
  .catalog-card__price {
    flex-direction: column; /* Apila los precios de forma obligatoria */
    align-items: flex-start;
  }
  
  .price-regular {
    line-height: 1; /* Quita el espacio sobrante debajo del precio tachado */
    margin-bottom: 0.1rem;
  }
}

/* =========================================================
   FORZAR ESTILO DEL NAVBAR IDÉNTICO AL INICIO (STYLES.CSS)
   ========================================================= */

/* 1. PC: Restaurar alineación del menú, separación y tamaño del logo */
.catalog-page .main-navigation {
  margin-left: 0 !important;
}

.catalog-page .main-navigation a {
  padding: 0.55rem 1.2rem !important; 
}

@media (min-width: 701px) {
  .catalog-page .site-header {
    height: 4.4rem !important; 
    padding: 0 4vw !important;
  }
  .catalog-page .site-logo {
    width: 140px !important; 
    height: 110px !important;
  }
}

/* 2. Tablet y Móvil: Restaurar logo, espacios y tamaño de tipografía */
@media (max-width: 700px) {
  .catalog-page .site-logo {
    width: 100px !important; 
    height: 72px !important;
  }
  .catalog-page .main-navigation ul {
    gap: 0.9rem !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
  }
  .catalog-page .main-navigation a {
    padding: 0.6rem 0.5rem !important;
    font-size: 0.68rem !important;
  }
}

/* 3. Móvil Pequeño (<460px): Restaurar diseño apilado y centrado */
@media (max-width: 460px) {
  .catalog-page .site-header {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 2vw !important;
  }
  .catalog-page .main-navigation,
  .catalog-page .main-navigation ul {
    width: 100% !important;
    justify-content: space-between !important;
  }
  .catalog-page .main-navigation ul {
    flex-wrap: wrap !important;
    gap: 0.65rem 1rem !important;
  }
}