.product-detail {
  /* El contenedor principal debe ser transparente para no parecer una card gigante */
  position: static !important;
  padding: 9.4rem 1.25rem 4rem !important;
  max-width: 1240px;
  margin: 0 auto;
  z-index: auto !important;
  background: transparent;
  border-radius: 0;
}

body.stack-footer-shoe {
  background:
    linear-gradient(0deg, rgba(9, 61, 54, 0.98) 0%, rgba(6, 52, 50, 0.97) 24%, rgba(2, 42, 45, 0.98) 55%, rgba(1, 22, 22, 1) 82%, rgba(0, 0, 0, 1) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}
.product-photos {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 0.75rem;
  position: relative;
  min-height: 520px;
  border-radius: 1.8rem;
  padding: 0.4rem;
  /* Borderless: eliminar bordes y sombras */
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.photo-column {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0.75rem;
}
.photo-large,
.photo-small {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* Bordes más pronunciados */
  border-radius: 1.8rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
}
.photo-large {
  min-height: 500px;
}
.photo-small {
  min-height: 240px;
}
.product-photos.single-photo {
  grid-template-columns: 1fr;
  justify-items: stretch;
  align-items: stretch;
}
.product-photos.single-photo .photo-column {
  display: none;
}
.product-photos.single-photo .photo-large {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  width: 100%;
  min-height: 520px;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: rgba(255, 255, 255, 0.04);
}
.product-carousel-controls {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1rem;
  padding: 0 1rem;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}
.product-carousel-controls .carousel-btn,
.carousel-dot {
  pointer-events: auto;
}
.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.45);
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}
.carousel-btn:hover {
  opacity: 0.95;
}
.carousel-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex: 1;
}
.carousel-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
}
.carousel-dot.active {
  background: #ffffff;
}
.product-info-card {
  /* Hacer la tarjeta transparente e integrada en el fondo */
  border-radius: 0.6rem;
  padding: 1.5rem;
  border: none;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
.product-info {
  flex: 1;
}
.product-info h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 2.6vw, 2.7rem);
  line-height: 1.08;
  color: #f8fcff;
}
.product-info p {
  margin: 0 0 1rem;
  line-height: 1.6;
  color: rgba(238,248,252,0.9);
  font-size: 1.05rem;
}
#productDescriptionItems {
  margin: 0 0 0.45rem;
  color: rgba(214,233,239,0.92);
}
#productDescriptionItems p {
  margin: 0 0 0.45rem;
  line-height: 1.55;
}
.product-info ul {
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.product-info ul li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1.35;
  color: #e9f4f8;
  font-size: 0.98rem;
}
.btn-green { background: #12b76a; }
.btn-red { background: #a61d24; }
.btn-price { font-weight: 800; }
.btn-icon { display:inline-flex; width:1.6rem; height:1.6rem; align-items:center; justify-content:center; flex-shrink:0; }
.btn-icon svg { width: 1.2rem; height: 1.2rem; display:block; }
.btn-green:hover, .btn-red:hover { text-decoration: none; opacity:0.95; }
.product-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.price-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.price-current {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
}

/* Responsive fixes: stack product columns on narrower viewports and relax fixed min-heights */
/* Keep two-column product layout on most laptop widths; only stack below 760px */
@media (max-width: 760px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .product-photos {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: auto;
    padding: 0;
  }

  .photo-column { display: block; grid-auto-flow: row; }
  .photo-large { min-height: 320px; }
  .photo-small { min-height: 160px; }

  .product-info-card {
    min-height: auto;
    padding: 1rem;
  }

  .product-actions { grid-template-columns: 1fr; }
  .price-block { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .product-detail { padding: 6rem 0.75rem 3rem !important; }
  .product-info h1 { font-size: 1.6rem; }
  .price-current { font-size: 1.25rem; }
  .product-photos.single-photo .photo-large { min-height: 260px; }
}
.price-old {
  display: block;
  margin-top: 0.5rem;
  color: rgba(248,250,252,0.65);
  font-size: 1rem;
  text-decoration: line-through;
}
.product-info .btn {
  width: 100%;
  max-width: 100%;
}
.btn-whatsapp,
#addCartBtn {
  min-height: 3.4rem;
  border-radius: 1.2rem !important;
  border: none;
  padding: 0.9rem 1rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  font-size: 1rem !important;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
  text-decoration: none;
  box-sizing: border-box;
  width: 100%;
}
.btn-whatsapp {
  background: linear-gradient(180deg, #2fdf79, #16a34a);
  color: #022f1b;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.18);
}
.btn-whatsapp .btn-icon {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#addCartBtn {
  background: linear-gradient(180deg, #b91c1c, #8b1116);
  color: #fff;
  box-shadow: 0 10px 22px rgba(139, 17, 22, 0.25);
}
.btn-price {
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.btn-whatsapp:hover,
#addCartBtn:hover {
  transform: translateY(-1px);
  opacity: 0.98;
}
.site-nav a.active {
  color: var(--accent);
}
.product-extra {
  margin-top: 1.25rem;
  color: rgba(248,250,252,0.78);
  font-size: 0.95rem;
  line-height: 1.7;
}
.body-message {
  max-width: 560px;
  margin: 2rem auto 0;
  padding: 2rem;
  background: rgba(255,255,255,0.95);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  color: #12313a;
  border: 1px solid rgba(2, 40, 47, 0.08);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.body-message .message-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(12, 167, 133, 0.12);
  color: #08715b;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.body-message h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  line-height: 1.15;
}
.body-message p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(18, 49, 58, 0.86);
}
.body-message .btn-secondary {
  align-self: flex-start;
  background: #0a3c41;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(10, 60, 65, 0.18);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.body-message .btn-secondary:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}
.cart-trigger {
  position: fixed;
  right: 1rem;
  top: auto;
  bottom: 1rem;
  z-index: 35;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(2, 40, 47, 0.96);
  color: #eaf7ea;
  border-radius: 999px;
  padding: 0.6rem;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 30px rgba(0,0,0,0.18);
  cursor: pointer;
}

.cart-trigger .cart-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.visually-hidden,
.cart-trigger .cart-count.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.cart-trigger .cart-count {
  margin-left: 0;
  min-width: 1.5rem;
  justify-content: center;
}
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998; /* above header */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  z-index: 9999; /* above everything including header */
  background: linear-gradient(180deg, rgba(7,54,58,0.98), rgba(2,27,36,0.98));
  border-left: 1px solid rgba(255,255,255,0.06);
  box-shadow: -18px 0 50px rgba(0,0,0,0.28);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-header {
  padding: 1.2rem 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cart-drawer-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #A9FF3C;
}
.cart-close {
  border: none;
  background: rgba(255,255,255,0.06);
  color: #eaf7ea;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.2rem;
}
.cart-drawer-body {
  padding: 1rem 1.2rem;
  overflow: auto;
  flex: 1;
}
.cart-empty {
  color: rgba(234,247,234,0.68);
  text-align: center;
  padding: 3rem 0;
}
.cart-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 1rem;
  padding: 0.9rem;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.cart-item img {
  width: 54px;
  height: 54px;
  border-radius: 0.8rem;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
}
.cart-item h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  color: #f8fafc;
}
.cart-item p {
  margin: 0;
  color: rgba(234,247,234,0.72);
  font-size: 0.85rem;
}
.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
}
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-qty button,
.cart-remove,
.cart-clear,
.cart-checkout {
  border: none;
  cursor: pointer;
  font-weight: 700;
  border-radius: 0.8rem;
}
.cart-qty button {
  width: 2rem;
  height: 2rem;
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.cart-remove {
  background: transparent;
  color: #ffb1b1;
  padding: 0.35rem 0.15rem;
}
.cart-drawer-footer {
  padding: 1rem 1.2rem 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(2,27,36,0.45);
}
.cart-totals {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: #eaf7ea;
  font-size: 0.95rem;
}
.cart-checkout {
  width: 100%;
  background: linear-gradient(180deg, #A9FF3C, #8fe62e);
  color: #012228;
  padding: 0.95rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.cart-clear {
  width: 100%;
  background: rgba(255,255,255,0.06);
  color: #eaf7ea;
  padding: 0.85rem 1rem;
}
.cart-back {
  width: 100%;
  background: rgba(255,255,255,0.04);
  color: #eaf7ea;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  border-radius: 0.6rem;
  text-align: center;
}

@media (max-width: 760px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
  .product-photos,
  .product-info-card {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .product-detail {
    padding: clamp(3.1rem, 2.8rem + 1vw, 3.5rem) 0.9rem 1.8rem !important;
  }
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .product-photos {
    grid-template-columns: 1.35fr 0.85fr;
    gap: 0.55rem;
    min-height: 0;
    height: auto;
    padding: 0.55rem;
    border-radius: 1.05rem;
  }
  .product-photos.carousel-mode {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
  }
  .product-photos.carousel-mode .photo-column {
    display: none;
  }
  .product-photos.carousel-mode .product-carousel-controls {
    display: flex;
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin-top: 0.6rem;
    padding: 0;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
  }
  .product-carousel-controls .carousel-dots {
    flex: 0 0 auto;
    justify-content: center;
  }
  .product-carousel-controls .carousel-btn {
    display: none;
  }
  .product-photos.single-photo {
    grid-template-columns: 1fr;
    height: auto;
  }
  .product-photos.single-photo .photo-large {
    min-height: auto;
    aspect-ratio: 1 / 1;
    height: auto;
  }
  .photo-large {
    min-height: 250px;
    height: auto;
    width: 100%;
    border-radius: 0.85rem;
  }
  .photo-small {
    min-height: 120px;
    height: 100%;
    width: 100%;
    border-radius: 0.85rem;
  }
  .photo-column {
    grid-template-rows: 1fr 1fr;
    gap: 0.55rem;
    height: 100%;
  }
  .product-photos,
  .photo-large,
  .photo-small,
  .product-carousel-controls {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
  }
  .product-info-card {
    padding: 0.95rem 1.05rem;
    min-height: auto;
    border-radius: 1.05rem;
  }
  .product-info h1 {
    font-size: clamp(1.5rem, 6.1vw, 2rem);
    margin-bottom: 0.72rem;
  }
  .product-info p {
    font-size: 0.94rem;
    margin-bottom: 0.8rem;
  }
  .product-info ul {
    margin-bottom: 1rem;
    gap: 0.5rem;
  }
  .product-info ul li {
    font-size: 0.88rem;
    gap: 0.4rem;
  }
  .product-actions {
    grid-template-columns: 1fr;
    gap: 0.62rem;
  }
  .btn-whatsapp,
  #addCartBtn {
    width: 100%;
    justify-content: center;
    min-height: 2.85rem;
    border-radius: 0.78rem !important;
    font-size: 0.9rem !important;
    padding: 0.78rem 0.95rem !important;
    gap: 0.45rem;
  }
  .btn-whatsapp .btn-icon { 
    width: 1.25rem; 
    height: 1.25rem; 
  }
  .price-current {
    font-size: 1.4rem;
  }
  .price-old {
    font-size: 0.9rem;
  }
  .body-message {
    padding: 1.5rem;
    margin: 1.5rem auto 0;
  }
  .cart-trigger {
    top: auto;
    bottom: 1rem;
    right: 1rem;
  }
  .cart-drawer { width: 100vw; }
}

@media (max-width: 420px) {
  .product-detail {
    padding-top: 1.6rem !important;
  }
  .photo-large {
    min-height: 255px;
  }
  .photo-small {
    min-height: 122px;
  }
  .btn-whatsapp,
  #addCartBtn {
    font-size: 0.86rem !important;
    min-height: 2.75rem;
  }
}
