/* =====================================================================
   buscar-movil.css — Resultados de la búsqueda en el TELÉFONO (shop.php),
   como TikTok Shop. La computadora no cambia: todo va en max-width 767px.
   ===================================================================== */
.sm, .sm-hoja, .sm-velo, .sm-subir { display: none; }

@media (max-width: 767px) {
  /* Lo de la página de siempre se esconde en el teléfono */
  body.page-shop .top-header,
  body.page-shop .footer,
  body.page-shop .shop-head,
  body.page-shop .shop-cat-scroll-wrap,
  body.page-shop .shop-filtros,
  body.page-shop #shopGrid,
  body.page-shop #btnVerMasShopWrap,
  body.page-shop main > p.text-muted { display: none !important; }
  html body.page-shop main.main-content { padding: 0 0 calc(70px + env(safe-area-inset-bottom)) !important; margin: 0 !important; max-width: none !important; }
  body.page-shop { background: #fff; }

  .sm { display: block; }
  .sm-arriba { position: sticky; top: 0; z-index: 60; background: #fff; }
  .sm-cab { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
  .sm-atras { border: none; background: none; width: 34px; height: 40px; font-size: 21px; color: #161823; padding: 0; flex: none; }
  .sm-caja { flex: 1; min-width: 0; height: 42px; border: none; border-radius: 10px; background: #f1f1f3; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 16px; color: #161823; text-align: left; }
  .sm-caja span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sm-caja span.vacio { color: #8a8b91; }
  .sm-tabs { display: flex; justify-content: space-around; border-bottom: 1px solid #eee; }
  .sm-tabs button { border: none; background: none; font-size: 15.5px; font-weight: 700; color: #8a8b91; padding: 10px 4px 9px; border-bottom: 3px solid transparent; }
  .sm-tabs button.on { color: #161823; border-bottom-color: #161823; }

  .sm-chips { display: flex; gap: 8px; padding: 12px 12px 8px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .sm-chips::-webkit-scrollbar { display: none; }
  .sm-chips button { flex: none; border: 1px solid #dcdce0; background: #fff; border-radius: 8px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: #161823; }
  .sm-chips button i.fa-chevron-down { font-size: 10px; margin-left: 3px; }
  .sm-chips button.on { border-color: #FF2D55; color: #FF2D55; background: #fff5f7; }
  .sm-chips[hidden] { display: none; }
  .sm-prot { margin: 4px 12px 8px; background: #F3EDFF; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: #161823; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-decoration: none; }
  .sm-prot i { color: #7614E0; }
  .sm-prot b { font-weight: 800; }
  .sm-prot span { color: #5b5c66; overflow: hidden; text-overflow: ellipsis; }
  .sm-res { font-size: 12.5px; color: #8a8b91; padding: 0 12px 8px; }
  .sm-res:empty { display: none; }
  .sm-titulo { font-size: 16px; font-weight: 800; color: #161823; padding: 14px 12px 8px; }
  .sm-nada:empty { display: none; }
  .sm-nada { text-align: center; padding: 26px 24px 6px; color: #6b6c72; font-size: 14px; }
  .sm-nada i { display: block; font-size: 36px; color: #c9c9d1; margin-bottom: 10px; }

  .sm-feed { display: flex; gap: 8px; padding: 0 8px; align-items: flex-start; }
  .sm-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
  .sm-card { display: block; color: #161823; text-decoration: none; }
  .sm-ci { position: relative; border-radius: 8px; overflow: hidden; background: #f4f4f6; }
  .sm-ci img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
  .sm-ci em { position: absolute; left: 6px; bottom: 6px; background: #0f9d8a; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
  .sm-ci em.cobra { background: #FF2D55; }
  .sm-ci .sm-chip { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; }
  .sm-ci .sm-chip.morado { background: #7614E0; }
  .sm-ct { padding: 7px 2px 4px; }
  .sm-n { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .sm-v { font-size: 12.5px; color: #8a8b91; margin-top: 3px; }
  .sm-st { font-size: 12.5px; margin-top: 3px; }
  .sm-st i { color: #f5b301; font-size: 10px; }
  .sm-mv { font-size: 12.5px; color: #b8860b; font-weight: 700; margin-top: 3px; }
  .sm-of { font-size: 13px; color: #FF2D55; font-weight: 700; margin-top: 3px; }
  .sm-p { font-size: 13px; margin-top: 3px; }
  .sm-p b { font-size: 19px; }
  .sm-p s { color: #999; font-size: 12px; margin-left: 4px; }
  .sm-p em { color: #FF2D55; font-style: normal; font-weight: 700; font-size: 12.5px; margin-left: 3px; }
  .sm-p small { display: block; font-size: 11.5px; color: #8a8b91; }
  .sm-gente { font-size: 12px; color: #6b6c72; margin-top: 3px; }
  .sm-barra { height: 4px; border-radius: 3px; background: #ececf0; margin-top: 6px; overflow: hidden; }
  .sm-barra i { display: block; height: 100%; background: #f59e0b; }

  .sm-carga { display: flex; justify-content: center; gap: 4px; padding: 18px 0 26px; }
  .sm-carga i { width: 13px; height: 13px; border-radius: 50%; display: block; animation: smPunto .7s ease-in-out infinite alternate; }
  .sm-carga i:first-child { background: #19C6E8; }
  .sm-carga i:last-child { background: #FF2D55; animation-delay: -.35s; }
  .sm-carga.fin { visibility: hidden; padding: 6px 0; }
  @keyframes smPunto { from { transform: translateX(-5px) scale(.85); } to { transform: translateX(5px) scale(1.05); } }

  .sm-subir { display: grid; place-items: center; position: fixed; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 50%; background: #fff; border: none; box-shadow: 0 2px 12px rgba(0,0,0,.18); font-size: 18px; color: #161823; z-index: 58; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sm-subir.ver { opacity: 1; pointer-events: auto; }

  /* Hoja de "Ordenar" */
  .sm-velo { display: block; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sm-hoja { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2001; background: #fff; border-radius: 16px 16px 0 0; padding: 6px 0 calc(14px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease; }
  body.sm-hoja-abierta .sm-velo { opacity: 1; pointer-events: auto; }
  body.sm-hoja-abierta .sm-hoja { transform: none; }
  .sm-hoja h3 { font-size: 17px; font-weight: 800; color: #161823; text-align: center; margin: 10px 0 8px; }
  .sm-hoja button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: none; background: none; padding: 14px 18px; font-size: 15.5px; color: #161823; text-align: left; }
  .sm-hoja button.on { color: #FF2D55; font-weight: 700; }
  .sm-hoja button i { visibility: hidden; }
  .sm-hoja button.on i { visibility: visible; }
}
