/* Catálogo: proporciones fijas y una sola zona para cada elemento. */
.product-grid { align-items: start; }

.product-card {
  min-width: 0;
  display: grid;
  grid-template-rows: 208px minmax(228px, auto);
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 20px #071a2e0d;
  cursor: pointer;
}

.product-card:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.product-card.air-priority { border: 2px solid #2576a8; box-shadow: 0 12px 26px #2576a824; }
.product-card.air-priority .product-visual::after { content: '✈ OFERTA · ENVÍO AÉREO'; position: absolute; left: 10px; bottom: 10px; padding: 5px 8px; border-radius: 100px; background: #2576a8; color: #fff; font-size: .6rem; font-weight: 800; letter-spacing: .04em; }

.product-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 208px;
  overflow: hidden;
  background: #fff !important;
}

.product-visual.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.product-visual.no-image {
  display: grid;
  place-content: center;
  gap: 8px;
  color: #fff;
  background: var(--product-color) !important;
  text-align: center;
}

.product-visual.no-image span { font-size: 4rem; line-height: 1; }
.product-visual.no-image small { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.product-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 17px;
}

.product-info h3 {
  min-width: 0;
  min-height: 2.45em;
  margin: 6px 0;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.product-info small {
  display: -webkit-box;
  min-height: 2.9em;
  overflow: hidden;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-instruction { margin-top: 8px; color: #2576a8; font-size: .66rem; font-weight: 700; line-height: 1.3; }

/* La etiqueta va con los datos, nunca sobre la imagen del producto. */
.shipping-badge {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 100px;
  color: #fff;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.15;
  white-space: nowrap;
}

.shipping-air { background: #2576a8; }
.shipping-sea { background: #087865; }

.august-offer { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 20px; padding: 8px 13px 8px 9px; border: 1px solid #efb43d; border-radius: 100px; background: #fff8df; color: #704900; animation: offer-glow 1.8s ease-in-out infinite; }
.august-offer b, .august-offer small { display: block; }
.august-offer b { font-size: .78rem; letter-spacing: .02em; }
.august-offer small { margin-top: 1px; font-size: .64rem; }
.offer-spark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e95e37; color: #fff; animation: offer-flight 1.8s ease-in-out infinite; }
@keyframes offer-glow { 50% { box-shadow: 0 0 0 5px #efb43d33; } }
@keyframes offer-flight { 50% { transform: translateX(4px) translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .august-offer, .offer-spark { animation: none; } }

.product-info > div {
  width: 100%;
  min-height: 34px;
  margin-top: auto;
  padding-top: 16px;
  gap: 10px;
}

.product-info strong, .consult-button { white-space: nowrap; }

@media (max-width: 760px) {
  .product-card { grid-template-rows: 155px minmax(220px, auto); }
  .product-visual { height: 155px; }
  .product-info { padding: 13px; }
  .product-info h3 { min-height: 2.5em; }
  .product-info small { min-height: 3em; }
  .product-info > div { gap: 5px; }
  .consult-button { padding: 7px 8px; font-size: .67rem; }
}

.viewer-close { position: absolute; top: 4px; right: 8px; z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: #071a2e; color: #fff; line-height: 1; }
.product-viewer { width: min(94vw, 960px); max-width: 960px; max-height: 92dvh; margin: auto; padding: 18px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 20px 60px #0007; }
.product-viewer::backdrop { background: #071a2ed9; }
.product-viewer img { display: block; width: 100%; max-height: calc(92dvh - 88px); object-fit: contain; }
.product-viewer p { margin: 10px 38px 0; text-align: center; font-weight: 700; color: var(--ink); }

.product-detail { width: min(94vw, 880px); max-width: 880px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 20px 60px #0007; }
.product-detail::backdrop { background: #071a2ed9; }
.product-detail[open] { display: block; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(290px, .9fr); min-height: 420px; }
.detail-media { min-height: 380px; display: grid; place-items: center; overflow: hidden; background: #fff; padding: 18px; }
.detail-media img { width: 100%; max-height: 560px; object-fit: contain; cursor: zoom-in; }
.detail-content { padding: 48px 32px 30px; display: flex; flex-direction: column; align-items: flex-start; }
.detail-content h2 { margin: 0 0 18px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.detail-content > p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); line-height: 1.6; }
.detail-content strong { font-size: 1.5rem; margin-bottom: 22px; }
.detail-content .button { margin-top: auto; text-align: center; }

@media (max-width: 680px) {
  .product-detail[open] { max-height: 92dvh; overflow: auto; }
  .detail-layout { display: block; }
  .detail-media { min-height: 250px; max-height: 50dvh; }
  .detail-content { padding: 28px 22px; }
}
