/* 🎨 TIENDA WH - Tema claro con tipografía Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --bg: #E5D8C2;        /* fondo cálido */
  --fg: #111111;        /* texto principal */
  --muted: #555555;     /* texto secundario */
  --card: #ffffff;      /* tarjetas */
  --acc: #C26D15;       /* color acento cálido */
  --acc-2: #f4ede1;     /* fondo leve */
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
  border: none;
  user-select: none;
}

/* 🔝 Barra superior */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #ccc;
}

.topbar__logo img {
  height: 36px;
}

.topbar__menu {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 26px;
  border: 0;
  background: transparent;
  color: var(--fg);
  padding: 8px;
  cursor: pointer;
}

/* 🧭 Menú lateral */
.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: 82%;
  max-width: 340px;
  background: var(--card);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 30;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
}

.drawer.on {
  transform: translateX(0);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 25;
}

.overlay.on {
  opacity: 1;
  pointer-events: auto;
}

.drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
}

.drawer__list {
  list-style: none;
  margin: 0;
  padding: 8px;
}

.drawer__link {
  display: block;
  padding: 12px;
  border-radius: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
}

.drawer__link:hover {
  background: var(--acc-2);
  color: var(--acc);
}

/* 🖼️ Carrusel */
.carousel {
  padding: 12px;
}

.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 70%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }

.card {
  background: var(--card);
  border: 1px solid #ddd;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card__body {
  padding: 10px;
}

.price {
  font-weight: 700;
  color: var(--acc);
}

.muted {
  color: var(--muted);
  font-size: 0.9em;
}

.xl {
  font-size: 24px;
}

/* 🧩 Contenido principal */
.content {
  padding: 8px 12px 80px;
}

.cat {
  margin: 12px 0 22px;
}

.cat h2 {
  margin: 6px 0 10px;
  font-size: 18px;
  color: var(--acc);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 🛍️ Página de producto */
.product__img {
  border-radius: 16px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
}

.label {
  display: block;
  margin: 6px 0 4px;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.chip {
  border: 1px solid #ccc;
  background: var(--acc-2);
  color: var(--fg);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.chip--on {
  background: var(--acc);
  color: #fff;
}

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.qty__btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #f9f9f9;
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
}

input[type=number] {
  width: 64px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #fff;
  color: var(--fg);
  padding: 6px;
}

.btn {
  display: inline-block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
}

.btn--primary {
  background: var(--acc);
  color: #fff;
  transition: background 0.2s;
}

.btn--primary:hover {
  background: #a45d10;
}

.btn--ghost {
  background: transparent;
  border-color: #bbb;
  color: var(--fg);
}

.full {
  width: 100%;
}

/* 💻 Desktop */
@media (min-width: 900px) {
  .carousel__track {
    grid-auto-columns: 40%;
  }
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .cat h2 {
    font-size: 20px;
  }
}

/* 🎯 Pie de página */
.footer {
  background: #C7B59B; /* más oscuro dentro de la gama */
  color: #111;
  padding: 20px 10px;
  margin-top: 40px;
  border-top: 2px solid #b9a78f;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-copy {
  font-weight: 500;
  text-align: center;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #111;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  transition: all .25s;
}

.footer-social a:hover {
  background: var(--acc);
  color: #fff;
  transform: scale(1.1);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 700px){
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* --- Correcciones visuales generales --- */
a {
  text-decoration: none;
  color: inherit;
}

.card__body h3,
.card__body p,
.related .card h3,
.related .card p {
  color: #111;
}

.price {
  color: var(--acc);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.25s ease;
}

/* 🧾 Drawer del carrito (versión mejorada con animación suave) */
.cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 360px;
  height: 100%;
  background: var(--card);
  box-shadow: -6px 0 20px rgba(0,0,0,0.25);
  transform: translateX(110%);
  transition: transform 0.45s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-radius: 16px 0 0 16px;
}

.cart.on {
  transform: translateX(0);
}

.cart__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: var(--acc);
  color: #fff;
  font-weight: 600;
  border-radius: 16px 0 0 0;
}

.cart__head button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.cart__items {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

.cart__item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--acc-2);
  border-radius: 12px;
  padding: 8px;
  border: 1px solid #ddd;
}

.cart__item img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.cart__remove {
  background: none;
  border: none;
  color: #b00;
  font-size: 18px;
  cursor: pointer;
}

.cart__remove:hover { color: #e00; }

.cart__footer {
  padding: 14px;
  border-top: 1px solid #ddd;
  display: grid;
  gap: 10px;
}

.cart__line {
  display: flex;
  justify-content: space-around;
  gap: 16px;
}

.cart__total {
  text-align: right;
  font-weight: 600;
  font-size: 18px;
}

/* 🕶 Fondo oscuro detrás del carrito */
.cart-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.cart-overlay.on {
  opacity: 1;
  pointer-events: all;
}

/* 🛒 Botón flotante del carrito */
.fab {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 1100;
  background: var(--acc);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.25s ease;
}

.fab.bump { transform: scale(1.08); }
