:root {
  --ink: #20233a;
  --muted: #676b7e;
  --paper: #fffefa;
  --surface: #ffffff;
  --violet: #6c4ccf;
  --violet-dark: #4e35a5;
  --red: #ef476f;
  --orange: #ff9f1c;
  --yellow: #ffd166;
  --green: #06b982;
  --blue: #118ab2;
  --indigo: #5b5bd6;
  --mint: #e1f8ef;
  --line: #e7e7ee;
  --rainbow: linear-gradient(90deg, var(--red) 0 16.6%, var(--orange) 16.6% 33.2%, var(--yellow) 33.2% 49.8%, var(--green) 49.8% 66.4%, var(--blue) 66.4% 83%, var(--violet) 83% 100%);
  --shadow: 0 18px 50px rgba(41, 43, 70, 0.11);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 4% 4%, rgba(255,209,102,.17), transparent 24rem),
    radial-gradient(circle at 96% 12%, rgba(108,76,207,.09), transparent 26rem),
    var(--paper);
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,253,249,.9); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(112,45,255,.1);
}
.topbar::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--rainbow); }
.nav { min-height: 72px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; letter-spacing: -.03em; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; padding: 4px; background: conic-gradient(var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--violet), var(--red)); box-shadow: 0 8px 20px rgba(67,55,113,.18); }
.brand-mark span { width: 100%; height: 100%; border-radius: 10px; display: grid; place-items: center; background: white; color: var(--ink); font-size: .78rem; }
.brand span small { display: block; color: var(--muted); font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; font-weight: 700; color: var(--muted); }
.nav-links a:hover { color: var(--violet); }
.cart-btn, .button {
  border: 0; border-radius: 999px; background: var(--violet); color: white;
  padding: 12px 18px; font-weight: 850; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.cart-btn:hover, .button:hover { transform: translateY(-2px); background: var(--violet-dark); box-shadow: 0 10px 24px rgba(112,45,255,.22); }
.button.secondary { background: #f0eaff; color: var(--violet); }
.button.secondary:hover { background: #e6dcff; }
.button.dark { background: var(--ink); }
.button.small { padding: 9px 14px; font-size: .9rem; }
.button.full { width: 100%; }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--yellow); color: var(--ink); font-size: .76rem; }

.hero { padding: 64px 0 34px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--violet); font-weight: 900; text-transform: uppercase; letter-spacing: .1em; font-size: .76rem; }
.eyebrow::before { content: ""; width: 32px; height: 4px; border-radius: 9px; background: var(--rainbow); }
h1 { font-size: clamp(2.7rem, 6vw, 5.5rem); line-height: .96; letter-spacing: -.065em; margin: 18px 0 24px; max-width: 760px; }
h1 em { color: var(--violet); font-style: normal; position: relative; background: var(--rainbow); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 650px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 1.5rem; line-height: 1; }
.hero-stats span { color: var(--muted); font-size: .84rem; }
.hero-art { position: relative; min-height: 490px; }
.hero-card { position: absolute; overflow: hidden; box-shadow: var(--shadow); border: 7px solid white; }
.hero-card.main { inset: 0 0 70px 45px; border-radius: 36px; transform: rotate(2deg); }
.hero-card.main img { width: 100%; height: 100%; object-fit: cover; }
.hero-card.note { left: 0; bottom: 15px; width: 270px; padding: 20px 20px 20px 25px; border-radius: 22px; background: white; transform: rotate(-4deg); font-weight: 850; }
.hero-card.note::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: var(--rainbow); }
.hero-card.live { right: -12px; bottom: 25px; padding: 14px 18px; border-radius: 18px; background: var(--ink); color: white; }
.live-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: #35df82; box-shadow: 0 0 0 5px rgba(53,223,130,.16); }
.diversity-note { display: flex; align-items: center; gap: 13px; margin-top: 24px; max-width: 610px; color: var(--muted); font-size: .9rem; }
.color-voices { display: flex; flex: 0 0 auto; }
.color-voices i { width: 14px; height: 14px; border-radius: 50%; margin-left: -3px; border: 2px solid white; }
.color-voices i:nth-child(1) { background: var(--red); }
.color-voices i:nth-child(2) { background: var(--orange); }
.color-voices i:nth-child(3) { background: var(--yellow); }
.color-voices i:nth-child(4) { background: var(--green); }
.color-voices i:nth-child(5) { background: var(--blue); }
.color-voices i:nth-child(6) { background: var(--violet); }

.section { padding: 54px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -.05em; margin: 7px 0 0; }
.section-head p { color: var(--muted); max-width: 520px; margin: 0; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 24px; }
.search-box { position: relative; }
.search-box input { width: 100%; border: 1px solid var(--line); background: white; border-radius: 18px; padding: 15px 18px 15px 46px; outline: none; box-shadow: 0 7px 25px rgba(48,34,77,.06); }
.search-box input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(112,45,255,.1); }
.search-box span { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); padding: 10px 14px; font-weight: 750; cursor: pointer; }
.chip.active { background: var(--ink); border-color: var(--ink); color: white; }
.business-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.business-card { --accent: var(--violet); position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 10px 30px rgba(47,33,75,.06); transition: transform .2s ease, box-shadow .2s ease; }
.business-card::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 2; height: 4px; background: var(--accent); }
.business-card[data-category="Comida"] { --accent: var(--orange); }
.business-card[data-category="Moda"] { --accent: var(--red); }
.business-card[data-category="Bienestar"] { --accent: var(--green); }
.business-card[data-category="Belleza"] { --accent: var(--violet); }
.business-card[data-category="Regalos"] { --accent: var(--blue); }
.business-card[data-category="Infantil"] { --accent: var(--yellow); }
.business-card[data-category="Artesanías"] { --accent: var(--indigo); }
.business-card[data-category="Disponible"] { --accent: #a8a9b6; }
.business-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.business-image { height: 190px; position: relative; overflow: hidden; background: linear-gradient(135deg, #f1eaff, #ffe8f1); }
.business-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.business-card:hover .business-image img { transform: scale(1.04); }
.business-placeholder { height: 100%; display: grid; place-items: center; font-size: 4rem; }
.booth { position: absolute; left: 14px; top: 14px; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.92); font-weight: 900; font-size: .78rem; }
.status { position: absolute; right: 14px; top: 14px; padding: 7px 10px; border-radius: 999px; background: rgba(31,22,54,.88); color: white; font-weight: 800; font-size: .74rem; }
.business-body { padding: 19px; }
.business-body h3 { margin: 0 0 5px; font-size: 1.24rem; letter-spacing: -.025em; }
.business-body p { color: var(--muted); margin: 0 0 16px; font-size: .92rem; min-height: 44px; }
.business-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--muted); }
.business-meta a { color: var(--violet); font-weight: 850; }

.map-heading > div:last-child { display: grid; justify-items: start; gap: 13px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr); gap: 24px; align-items: stretch; }
.interactive-map { position: relative; min-width: 0; border-radius: 30px; overflow: hidden; background: #f6eddf; border: 1px solid #e3d8c6; box-shadow: var(--shadow); }
.interactive-map svg { display: block; width: 100%; height: auto; }
.map-ground { stroke: #d7c5ab; stroke-width: 3; }
.map-landmark text { fill: #5f5b68; font-size: 16px; font-weight: 850; letter-spacing: .02em; }
.map-landmark text.landmark-on-dark { fill: white; }
.map-booth { cursor: pointer; outline: none; }
.map-booth rect { fill: #fff; stroke: #31344f; stroke-width: 2.5; transition: transform .18s ease, fill .18s ease, filter .18s ease; transform-box: fill-box; transform-origin: center; }
.map-booth text { fill: #25283d; font-size: 21px; font-weight: 950; pointer-events: none; }
.map-booth:hover rect, .map-booth:focus rect { transform: scale(1.12); fill: #fff8d9; filter: drop-shadow(0 8px 7px rgba(32,35,58,.22)); }
.map-booth:focus rect { stroke: var(--violet); stroke-width: 5; }
.map-booth.category-comida rect { fill: #fff0d8; }
.map-booth.category-moda rect { fill: #ffe1e9; }
.map-booth.category-bienestar rect { fill: #dcf7ed; }
.map-booth.category-belleza rect { fill: #eee7ff; }
.map-booth.category-regalos rect { fill: #def2fa; }
.map-booth.category-infantil rect { fill: #fff6c9; }
.map-booth.category-artesanias rect { fill: #e7e7ff; }
.map-booth.category-servicios rect { fill: #e8f0ff; }
.map-booth.category-disponible rect { fill: #f2f2f4; stroke-dasharray: 6 4; }
.map-tip { position: absolute; left: 20px; bottom: 20px; display: grid; padding: 11px 15px; border-radius: 14px; background: rgba(32,35,58,.92); color: white; box-shadow: 0 12px 26px rgba(32,35,58,.22); }
.map-tip strong { font-size: .9rem; }.map-tip span { color: #dcdce5; font-size: .74rem; }
.map-copy { position: relative; overflow: hidden; border-radius: 30px; background: var(--ink); color: white; padding: 42px 36px 36px; display: flex; flex-direction: column; justify-content: space-between; }
.map-copy::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: var(--rainbow); }
.map-copy h2 { font-size: 2.7rem; line-height: 1; letter-spacing: -.05em; margin: 10px 0 20px; }
.map-copy p { color: #cfc8df; }
.map-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 20px; }
.map-list a { color: white; font-size: .9rem; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.map-list a:hover { color: var(--yellow); }
.original-plan { margin-top: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; overflow: hidden; }
.original-plan summary { cursor: pointer; padding: 15px 18px; font-weight: 850; color: var(--violet); }
.original-plan img { max-height: 720px; width: 100%; object-fit: contain; padding: 12px; background: #f7f5f1; }

.store-hero { padding: 38px 0 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.store-cover { height: 430px; border-radius: 32px; overflow: hidden; background: linear-gradient(135deg, #ece3ff, #ffe4ed); box-shadow: var(--shadow); }
.store-cover img { width: 100%; height: 100%; object-fit: cover; }
.store-cover .business-placeholder { font-size: 7rem; }
.store-info h1 { font-size: clamp(2.6rem, 5vw, 4.8rem); margin: 12px 0 16px; }
.store-info .badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.badge { background: #f0eaff; color: var(--violet); border-radius: 999px; padding: 8px 12px; font-weight: 800; font-size: .82rem; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; color: var(--muted); margin-top: 28px; }
.store-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.product { display: grid; grid-template-columns: 115px 1fr; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 22px; }
.product img, .product .product-art { width: 115px; height: 100%; min-height: 145px; object-fit: cover; }
.product-art { display: grid; place-items: center; background: #f0eaff; font-size: 2.5rem; }
.product-copy { padding: 16px; display: flex; flex-direction: column; }
.product-copy h3 { margin: 0; font-size: 1rem; }
.product-copy p { color: var(--muted); margin: 5px 0 12px; font-size: .82rem; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.price { font-weight: 950; }
.side-panel { position: sticky; top: 92px; border-radius: 26px; background: white; border: 1px solid var(--line); padding: 22px; box-shadow: var(--shadow); }
.side-panel h3 { margin: 0 0 8px; }
.camera-view { aspect-ratio: 16/10; border-radius: 18px; background: linear-gradient(145deg, #281f3d, #0e0b16); color: white; display: grid; place-items: center; text-align: center; overflow: hidden; padding: 20px; margin: 16px 0; }
.camera-view iframe { width: 100%; height: 100%; border: 0; }
.camera-view strong { display: block; font-size: 1rem; }
.camera-view span { color: #bdb5cf; font-size: .8rem; }
.side-panel hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.payment-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.payment-tags span { border-radius: 10px; padding: 7px 9px; background: var(--mint); font-size: .78rem; font-weight: 800; }

.checkout { max-width: 920px; padding: 42px 0 70px; }
.checkout h1 { font-size: 3.5rem; }
.checkout-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.panel { border: 1px solid var(--line); background: white; border-radius: 24px; padding: 24px; box-shadow: 0 10px 35px rgba(48,34,77,.07); }
.panel h2 { margin: 0 0 18px; font-size: 1.35rem; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label, .choice-title { font-size: .86rem; font-weight: 850; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; outline: none; background: white; }
.field input:focus, .field textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(112,45,255,.09); }
.choices { display: grid; gap: 9px; margin-bottom: 20px; }
.choice { display: flex; align-items: start; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--violet); background: #f8f5ff; }
.choice input { margin-top: 5px; accent-color: var(--violet); }
.choice small { display: block; color: var(--muted); }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line small { display: block; color: var(--muted); }
.totals { display: grid; gap: 8px; margin: 18px 0; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 1.2rem; font-weight: 950; border-top: 1px solid var(--line); padding-top: 10px; }
.notice { background: #fff7d8; border: 1px solid #f1d261; border-radius: 14px; padding: 12px; font-size: .84rem; color: #66520f; }

.seller { max-width: 980px; padding: 38px 0 70px; }
.seller-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.seller h1 { font-size: 3.4rem; margin-bottom: 10px; }
.seller-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 25px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-grid label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 11px; }
.manager-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); gap: 22px; align-items: start; margin-top: 26px; }
.booth-selector { position: sticky; top: 90px; }
.mini-map { max-width: 360px; margin: 18px auto 0; }
.mini-map .interactive-map { border-radius: 20px; box-shadow: none; }
.mini-map .map-tip { display: none; }
.local-number { display: flex; align-items: center; justify-content: space-between; border-radius: 16px; background: #f4f1fb; color: var(--muted); padding: 11px 15px; margin: 0 0 18px; }
.local-number strong { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--violet); color: white; font-size: 1.15rem; }
.manager-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 14px; }

.empty { text-align: center; padding: 52px 20px; border: 1px dashed #cfc6dd; border-radius: 24px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 1.25rem; margin-bottom: 5px; }
.footer { margin-top: 40px; padding: 38px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 120px); opacity: 0; background: var(--ink); color: white; padding: 13px 18px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 800; transition: .25s ease; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 920px) {
  .hero, .store-hero, .map-layout, .checkout-grid, .seller-grid, .manager-layout { grid-template-columns: 1fr; }
  .hero-art { min-height: 400px; }
  .business-grid { grid-template-columns: repeat(2, 1fr); }
  .store-layout { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .booth-selector { position: static; }
}
@media (max-width: 650px) {
  .shell { width: min(100% - 22px, 1180px); }
  .nav { min-height: 64px; }
  .brand > span:last-child { display: none; }
  .nav-links > a { display: none; }
  .hero { padding-top: 38px; gap: 28px; }
  h1 { font-size: 3.25rem; }
  .hero-art { min-height: 340px; }
  .hero-card.main { inset: 0 0 52px 20px; }
  .hero-card.note { width: 210px; font-size: .88rem; }
  .hero-card.live { font-size: .78rem; }
  .section { padding: 40px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .search-row { grid-template-columns: 1fr; }
  .business-grid, .products { grid-template-columns: 1fr; }
  .business-image { height: 210px; }
  .store-cover { height: 320px; }
  .product { grid-template-columns: 100px 1fr; }
  .product img, .product .product-art { width: 100px; }
  .map-copy { padding: 24px; }
  .map-list { grid-template-columns: 1fr; max-height: 420px; overflow: auto; }
  .checkout h1, .seller h1 { font-size: 2.7rem; }
  .seller-head { align-items: start; flex-direction: column; }
}
