/* 
   NOIR ELITE - Original Luxury Design System
   Swann Jewelry Redesign
*/

:root {
    --red-accent: #ff0000;
    --red-glow: rgba(255, 0, 0, 0.3);
}

/* Default Theme (Dark) */
[data-theme="dark"],
:root:not([data-theme="light"]) {
    --noir-bg: #0a0a0a;
    --noir-surface: #141414;
    --noir-border: #262626;
    --noir-text: #ffffff;
    --noir-muted: #888888;
    --silk-silver: #e2e8f0;
    --glass-bg: rgba(10, 10, 10, 0.7);
}

/* Light Theme */
[data-theme="light"] {
    --noir-bg: #f4f4f7; /* Soft Platinum/Ivory */
    --noir-surface: #ffffff;
    --noir-border: rgba(0, 0, 0, 0.06);
    --noir-text: #0a0a0a;
    --noir-muted: #666666;
    --silk-silver: #444444;
    --glass-bg: rgba(255, 255, 255, 0.88);
    --footer-bg: #f8f9fa;
    --footer-text: #0a0a0a;
}

[data-theme="dark"],
:root:not([data-theme="light"]) {
    --footer-bg: #000000;
    --footer-text: #ffffff;
}

/* Base Styles */
html, body {
    background-color: var(--noir-bg);
    color: var(--noir-text);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Prevent transition flicker on load */
body.loading-theme,
body.loading-theme *,
body.loading-theme *:before,
body.loading-theme *:after {
    transition: none !important;
    animation: none !important;
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: 'Roboto', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Glass Header */
.elite-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
}

.elite-header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--noir-border);
    padding: 10px 0;
}

.elite-nav-link {
    color: var(--silk-silver);
    font-size: 0.95rem;
    /* Larger nav */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    padding: 10px 15px;
    transition: color 0.3s ease;
    position: relative;
}

.elite-nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 1px;
    background: var(--red-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.elite-nav-link:hover,
.elite-nav-link.active {
    color: var(--red-accent) !important;
}

.elite-nav-link:hover:after,
.elite-nav-link.active:after {
    transform: scaleX(1);
}

/* Hero Section */
.noir-hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.noir-hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6) contrast(1.1);
}

.noir-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--noir-bg) 80%);
    z-index: 2;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

[data-theme="light"] .noir-hero-overlay {
    opacity: 0 !important;
}

.noir-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.noir-hero-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, var(--noir-text) 0%, var(--noir-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Lookbook Category Grid */
.lookbook-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 80px 0;
}

.lookbook-item {
    position: relative;
    overflow: hidden;
    background: var(--noir-surface);
}

.lookbook-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lookbook-item:hover img {
    transform: scale(1.08);
}

.lookbook-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

/* Product Cards Elite */
.product-card-elite {
    background: transparent;
    border: none;
    transition: all 0.5s ease;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
}

[data-theme="light"] .product-card-elite {
    background: var(--noir-surface);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .order-card-elite,
[data-theme="light"] .info-card-elite,
[data-theme="light"] .p-4.border-0.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .elite-side-nav .nav-link.active {
    background: rgba(255, 0, 0, 0.05) !important;
}

.product-image-container {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: var(--noir-surface);
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.product-card-elite:hover .product-image-container img {
    transform: scale(1.05);
}

.elite-action-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Darker overlay for better contrast */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(0px);
    z-index: 5;
}

.product-card-elite:hover .elite-action-overlay {
    opacity: 1;
    backdrop-filter: blur(6px);
}

.elite-action-overlay .elite-btn {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-elite:hover .elite-action-overlay .elite-btn {
    transform: translateY(0);
    opacity: 1;
}

.product-card-elite:hover .elite-action-overlay .elite-btn:nth-child(2) {
    transition-delay: 0.1s;
}

.elite-btn {
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: #fff !important;
    padding: 10px 25px;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 80%;
    text-decoration: none;
    text-align: center;
}

.elite-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff !important;
}

.elite-btn-red {
    background: var(--red-accent) !important;
    border-color: var(--red-accent) !important;
    color: #fff !important;
}

.elite-btn-red:hover {
    background: #e60000 !important;
    border-color: #e60000 !important;
    color: #fff !important;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

/* AI Powered Section */
.ai-curator-section {
    background: var(--noir-bg);
    padding: 60px 0;
    position: relative;
}

.ai-curator-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.ai-badge-elite {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--red-accent);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ai-badge-floating {
    position: absolute;
    top: -5px;
    right: -20px;
    transform: translateX(100%);
    padding: 4px 12px;
    font-size: 0.65rem;
    white-space: nowrap;
    border-radius: 2px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ai-badge-floating.bg-trend {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

/* Animations */
@keyframes noirReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.noir-reveal {
    animation: noirReveal 1s ease-out forwards;
}

/* Swiper Customization */
.swiper-button-next,
.swiper-button-prev {
    color: var(--red-accent) !important;
}

.swiper-pagination-bullet {
    background: var(--noir-muted) !important;
}

.swiper-pagination-bullet-active {
    background: var(--red-accent) !important;
}

/* Mobile Global Fixes */
@media (max-width: 768px) {
    .elite-btn {
        padding: 8px 20px;
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .elite-action-overlay {
        gap: 8px;
    }

    /* Fix Hero Overflow */
    .noir-hero-content h5 {
        letter-spacing: 2px !important;
        font-size: 0.9rem !important;
        padding: 0 15px;
    }

    .elite-header .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .ls-5 {
        letter-spacing: 2px !important;
    }
}

/* Main Content Offset */
.pt-navbar {
    padding-top: 70px;
}

@media (max-width: 991px) {
    .pt-navbar {
        padding-top: 60px;
    }
}

/* Theme-aware Text Colors */
.text-dark-theme-toggle {
    color: var(--noir-text) !important;
}

[data-theme="dark"],
:root:not([data-theme="light"]) {
    color-scheme: dark;
}

[data-theme="light"] {
    color-scheme: light;
}

/* Force native UI to follow theme */
select,
input,
textarea {
    color-scheme: inherit;
}

select.form-select,
select.form-control {
    background-color: var(--noir-bg) !important;
    color: var(--noir-text) !important;
    border-color: var(--noir-border) !important;
}

select.form-select option {
    background-color: var(--noir-surface) !important;
    color: var(--noir-text) !important;
}

[data-theme="dark"] select.form-select option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

[data-theme="light"] select.form-select option {
    background-color: #ffffff !important;
    color: #000000 !important;
}

[data-theme="dark"] .text-dark-theme-toggle {
    color: #ffffff !important;
}

[data-theme="light"] .text-dark-theme-toggle {
    color: #000000 !important;
}

/* Elite Section Headers */
.elite-section-header {
    position: relative;
    padding-left: 0;
    margin-bottom: 3rem;
}

.elite-subtitle {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--red-accent);
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 700;
    margin-bottom: 12px;
}

.elite-subtitle::before {
    content: '';
    height: 1px;
    width: 0;
    background: var(--red-accent);
    opacity: 0.6;
    transition: width 0.3s ease;
}

.justify-content-center.elite-subtitle::before {
    width: 40px;
}

.elite-subtitle::after {
    content: '';
    height: 1px;
    width: 40px;
    background: var(--red-accent);
    opacity: 0.6;
}

.elite-title {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--noir-text);
}

/* AI Powered Section Refinement */
.ai-curator-section {
    background: var(--noir-bg);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.ai-curator-section::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.03) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Premium Dropdown Styling */
.dropdown-menu {
    padding: 10px 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    border: 1px solid var(--noir-border) !important;
}

.dropdown-item {
    padding: 10px 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 4px !important;
    margin: 2px 8px !important;
    width: calc(100% - 16px) !important;
    font-weight: 500 !important;
}

/* Dark Theme Dropdown Hover */
[data-theme="dark"] .dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 0, 0, 0.12) !important;
    color: var(--red-accent) !important;
    transform: translateX(4px);
}

/* Light Theme Dropdown Hover */
[data-theme="light"] .dropdown-item {
    color: #333 !important;
}

[data-theme="light"] .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--red-accent) !important;
    transform: translateX(4px);
}

/* Special Items */
.dropdown-item.text-warning:hover {
    color: #ffc107 !important;
    background: rgba(255, 193, 7, 0.1) !important;
}

.dropdown-item.text-danger:hover {
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.1) !important;
}