@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700;800;900&display=swap');

:root {
    color-scheme: light;
    --ink: #202b35;
    --muted: #6c7883;
    --brand: #b83222;
    --brand-dark: #922719;
    --paper: #f6f7f8;
    --line: #e1e5e8;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 system-ui, sans-serif; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 0.85rem max(5vw, calc((100vw - 1120px) / 2)); background: #17212b; color: white; }
.site-header nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 0.85rem; margin-left: auto; }
.site-header a, .site-header .link-button { color: white; }
.nav-management-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 650; color: #ffffff !important; padding: .32rem .75rem; border-radius: 8px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); transition: background .15s ease; text-decoration: none !important; white-space: nowrap; flex-shrink: 0; }
.nav-management-link:hover { background: rgba(255, 255, 255, 0.22); color: #ffffff !important; text-decoration: none !important; }
.nav-chat-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: #cbd5e1 !important; padding: .32rem .65rem; border-radius: 8px; transition: color .15s ease, background .15s ease; text-decoration: none !important; white-space: nowrap; flex-shrink: 0; }
.nav-chat-link:hover { color: #ffffff !important; background: rgba(255, 255, 255, 0.1); text-decoration: none !important; }
.nav-store-preview-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: #cbd5e1 !important; padding: .32rem .7rem; border-radius: 8px; transition: color .15s ease, background .15s ease; text-decoration: none !important; white-space: nowrap; flex-shrink: 0; }
.nav-store-preview-link:hover { color: #ffffff !important; background: rgba(255, 255, 255, 0.1); text-decoration: none !important; }
.user-dropdown { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }
.user-dropdown-trigger { background: transparent; border: none; padding: 0; cursor: pointer; font: inherit; color: inherit; display: inline-flex; align-items: center; }
.nav-user-greeting { display: inline-flex; align-items: center; gap: .45rem; padding: .32rem .8rem; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 99px; font-size: .88rem; font-weight: 650; color: #ffffff; white-space: nowrap; transition: background .15s ease, border-color .15s ease; }
.nav-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255, 255, 255, 0.85); flex-shrink: 0; }
.user-dropdown:hover .nav-user-greeting, .user-dropdown.is-open .nav-user-greeting { background: rgba(255, 255, 255, 0.22); border-color: rgba(255, 255, 255, 0.4); }
.dropdown-arrow { transition: transform .2s ease; opacity: .85; }
.user-dropdown:hover .dropdown-arrow, .user-dropdown.is-open .dropdown-arrow { transform: rotate(180deg); }
.user-dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #ffffff; color: #1e293b; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.22), 0 6px 12px -2px rgba(0, 0, 0, 0.08); padding: 6px; z-index: 1000; animation: dropdownFade .15s ease-out; }
@keyframes dropdownFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.user-dropdown:hover .user-dropdown-menu, .user-dropdown:focus-within .user-dropdown-menu, .user-dropdown.is-open .user-dropdown-menu { display: block; }
.user-dropdown-header { padding: 8px 12px 6px; display: flex; flex-direction: column; gap: 2px; }
.user-dropdown-name { font-size: .92rem; font-weight: 700; color: #0f172a; }
.user-dropdown-role { font-size: .75rem; color: #64748b; font-weight: 500; }
.user-dropdown-divider { height: 1px; background: #e2e8f0; margin: 4px 0; }
.user-dropdown-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: none; background: transparent; color: #334155 !important; font-size: .88rem; font-weight: 600; text-decoration: none; border-radius: 8px; cursor: pointer; text-align: left; box-sizing: border-box; transition: background .15s ease, color .15s ease; }
.user-dropdown-item:hover { background: #f1f5f9; color: #0f172a !important; text-decoration: none; }
.user-dropdown-form { margin: 0; padding: 0; }
.user-dropdown-logout { color: #dc2626 !important; font-weight: 650; }
.user-dropdown-logout:hover { background: #fef2f2 !important; color: #b91c1c !important; }
.brand { font-size: 1.25rem; font-weight: 800; }
.brand-suma { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: white; margin-right: auto; transition: opacity .15s ease, transform .15s ease; }
.brand-suma:hover { text-decoration: none; opacity: .95; transform: translateY(-1px); }
.brand-logo-icon { display: block; flex-shrink: 0; height: 34px; width: auto; }
.brand-name { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; color: #ffffff; line-height: 1; font-family: 'Poppins', 'Outfit', 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; text-transform: lowercase; }
.container { width: min(1120px, 90%); min-height: 76vh; margin: 2rem auto 4rem; }
.hero { padding: 2rem; margin-bottom: 2rem; border-radius: 14px; color: white; background: linear-gradient(120deg, #18232c, #394d5d); }
h1, h2, h3 { line-height: 1.2; }
.eyebrow { color: var(--brand); font-size: .8rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.hero .eyebrow { color: #ffc9bd; }
.hero h1 { margin: .3rem 0; font-size: clamp(2rem, 5vw, 3.2rem); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.product-card, .panel { padding: 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: white; }
.search-form { display: flex; max-width: 620px; align-items: center; gap: .7rem; margin: 1rem 0 1.5rem; }
.order-summary { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; margin-bottom: 1rem; }
.order-summary ul { grid-column: 1 / -1; margin: 0; }
.invoice { max-width: 900px; margin: auto; }
.invoice-heading, .management-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat { font-size: 1.7rem; color: var(--brand-dark); }
.report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.report-filter { display: flex; align-items: end; flex-wrap: wrap; gap: 1rem; margin: 1.2rem 0; }
.report-filter .field { margin: 0; }
.report-filter input { width: auto; }
.management-link { margin: 2rem 0; }
.narrow { max-width: 520px; }
.management-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2rem; align-items: start; }
.management-sidebar { position: sticky; top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: white; }
.management-sidebar nav { display: grid; gap: .35rem; }
.management-sidebar nav a { padding: .7rem .8rem; border-radius: 7px; color: var(--ink); font-weight: 600; }
.management-sidebar nav a:hover, .management-sidebar nav a.selected { background: #fbece9; color: var(--brand-dark); text-decoration: none; }
.management-content { min-width: 0; }
.management-content h1 { margin-top: .25rem; }
.management-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 2rem 0; }
.shortcut-card { display: grid; gap: .4rem; color: var(--ink); transition: transform .15s ease, border-color .15s ease; }
.shortcut-card:hover { transform: translateY(-2px); border-color: var(--brand); text-decoration: none; }
.shortcut-card strong { font-size: 1.05rem; }
.shortcut-card span { color: var(--muted); font-size: .92rem; }
.stock-badge, .status-pill { display: inline-block; padding: .28rem .65rem; border-radius: 99px; background: #edf0f2; color: #47535e; font-size: .83rem; font-weight: 700; white-space: nowrap; }
.stock-badge.good, .status-pill.good, .status-confirmed { background: #e3f5e9; color: #17693a; }
.stock-badge.low, .status-pending, .status-preparing { background: #fff2d7; color: #775515; }
.stock-badge.out, .danger-button { background: #fde9e7; color: #982e24; }
.status-sent { background: #e5f0ff; color: #245b9b; }
.status-cancelled { background: #f1e9e9; color: #7d2e2e; }
.action-cell { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.action-cell form { margin: 0; }
.danger-button:hover { background: #f8d4d0; color: #7c2119; }
.empty-cell { padding: 2rem; color: var(--muted); text-align: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem 1rem; }
.form-grid .full-width { grid-column: 1 / -1; }
.form-grid input[type=checkbox] { width: auto; }
.form-actions { display: flex; gap: .7rem; justify-content: flex-end; margin-top: 1.25rem; }
.form-image-preview { display: block; max-width: 180px; max-height: 140px; object-fit: cover; border-radius: 8px; }
.management-stack { display: grid; gap: 1rem; }
.management-stack h2, .management-order-layout h2 { margin-top: 0; font-size: 1.1rem; }
.order-filters select { min-width: 180px; padding: .65rem; border: 1px solid #cbd2d8; border-radius: 6px; background: white; font: inherit; }
.management-order-layout { grid-template-columns: 1.2fr .8fr; }
.catalog-image, .catalog-art { display: grid; width: 100%; height: 180px; overflow: hidden; border-radius: 8px; }
.catalog-image { object-fit: cover; }
.catalog-art { position: relative; place-items: center; background: linear-gradient(145deg, #f0f3f5, #e3e9ed); }
.catalog-art img { width: 100%; height: 100%; padding: .65rem; object-fit: contain; }
.catalog-art span { position: absolute; right: .5rem; bottom: .45rem; padding: .15rem .4rem; border-radius: 4px; background: rgb(255 255 255 / 82%); color: #63717c; font-size: .65rem; }
.catalog-image.large, .catalog-art.large { height: 360px; }
.product-name-cell { display: flex; align-items: center; gap: .7rem; min-width: 230px; }
.product-name-cell .catalog-image, .product-name-cell .catalog-art { flex: 0 0 58px; width: 58px; height: 48px; }
.product-name-cell .catalog-art { border-radius: 5px; }
.product-name-cell .catalog-art img { padding: .1rem; }
.product-name-cell .catalog-art span { display: none; }
.product-placeholder { display: grid; place-items: center; background: #e9edf0; color: var(--muted); font-weight: 700; }
.product-placeholder.large { height: 340px; }
.product-card h3 { margin-bottom: .4rem; }
.product-card p { margin: .3rem 0; }
.price { color: var(--brand-dark); font-size: 1.35rem; font-weight: 800; }
.muted, small { color: var(--muted); }
.button { display: inline-block; padding: .7rem 1rem; border: 0; border-radius: 7px; background: var(--brand); color: white; cursor: pointer; font: inherit; font-weight: 700; }
.button:hover { background: var(--brand-dark); color: white; text-decoration: none; }
.button.secondary { padding: .45rem .65rem; background: #354553; font-size: .9rem; }
.detail-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.detail-image { width: 100%; max-height: 440px; object-fit: cover; border-radius: 12px; }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .85rem; border-bottom: 1px solid var(--line); text-align: left; }
th { background: #f1f3f4; }
.quantity-form { display: flex; align-items: center; gap: .45rem; }
.add-to-cart-controls { display: flex; align-items: center; gap: .5rem; margin-top: .7rem; }
.add-to-cart-controls input[type=number] { width: 76px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
input, textarea { width: 100%; padding: .65rem; border: 1px solid #cbd2d8; border-radius: 6px; font: inherit; }
input[type=number] { width: 85px; }
.cart-total { margin: 1.2rem 0; font-size: 1.2rem; }
.danger { color: #a11; }
.link-button { padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; }
.inline-form { display: inline; }
.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .35rem; font-weight: 650; }
.field-error { display: block; color: #a11; }
.help-text { display: block; margin-top: .3rem; }
.help-text ul { margin: .3rem 0; padding-left: 1.2rem; }
.form-panel { max-width: 680px; }
.form-panel.narrow { max-width: 520px; margin: auto; }
.confirmation { max-width: 760px; margin: 3rem auto; }
.whatsapp { background: #168c52; }
.notice { padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 7px; background: #e4f4e9; }
.notice.error { background: #fde9e7; color: #8c2018; }
.site-footer {
    padding: 2.2rem max(5vw, calc((100vw - 1120px) / 2));
    background: var(--header-bg, #17212b);
    color: #cbd2d8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.footer-brand-side strong {
    font-size: 1.15rem;
    color: #ffffff;
}
.footer-tagline {
    margin: .25rem 0 .4rem;
    font-size: .92rem;
    color: #94a3b8;
}
.footer-copy {
    color: #64748b;
    font-size: .82rem;
    display: block;
}
.powered-by-suma {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .88rem;
    color: #94a3b8;
}
.suma-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 99px;
    color: #ffffff;
    text-decoration: none;
    transition: all .2s ease;
}
.suma-badge-pill:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    text-decoration: none;
    color: #ffffff;
}
.suma-badge-icon {
    display: block;
    width: 28px;
    height: 17px;
}
.suma-badge-name {
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: -.03em;
    color: #ffffff;
    font-family: 'Poppins', 'Outfit', sans-serif;
    line-height: 1;
}
@media (max-width: 700px) {
    .detail-layout, .checkout-layout, .report-columns, .management-order-layout { grid-template-columns: 1fr; }
    .management-layout { grid-template-columns: 1fr; gap: 1rem; }
    .management-sidebar { position: static; }
    .management-sidebar nav { display: flex; overflow-x: auto; }
    .management-sidebar nav a { white-space: nowrap; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full-width { grid-column: auto; }
    .site-header { align-items: flex-start; flex-direction: column; padding: 1rem 5%; }
    .site-header nav { gap: .75rem; }
    .invoice-heading, .management-heading { align-items: flex-start; flex-direction: column; }
}
@media print {
    .site-header, footer, .print-button, .notice { display: none !important; }
    body, .container { background: white; margin: 0; width: 100%; }
    .invoice { border: 0; }
}

/* Modal de exportación de inventario */
.inventory-dialog {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 680px;
    width: 90%;
    background: white;
    color: var(--ink);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.inventory-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}
.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    padding-bottom: .8rem;
    margin-bottom: 1rem;
}
.dialog-header h3 { margin: 0; font-size: 1.25rem; }
.dialog-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
}
.dialog-close:hover { color: var(--ink); }
.column-group { margin-bottom: 1.1rem; }
.column-group-title {
    font-size: .84rem;
    font-weight: 750;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: .05em;
    margin-bottom: .45rem;
}
.column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .45rem;
}
.column-checkbox-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .9rem;
    cursor: pointer;
    padding: .35rem .5rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}
.column-checkbox-label:hover { background: #edf2f7; }
.column-checkbox-label input[type=checkbox] { width: auto; margin: 0; }
.dialog-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    margin-top: 1.2rem;
}
.quick-select-buttons {
    display: flex;
    gap: .4rem;
}
.quick-select-buttons button {
    background: #edf2f7;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: .25rem .55rem;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}
.quick-select-buttons button:hover { background: #e2e8f0; }

@media (max-width: 680px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: .85rem;
    }
    .brand-suma {
        margin-right: 0;
    }
    .brand-logo-icon {
        height: 28px;
    }
    .brand-name {
        font-size: 1.5rem;
    }
}

/* Custom logo */
.brand-custom-logo {
    display: block;
    max-height: 38px;
    max-width: 140px;
    object-fit: contain;
}

/* Button variants */
.button-primary { background: var(--brand); color: white; }
.button-primary:hover { background: var(--brand-dark); }
.button-outline { background: transparent; border: 1.5px solid var(--brand); color: var(--brand-dark); }
.button-outline:hover { background: var(--brand); color: white; text-decoration: none; }
.button-whatsapp { background: #25D366; color: white; }
.button-whatsapp:hover { background: #128C7E; color: white; text-decoration: none; }
.button-lg { padding: .85rem 1.4rem; font-size: 1.02rem; border-radius: 9px; }

/* Home Hero Section */
.home-hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 2.5rem;
    align-items: center;
    padding: 3.5rem max(3vw, 2rem);
    margin-bottom: 2.5rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--header-bg, #17212b) 0%, #1e293b 100%);
    color: white;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}
.home-pill {
    display: inline-block;
    padding: .35rem .85rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: .85rem;
    font-weight: 650;
    color: #e2e8f0;
    letter-spacing: .02em;
    margin-bottom: .9rem;
}
.home-hero-title {
    font-size: clamp(2rem, 4.2vw, 3rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    font-weight: 850;
    color: #ffffff;
}
.home-hero-subtitle {
    font-size: 1.08rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0 0 1.8rem;
    max-width: 580px;
}
.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    align-items: center;
}
.home-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
.home-hero-custom-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
}
.home-hero-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.8rem;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 380px;
}
.home-hero-card-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 1.2rem;
}
.pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
}
.home-hero-card-content {
    display: grid;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 0;
    margin-bottom: 1.2rem;
}
.card-metric strong {
    font-size: 1.5rem;
    color: #ffffff;
    display: block;
}
.card-metric span {
    font-size: .85rem;
    color: #94a3b8;
}
.home-hero-card-footer {
    display: flex;
    flex-direction: column;
}
.home-hero-card-footer span {
    font-weight: 750;
    color: #ffffff;
}
.home-hero-card-footer small {
    color: #94a3b8;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3.5rem;
}
.benefit-card {
    padding: 1.4rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.benefit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}
.benefit-icon {
    font-size: 2rem;
    margin-bottom: .6rem;
}
.benefit-card h3 {
    margin: 0 0 .35rem;
    font-size: 1.08rem;
}
.benefit-card p {
    margin: 0;
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.45;
}

/* Home Section */
.home-section {
    margin-bottom: 3.5rem;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.6rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-header h2 {
    margin: .2rem 0 .3rem;
    font-size: 1.85rem;
}
.home-cta-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.home-cta-banner h3 {
    margin: 0 0 .25rem;
    font-size: 1.25rem;
}
.home-cta-banner p {
    margin: 0;
    color: var(--muted);
}

/* About Section */
.about-section {
    padding: 2.5rem;
    margin-bottom: 3.5rem;
    border-radius: 16px;
}
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 2.5rem;
    align-items: center;
}
.about-text h2 {
    margin: .25rem 0 1rem;
    font-size: 1.85rem;
}
.about-body {
    line-height: 1.7;
    color: #334155;
    font-size: 1.02rem;
}
.about-custom-img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
}
.about-highlight-box {
    display: grid;
    gap: 1.1rem;
    background: #f8fafc;
    border: 1px solid var(--line);
    padding: 1.6rem;
    border-radius: 14px;
}
.highlight-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.highlight-number {
    font-size: 1.4rem;
    font-weight: 850;
    color: var(--brand);
    font-family: 'Poppins', sans-serif;
    line-height: 1;
}
.highlight-item strong {
    display: block;
    font-size: 1rem;
    margin-bottom: .2rem;
}
.highlight-item p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.4;
}

/* Contact Section */
.contact-section {
    margin-bottom: 3.5rem;
}
.contact-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 2.5rem;
}
.contact-header {
    margin-bottom: 1.8rem;
}
.contact-header h2 {
    margin: .25rem 0 .3rem;
    font-size: 1.85rem;
}
.contact-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.3rem;
    margin-bottom: 1.8rem;
}
.contact-item {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: 1.1rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}
.contact-item-full {
    grid-column: 1 / -1;
}
.contact-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.contact-item strong {
    display: block;
    font-size: .92rem;
    color: var(--ink);
    margin-bottom: .2rem;
}
.contact-item p {
    margin: 0;
    font-size: .92rem;
    color: var(--muted);
}
.contact-social-links {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 1.2rem;
    font-size: .92rem;
}
.social-tag {
    display: inline-block;
    padding: .3rem .75rem;
    background: #edf2f7;
    border-radius: 99px;
    font-weight: 650;
    color: var(--ink);
    text-decoration: none;
    font-size: .85rem;
}
.social-tag:hover {
    background: var(--brand);
    color: white;
    text-decoration: none;
}

/* Profile Editor Form in Management */
.profile-editor-form {
    display: grid;
    gap: 1.8rem;
    max-width: 920px;
    margin-bottom: 3rem;
}
.editor-panel {
    padding: 1.6rem 1.8rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: white;
}
.editor-legend {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ink);
    padding: 0 .4rem;
}
.legend-icon {
    font-size: 1.3rem;
}
.theme-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .85rem;
    margin: 1.1rem 0 1.5rem;
}
.theme-preset-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: .85rem;
    cursor: pointer;
    background: #f8fafc;
    transition: all .15s ease;
}
.theme-preset-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.theme-preset-card.selected {
    border-color: var(--brand);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.theme-swatches {
    display: flex;
    gap: .35rem;
    margin-bottom: .6rem;
}
.swatch {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.custom-colors-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin: 1.2rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #edf2f7;
}
.color-picker-box label {
    display: block;
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: .4rem;
}
.color-picker-input {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.color-picker-input input[type=color] {
    width: 44px;
    height: 38px;
    padding: 2px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #cbd5e1;
}
.color-hex-val {
    font-family: monospace;
    font-size: .9rem;
    font-weight: 700;
    color: var(--ink);
}
.theme-live-preview {
    margin-top: 1.2rem;
    padding: 1.1rem;
    background: #f1f5f9;
    border-radius: 10px;
}
.preview-tag {
    display: block;
    font-size: .8rem;
    font-weight: 750;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .6rem;
}
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .85rem 1.1rem;
    border-radius: 8px;
    background: #17212b;
    color: white;
    margin-bottom: .85rem;
    transition: background-color .2s ease;
}
.preview-brand {
    font-weight: 800;
    font-size: 1.1rem;
}
.preview-nav {
    font-size: .85rem;
    opacity: .85;
}
.preview-body {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: .7rem;
    background: white;
    border-radius: 8px;
}
.preview-btn {
    padding: .5rem 1rem;
    border: 0;
    border-radius: 6px;
    background: #10b981;
    color: white;
    font-weight: 700;
    cursor: default;
    transition: background-color .2s ease;
}
.preview-link {
    font-weight: 700;
    color: #1e57a4;
    cursor: default;
    transition: color .2s ease;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}
.benefit-edit-box {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 1rem;
}
.benefit-edit-box strong {
    display: block;
    margin-bottom: .6rem;
    font-size: .92rem;
}
.editor-actions {
    position: sticky;
    bottom: 1rem;
    display: flex;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

@media (max-width: 768px) {
    .home-hero, .about-grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
    }
    .theme-presets-grid {
        grid-template-columns: 1fr 1fr;
    }
    .editor-actions {
        flex-direction: column;
    }
}

/* ==========================================================================
   CURRENCY SWITCHER & BCV RATE WIDGET
   ========================================================================== */
.currency-switch-wrap {
    display: flex;
    align-items: center;
    gap: .55rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: .28rem .55rem;
    border-radius: 999px;
    font-size: .82rem;
    color: #f1f5f9;
    white-space: nowrap;
    flex-shrink: 0;
}
.currency-bcv-label {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    color: #cbd5e1;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding-right: .55rem;
    white-space: nowrap;
}
.currency-bcv-label strong {
    color: #38bdf8;
    font-weight: 700;
}
.currency-buttons {
    display: inline-flex;
    gap: .25rem;
}
.curr-btn {
    display: inline-block;
    padding: .2rem .5rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    color: #e2e8f0;
    text-decoration: none;
    transition: all .15s ease;
}
.curr-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: white;
    text-decoration: none;
}
.curr-btn.active {
    background: var(--brand);
    color: #0f172a;
    font-weight: 800;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Price Dual Display */
.price-dual {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    flex-wrap: wrap;
}
.price-dual .price-primary {
    color: var(--brand-dark);
    font-weight: 800;
}
.price-dual .price-secondary {
    color: #64748b;
    font-weight: 600;
    font-size: .88em;
}

/* ==========================================================================
   BUSINESS MODEL / RUBRO PRESET CARDS (PERFIL WEB)
   ========================================================================== */
.business-rubro-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 700;
}
.bcv-admin-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
}
.rubro-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
    margin: 1.2rem 0;
}
.rubro-card {
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.1rem;
    cursor: pointer;
    transition: all .2s ease;
    text-align: left;
    position: relative;
}
.rubro-card:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
.rubro-card.selected {
    border-color: var(--brand);
    background: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.16);
}
.rubro-icon-bubble {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: .6rem;
}
.rubro-card h4 {
    margin: 0 0 .35rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
}
.rubro-card p {
    margin: 0 0 .8rem;
    font-size: .83rem;
    color: #64748b;
    line-height: 1.35;
}
.rubro-apply-btn {
    display: inline-block;
    width: 100%;
    padding: .45rem;
    font-size: .78rem;
    font-weight: 700;
    text-align: center;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #334155;
    cursor: pointer;
    transition: all .15s ease;
}
.rubro-card:hover .rubro-apply-btn {
    border-color: var(--brand);
    color: var(--brand-dark);
}
.rubro-card.selected .rubro-apply-btn {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
}

/* ==========================================================================
   USER PROFILE PAGE (ADMINISTRADOR / EMPLEADO / CLIENTE)
   ========================================================================== */
.profile-container {
    max-width: 1060px;
    margin: 0 auto 3rem;
}

.profile-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 2.5rem;
    border-radius: 18px;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.25);
    flex-wrap: wrap;
}

.staff-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1e3a8a 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.customer-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #065f46 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.profile-avatar-wrap {
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: white;
    display: block;
}

.profile-avatar-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand, #1e57a4), #38bdf8);
    color: white;
    font-size: 2.3rem;
    font-weight: 850;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    user-select: none;
}

.profile-avatar-placeholder.customer-placeholder {
    background: linear-gradient(135deg, #059669, #34d399);
}

.profile-header-titles {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.profile-role-pill {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 750;
    letter-spacing: .02em;
}

.pill-admin {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.pill-employee {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #bae6fd;
}

.pill-customer {
    background: rgba(52, 211, 153, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.5);
    color: #a7f3d0;
}

.profile-name {
    margin: 0;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 850;
    color: white;
    line-height: 1.15;
}

.profile-subtitle {
    margin: 0;
    font-size: .95rem;
    color: #cbd5e1;
}

.profile-header-actions {
    flex-shrink: 0;
}

/* Staff Layout Grid */
.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.8rem;
    align-items: start;
}

.profile-form-panel {
    background: white;
    border-radius: 14px;
    padding: 2rem;
    border: 1px solid var(--line);
}

.profile-sidebar {
    display: grid;
    gap: 1.5rem;
}

.info-card, .shortcuts-card {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid var(--line);
}

.info-card h3, .shortcuts-card h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 750;
    color: var(--ink);
    border-bottom: 1px solid #edf2f7;
    padding-bottom: .6rem;
}

.meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .85rem;
}

.meta-list li {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .88rem;
}

.meta-label {
    color: #64748b;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.sidebar-links {
    display: grid;
    gap: .45rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .65rem .85rem;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 650;
    transition: all .15s ease;
}

.sidebar-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(3px);
    text-decoration: none;
    color: var(--brand-dark);
}

/* Customer View Layout */
.profile-customer-grid {
    display: grid;
    gap: 2rem;
}

.customer-data-panel {
    background: white;
    border-radius: 14px;
    padding: 1.8rem 2rem;
    border: 1px solid var(--line);
}

.customer-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    margin: 1.2rem 0;
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: .9rem 1.1rem;
}

.data-item.full-width {
    grid-column: 1 / -1;
}

.data-label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: .03em;
}

.data-value {
    font-size: 1rem;
    color: var(--ink);
    word-break: break-word;
}

.customer-data-note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: .75rem 1rem;
    color: #1e40af;
    margin-top: .8rem;
}

/* Customer Purchases Section */
.customer-purchases-panel {
    background: white;
    border-radius: 14px;
    padding: 1.8rem 2rem;
    border: 1px solid var(--line);
}

.purchases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}

.badge-purchases-count {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: .35rem .85rem;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 700;
}

.purchases-list {
    display: grid;
    gap: 1.2rem;
}

.purchase-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.4rem;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: box-shadow .15s ease, border-color .15s ease;
}

.purchase-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.purchase-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.purchase-id-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1.05rem;
    margin-bottom: .25rem;
}

.purchase-pricing {
    text-align: right;
}

.purchase-price-total {
    font-size: 1.25rem;
    font-weight: 850;
    color: var(--brand-dark);
}

.purchase-items-box {
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.purchase-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .5rem;
}

.purchase-items-list li {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .92rem;
}

.item-qty {
    background: #f1f5f9;
    color: #334155;
    font-weight: 750;
    font-size: .8rem;
    padding: .15rem .45rem;
    border-radius: 4px;
}

.item-name {
    font-weight: 600;
    color: var(--ink);
}

.item-sku {
    color: #94a3b8;
    font-size: .8rem;
    margin-left: auto;
}

.purchase-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: .85rem;
    flex-wrap: wrap;
}

.purchase-shipping-info {
    font-size: .85rem;
}

.empty-purchases {
    text-align: center;
    padding: 3.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .8rem;
}

.empty-purchases-icon {
    font-size: 3.5rem;
    line-height: 1;
}

.empty-purchases h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--ink);
}

.empty-purchases p {
    margin: 0 0 .5rem;
    max-width: 440px;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    .profile-header-banner {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-header-left {
        flex-direction: column;
        align-items: flex-start;
    }
}


