:root {
    --cn-primary: #1677c8;
    --cn-primary-dark: #125a96;
    --cn-primary-hover: #0668b5;
    --cn-action: #0879d1;
    --cn-soft-blue: #e8f3fc;
    --cn-active: #dceeff;
    --cn-page: #f4f8fc;
    --cn-page-alt: #edf5fb;
    --cn-surface: #fff;
    --cn-text: #173b5e;
    --cn-muted: #60778e;
    --cn-border: #d4e4f1;
    --cn-success: #19ad63;
    --cn-danger: #e45454;
    --cn-price: #0874c9;
    --cn-shadow: 0 8px 24px rgba(20, 73, 116, .08);
    --cn-radius: 12px;
    --cn-font: Inter, "Segoe UI", Arial, sans-serif;
}

html { color-scheme: light; }
body {
    background: var(--cn-page);
    color: var(--cn-text);
    font-family: var(--cn-font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, button, input, select, textarea {
    font-family: var(--cn-font);
}
h1 { font-size: clamp(26px, 2.15vw, 32px); line-height: 1.18; letter-spacing: -.025em; }
h2 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.25; letter-spacing: -.015em; }
h3 { font-size: 18px; line-height: 1.3; }
p { color: var(--cn-muted); }
a { color: var(--cn-primary-dark); }

.commerce-header {
    background: var(--cn-primary-dark);
    box-shadow: 0 4px 18px rgba(24, 63, 98, .12);
}
.header-main {
    min-height: 72px;
    max-width: 1440px;
    margin: 0 auto;
    gap: 16px;
    padding: 10px 24px;
}
.commerce-brand {
    background: transparent;
    border-radius: 10px;
    padding: 4px 8px;
}
.commerce-brand img {
    width: auto;
    max-width: 190px;
    max-height: 48px;
    object-fit: contain;
}
.commerce-search {
    height: 44px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(16,65,103,.12);
}
.commerce-search input {
    height: 44px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 14px;
}
.commerce-search button {
    min-width: 48px;
    height: 44px;
    color: var(--cn-primary-dark);
    background: #fff;
    border: 0;
    border-left: 1px solid var(--cn-border);
    border-radius: 0;
    box-shadow: none;
}
.commerce-search button:hover {
    color: #fff;
    background: var(--cn-action);
}
.header-actions a {
    min-height: 42px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}
.header-actions .whatsapp-action { background: var(--cn-success); }
.category-strip {
    min-height: 44px;
    background: var(--cn-soft-blue);
    border-bottom: 1px solid var(--cn-border);
}
.category-strip a {
    position: relative;
    color: var(--cn-text);
    font-size: 12px;
    font-weight: 700;
    padding: 13px 14px;
    border-right: 0;
}
.category-strip a:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 20px;
    background: #9fc8e5;
    transform: translateY(-50%);
}
.category-strip a:hover {
    color: var(--cn-primary);
    background: rgba(255,255,255,.72);
}

.page-shell, .commerce-shell {
    width: min(100%, 1440px);
    margin-inline: auto;
}

:where(.card, .panel, .commerce-card, .catalog-card, .product-card,
       .customer-card, .login-card, .content-card, .managed-card) {
    background: var(--cn-surface);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    box-shadow: var(--cn-shadow);
}

:where(button, .button, .btn, [class*="btn-"], input[type="submit"]) {
    min-height: 42px;
    border-radius: 9px;
    font-weight: 700;
    transition: background-color .18s ease, border-color .18s ease,
                color .18s ease, transform .18s ease, box-shadow .18s ease;
}
:where(button, .button, .btn, [class*="btn-"], input[type="submit"]):focus-visible,
:where(a, input, select, textarea):focus-visible {
    outline: 3px solid rgba(22,119,200,.22);
    outline-offset: 2px;
}
:where(.btn-primary, .button-primary, button[type="submit"]) {
    background: var(--cn-action);
    border-color: var(--cn-action);
}
:where(.btn-primary, .button-primary, button[type="submit"]):hover {
    background: var(--cn-primary-hover);
    border-color: var(--cn-primary-hover);
}

input:not([type="checkbox"]):not([type="radio"]),
select, textarea {
    min-height: 42px;
    color: var(--cn-text);
    background: rgba(255,255,255,.92);
    border: 1px solid var(--cn-border);
    border-radius: 9px;
    font-size: 14px;
}
input::placeholder, textarea::placeholder { color: #8aa0b4; }

table {
    border-color: var(--cn-border);
    font-size: 13px;
}
thead th {
    color: var(--cn-text);
    background: var(--cn-page-alt);
    border-color: var(--cn-border);
    font-size: 11px;
    letter-spacing: .035em;
    text-transform: uppercase;
}
tbody td { border-color: var(--cn-border); }

.price, [class*="price"], [class*="precio"] { color: var(--cn-price); }
.badge-success, .status-success, .available { color: #08743f; background: #e5f8ee; }
.badge-danger, .status-danger { color: #a92e2e; background: #fdeaea; }

.managed-footer {
    margin-top: 48px;
    color: #eaf5fc;
    background: var(--cn-primary-dark);
    border-top: 4px solid var(--cn-primary);
}
.managed-footer-main {
    max-width: 1440px;
    margin: auto;
    padding: 40px 28px 32px;
    gap: 32px;
}
.managed-footer h2 { color: #fff; font-size: 15px; }
.managed-footer p, .managed-footer address { color: #d5e8f6; font-size: 13px; }
.managed-footer a { color: #eef8ff; font-size: 13px; }
.managed-footer a:hover { color: #fff; text-decoration: underline; }
.managed-footer-bottom {
    background: rgba(8,52,88,.32);
    border-color: rgba(255,255,255,.12);
    color: #cfe4f3;
}

@media (max-width: 900px) {
    .header-main { padding: 8px 12px; }
    .commerce-brand img { max-width: 150px; max-height: 40px; }
    .header-actions a { min-height: 38px; }
    .category-strip { overflow-x: auto; justify-content: flex-start; }
    .category-strip a { white-space: nowrap; }
    .managed-footer-main { padding: 32px 18px; }
}
