/* ==========================================================================
   NEXUS CUSTOM STYLES - TOTAL THEME SYNC
   ========================================================================== */

/* 1. HOMEPAGE CLASSES (NX-) */
.nx-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.nx-hero-video {
    position: absolute;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    opacity: 0.35;
    z-index: 0;
}

.nx-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--nexus-bg) 100%);
    z-index: 1;
}

.nx-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.nx-title-huge {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.nx-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 40px;
}

.nx-media-section {
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 20px;
}

.nx-media-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 991px) {
    .nx-media-grid {
        grid-template-columns: 1fr;
    }
    .nx-practice-panel {
        margin-top: 20px;
    }
}

.nx-glass-panel {
    background: var(--nexus-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--nexus-border);
    border-radius: 24px;
    padding: 30px;
}

[data-theme="light"] .nx-glass-panel {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.05);
}

.nx-glass-panel h2, .nx-glass-panel h3 {
    color: var(--nexus-text) !important;
}

.nx-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--nexus-shadow-3d);
}

.nx-iframe-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.nx-video-large {
    padding-bottom: 56.25%; /* 16:9 */
}

@media (max-width: 768px) {
    .nx-video-large {
        padding-bottom: 75%; /* Slightly taller on mobile for impact */
    }
}

.nx-article-container {
    max-width: 1000px;
    margin: 100px auto;
    padding: 0 20px;
    font-size: 1.15rem;
    line-height: 1.8;
}

.nx-glow-text {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--nexus-text);
    margin-bottom: 30px;
}

[data-theme="dark"] .nx-glow-text {
    text-shadow: 0 0 30px var(--nexus-red-glow);
}

.nx-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.nx-card {
    background: var(--nexus-surface);
    border-radius: 20px;
    border: 1px solid var(--nexus-border);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nx-card-title, .nx-card-price {
    color: var(--nexus-text) !important;
}

.nx-price-label {
    font-size: 0.8rem;
    color: var(--nexus-text-muted);
    font-weight: 400;
    display: block;
}

/* Card Components */
.nx-card-img-wrap {
    height: 240px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.nx-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.nx-card:hover .nx-card-img {
    transform: scale(1.1) rotate(2deg);
}

.nx-card-body {
    padding: 24px;
}

.nx-card-cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--nexus-red);
    letter-spacing: 1px;
}

.nx-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 8px 0 16px;
    height: 3rem;
    overflow: hidden;
}

.nx-card-price {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.nx-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--nexus-border);
}

.nx-tag-ali {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nexus-text-muted);
}

.nx-tag-social {
    color: var(--nexus-text-muted);
    transition: color 0.3s;
}

.nx-tag-social:hover {
    color: var(--nexus-red);
}

.nx-card-btn {
    flex: 1;
    background: var(--nexus-surface);
    border: 1px solid var(--nexus-border);
    color: var(--nexus-text);
    padding: 12px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.nx-card-btn:hover {
    background: var(--nexus-red);
    border-color: var(--nexus-red);
    color: #fff;
    box-shadow: var(--nexus-shadow-3d);
}

.nx-wa-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: #fff;
    border-radius: 12px;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.nx-wa-icon:hover {
    transform: scale(1.1);
    color: #fff;
}

/* 2. LIGHT MODE OVERRIDES */

/* Body Aura Gradient */
[data-theme="light"] body {
    background-image: radial-gradient(circle at top right, rgba(255, 215, 0, 0.15), transparent 800px), 
                      radial-gradient(circle at top left, rgba(238, 28, 37, 0.15), transparent 800px) !important;
    background-attachment: fixed !important;
}

/* Centering Catalog Section */
.nx-products-wrap {
    text-align: center;
}

.nx-grid-header {
    text-align: center;
    margin-bottom: 50px;
}

.nx-promo-image {
    margin: 0 auto !important;
    display: block !important;
    max-width: 100%;
}

.nx-products-grid {
    text-align: left; /* Keep cards aligned left inside the centered container */
}
[data-theme="light"] .filter-card {
    background: var(--nexus-surface) !important;
    border-color: var(--nexus-border) !important;
    box-shadow: var(--nexus-shadow-3d) !important;
}

[data-theme="light"] .filter-card h3,
[data-theme="light"] .filter-card label {
    color: var(--nexus-text) !important;
}

[data-theme="light"] .filter-link {
    color: var(--nexus-text-muted) !important;
}

[data-theme="light"] .filter-link.active,
[data-theme="light"] .filter-link:hover {
    color: var(--nexus-red) !important;
    background: rgba(0,0,0,0.02);
}

/* Hero Sections */
[data-theme="light"] .catalog-hero,
[data-theme="light"] .about-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: var(--nexus-text) !important;
    border-bottom-color: var(--nexus-gold) !important;
}

/* Catalog Specifics */
[data-theme="light"] .product-card {
    background: var(--nexus-surface) !important;
    border-color: var(--nexus-border) !important;
    color: var(--nexus-text) !important;
}

[data-theme="light"] .product-card h3 {
    color: var(--nexus-text) !important;
}

[data-theme="light"] .category-badge {
    box-shadow: 0 4px 10px rgba(238, 28, 37, 0.2);
}

[data-theme="light"] .nx-price-label {
    color: var(--nexus-text-muted) !important;
}

/* 3. FINAL SEARCH & MENU UI REFINEMENTS */
#nexus-theme-toggle {
    font-size: 1.1rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--nexus-gold);
    border-radius: 50%;
    color: var(--nexus-gold);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0 5px;
}

#nexus-theme-toggle:hover {
    transform: scale(1.1);
    background: var(--nexus-gold);
    color: var(--nexus-bg);
    box-shadow: 0 0 15px var(--nexus-gold);
}

.nexus-search-inner {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0 2px 0 15px;
    transition: all 0.3s;
    width: 250px;
    height: 40px;
}

.nexus-search-inner:focus-within {
    border-color: var(--nexus-red);
    background: rgba(255, 255, 255, 0.12);
}

.nexus-search-input {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    height: 100% !important;
    width: 100% !important;
    color: #FFFFFF !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 40px !important;
}

.nexus-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.nexus-search-btn {
    background: var(--nexus-red) !important;
    color: #FFFFFF !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 1.25rem !important; /* Lupa maior */
    transition: all 0.2s !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

.nexus-search-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 991px) {
    .nexus-brand {
        display: none !important;
    }
    .d-none { display: none !important; }
    
    .nexus-header-row {
        justify-content: space-between !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .nexus-actions {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    .nexus-search-wrap {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .nexus-search-inner {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 5px 0 15px;
        height: 38px;
        border-radius: 50px;
    }

    .nexus-search-input {
        font-size: 13px !important;
        padding: 0 !important;
    }

    #nexus-theme-toggle {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        margin: 0 !important;
    }

    .nexus-avatar-btn {
        display: none !important; /* Hide avatar to save space on mobile if needed */
    }

    .nexus-hamburger {
        margin-left: 5px !important;
    }
}

@media (min-width: 992px) {
    .d-lg-flex { display: flex !important; }
}

/* Sidenav Mobile Styles */
.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 99999999;
    right: 0;
    top: 0;
    overflow-x: hidden;
    transition: 0.5s;
    background: #000 !important;
    visibility: hidden;
}
.sidenav.show {
    visibility: visible;
    width: 300px;
}
.sidenav .closebtn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: #fff !important;
    text-decoration: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    line-height: 1;
}
.mobile-menu-list {
    list-style: none;
    padding: 80px 20px 20px;
}
.mobile-menu-list li a {
    color: #fff !important;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
