/* OsChollos · estilos (versión funcional; la estética se afinará después) */
:root {
  --ink: #15171C;
  --muted: #5B616E;
  --line: #E3E5EA;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --tile: #EDEEF1;
  --accent: #D33A22;
  --accent-dark: #B02E19;
  --coupon: #FFF6EC;
  --radius: 16px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; }
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .wrap { padding-left: 24px; padding-right: 24px; } }

/* --- botones --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; white-space: nowrap; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { color: #fff; background: #2A2D35; }
.btn-accent { background: var(--accent); color: #fff; font-weight: 700; }
.btn-accent:hover { color: #fff; background: var(--accent-dark); }
.btn-outline { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); font-weight: 700; }
.btn-light:hover { color: var(--ink); }
.btn-outline-light { border-color: #fff; color: #fff; font-weight: 700; }
.btn-outline-light:hover { color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 54px; font-size: 17px; }

/* --- cabecera --- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand span { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.5px; }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.brand-light, .brand-light:hover { color: #fff; }
.search { flex: 1 1 260px; order: 3; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink); outline: none; }
@media (min-width: 900px) { .search { order: 0; } }
.cats { display: flex; gap: 4px 20px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; font-size: 14px; font-weight: 500; }
.cats a { text-decoration: none; padding: 6px 0; white-space: nowrap; }

/* --- portada --- */
.main { display: flex; flex-direction: column; gap: 36px; padding-top: 28px; padding-bottom: 56px; }
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 6vw, 48px); line-height: 1.05; letter-spacing: -1px; }
.hero p { margin: 8px 0 0; color: var(--muted); max-width: 560px; }
.block { display: flex; flex-direction: column; gap: 16px; }
.block h2 { font-family: var(--display); font-weight: 800; font-size: 24px; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #D5D8DE; background: var(--surface); text-decoration: none; font-size: 14px; font-weight: 500; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.more { align-self: center; }
.empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty p { margin: 0; color: var(--muted); }

/* --- top descuentos --- */
.top-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.top-card { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.top-media { position: relative; flex: none; width: 104px; height: 104px; border-radius: 12px; background: var(--tile); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.top-media img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.top-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.top-title { font-weight: 600; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* --- tarjetas --- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-media { position: relative; height: 210px; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--tile); color: #8A909C; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; padding: 3px 9px; border-radius: 8px; }
.badge-lg { font-size: 20px; padding: 6px 12px; top: 16px; left: 16px; }
.store-chip { position: absolute; top: 10px; right: 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.meta { font-size: 12.5px; color: var(--muted); }
.card h3 { font-size: 16px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 a { text-decoration: none; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.price strong { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.price s { color: var(--muted); font-size: 15px; }
.price-lg strong { font-size: 36px; }
.price-lg s { font-size: 20px; }
.note { font-size: 12px; color: var(--muted); }
.grow { flex: 1; }
.coupon { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 12px; border: 1.5px dashed var(--ink); border-radius: 10px; background: var(--coupon); font-size: 13px; color: var(--muted); }
.coupon b { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 15px; color: var(--ink); letter-spacing: 0.5px; }
.coupon-lg { padding: 6px 6px 6px 16px; font-size: 15px; }
.copy { min-height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.copy.is-done { background: #0E7C5A; }
.is-expired .card-media img, .is-expired .detail-media img { opacity: 0.55; }
.is-expired .badge { background: var(--muted); }

/* --- ficha --- */
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
@media (min-width: 820px) { .detail { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); padding: 24px; gap: 40px; } }
.detail-media { position: relative; aspect-ratio: 1; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail-media img { width: 100%; height: 100%; object-fit: contain; }
.detail-body { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.detail-body h1 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 4vw, 36px); line-height: 1.1; }
.detail-body .btn { width: 100%; max-width: 420px; }
.detail-body .coupon { width: 100%; max-width: 420px; }
.subtitle { margin: 0; color: var(--muted); }
.warn { margin: 0; padding: 12px 14px; border-radius: 10px; background: #FFF1EE; color: #8A2414; font-size: 14px; }
.comment { margin: 0; padding: 12px 16px; border-left: 0; border-radius: 12px; background: var(--bg); font-style: italic; }

/* --- banda de unirse --- */
.join { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 28px; border-radius: 20px; background: var(--ink); color: #fff; }
.join h2 { font-family: var(--display); font-weight: 800; font-size: 26px; }
.join p { margin: 6px 0 0; color: #C9CDD4; max-width: 560px; }
.join-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- pie --- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 14px; }
.site-footer p { margin: 0; max-width: 820px; line-height: 1.55; }
.legal { display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: 500; }
.legal a { text-decoration: none; }

/* --- páginas legales --- */
.prose { max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; line-height: 1.6; }
.prose h1 { font-family: var(--display); font-weight: 800; font-size: 34px; margin-bottom: 12px; }
.prose h2 { font-size: 19px; margin: 24px 0 6px; }

/* --- /hoy --- */
.today { max-width: 560px; margin: 0 auto; }
.today-head { background: var(--ink); color: #fff; padding: 20px 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.today-head .brand img { width: 40px; height: 40px; }
.today-head .brand span { font-size: 21px; }
.today-head .eyebrow { color: #C9CDD4; font-size: 13px; }
.today-head h1 { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.05; margin-top: -6px; }
.today-head p { margin: 0; color: #C9CDD4; font-size: 15px; }
.today-list { list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.row-top { display: flex; gap: 12px; }
.row-media { position: relative; flex: none; width: 96px; height: 96px; border-radius: 12px; background: #fff; border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.row-media img { width: 100%; height: 100%; object-fit: contain; }
.row-media .badge { top: auto; bottom: 6px; left: 6px; font-size: 12px; padding: 2px 7px; }
.row-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row-body h2 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.row-body h2 a { text-decoration: none; }
.row-body .price strong { font-size: 20px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions > * { flex: 1 1 140px; }
.copy-wide { min-height: 46px; border: 1.5px dashed var(--ink); background: var(--coupon); color: var(--ink); font-size: 14px; }
.copy-wide.is-done { background: #E6F5EE; color: #0E5A42; border-color: #0E7C5A; }
.today-cta { margin: 0 16px 20px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 12px; }
.today-cta h2 { font-family: var(--display); font-weight: 800; font-size: 21px; }
.today-cta p { margin: 0; color: var(--muted); font-size: 14px; }
.today-legal { margin: 0; padding: 0 16px 32px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.today .empty { margin: 16px; }

/* --- cabecera con mascota --- */
.brand img { border-radius: 50%; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px 28px 0; align-items: center; overflow: hidden; }
.hero-text { flex: 1 1 340px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 28px; }
.hero-text p { margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-mascot { width: 260px; height: auto; align-self: flex-end; margin: 0 auto; }
@media (min-width: 720px) { .hero-card { padding: 32px 40px 0; } .hero-mascot { width: 320px; margin: 0; } }

/* --- asistente --- */
.asis { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.asis-fab { width: 68px; height: 68px; padding: 0; border-radius: 50%; border: 3px solid var(--ink); background: #fff; cursor: pointer; overflow: hidden; box-shadow: 0 8px 24px rgba(21,23,28,.22); transition: transform .15s; }
.asis-fab:hover { transform: scale(1.05); }
.asis-fab img { width: 100%; height: 100%; object-fit: cover; }
.asis-panel { width: 380px; max-width: calc(100vw - 32px); height: min(620px, calc(100vh - 110px)); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 48px rgba(21,23,28,.22); display: flex; flex-direction: column; overflow: hidden; }
.asis-panel[hidden] { display: none; }
.asis-head { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; background: var(--ink); color: #fff; }
.asis-head img { width: 44px; height: 44px; border-radius: 50%; background: #fff; }
.asis-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.asis-head span { font-size: 12px; color: #C9CDD4; }
.asis-close { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.asis-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { margin: 0; max-width: 92%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.msg p { margin: 0; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; display: flex; flex-direction: column; gap: 10px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--muted); font-style: italic; }
.asis-sugs { display: flex; flex-wrap: wrap; gap: 6px; }
.asis-sugs button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #D5D8DE; background: #fff; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.asis-sugs button:hover { border-color: var(--ink); }
.asis-deal { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.asis-deal.is-old { opacity: .8; }
.asis-deal-main { display: flex; gap: 10px; padding: 8px; text-decoration: none; color: var(--ink); }
.asis-media { position: relative; flex: none; width: 64px; height: 64px; border-radius: 8px; background: var(--tile); overflow: hidden; }
.asis-media img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.asis-media .badge { top: auto; bottom: 3px; left: 3px; font-size: 11px; padding: 1px 5px; border-radius: 5px; }
.asis-deal-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.asis-deal-name { font-weight: 600; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asis-deal-price { display: flex; gap: 6px; align-items: baseline; }
.asis-deal-price b { font-size: 16px; }
.asis-deal-price s { font-size: 12px; color: var(--muted); }
.asis-deal-meta { font-size: 11.5px; color: var(--muted); }
.asis-deal-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 8px; }
.asis-deal-actions > * { flex: 1 1 110px; min-height: 38px; font-size: 13px; }
.asis-links { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.asis-links a { font-weight: 600; }
.asis-note { font-size: 11.5px; color: var(--muted); }
.asis-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.asis-form input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 15px; color: var(--ink); }
.asis-form input:focus { outline: none; border-color: var(--ink); }
.asis-form button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
@media (max-width: 520px) {
  .asis.is-open { left: 8px; right: 8px; bottom: 8px; }
  .asis.is-open .asis-panel { width: 100%; max-width: none; height: calc(100vh - 100px); }
}
