/* Offside · móvil tipo app (barra inferior, búsqueda rápida), barra de envío gratis y regalos, vídeo en la ficha.
   Patrones vistos en repos abiertos, código propio: barra inferior con safe-area como en Ionic Framework (MIT) y
   nextjs-starter-medusa (MIT); barra de progreso con hitos como en Shopify Dawn (MIT, «free shipping bar»). */

:root { --appbar-h: 0px; }

/* ============ Barra inferior (solo móvil) ============ */
.appbar { display: none; }
@media (max-width: 899px) {
	body { padding-bottom: calc(var(--appbar-h) + env(safe-area-inset-bottom)); }
	.appbar { position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-top: 1px solid var(--line); -webkit-tap-highlight-color: transparent; }
	.appbar a, .appbar button { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 50px; padding: 4px 0; border: 0; background: none; border-radius: var(--r-s); color: var(--ink-3); font: 600 .66rem/1 var(--font-b); letter-spacing: .01em; cursor: pointer; transition: color .2s, transform .25s var(--ease); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
	.appbar svg { width: 26px; height: 26px; transition: transform .35s var(--ease); }
	.appbar .is-press, .appbar a:active, .appbar button:active { transform: scale(.92); }
	.appbar .is-on { color: var(--brand-600); }
	.appbar .is-on svg { transform: translateY(-1px); }
	.appbar .is-on::after { content: ""; position: absolute; top: 2px; width: 18px; height: 3px; border-radius: var(--pill); background: var(--brand-600); animation: appbar-dot .45s var(--ease) both; }
	.appbar .cart-count, .appbar .fav-count { position: absolute; top: 2px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--pill); background: var(--brand-600); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; transition: transform .4s var(--ease); }
	.appbar .fav-count[data-n="0"] { display: none; }
	.appbar .fav-count.bump { animation: badge-bump .45s var(--ease); }

	/* Lo que estaba pegado abajo sube por encima de la barra */
	.buybar { bottom: calc(10px + var(--appbar-h) + env(safe-area-inset-bottom)); }
	.cookie { bottom: calc(12px + var(--appbar-h) + env(safe-area-inset-bottom)); }
	.sheet-panel, .filters { padding-bottom: calc(28px + var(--appbar-h) + env(safe-area-inset-bottom)); }
	.site-footer { padding-bottom: 8px; }
}
@media (hover: hover) { .appbar a:hover, .appbar button:hover { color: var(--ink); } }
@keyframes appbar-dot { from { transform: scaleX(0); } to { transform: none; } }
@keyframes badge-bump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@media (prefers-reduced-transparency: reduce) { .appbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (display-mode: standalone) { .announce { display: none; } }

/* Búsqueda: el buscador grande vive en cart-search.css (B). */

/* ============ Barra de envío gratis y regalos ============ */
.off-ship { display: grid; gap: 10px; padding: 18px 18px 14px; margin: 0 0 22px; border-radius: var(--r-m); background: var(--bg-3); }
.off-ship-cart { margin-bottom: 26px; }
.off-ship-pdp { margin: 18px 0 0; }
.off-ship-msg { font-size: .98rem; line-height: 1.35; }
.off-ship-msg strong { color: var(--brand-700); }
.off-ship-track { position: relative; height: 10px; margin: 6px 0 46px; border-radius: var(--pill); background: rgba(0, 113, 227, .14); }
.off-ship-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: var(--pill); background: linear-gradient(90deg, var(--brand), var(--brand-600)); transition: width 1.1s var(--ease); }
.off-ship.is-ready .off-ship-fill { width: var(--p); }
.off-ship-hit { position: absolute; top: 50%; left: var(--x); translate: -50% -50%; display: grid; justify-items: center; }
.off-ship-hit i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--pill); background: var(--bg); color: var(--ink-3); box-shadow: 0 0 0 3px var(--bg-3); transition: background-color .4s, color .4s, transform .6s var(--ease); }
.off-ship-hit.is-on i { background: var(--brand-600); color: #fff; }
.off-ship.is-ready .off-ship-hit.is-on i { animation: hit-pop .7s var(--ease) .5s both; }
.off-ship-hit b, .off-ship-hit small { position: absolute; top: 100%; white-space: nowrap; font-size: .68rem; line-height: 1.2; }
.off-ship-hit b { margin-top: 6px; font-weight: 650; color: var(--ink-2); }
.off-ship-hit small { margin-top: 20px; color: var(--ink-3); }
.off-ship-hit.is-on b { color: var(--brand-700); }
.off-ship-hit:last-child { translate: -100% -50%; }
.off-ship-hit:last-child b, .off-ship-hit:last-child small { right: 0; }
.off-ship-gift { font-size: .9rem; padding: 10px 14px; border-radius: var(--r-s); background: var(--bg); font-weight: 550; }
.off-ship-legal { font-size: .75rem; }
@keyframes hit-pop { 0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); } }
.off-gift-row td { color: var(--brand-700); font-weight: 550; }
.off-gift-note { margin: 16px 0; padding: 14px 18px; border-radius: var(--r-m); background: var(--bg-3); }
@media (min-width: 700px) { .off-ship-hit b, .off-ship-hit small { font-size: .78rem; } .off-ship-track { margin-bottom: 50px; } }

/* ============ Vídeo en la ficha ============ */
.pdp-video .wrap { display: grid; gap: 22px; align-items: center; }
.vcard { position: relative; width: min(100%, 320px); border-radius: var(--r-m); overflow: hidden; background: var(--dark); aspect-ratio: 9 / 16; }
.vcard-media { position: absolute; inset: 0; }
.vcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.vcard-media video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.vcard-media iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.vcard-play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 60%); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vcard-play span { display: grid; place-items: center; width: 68px; height: 68px; border-radius: var(--pill); background: rgba(255, 255, 255, .22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .4) inset; transition: transform .35s var(--ease), background-color .3s; }
.vcard-play:active span { transform: scale(.92); }
@media (hover: hover) { .vcard-play:hover span { transform: scale(1.08); background: rgba(255, 255, 255, .34); } .vcard-play:hover ~ .vcard-media img { transform: scale(1.04); } }
.vcard-meta { position: absolute; left: 16px; right: 16px; bottom: 16px; color: #fff; display: grid; gap: 2px; pointer-events: none; }
.vcard-meta b { font: 700 1.05rem/1.2 var(--font-d); font-stretch: 112%; letter-spacing: -.02em; }
.vcard-meta small { opacity: .85; font-size: .8rem; }
.is-playing .vcard-meta { display: none; }
.pdp-video-text { display: grid; gap: 10px; }
.pdp-video-text p { color: var(--ink-2); max-width: 44ch; }
@media (min-width: 900px) { .pdp-video .wrap { grid-template-columns: 320px 1fr; gap: 48px; } }
