:root {
  --bg-main: #0B0F17;
  --bg-card: #111827;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --subtle: #F8FAFC;
  --brand: #FF5A1F;
  --brand-hover: #E64A12;
  --accent: #2563EB;
  --success: #10B981;
  --danger: #EF4444;
  --radius: 12px;
  --font-ui: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Outfit', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-ui); font-size: .95rem; line-height: 1.55; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: 1.875rem; font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .825rem; }
.container { width: min(1200px, 92%); margin: 0 auto; }
[data-lucide] { width: 18px; height: 18px; stroke-width: 2; vertical-align: -3px; }
::selection { background: var(--brand); color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 .92rem var(--font-ui); padding: .7rem 1.3rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: background-color .2s ease, transform .15s ease, box-shadow .2s ease, color .2s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { box-shadow: 0 8px 24px -8px var(--accent); filter: brightness(1.05); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-hover); box-shadow: 0 10px 30px -10px var(--brand); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-secondary { background: #F1F5F9; color: #334155; border-color: #CBD5E1; }
.btn-secondary:hover { background: #E2E8F0; }
.btn-danger { background: #FEE2E2; color: #991B1B; }
.btn-sm { padding: .4rem .85rem; font-size: .8rem; }
.btn-block { width: 100%; }
.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; }
.inline { display: inline; }

/* Forms */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.field label { font-weight: 600; font-size: .85rem; }
.input, select.input, textarea.input { font: inherit; padding: .7rem .9rem; border: 1px solid #CBD5E1; border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease; width: 100%; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea.input { min-height: 110px; resize: vertical; }
.err-text { color: var(--danger); font-size: .8rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }

/* Alerts & badges */
.alert { padding: .85rem 1rem; border-radius: 10px; margin-bottom: 1.2rem; font-weight: 500; display: flex; gap: .5rem; align-items: center; animation: fadeUp .35s ease both; }
.alert-ok { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-err { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; border: 1px solid; }
.badge-pendiente { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.badge-pagado { background: #D1FAE5; color: #065F46; border-color: #A7F3D0; }
.badge-enviado { background: #DBEAFE; color: #1E40AF; border-color: #BFDBFE; }
.badge-entregado { background: #E0E7FF; color: #3730A3; border-color: #C7D2FE; }
.badge-cancelado { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.badge-off { background: #F1F5F9; color: #475569; border-color: #E2E8F0; }
.badge-low { background: #FFEDD5; color: #9A3412; border-color: #FED7AA; }

/* Card & table */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .8rem 1rem; background: var(--subtle); border-bottom: 1px solid var(--line); }
td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover { background: #FAFBFC; }
.thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #F1F5F9; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }

/* ===== Platform ===== */
.platform { background: var(--bg-main); color: #E5E7EB; min-height: 100vh; }
.platform .topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); background: rgba(11,15,23,.7); border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; display: flex; align-items: center; gap: .5rem; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.topbar nav { display: flex; gap: .6rem; align-items: center; }
.hero { padding: 6rem 0 5rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 1.15rem; color: #9CA3AF; margin: 1.5rem 0 2.2rem; max-width: 520px; }
.hero-ctas { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 4/5; border-radius: 24px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-chip { position: absolute; left: 1.2rem; bottom: 1.2rem; right: 1.2rem; background: rgba(17,24,39,.75); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--brand); margin-bottom: 1rem; display: block; }
.section { padding: 5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 2.5rem; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { color: #fff; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.store-card { background: var(--bg-card); border: 1px solid rgba(255,255,255,.07); border-radius: 18px; overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
.store-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.2); }
.store-card .cover { height: 160px; background-size: cover; background-position: center; position: relative; }
.store-card .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(17,24,39,.85), transparent 60%); }
.store-card .body { padding: 1.2rem 1.3rem 1.4rem; }
.store-card h3 { color: #fff; display: flex; align-items: center; gap: .5rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.07); border-radius: 18px; overflow: hidden; }
.feature { background: var(--bg-main); padding: 2rem 1.6rem; }
.feature [data-lucide] { width: 26px; height: 26px; color: var(--brand); margin-bottom: 1rem; }
.feature h4 { color: #fff; font-size: 1.05rem; margin-bottom: .4rem; }
.feature p { color: #9CA3AF; font-size: .88rem; }
.cta-band { margin: 2rem 0 5rem; border-radius: 24px; padding: 3.5rem; background: var(--brand); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; max-width: 560px; }
.cta-band .btn { background: #0B0F17; color: #fff; }
.footer { border-top: 1px solid rgba(255,255,255,.06); padding: 2rem 0; color: #6B7280; font-size: .85rem; }
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 3rem 0; }
.auth-card { width: min(480px, 92%); background: #fff; color: var(--ink); border-radius: 20px; padding: 2.4rem; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); animation: fadeUp .4s ease both; }
.auth-card h2 { margin-bottom: .3rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.8rem; }
.platform .auth-card { --accent: var(--brand); }
.slug-prefix { display: flex; align-items: center; border: 1px solid #CBD5E1; border-radius: 10px; overflow: hidden; }
.slug-prefix span { padding: .7rem .7rem; background: var(--subtle); color: var(--muted); font-size: .85rem; border-right: 1px solid #CBD5E1; }
.slug-prefix .input { border: none; border-radius: 0; }

/* ===== Panel ===== */
.panel { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--subtle); --accent: var(--brand); }
.sidebar { background: var(--bg-main); color: #CBD5E1; padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.sidebar .logo { color: #fff; padding: 0 .6rem 1.6rem; }
.side-store { margin: 0 .3rem 1.4rem; padding: .9rem; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.side-store strong { color: #fff; display: block; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: 10px; font-weight: 500; margin-bottom: .2rem; transition: background-color .15s ease, color .15s ease; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: var(--brand); color: #fff; }
.side-foot { margin-top: auto; }
.main { padding: 2rem 2.5rem 4rem; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.9rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; animation: fadeUp .4s ease both; }
.stat:nth-child(2) { animation-delay: .05s; } .stat:nth-child(3) { animation-delay: .1s; } .stat:nth-child(4) { animation-delay: .15s; }
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 600; display: flex; gap: .4rem; align-items: center; }
.stat .value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; margin-top: .3rem; }
.toolbar { display: flex; gap: .6rem; margin-bottom: 1.2rem; flex-wrap: wrap; align-items: center; }
.pills a { padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .82rem; font-weight: 600; transition: background-color .15s ease; }
.pills a.active, .pills a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.4rem; align-items: start; }
.actions { display: flex; gap: .4rem; justify-content: flex-end; }

/* ===== Storefront ===== */
.store { background: #fff; --accent-soft: color-mix(in srgb, var(--accent) 10%, #fff); }
.store-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.store-top .inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.store-brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: .55rem; }
.store-brand .mark { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 1rem; }
.search { flex: 1; max-width: 420px; position: relative; }
.search .input { border-radius: 999px; padding-left: 2.4rem; background: var(--subtle); }
.search [data-lucide] { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.store-actions { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.icon-btn { position: relative; display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .85rem; border-radius: 999px; font-weight: 600; font-size: .88rem; transition: background-color .15s ease; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.cart-count { background: var(--accent); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .45rem; min-width: 20px; text-align: center; }
.cat-bar { border-bottom: 1px solid var(--line); }
.cat-bar .inner { display: flex; gap: .4rem; overflow-x: auto; padding: .7rem 0; }
.cat-bar a { padding: .4rem .95rem; border-radius: 999px; font-size: .85rem; font-weight: 600; color: #475569; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
.cat-bar a:hover { background: var(--accent-soft); color: var(--accent); }
.cat-bar a.active { background: var(--accent); color: #fff; }
.store-hero { margin: 2rem auto; border-radius: 24px; overflow: hidden; position: relative; min-height: 340px; display: flex; align-items: flex-end; background: var(--ink) center/cover; }
.store-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,23,42,.85), rgba(15,23,42,.2)); }
.store-hero .txt { position: relative; padding: 3rem; color: #fff; max-width: 640px; animation: fadeUp .5s ease both; }
.store-hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.store-hero p { margin-top: .8rem; color: #E2E8F0; font-size: 1.05rem; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2rem 1.5rem; padding-bottom: 5rem; }
.product-card { display: flex; flex-direction: column; animation: fadeUp .45s ease both; }
.product-card .img { aspect-ratio: 4/5; border-radius: 16px; overflow: hidden; background: #F1F5F9; position: relative; }
.product-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .img img { transform: scale(1.05); }
.product-card .tag { position: absolute; top: .8rem; left: .8rem; background: rgba(255,255,255,.92); padding: .2rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.product-card .meta { padding: .9rem .2rem 0; display: flex; justify-content: space-between; gap: .8rem; align-items: start; }
.product-card h3 { font-size: 1.05rem; }
.price { font-family: var(--font-display); font-weight: 700; color: var(--accent); white-space: nowrap; }
.pdp { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; padding: 2.5rem 0 5rem; }
.pdp .img { border-radius: 20px; overflow: hidden; aspect-ratio: 1; background: #F1F5F9; }
.pdp .img img { width: 100%; height: 100%; object-fit: cover; }
.pdp .price { font-size: 2rem; margin: 1rem 0; display: block; }
.qty-row { display: flex; gap: .8rem; margin: 1.6rem 0; }
.qty-row .input { width: 90px; }
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 1.5rem; }
.crumbs a:hover { color: var(--accent); }
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; padding: 2rem 0 5rem; align-items: start; }
.summary { position: sticky; top: 90px; background: var(--subtle); border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem; }
.summary .row { display: flex; justify-content: space-between; padding: .45rem 0; }
.summary .total { border-top: 1px dashed #CBD5E1; margin-top: .6rem; padding-top: .9rem; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.coupon-form { display: flex; gap: .5rem; margin: 1rem 0; }
.page-title { padding: 2.2rem 0 0; }
.narrow { width: min(560px, 92%); margin: 2.5rem auto 5rem; }
.store-foot { background: var(--subtle); border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--muted); font-size: .85rem; }
.store-foot .inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 1.2rem; }
.success-icon [data-lucide] { width: 30px; height: 30px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero, .pdp, .cart-layout, .two-col { grid-template-columns: 1fr; }
  .features, .stats { grid-template-columns: 1fr 1fr; }
  .panel { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 1.5rem 1rem; }
  .search { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
}
td.actions { display: table-cell; text-align: right; white-space: nowrap; }
td.actions > * { display: inline-flex; margin-left: .3rem; vertical-align: middle; }
.side-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-store a { display: inline-flex; gap: .35rem; align-items: center; margin-top: .2rem; }
@media (max-width: 640px) {
  .store-top .inner { gap: .6rem; }
  .store-brand { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .icon-btn .lbl { display: none; }
  .icon-btn { padding: .5rem .55rem; }
  body { overflow-x: hidden; }
}
.hidden { display: none !important; }
.dropzone { display: block; position: relative; border: 2px dashed #CBD5E1; border-radius: 14px; aspect-ratio: 4/5; overflow: hidden; cursor: pointer; background: var(--subtle); transition: border-color .2s ease, background-color .2s ease; }
.dropzone:hover { border-color: var(--accent); background: #fff; }
.dropzone img { width: 100%; height: 100%; object-fit: cover; }
.dz-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; text-align: center; padding: 1rem; }
.dz-empty [data-lucide] { width: 34px; height: 34px; color: var(--accent); }
.dz-change { position: absolute; bottom: .8rem; left: 50%; transform: translateX(-50%); background: rgba(15,23,42,.8); color: #fff; padding: .4rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; backdrop-filter: blur(8px); }
