:root {
    --primary: #0067b1;
    --secondary: #00a676;
    --ink: #172033;
    --muted: #667085;
    --line: #dbe4ec;
    --surface: #f5f8fb;
    --white: #fff;
    --danger: #b42318;
    --success: #047857;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--white);
    font-weight: 400;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 3.7rem; line-height: 1.05; letter-spacing: 0; font-weight: 560; }
h2 { font-size: 1.52rem; line-height: 1.18; font-weight: 560; }
h3 { font-size: 1.03rem; font-weight: 560; }
p { color: var(--muted); line-height: 1.68; font-weight: 400; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid rgba(219, 228, 236, .9);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.brand small { display: block; color: var(--muted); font-size: .76rem; font-weight: 500; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 680;
}
.brand-logo { width: auto; max-width: 132px; height: 38px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: #344054; font-weight: 520; font-size: .94rem; }
.btn {
    border: 1px solid transparent;
    background: transparent;
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 580;
    min-height: 42px;
    padding: 10px 16px;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.18); width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.flash {
    max-width: 1180px;
    margin: 14px auto 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
}
.flash-success { border-color: #a7f3d0; color: var(--success); background: #ecfdf5; }
.flash-error { border-color: #fecaca; color: var(--danger); background: #fff1f2; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 34px;
    padding: clamp(40px, 7vw, 92px) clamp(18px, 4vw, 56px) 48px;
    min-height: 74vh;
    align-items: center;
    background: linear-gradient(180deg, #fff 0%, #f8fbfd 100%);
}
.hero-copy { max-width: 850px; }
.eyebrow, .pill {
    color: var(--secondary);
    font-size: .8rem;
    font-weight: 650;
    letter-spacing: 0;
    text-transform: uppercase;
}
.hero p { font-size: 1.18rem; max-width: 720px; }
.hero-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 26px;
    box-shadow: 0 18px 42px rgba(23, 32, 51, .055);
}
.hero-panel strong { font-size: 1.18rem; font-weight: 560; display: block; margin-bottom: 10px; }
.hero-media {
    min-height: 360px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #eef4f8;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.section { padding: 42px clamp(18px, 4vw, 56px); max-width: 1280px; margin: 0 auto; }
.section.muted { background: var(--surface); max-width: none; }
.section.muted > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 20px; }
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.category-grid, .social-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.category-card, .social-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 16px;
    display: grid;
    gap: 8px;
    min-height: 96px;
}
.category-card span, .social-card span { color: var(--muted); font-size: .84rem; }
.social-card { grid-template-rows: 150px auto; padding: 0; overflow: hidden; }
.social-card img { width: 100%; height: 150px; object-fit: cover; background: #eef4f8; }
.social-card strong { padding: 0 14px 14px; line-height: 1.35; }
.card, .panel, .form-card {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    padding: 22px;
}
.card p { margin-bottom: 0; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card {
    display: grid;
    grid-template-rows: 210px 1fr;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.product-card img { width: 100%; height: 210px; object-fit: cover; background: #eef4f8; }
.product-card > div { padding: 18px; display: grid; gap: 10px; align-content: start; }
.product-card span { color: var(--muted); font-size: .82rem; font-weight: 520; }
.product-card h2, .product-card h3 { margin: 0; line-height: 1.25; }
.locked-price, .locked-box {
    border: 1px dashed #9fb3c8;
    border-radius: 8px;
    background: #f8fbfd;
    color: #344054;
    font-weight: 540;
    padding: 12px;
}
.locked-action {
    display: flex;
    justify-content: center;
    text-align: center;
    color: var(--ink);
    font-weight: 680;
}
.locked-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.locked-box p { flex-basis: 100%; margin: 0; }
.page-hero {
    padding: clamp(36px, 6vw, 70px) clamp(18px, 4vw, 56px);
    background: var(--surface);
}
.image-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #172033;
}
.image-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15,23,42,.84), rgba(15,23,42,.36)), var(--hero-image) center/cover;
}
.image-hero > * { position: relative; }
.image-hero p { color: rgba(255,255,255,.86); }
.page-hero.compact h1 { max-width: 860px; }
.page-hero.compact p { max-width: 760px; }
.search { display: flex; gap: 10px; width: 100%; max-width: 780px; margin: 18px 0; }
input, textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 13px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}
label { display: grid; gap: 7px; color: #344054; font-weight: 540; }
.form-section { max-width: 860px; }
.form-card { display: grid; gap: 16px; }
.form-card h2 { font-size: 1.12rem; margin: 10px 0 0; }
.form-card.wide { max-width: 980px; }
.compact-form { margin-top: 18px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check-row { display: flex; gap: 18px; flex-wrap: wrap; }
.check-row label, label:has(input[type="checkbox"]) { display: flex; grid-template-columns: none; align-items: center; gap: 9px; font-weight: 520; }
.check-row input, label input[type="checkbox"] { width: auto; }
.table-wrap { width: 100%; overflow-x: auto; }
.admin-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mini-editor { border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 12px; background: #fff; }
.catalog-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.catalog-sidebar {
    position: sticky;
    top: 82px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 6px;
}
.catalog-sidebar strong { margin-bottom: 6px; }
.catalog-sidebar a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    color: #344054;
    font-weight: 520;
}
.catalog-sidebar a.active, .catalog-sidebar a:hover { background: var(--surface); color: var(--primary); }
.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    gap: 36px;
    padding: clamp(34px, 6vw, 74px) clamp(18px, 4vw, 56px);
    align-items: center;
}
.product-media { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #eef4f8; }
.product-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.prose { max-width: 860px; line-height: 1.75; }
.footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 34px clamp(18px, 4vw, 56px);
    border-top: 1px solid var(--line);
    background: #0f172a;
    color: #fff;
}
.footer p, .footer a { color: #cbd5e1; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }

.login-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 36px;
    align-items: center;
    padding: clamp(40px, 7vw, 90px) clamp(18px, 4vw, 56px);
    background: var(--surface);
}
.login-copy { max-width: 720px; }
.login-copy h1 { max-width: 720px; }
.inline-auth { width: 100%; box-shadow: none; }
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--surface);
}
.auth-card {
    width: min(100%, 430px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    display: grid;
    gap: 16px;
    box-shadow: 0 18px 42px rgba(23, 32, 51, .055);
}
.auth-card form { display: grid; gap: 14px; }

.admin-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); background: var(--surface); min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: #111827;
    color: #fff;
    padding: 18px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
}
.admin-brand { color: #fff; }
.sidebar nav { display: grid; gap: 5px; align-content: start; }
.sidebar nav a {
    color: #d1d5db;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 520;
}
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { min-width: 0; padding: 24px; }
.admin-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 20px;
}
.admin-top span, .table small { display: block; color: var(--muted); font-size: .82rem; }
.admin-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.admin-page-head h1 { font-size: 1.85rem; line-height: 1.12; margin-bottom: 6px; font-weight: 560; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #fff; }
.stat span { color: var(--muted); font-weight: 540; }
.stat strong { display: block; margin-top: 6px; font-size: 1.65rem; font-weight: 560; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
.table th { color: #475467; font-size: .78rem; text-transform: uppercase; letter-spacing: 0; font-weight: 560; }

.portal-shell { background: var(--surface); min-height: 100vh; }
.portal-main { padding: 24px clamp(14px, 3vw, 42px); }
.portal-product-list { display: grid; gap: 12px; }
.portal-product {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) minmax(190px, .35fr);
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}
.portal-product img { width: 92px; height: 74px; object-fit: cover; border-radius: 8px; background: #eef4f8; }
.portal-product h2 { font-size: 1rem; margin-bottom: 4px; }
.portal-buy { display: grid; gap: 10px; justify-items: end; }
.portal-buy form { display: flex; gap: 8px; }
.portal-buy input { width: 74px; }

.whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    min-height: 48px;
    padding: 13px 18px;
    border-radius: 999px;
    background: #15b86a;
    color: #fff;
    font-weight: 680;
    box-shadow: 0 14px 30px rgba(21, 184, 106, .28);
}

@media (max-width: 900px) {
    h1 { font-size: 2.85rem; line-height: 1.08; }
    .topbar { position: static; align-items: flex-start; flex-wrap: wrap; }
    .nav { order: 3; width: 100%; gap: 12px; }
    .hero, .product-detail, .admin-shell { grid-template-columns: 1fr; }
    .hero { min-height: auto; }
    .grid.three, .product-grid, .stats-grid, .category-grid, .social-grid, .catalog-layout, .login-section, .admin-edit-grid { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; }
    .sidebar { position: static; height: auto; }
    .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-main { padding: 16px; }
    .portal-product { grid-template-columns: 74px minmax(0, 1fr); }
    .portal-buy { grid-column: 1 / -1; justify-items: stretch; }
    .portal-buy form { width: 100%; }
    .portal-buy .btn { flex: 1; }
    .split, .footer { grid-template-columns: 1fr; flex-direction: column; }
}

@media (max-width: 560px) {
    h1 { font-size: 2.3rem; line-height: 1.08; }
    .search { flex-direction: column; }
    .section-head, .admin-page-head { align-items: flex-start; flex-direction: column; }
    .product-card { grid-template-rows: 180px 1fr; }
    .product-card img { height: 180px; }
    .sidebar nav { grid-template-columns: 1fr; }
    .social-card { grid-template-rows: 180px auto; }
    .social-card img { height: 180px; }
}
