/* ==========================================================================
   BOGARTMX — Stitch Design System Layer
   Proyecto Stitch: 15159927985313204770
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@700;800;900&display=swap');

:root {
    --stitch-headline: 'Public Sans', 'Outfit', sans-serif;
    --stitch-glow-red: 0 0 20px rgba(229, 9, 20, 0.15);
    --stitch-glow-red-strong: 0 0 20px rgba(229, 9, 20, 0.4);
}

/* --- Pulse CTA (Stitch suggestion) --- */
@keyframes stitch-pulse-red {
    0%, 100% {
        box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
    }
    50% {
        box-shadow: 0 0 28px rgba(229, 9, 20, 0.75), 0 0 48px rgba(229, 9, 20, 0.25);
    }
}

.btn-pulse-cta {
    animation: stitch-pulse-red 2.2s ease-in-out infinite;
}

.btn-pulse-cta:hover {
    animation: none;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.65);
}

/* --- Navigation (Stitch TopNavBar) --- */
body.stitch-ui header {
    background: rgba(5, 5, 5, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--stitch-glow-red);
}

body.stitch-ui nav ul li a.active {
    color: var(--accent-red);
    font-weight: 700;
}

body.stitch-ui nav ul li a.active::after {
    width: 100%;
    height: 2px;
}

body.stitch-ui .btn-primary {
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}

body.stitch-ui .btn-primary:hover {
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.55);
}

/* --- Hero --- */
body.stitch-ui .hero-section::after {
    content: '';
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: min(600px, 80vw);
    height: min(600px, 80vw);
    background: radial-gradient(circle, rgba(229, 9, 20, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 2;
    pointer-events: none;
}

body.stitch-ui .hero-title .text-red {
    text-shadow: 0 0 12px rgba(229, 9, 20, 0.45);
}

body.stitch-ui .hero-stat-card {
    border-top: 2px solid rgba(229, 9, 20, 0.35);
    box-shadow: var(--stitch-glow-red);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.stitch-ui .hero-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--stitch-glow-red-strong);
}

body.stitch-ui .hero-stat-num {
    font-family: var(--stitch-headline);
    letter-spacing: -0.02em;
}

body.stitch-ui .section-title {
    font-family: var(--stitch-headline);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* --- Feature cards --- */
body.stitch-ui #features .hero-stat-card {
    position: relative;
    overflow: hidden;
}

body.stitch-ui #features .hero-stat-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    transition: opacity 0.3s ease;
}

body.stitch-ui #features .hero-stat-card:hover {
    border-color: rgba(229, 9, 20, 0.35);
}

body.stitch-ui #features .hero-stat-card:hover::before {
    opacity: 1.5;
}

/* --- Product cards (Tienda + Landing) --- */
body.stitch-ui .product-card {
    background: rgba(22, 22, 22, 0.85);
    backdrop-filter: blur(8px);
}

body.stitch-ui .product-card:hover {
    border-color: rgba(229, 9, 20, 0.35);
}

body.stitch-ui .product-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

body.stitch-ui .product-card:hover .product-img-wrapper::after {
    opacity: 1;
}

body.stitch-ui .product-title {
    font-family: var(--stitch-headline);
}

/* --- Filter chips (Stitch style) --- */
body.stitch-ui .category-tabs .tab-btn {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
}

body.stitch-ui .category-tabs .tab-btn.active {
    background: rgba(229, 9, 20, 0.15);
    border-color: rgba(229, 9, 20, 0.45);
    box-shadow: var(--stitch-glow-red);
}

/* --- Sticky B2B bar (Tienda) --- */
.stitch-b2b-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stitch-b2b-bar p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.stitch-b2b-bar strong {
    color: var(--text-white);
}

body.stitch-ui.shop-has-bar {
    padding-bottom: 80px;
}

/* --- MLM tiers (Stitch) --- */
body.stitch-ui .vip-bullet-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 4px solid var(--accent-red);
    border-radius: var(--border-radius-md);
    padding: 20px 24px;
    transition: transform 0.25s ease;
}

body.stitch-ui .vip-bullet-item:nth-child(2) {
    margin-left: 16px;
    border-left-color: rgba(255, 255, 255, 0.5);
}

body.stitch-ui .vip-bullet-item:nth-child(3) {
    margin-left: 32px;
    border-left-color: rgba(255, 255, 255, 0.2);
}

body.stitch-ui .vip-bullet-item:hover {
    transform: translateX(6px);
}

body.stitch-ui .vip-bullet-icon {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    font-family: var(--stitch-headline);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--accent-red);
    min-width: 48px;
}

body.stitch-ui .vip-title-hero {
    font-family: var(--stitch-headline);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* --- Cotizador wizard (Stitch) --- */
body.stitch-ui .wizard-steps-indicator {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    box-shadow: var(--stitch-glow-red);
}

body.stitch-ui .wizard-step-node.active .wizard-step-circle {
    box-shadow: 0 0 16px rgba(229, 9, 20, 0.55);
}

body.stitch-ui .wizard-card {
    border-color: rgba(229, 9, 20, 0.1);
}

body.stitch-ui .color-swatch.selected,
body.stitch-ui .garment-card.selected {
    outline: 2px solid var(--accent-red);
    box-shadow: var(--stitch-glow-red-strong);
}

body.stitch-ui .tech-touch-card.selected,
body.stitch-ui .position-touch-card.selected {
    border-color: var(--accent-red);
    box-shadow: var(--stitch-glow-red);
}

body.stitch-ui .uniform-preview-panel,
body.stitch-ui .quote-summary-panel {
    border-color: rgba(229, 9, 20, 0.12);
    box-shadow: var(--stitch-glow-red);
}

body.stitch-ui .garment-card.selected {
    border-color: var(--accent-red);
    box-shadow: var(--stitch-glow-red-strong);
}

body.stitch-ui .quote-total-value {
    color: var(--accent-red);
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.35);
    font-family: var(--stitch-headline);
}

/* --- Stitch preview link (dev) --- */
.stitch-preview-banner {
    background: linear-gradient(90deg, rgba(229, 9, 20, 0.12), rgba(229, 9, 20, 0.04));
    border-bottom: 1px solid rgba(229, 9, 20, 0.2);
    padding: 8px 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stitch-preview-banner a {
    color: var(--accent-red);
    font-weight: 600;
}

/* --- Testimonials (Stitch) --- */
.stitch-testimonials {
    padding: 80px 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.stitch-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.stitch-testimonial-card {
    padding: 28px;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.stitch-testimonial-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 9, 20, 0.3);
    box-shadow: var(--stitch-glow-red-strong);
}

.stitch-testimonial-stars {
    color: var(--accent-red);
    margin-bottom: 14px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.stitch-testimonial-quote {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 20px;
    font-style: italic;
}

.stitch-testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stitch-testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), #9e060d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--stitch-headline);
    font-weight: 800;
    font-size: 0.85rem;
}

.stitch-testimonial-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.stitch-testimonial-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Admin CRM + Portal (Stitch) --- */
body.stitch-ui.dashboard-layout .dashboard-sidebar {
    background: rgba(5, 5, 5, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--stitch-glow-red);
}

body.stitch-ui.dashboard-layout .sidebar-nav-item.active a {
    background: rgba(229, 9, 20, 0.12);
    border-left: 3px solid var(--accent-red);
    color: var(--text-white);
}

body.stitch-ui.dashboard-layout .sidebar-user-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

body.stitch-ui.crm-layout .crm-kpi {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.stitch-ui.crm-layout .crm-kpi:hover {
    transform: translateY(-3px);
    box-shadow: var(--stitch-glow-red);
}

body.stitch-ui.crm-layout .crm-kpi strong {
    font-family: var(--stitch-headline);
}

body.stitch-ui.crm-layout .crm-column {
    background: rgba(13, 13, 13, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
}

body.stitch-ui.crm-layout .crm-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.stitch-ui.crm-layout .crm-card:hover {
    border-color: rgba(229, 9, 20, 0.35);
    box-shadow: var(--stitch-glow-red);
    transform: translateY(-2px);
}

body.stitch-ui .dashboard-stat-card,
body.stitch-ui .portal-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 2px solid rgba(229, 9, 20, 0.4);
    box-shadow: var(--stitch-glow-red);
}

body.stitch-ui.login-panel-wrapper .login-card,
body.stitch-ui .admin-login-card {
    border-color: rgba(229, 9, 20, 0.15);
    box-shadow: var(--shadow-premium), var(--stitch-glow-red);
}

body.stitch-ui.login-panel-wrapper,
body.stitch-ui .admin-login-page {
    position: relative;
    overflow: hidden;
}

body.stitch-ui.login-panel-wrapper::before,
body.stitch-ui .admin-login-page::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.14) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

body.stitch-ui.login-panel-wrapper .login-card,
body.stitch-ui .admin-login-card {
    position: relative;
    z-index: 1;
}

body.stitch-ui .admin-login-header h1 {
    font-family: var(--stitch-headline);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

body.stitch-ui .affiliate-link-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(229, 9, 20, 0.35);
    border-radius: var(--border-radius-sm);
    padding: 16px;
}

/* --- Product card dynamic hover (Stitch) --- */
body.stitch-ui .product-card .product-actions {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

body.stitch-ui .product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mobile refinements (Stitch MOBILE screens) --- */
@media (max-width: 768px) {
    body.stitch-ui .hero-section .container {
        text-align: center;
    }

    body.stitch-ui .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    body.stitch-ui .hero-buttons .btn {
        width: 100%;
    }

    body.stitch-ui .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    body.stitch-ui .stitch-testimonials-grid {
        grid-template-columns: 1fr;
    }

    body.stitch-ui .vip-bullet-item:nth-child(2),
    body.stitch-ui .vip-bullet-item:nth-child(3) {
        margin-left: 0;
    }

    body.stitch-ui.shop-has-bar {
        padding-bottom: 100px;
    }

    body.stitch-ui .stitch-b2b-bar {
        flex-direction: column;
        text-align: center;
        padding: 12px 16px;
    }

    body.stitch-ui.crm-layout .crm-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }

    body.stitch-ui.crm-layout .crm-pipeline {
        grid-template-columns: 1fr;
    }
}

/* --- Navigation Drawer (Stitch) --- */
.stitch-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stitch-nav-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.stitch-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 82vw);
    height: 100vh;
    background: rgba(13, 13, 13, 0.97);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5), var(--stitch-glow-red);
    z-index: 1101;
    transform: translateX(-105%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
}

.stitch-nav-drawer.open {
    transform: translateX(0);
}

body.nav-drawer-open {
    overflow: hidden;
}

.stitch-nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stitch-nav-drawer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stitch-nav-drawer-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    object-fit: contain;
}

.stitch-nav-drawer-title {
    font-family: var(--stitch-headline);
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

.stitch-nav-drawer-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.stitch-nav-drawer-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-quick);
}

.stitch-nav-drawer-close:hover {
    background: rgba(229, 9, 20, 0.2);
    border-color: rgba(229, 9, 20, 0.4);
}

.stitch-nav-drawer-links {
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 4px;
    flex-grow: 1;
}

.stitch-nav-drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-quick);
}

.stitch-nav-drawer-link i {
    width: 20px;
    text-align: center;
    color: var(--accent-red);
    opacity: 0.8;
}

.stitch-nav-drawer-link:hover,
.stitch-nav-drawer-link.active {
    background: rgba(229, 9, 20, 0.12);
    color: var(--text-white);
    border-left: 3px solid var(--accent-red);
    padding-left: 13px;
}

.stitch-nav-drawer-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stitch-nav-drawer-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #25d366;
    font-weight: 600;
    font-size: 0.9rem;
}

.stitch-nav-drawer-email {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Hide legacy slide nav when drawer is active on mobile */
@media (max-width: 992px) {
    body.stitch-ui nav#nav-menu {
        display: none;
    }

    body.stitch-ui .category-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    body.stitch-ui .category-tabs::-webkit-scrollbar {
        display: none;
    }

    body.stitch-ui .category-tabs .tab-btn {
        flex-shrink: 0;
    }

    body.stitch-ui .cotizador-layout {
        grid-template-columns: 1fr !important;
    }

    body.stitch-ui .uniform-preview-panel {
        position: relative;
        top: auto;
        margin-top: 20px;
    }

    body.stitch-ui .wizard-navigation-buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 12px 16px;
        z-index: 800;
        margin: 0 !important;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
        display: flex;
        gap: 12px;
    }

    body.stitch-ui .wizard-navigation-buttons .btn {
        flex: 1;
    }

    body.stitch-ui .cotizador-page {
        padding-bottom: 90px;
    }

    body.stitch-ui .wizard-steps-indicator {
        padding: 12px 8px;
    }

    body.stitch-ui .wizard-step-title {
        font-size: 0.55rem;
    }

    body.stitch-ui .wizard-step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Dashboard mobile drawer (Admin + Portal) */
    body.stitch-ui .dashboard-mobile-bar {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
        background: rgba(5, 5, 5, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: var(--stitch-glow-red);
        position: sticky;
        top: 0;
        z-index: 900;
    }

    body.stitch-ui .dashboard-sidebar-toggle {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-white);
        width: 42px;
        height: 42px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    body.stitch-ui .dashboard-mobile-brand {
        font-family: var(--stitch-headline);
        font-weight: 900;
        font-size: 1rem;
        letter-spacing: 0.04em;
        display: block;
    }

    body.stitch-ui .dashboard-mobile-sub {
        font-size: 0.7rem;
        color: var(--accent-red);
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    body.stitch-ui.dashboard-drawer-open {
        overflow: hidden;
    }

    body.stitch-ui .dashboard-sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 950;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    body.stitch-ui .dashboard-sidebar-backdrop.open {
        opacity: 1;
        visibility: visible;
    }

    body.stitch-ui.dashboard-layout .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(300px, 85vw);
        height: 100vh;
        z-index: 960;
        transform: translateX(-105%);
        transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
        overflow-y: auto;
        flex-direction: column;
        padding: 24px 20px;
    }

    body.stitch-ui.dashboard-layout.sidebar-open .dashboard-sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5), var(--stitch-glow-red);
    }

    body.stitch-ui.dashboard-layout .sidebar-nav {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    body.stitch-ui.dashboard-layout .sidebar-nav-item a {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    body.stitch-ui.dashboard-layout .dashboard-main {
        padding-top: 16px;
    }

    body.stitch-ui.crm-layout .crm-pipeline {
        display: flex;
        overflow-x: auto;
        gap: 14px;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    body.stitch-ui.crm-layout .crm-column {
        flex: 0 0 min(280px, 85vw);
        scroll-snap-align: start;
    }
}

@media (min-width: 993px) {
    body.stitch-ui .dashboard-mobile-bar,
    body.stitch-ui .dashboard-sidebar-backdrop {
        display: none;
    }
}