* {
  box-sizing: border-box;
  font-family: Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  background: #fff;
  color: #000;
}

/* Make images responsive by default */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================
   ANNOUNCEMENT
========================= */
.announcement {
  background: #000000;
  color: #fff;
  text-align: center;
  padding: 8px;
  font-size: 13px;
}

/* =========================
   HEADER
========================= */
.topbar {
  border-bottom: 1px solid #eee;
}

.nav {
  width: 100%;
  max-width: 1800px; /* widen container for large desktops */
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 28px;
}

.nav ul,
.nav-left,
.nav-right {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
}

.nav-right {
  justify-self: end;
}

.nav-left {
  justify-self: start;
}

.logo-img {
  height: 44px;
  display: block;
}

/* keep logo centered in nav */
.logo {
  justify-self: center;
}

.categories {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  gap: 25px;
  justify-content: center;
  padding: 10px 0;
  font-size: 14px;
}

/* categories links: bold, no underline */
.categories a {
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}
.categories a:hover { text-decoration: none; }
.categories a.active { text-decoration: none; }

/* =========================
   HERO
========================= */
.hero {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 460px;
}

/* HTML uses .hero-left / .hero-right — style both similarly */
.hero-left,
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  min-height: 360px;
}

.hero-left {
  background: url("prueba.jpg") center / cover no-repeat;
}

.hero-right {
  background: url("prueba2.jpg") center / cover no-repeat;
}

.hero h2 {
  position: relative;
  z-index: 3;
  color: #fff;
  padding: 20px 30px;
  text-transform: uppercase;
}

/* Overlay layer so text stands out on top of background images */
.hero-left,
.hero-right {
  position: relative;
}

.hero-left::before,
.hero-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.38); /* tweak opacity as needed */
  z-index: 1;
}

.hero h2 { z-index: 2; }

/* =========================
   PRODUCTS
========================= */
.products {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  justify-content: center;
  justify-items: center;
}

.product {
  position: relative;
  text-align: center;
}
/* center product contents */
.product {
  display: flex;
  flex-direction: column;
  align-items: center;
}
  

/* CONTENEDOR DE IMAGEN */
.img-box {
  width: 100%;
  aspect-ratio: 3 / 4;        /* 🔥 PRO, no height */
  overflow: hidden;
  position: relative;
}

/* IMÁGENES */
.img-box {
  /* ensure 3D rendering context for smoother transforms */
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.img-box .product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 260ms cubic-bezier(.2,.8,.2,1), opacity 220ms ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform-origin: center center;
}

.img-box .hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms cubic-bezier(.2,.8,.2,1);
  z-index: 2;
}

.img-box .product-img { z-index: 1; }
.sizes { z-index: 3; }

/* SOLD OUT BADGE */
.sold-badge {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(192,24,24,0.95);
  color: #fff;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  pointer-events: none;
  z-index: 5;
}

/* When product has no stock hide sizes and show badge */
.product[data-stock="0"] .sizes {
  display: none;
}
.product[data-stock="0"] .sold-badge {
  display: block;
}
.product[data-stock="0"] .img-box { opacity: 0.86; }

/* Inline small message shown on product (e.g., AGOTADAS) */
.inline-msg {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  bottom: 12px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 60;
}
.inline-msg.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.img-box:hover .product-img,
.img-box.active .product-img {
  transform: scale(1.02);
}

.img-box:hover .hover-img,
.img-box.active .hover-img {
  opacity: 1;
}

/* HOVER */
.img-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.product:hover .img-hover {
  opacity: 1;
}

/* TALLAS: hidden by default, visible on image hover or .active (for touch) */
.sizes {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.18s ease;
}

.img-box:hover .sizes,
.img-box.active .sizes {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sizes span {
  background: #fff;
  border: 1px solid #000;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

/* TEXTO */
.name {
  font-size: 13px;
  margin: 8px 0 2px;
  text-transform: uppercase;
}

.price {
  font-size: 13px;
}

/* =========================
   CART
========================= */
.cart {
  position: fixed;
  right: -380px;
  top: 0;
  width: 360px;
  height: 100%;
  background: #fff;
  border-left: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  z-index: 1000;
}

.cart.open {
  right: 0;
}

/* When cart is open, blur and dim the rest of the page */
body.cart-open > *:not(.cart) {
  filter: blur(2px) saturate(.70);
  transition: filter 220ms ease;
  pointer-events: none;
  user-select: none;
}

body.cart-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.12);
  z-index: 900; /* below cart (1000) */
  pointer-events: none;
}

/* =========================
   FOOTER
========================= */
.site-footer {
  border-top: 1px solid #eee;
  background: #fff;
}
.site-footer .footer-inner {
  max-width: 1800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 24px;
}
.footer-center {
  text-align: center;
  font-size: 14px;
  color: #333;
}
.footer-right { text-align: right; }
.social-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
.social-icon { width: 22px; height: 22px; display: block; }

@media (max-width: 600px) {
  .site-footer .footer-inner {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }
  .footer-right { order: 2; }
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.cart-items {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.cart-footer {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-footer button {
  background: #000000;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

/* Cart item styles */
.cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
}
.cart-line-info {
  flex: 1 1 auto;
}
.cart-line-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  background: transparent;
  border: 1px solid #ccc;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
}
.remove-btn {
  background: transparent;
  border: none;
  color: #c00;
  cursor: pointer;
}
.cart-line-price {
  font-weight: 700;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    grid-template-columns: 1fr;
    height: auto;
  }

  .hero-left,
  .hero-right {
    min-height: 240px;
  }
}

/* Centered single-image page helper */
.centered-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}

.centered-page img {
  max-width: 65%;
  max-height: 65%;
}

/* =========================
   RESPONSIVE: MOBILE / TABLET / DESKTOP
========================= */

/* Mobile first: small phones */
@media (max-width: 600px) {
  .nav {
    grid-template-columns: 1fr auto;
    padding: 12px;
  }

  .nav-left {
    display: none;
  }

  .logo-img {
    height: 36px;
  }

  .categories {
    padding: 8px 10px;
    gap: 12px;
    font-size: 13px;
  }

  .hero {
    grid-template-columns: 1fr;
    height: auto;
  }

  .hero-left,
  .hero-right {
    min-height: 200px;
  }

  .products {
    padding: 30px 12px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .img-box {
    aspect-ratio: 4 / 5;
  }

  /* keep sizes hidden by default even on mobile; tap will toggle via JS */
  .img-box .sizes {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
  }

  .cart {
    width: 100%;
    right: -100%;
  }

  .cart.open {
    right: 0;
  }

  .cart-footer button {
    width: 100%;
  }
}

/* Small tablets / landscape phones */
@media (min-width: 601px) and (max-width: 900px) {
  .nav {
    grid-template-columns: 1fr auto 1fr;
    padding: 14px 16px;
  }

  .categories {
    padding: 10px 14px;
    gap: 16px;
  }

  .hero-left,
  .hero-right {
    min-height: 260px;
  }

  .products {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 20px;
    padding: 40px 18px;
  }

  .img-box {
    aspect-ratio: 3 / 4;
  }
}

/* Desktop / Laptops */
@media (min-width: 901px) {
  .nav {
    grid-template-columns: 1fr auto 1fr;
    padding: 20px 24px;
  }

  .categories {
    padding: 10px 20px;
    gap: 20px;
  }

  .hero {
    height: 420px;
  }

  .hero-left,
  .hero-right {
    min-height: 360px;
  }

  .products {
    grid-template-columns: repeat(3, 1fr); /* force 3 columns on desktop */
    gap: 30px;
    padding: 60px 20px;
  }

  /* keep sizes hidden until hover on hover-capable devices */
  @media (hover: hover) {
    .sizes { opacity: 0; }
    .img-box:hover .sizes { opacity: 1; }
  }
}
