/* Página de la tienda (como en DoorDash), favoritos y seguir tiendas. */

/* ---------- Corazón en las tarjetas ---------- */
.card-wrap { position: relative; min-width: 0; }
.fav-form { position: absolute; top: .45rem; right: .45rem; margin: 0; }
.fav-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transition: transform .12s; }
.fav-btn svg { fill: none; stroke: var(--ink); stroke-width: 2; }
.fav-btn:hover { transform: scale(1.08); }
.fav-btn.is-on svg { fill: var(--accent); stroke: var(--accent); }
.fav-btn.pop { animation: pop .25s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }
.card-wrap.is-gone .card { opacity: .55; }
.card.is-sold { opacity: .6; }
.card.is-sold .card-price { text-decoration: line-through; }
.product-fav { display: inline-flex; align-items: center; gap: .4rem; }
.product-fav .fav-btn { position: static; box-shadow: none; border: 1px solid var(--line); }

/* ---------- Logo de la tienda ---------- */
.store-logo { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--ink); }
.store-logo-sm { width: 44px; height: 44px; }
.store-logo-md { width: 64px; height: 64px; font-size: 1.4rem; }
.store-logo-lg { width: 112px; height: 112px; font-size: 2.6rem; border: 4px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }

/* ---------- Encabezado de la tienda ---------- */
.store-hero { margin: 1rem 0 1.25rem; }
.store-banner { height: clamp(120px, 22vw, 260px); background: linear-gradient(135deg, #111 0%, #3a3a3a 55%, #c8102e 140%); overflow: hidden; border-radius: 10px; }
.store-banner img { width: 100%; height: 100%; object-fit: cover; }
.store-id { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; padding: 0 1rem; margin-top: -56px; }
.store-id-main { flex: 1; min-width: 240px; padding-top: 60px; }
.store-id-main h1 { margin: 0 0 .3rem; text-transform: uppercase; font-weight: 900; }
.verified { display: inline-flex; align-items: center; vertical-align: middle; font-size: .7rem; font-weight: 800; letter-spacing: .04em; padding: .2rem .5rem; border-radius: 99px; background: var(--ok-soft); color: var(--ok); text-transform: uppercase; }
.store-stats { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; }
.store-actions { display: flex; gap: .5rem; padding-bottom: .3rem; }
.store-actions form { margin: 0; }

.store-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2rem; align-items: start; }
.store-about { white-space: pre-line; margin: 0 0 1.25rem; font-size: 1rem; max-width: 70ch; }
.store-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; margin-bottom: .75rem; }
.store-toolbar select { width: auto; }
.store-tabs { position: sticky; top: 0; z-index: 6; display: flex; gap: .3rem; overflow-x: auto; padding: .5rem 0; background: var(--bg); border-bottom: 1px solid var(--line); margin-bottom: 1rem; scrollbar-width: none; }
.store-tabs::-webkit-scrollbar { display: none; }
.store-tabs a { flex-shrink: 0; padding: .45rem .85rem; border-radius: 99px; font-weight: 700; font-size: .85rem; border: 1px solid var(--line); }
.store-tabs a:hover { border-color: var(--ink); text-decoration: none; }
.store-tabs a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.store-tabs a span { opacity: .6; font-weight: 600; }
.store-section { margin: 0 0 2.5rem; scroll-margin-top: 70px; }
.store-section h2 { margin-bottom: 1rem; }
.store-side { position: sticky; top: 1rem; display: grid; gap: 1rem; }
.side-box { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.side-box h3 { margin: 0 0 .5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.side-box p { margin: .3rem 0; }
.pickup-list { margin: .2rem 0 .5rem; padding-left: 1.1rem; }
.side-links { display: grid; gap: .5rem; }

/* ---------- Siguiendo ---------- */
.follow-strip { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1.5rem; }
.follow-store { display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 96px; text-align: center; font-weight: 700; font-size: .82rem; }
.follow-store:hover { text-decoration: none; }

@media (max-width: 900px) {
  .store-layout { grid-template-columns: minmax(0, 1fr); }
  .store-toolbar { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .store-toolbar select { width: 100%; }
  .store-side { position: static; }
  .store-id { padding: 0 .25rem; margin-top: -44px; }
  .store-logo-lg { width: 88px; height: 88px; font-size: 2rem; }
  .store-id-main { padding-top: 0; min-width: 100%; }
  .store-actions { width: 100%; }
  .store-actions .btn, .store-actions form, .store-actions form .btn { flex: 1; width: 100%; }
}
.product-meta-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.store-card-logo { position: absolute; left: .7rem; bottom: .7rem; width: 54px !important; height: 54px !important; border-radius: 50%; border: 3px solid #fff; object-fit: cover; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }

/* Relacionados en el artículo y "Vistos recientemente" en la portada */
.related { margin: 3rem 0 0; }
.related-row { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.recent-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; }
.recent-item { flex: 0 0 132px; display: flex; flex-direction: column; gap: .2rem; color: var(--text); }
.recent-item:hover { text-decoration: none; }
.recent-item img { width: 132px; height: 132px; object-fit: cover; background: var(--soft); }
.recent-title { font-size: .8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-price { font-size: .8rem; font-weight: 800; }

/* Avance del pedido en el chat  */
.order-track { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: .7rem 0 .4rem; padding: 0; position: relative; }
.order-track::before { content: ''; position: absolute; top: 12px; left: 10%; right: 10%; height: 2px; background: var(--line); }
.order-track li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; font-size: .66rem; font-weight: 700; color: var(--muted); line-height: 1.2; }
.dot-step { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); font-size: .7rem; z-index: 1; }
.order-track .is-done { color: var(--text); }
.order-track .is-done .dot-step { background: var(--ink); border-color: var(--ink); color: #fff; }
.order-track .is-current { color: var(--text); }
.order-track .is-current .dot-step { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 17, 17, .12); }

/* Barra de abajo en el celular (como las apps de DoorDash) */
.tabbar { display: none; }
@media (max-width: 767px) {
  body.has-tabbar { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); backdrop-filter: blur(8px); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .66rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.is-active { color: var(--ink); }
  .tabbar a.is-active svg { stroke-width: 2.4; }
  .tabbar .badge { position: absolute; top: -2px; left: calc(50% + 6px); }
}
.geo-field { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; }

/* Chat directo con CowFace: marcado como oficial */
.official-badge { display: inline-flex; align-items: center; margin-left: .35rem; padding: .1rem .45rem; border-radius: 99px; background: var(--ink); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
.inbox-pinned { margin-bottom: 1rem; }
.inbox-official { background: var(--soft); }
.inbox-official img { border-radius: 50%; }
.support-logo { border-radius: 50%; }
.support-note { margin: 0; padding: .6rem 1rem; background: var(--soft); border-bottom: 1px solid var(--line); color: var(--muted); }
.bubble-official { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.bubble-author { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.admin-support { max-width: none; margin: 0; }
