/* path: /files/public_html/app/assets/tienda.css */
/* 0.1.0 Archivo creado: Tiendas de Alimentos y Agro (página pública tienda.php y módulos «alimentos» y «agro» del Panel).
   Usa los tokens de panel.css; --bt-c es el color de cada rubro. */
.bt { --bt-c: var(--verde); max-width: 1180px; margin: 0 auto; }
.bt-barra { position: sticky; top: 0; z-index: 5; display: grid; gap: 10px; padding: 10px 0 12px; background: linear-gradient(var(--bg-main) 75%, transparent); }
.bt-buscar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-color); box-shadow: var(--sombra-1); }
.bt-buscar:focus-within { border-color: var(--bt-c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bt-c) 22%, transparent); }
.bt-buscar i { color: var(--muted); }
.bt-buscar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text-color); }
.bt-lineas { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.bt-lineas::-webkit-scrollbar { display: none; }
.bt-linea { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-color); border-radius: 999px; padding: 8px 14px; font-size: .84rem; font-weight: 700; cursor: pointer; }
.bt-linea small { color: var(--muted); font-weight: 600; }
.bt-linea.activa { background: var(--bt-c); border-color: var(--bt-c); color: #fff; }
.bt-linea.activa small { color: rgba(255,255,255,.8); }

.bt-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
@media (max-width: 520px) { .bt-grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.bt-prod { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 18px; overflow: hidden; box-shadow: var(--sombra-1); transition: transform .18s, box-shadow .18s; }
.bt-prod:hover { transform: translateY(-3px); box-shadow: var(--sombra-2); }
.bt-prod[hidden] { display: none; }
.bt-prod-ver { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; }
.bt-prod-img { display: grid; place-items: center; aspect-ratio: 1; background: radial-gradient(circle at 50% 40%, #fff, color-mix(in srgb, var(--bt-c) 10%, #fff)); overflow: hidden; }
html.oscuro .bt-prod-img { background: radial-gradient(circle at 50% 40%, #f8fafc, #dfe6d6); }
.bt-prod-img img { width: 86%; height: 86%; object-fit: contain; transition: transform .3s; }
.bt-prod:hover .bt-prod-img img { transform: scale(1.05); }
.bt-prod-img .fa { font-size: 2.4rem; color: var(--bt-c); }
.bt-prod-txt { padding: 12px 14px 4px; flex: 1; }
.bt-prod-txt h3 { margin: 6px 0 4px; font-size: .98rem; line-height: 1.2; }
.bt-pres { margin: 0; font-size: .76rem; color: var(--muted); }
.bt-chip { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--bt-c); background: color-mix(in srgb, var(--bt-c) 13%, transparent); padding: 3px 8px; border-radius: 6px; }
.bt-prod-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 12px 12px; }
@media (max-width: 380px) { .bt-prod-acc { grid-template-columns: 1fr; } .bt-prod-acc .bt-btn-sec { display: none; } }
.bt-btn, .bt-btn-sec { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 11px; font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; }
.bt-btn { background: var(--bt-c); color: #fff; border: 0; }
.bt-btn:hover { filter: brightness(1.06); }
.bt-btn-sec { background: transparent; color: var(--text-color); border: 1px solid var(--border-color); }
.bt-ancho { width: 100%; min-height: 48px; font-size: .95rem; }
.bt-vacio { text-align: center; color: var(--muted); padding: 34px 10px; }
.bt-nota { color: var(--muted); font-size: .78rem; text-align: center; margin: 8px 0 0; }

/* Ficha y pedido: hoja que sube desde abajo en el celular y ventana centrada en la computadora */
html.bt-bloq, html.bt-bloq body { overflow: hidden; }
.bt-capa { position: fixed; inset: 0; z-index: 2000001; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 15, 6, 0); transition: background .25s; }
.bt-capa[hidden] { display: none; }
.bt-capa.abierta { background: rgba(8, 15, 6, .55); }
.bt-hoja { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--bg-card-solido); color: var(--text-color); border-radius: 24px 24px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.bt-capa.abierta .bt-hoja { transform: none; }
@media (min-width: 700px) { .bt-capa { align-items: center; } .bt-hoja { border-radius: 24px; transform: translateY(24px) scale(.98); opacity: 0; transition: transform .25s, opacity .25s; } .bt-capa.abierta .bt-hoja { opacity: 1; } }
.bt-cerrar { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-main); color: var(--text-color); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.bt-f-cab { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; margin-bottom: 14px; padding-right: 30px; }
.bt-f-img { aspect-ratio: 1; border-radius: 16px; background: #fff; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border-color); }
.bt-f-img img { width: 90%; height: 90%; object-fit: contain; }
.bt-f-cab h3 { margin: 6px 0 0; font-size: 1.2rem; }
.bt-f-pres { display: grid; gap: 8px; margin-bottom: 12px; }
.bt-f-pres > span, .bt-f-cant > span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.bt-f-pres > div { display: flex; flex-wrap: wrap; gap: 8px; }
.bt-pres-op { border: 1.5px solid var(--border-color); background: transparent; color: var(--text-color); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.bt-pres-op.activa { border-color: var(--bt-c, var(--verde)); background: color-mix(in srgb, var(--bt-c, var(--verde)) 12%, transparent); }
.bt-f-cant { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bt-cant { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-color); border-radius: 12px; padding: 3px; }
.bt-cant button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--bg-main); color: var(--text-color); font-size: 1.1rem; font-weight: 800; cursor: pointer; }
.bt-cant b { min-width: 30px; text-align: center; }
.bt-f-desc p { margin: 0 0 10px; }
.bt-f-tabla { overflow-x: auto; margin: 4px 0 12px; border: 1px solid var(--border-color); border-radius: 12px; }
.bt-f-tabla table { border-collapse: collapse; width: 100%; font-size: .8rem; white-space: nowrap; }
.bt-f-tabla th, .bt-f-tabla td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border-color); }
.bt-f-tabla th { background: var(--bg-main); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.bt-f-tabla tr:last-child td { border-bottom: 0; }
.bt-f-desc { white-space: pre-line; font-size: .9rem; line-height: 1.55; color: var(--text-color); margin: 16px 0 10px; }
.bt-f-info img { width: 100%; border-radius: 12px; margin-top: 8px; display: block; }
.bt-hoja h3 .fa { color: var(--bt-c, var(--verde)); }
.bt-p-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.bt-p-item strong { display: block; font-size: .92rem; }
.bt-p-item small { color: var(--muted); font-size: .76rem; }
.bt-quitar { border: 0; background: none; color: var(--muted); cursor: pointer; width: 32px; height: 32px; }
.bt-p-nota { display: grid; gap: 6px; margin: 14px 0 12px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.bt-p-nota textarea { font: inherit; font-size: 16px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-color); background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px 12px; resize: vertical; }
.bt-wa { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 14px; background: #25d366; color: #fff; font-weight: 800; text-decoration: none; }
.bt-wa[hidden] { display: none; }
.bt-wa .fa { font-size: 1.3rem; }
.bt-vaciar { display: block; margin: 12px auto 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; text-decoration: underline; }
.bt-vaciar[hidden] { display: none; }

.bt-flotante { position: fixed; z-index: 2000000; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 0; border-radius: 999px; background: #14240c; color: #fff; font: inherit; font-size: .9rem; box-shadow: 0 12px 30px rgba(0,0,0,.25); cursor: pointer; animation: bt-sube .3s ease-out; }
.bt-flotante[hidden] { display: none; }
.bt-flotante b { color: #b9e27d; }
@keyframes bt-sube { from { transform: translate(-50%, 30px); opacity: 0; } }
.bt-toast { position: fixed; z-index: 2000002; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%); background: #14240c; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: .86rem; box-shadow: 0 10px 24px rgba(0,0,0,.2); max-width: calc(100vw - 32px); }
.bt-toast[hidden] { display: none; }
@media (min-width: 1024px) { .bt-flotante { left: auto; right: 28px; transform: none; } @keyframes bt-sube { from { transform: translateY(30px); opacity: 0; } } }

/* Cabecera del rubro dentro del Panel */
.bt-cab { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 20px; margin-bottom: 6px; color: #fff; background: linear-gradient(120deg, color-mix(in srgb, var(--bt-c) 92%, #000), color-mix(in srgb, var(--bt-c) 55%, #0c1a06)); }
.bt-cab::after { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.08); }
.bt-cab h2 { margin: 0 0 4px; font-size: 1.35rem; }
.bt-cab p { margin: 0; opacity: .88; font-size: .9rem; max-width: 560px; }
.bt-cab .fa-big { position: absolute; right: 22px; bottom: 14px; font-size: 3.6rem; opacity: .18; }

/* ---------- 0.1.0 Página pública de la Tienda (tienda.php) ---------- */
body.ts { background: var(--bg-main); }
.ts-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, calc((100vw - 1180px) / 2)); background: color-mix(in srgb, var(--bg-main) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-color); }
.ts-marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-color); font-weight: 800; white-space: nowrap; }
.ts-marca img { border-radius: 9px; }
.ts-marca b { color: var(--bt-c); }
.ts-nav nav { display: flex; gap: 4px; margin-left: auto; }
.ts-nav nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: .88rem; }
.ts-nav nav a[aria-current] { color: var(--bt-c); background: color-mix(in srgb, var(--bt-c) 12%, transparent); }
.ts-nav-der { display: flex; align-items: center; gap: 8px; }
.ts-pedido { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-color); cursor: pointer; font-size: 1.05rem; }
.ts-pedido b { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--bt-c); color: #fff; font-size: .7rem; display: grid; place-items: center; }
.ts-pedido b[hidden] { display: none; }
.ts-acceder { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--text-color); color: var(--bg-main); text-decoration: none; font-weight: 800; font-size: .86rem; }
@media (max-width: 640px) {
  .ts-nav { flex-wrap: wrap; gap: 8px 10px; }
  .ts-nav nav { order: 3; width: 100%; margin: 0; }
  .ts-nav nav a { flex: 1; justify-content: center; }
  .ts-nav-der { margin-left: auto; }
  .ts-acceder span { display: none; }
  .ts-acceder { width: 42px; padding: 0; justify-content: center; }
}
.ts-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 36px 16px 10px; }
@media (max-width: 800px) { .ts-hero { grid-template-columns: 1fr; padding-top: 22px; } .ts-hero-img { display: none !important; } }
.ts-ante { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--bt-c); }
.ts-hero h1 { margin: 10px 0 10px; font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: -.03em; }
.ts-hero p { margin: 0; color: var(--muted); font-size: 1.02rem; max-width: 520px; }
.ts-hero-datos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ts-hero-datos span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border-color); font-size: .84rem; }
.ts-hero-datos b { color: var(--bt-c); }
.ts-hero-img { position: relative; display: grid; place-items: center; aspect-ratio: 1.15; }
.ts-hero-img span { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--bt-c) 35%, transparent), transparent 70%); filter: blur(10px); }
.ts-hero-img img { position: relative; width: 74%; max-height: 360px; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0,0,0,.18)); animation: ts-flota 6s ease-in-out infinite; }
@keyframes ts-flota { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { .ts-hero-img img { animation: none; } }
.ts-main { max-width: 1180px; margin: 0 auto; padding: 10px 16px 40px; }
.ts-main .bt-barra { top: 62px; }
@media (max-width: 640px) { .ts-main .bt-barra { top: 106px; } }
.ts-como { margin: 36px 0 0; padding: 22px; border-radius: 22px; background: var(--bg-card); border: 1px solid var(--border-color); }
.ts-como h2 { margin: 0 0 12px; font-size: 1.15rem; }
.ts-como ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ts-como li { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.ts-como li .fa { font-size: 1.4rem; color: var(--bt-c); }
.ts-como li b { color: var(--text-color); }
.ts-elegir { max-width: 1000px; margin: 0 auto; padding: 48px 16px 40px; text-align: center; }
.ts-elegir h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 5vw, 2.8rem); letter-spacing: -.03em; }
.ts-elegir > p { color: var(--muted); margin: 0 auto 28px; max-width: 540px; }
.ts-rubros { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.ts-rubro { position: relative; overflow: hidden; display: grid; gap: 8px; text-align: left; padding: 28px 24px; border-radius: 26px; text-decoration: none; color: #fff; min-height: 260px; align-content: end; background: linear-gradient(150deg, color-mix(in srgb, var(--bt-c) 95%, #fff), color-mix(in srgb, var(--bt-c) 60%, #0c1a06)); box-shadow: var(--sombra-2); transition: transform .2s; }
.ts-rubro:hover { transform: translateY(-4px); }
.ts-rubro > .fa:first-child { position: absolute; top: 22px; right: 24px; font-size: 4.5rem; opacity: .22; }
.ts-rubro h2 { margin: 0; font-size: 1.8rem; }
.ts-rubro p { margin: 0; opacity: .9; }
.ts-rubro span { font-weight: 800; margin-top: 6px; }
.ts-pie { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto; padding: 24px 16px 90px; border-top: 1px solid var(--border-color); color: var(--muted); font-size: .84rem; }
.ts-pie div { display: grid; }
.ts-pie strong { color: var(--text-color); }
.ts-pie nav { display: flex; gap: 14px; flex-wrap: wrap; }
.ts-pie a { color: var(--muted); }
