/* Embudos de venta: barra promocional y avisos de descuento */
.promo-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 44px 10px 16px; background: #c4a77d; color: #0a0a0a; font-size: 14px; font-weight: 600; text-align: center; position: relative; }
.promo-bar[hidden] { display: none; }
.promo-bar__text { margin: 0; }
.promo-bar__cta { color: inherit; text-decoration: underline; white-space: nowrap; }
.promo-bar__close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; }
@media (max-width: 480px) { .promo-bar { flex-direction: column; gap: 2px; padding: 8px 40px 8px 12px; font-size: 13px; } }
.funnel-note { margin: 12px 0 0; padding: 10px 12px; border: 1px dashed #c4a77d; font-size: 14px; }
.funnel-note strong { letter-spacing: 0.02em; }
.funnel-nudge { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #c4a77d; background: #faf6ef; font-size: 14px; }
.funnel-nudge[hidden] { display: none; }
.funnel-nudge--ok { background: #eef6ee; border-color: #6aa36a; }
.funnel-nudge a { text-decoration: underline; }
.flow-summary__row--discount strong { color: #2c7a2c; }
.funnel-banner { margin: 0 0 18px; padding: 14px 16px; background: #0a0a0a; color: #f5f5f5; }
.funnel-banner__title { margin: 0 0 4px; font-weight: 700; letter-spacing: 0.04em; }
.funnel-banner__text { margin: 0; font-size: 14px; }

/* El atributo hidden debe ganar a cualquier display de las clases de la tienda */
.flow-summary__row[hidden], .funnel-nudge[hidden], .promo-bar[hidden] { display: none !important; }

/* Ficha: comprar ahora + añadir a la bolsa */
.pdp__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pdp__cta .pdp__add-btn { flex: 1 1 200px; margin: 0; }
.pdp__add-secondary { background: transparent; color: inherit; border: 1px solid currentColor; }
.pdp__pay-note { margin: 8px 0 0; font-size: 13px; opacity: 0.75; }
.pdp__wa-link { margin: 10px 0 0; font-size: 14px; }
.pdp__wa-link a { text-decoration: underline; }

/* Pantalla emergente de bienvenida */
.dv-popup { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.dv-popup[hidden] { display: none !important; }
.dv-popup__card { position: relative; width: 100%; max-width: 420px; padding: 32px 28px 24px; background: #0a0a0a; color: #f5f5f5; text-align: center; border: 1px solid #c4a77d; }
.dv-popup__kicker { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.3em; color: #c4a77d; }
.dv-popup__title { margin: 0 0 10px; font-size: 30px; line-height: 1.1; letter-spacing: 0.03em; text-transform: uppercase; }
.dv-popup__text { margin: 0 0 20px; font-size: 15px; line-height: 1.5; opacity: 0.9; }
.dv-popup__cta { display: block; padding: 14px 16px; background: #c4a77d; color: #0a0a0a; font-weight: 700; letter-spacing: 0.06em; text-decoration: none; text-transform: uppercase; }
.dv-popup__cta:focus-visible, .dv-popup__no:focus-visible, .dv-popup__close:focus-visible { outline: 2px solid #f5f5f5; outline-offset: 2px; }
.dv-popup__no { margin-top: 12px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; opacity: 0.7; text-decoration: underline; cursor: pointer; }
.dv-popup__close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; color: inherit; font-size: 26px; line-height: 1; padding: 4px 8px; cursor: pointer; }

/* Resplandor de espada: un destello diagonal cruza el botón cada pocos segundos */
.dv-popup__cta { position: relative; overflow: hidden; isolation: isolate; }
.dv-popup__cta::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 38%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.15) 35%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.15) 65%, transparent 100%);
  transform: translateX(-160%) skewX(-22deg);
  animation: dv-sword-glint 3.2s ease-in-out 0.8s infinite;
  pointer-events: none; z-index: 1;
}
.dv-popup__cta { box-shadow: 0 0 0 rgba(196, 167, 125, 0); animation: dv-sword-pulse 3.2s ease-in-out 0.8s infinite; }
@keyframes dv-sword-glint {
  0% { transform: translateX(-160%) skewX(-22deg); }
  45%, 100% { transform: translateX(380%) skewX(-22deg); }
}
@keyframes dv-sword-pulse {
  0%, 30%, 100% { box-shadow: 0 0 0 rgba(196, 167, 125, 0); }
  42% { box-shadow: 0 0 22px rgba(196, 167, 125, 0.55); }
}
@media (prefers-reduced-motion: reduce) {
  .dv-popup__cta, .dv-popup__cta::after { animation: none; }
}

/* Comprar por WhatsApp: el botón ocupa todo el ancho y se ve apagado cuando está agotado */
.pdp__buy-wa { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; width: 100%; }
.pdp__buy-wa.is-disabled { opacity: 0.5; pointer-events: none; cursor: not-allowed; }
.pdp__cta { width: 100%; }

/* ---------- Catálogo: carrito junto a «Ver pieza» ---------- */
.ug-catalog .product-tile__quick { left: 0.85rem; right: auto; margin: 0; width: auto; max-width: calc(100% - 4.6rem); }
.product-tile__cart {
  position: absolute; right: 0.85rem; bottom: 0.85rem; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.15rem; height: 2.15rem; border: 1px solid #111; background: #111; color: #fff;
  opacity: 0; transition: opacity 0.2s, transform 0.2s; cursor: pointer;
}
.product-tile:hover .product-tile__cart, .product-tile:focus-within .product-tile__cart { opacity: 1; }
.product-tile__cart:hover { transform: translateY(-2px); }
@media (hover: none) { .product-tile__cart { opacity: 1; } .ug-catalog .product-tile__quick { opacity: 1; } }

/* ---------- Ficha: elegir talla con intención de compra ---------- */
.pdp__variant-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.65rem; }
.pdp__variant-head .pdp__variant-k { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.pdp__variant-hint { font-size: 0.75rem; opacity: 0.6; }
.pdp-page .chips { gap: 0.55rem; }
.pdp-page .chips .chip.chip--size {
  min-width: 3.1rem; height: 3.1rem; padding: 0 0.9rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(0, 0, 0, 0.3); background: #fff; color: #111; font-weight: 600; letter-spacing: 0.04em;
  border-radius: 0; transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.pdp-page .chips .chip.chip--size:hover { border-color: #111; transform: translateY(-1px); }
.pdp-page .chips .chip.chip--size.is-active { background: #111; color: #fff; border-color: #111; }
.pdp-page .chips .chip.chip--size.is-soldout { opacity: 0.4; text-decoration: line-through; }
.pdp-page .chips .chip.chip--size:focus-visible { outline: 2px solid #c4a77d; outline-offset: 3px; }
.pdp__variant-block--size.is-attention .chips { animation: dv-attn 1.1s ease 2; }
@keyframes dv-attn { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pdp__selection { margin: 1.1rem 0 0.7rem; padding: 0.7rem 0.9rem; font-size: 0.85rem; border-left: 3px solid #c4a77d; background: rgba(0, 0, 0, 0.04); line-height: 1.45; }
.pdp__selection:empty { display: none; }
.pdp__selection .is-low { color: #b45f06; font-weight: 600; }
.pdp__meta:has([data-sku-label]), .pdp__meta:has([data-stock-label]) { display: none; }
.pdp__cta { margin-top: 0.4rem; }
.pdp__pay-note { margin: 0.7rem 0 0; font-size: 0.78rem; opacity: 0.65; text-align: center; }

/* ---------- Avisos como «toast» ---------- */
.flash {
  position: fixed; left: 50%; bottom: 1.5rem; top: auto; z-index: 90; transform: translateX(-50%);
  width: min(92vw, 30rem); margin: 0; padding: 0.95rem 2.6rem 0.95rem 1.1rem;
  border-radius: 0; font-size: 0.9rem; line-height: 1.45; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: dv-toast-in 0.35s ease both;
}
.flash--ok { background: #111; border: 1px solid #c4a77d; border-left-width: 4px; color: #f5f5f5; }
.flash.is-leaving { animation: dv-toast-out 0.3s ease both; }
.flash__close { position: absolute; top: 0.35rem; right: 0.5rem; border: 0; background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: 0.7; padding: 0.2rem 0.45rem; }
.flash__close:hover { opacity: 1; }
@keyframes dv-toast-in { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes dv-toast-out { to { opacity: 0; transform: translate(-50%, 14px); } }
@media (prefers-reduced-motion: reduce) { .flash, .flash.is-leaving, .pdp__variant-block--size.is-attention .chips { animation: none; } }

/* Aviso de promoción («lleva más») */
.flash--promo { border-left-color: #e8b04a; }
.flash__tag { display: inline-block; margin-right: 0.4rem; padding: 0.1rem 0.45rem; background: #c4a77d; color: #111; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; }
.flash__link { color: #c4a77d; font-weight: 600; white-space: nowrap; margin-left: 0.3rem; }

/* ---------- Promoción «lleva 2»: ventana, barra inferior y catálogo en modo «segunda» ---------- */
.dv-promo-modal { z-index: 85; }
.second-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
  padding: 0.85rem max(1rem, 4vw); background: #0a0a0a; color: #f5f5f5; border-top: 2px solid #c4a77d;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
}
.second-bar__main { min-width: 0; }
.second-bar__have { margin: 0; font-size: 0.9rem; line-height: 1.35; }
.second-bar__have span { opacity: 0.65; }
.second-bar__hint { margin: 0.15rem 0 0; font-size: 0.78rem; color: #c4a77d; font-weight: 600; letter-spacing: 0.03em; }
.second-bar__side { display: flex; align-items: center; gap: 1.1rem; }
.second-bar__total { font-size: 0.85rem; opacity: 0.9; }
.second-bar__total strong { font-size: 1.1rem; margin-left: 0.35rem; }
.second-bar__cancel { background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); color: inherit; padding: 0.45rem 0.9rem; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.second-bar__cancel:hover { border-color: #fff; }
body:has(.second-bar) { padding-bottom: 4.8rem; }
body:has(.second-bar) .whatsapp-fab { bottom: 6rem; }
body:has(.second-bar) .flash { bottom: 6rem; }
.pdp__second-cta { width: 100%; }
@media (max-width: 640px) { .second-bar { padding: 0.7rem 1rem; } .second-bar__side { width: 100%; justify-content: space-between; } }
.flow-summary__k { margin: 1rem 0 0.4rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.dv-promo-modal form { margin: 0; }
.dv-promo-modal button.dv-popup__cta { display: block; width: 100%; border: 0; cursor: pointer; font-family: inherit; font-size: inherit; }
