/* ============================================
   LUXE NOIR - Premium Futuristic Styles
   Dark & Light Mode Complete Support
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS Variables - Dark Mode (Default)
   ============================================ */
:root {
    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Gold accent (same for both modes) */
    --gold: #C6A676;
    --gold-light: #D4B896;
    --gold-dark: #A68B5B;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 500ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 800ms cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
}

/* Dark Mode Colors (Default) */
.dark {
    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-tertiary: #1A1A1A;
    --bg-card: #0D0D0D;
    --text-primary: #EAEAEA;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --shadow-soft: rgba(0, 0, 0, 0.3);
    --glow-color: rgba(198, 166, 118, 0.15);
    --input-bg: rgba(255, 255, 255, 0.03);
    --overlay-bg: rgba(0, 0, 0, 0.8);
}

/* Light Mode Colors */
.light {
    --bg-primary: #FAF8F6;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F0EDE8;
    --bg-card: #FFFFFF;
    --text-primary: #0C0C0C;
    --text-secondary: #4A4A4A;
    --text-muted: #8A8A8A;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-hover: rgba(255, 255, 255, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-soft: rgba(0, 0, 0, 0.05);
    --glow-color: rgba(198, 166, 118, 0.25);
    --input-bg: rgba(0, 0, 0, 0.03);
    --overlay-bg: rgba(255, 255, 255, 0.9);
}

/* ============================================
   Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    overflow-x: hidden;
}

/* ============================================
   Typography
   ============================================ */
.font-display {
    font-family: var(--font-display);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
}

/* Clamp-based Responsive Typography */
.text-display-xl {
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 1;
}

.text-display-lg {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
}

.text-display-md {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.text-body-lg {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
}

/* ============================================
   Color Utilities
   ============================================ */
.text-gold { color: var(--gold) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.bg-gold { background-color: var(--gold) !important; }

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Glass Card Effect
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(198, 166, 118, 0.3);
    box-shadow: 0 8px 32px var(--shadow-color), 0 0 60px var(--glow-color);
}

/* ============================================
   Neumorphic Effects
   ============================================ */
.dark .neumorphic {
    background: var(--bg-secondary);
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.4),
        -8px -8px 20px rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.light .neumorphic {
    background: var(--bg-secondary);
    box-shadow: 
        8px 8px 20px rgba(0, 0, 0, 0.08),
        -8px -8px 20px rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #0A0A0A;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(198, 166, 118, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 30px var(--glow-color);
}

.btn-ghost {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-ghost:hover {
    color: var(--gold);
    background: var(--glass-bg);
}

/* ============================================
   Product Card
   ============================================ */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    transform-style: preserve-3d;
}

.product-card:hover {
    transform: translateY(-12px);
    border-color: rgba(198, 166, 118, 0.2);
    box-shadow: 
        0 25px 50px -12px var(--shadow-color),
        0 0 60px var(--glow-color);
}

.product-card .product-image {
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-card .product-overlay {
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-card h3,
.product-card p {
    color: var(--text-primary);
}

.product-card .text-neutral-400,
.product-card .text-neutral-500 {
    color: var(--text-secondary) !important;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.dark .hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(198, 166, 118, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(198, 166, 118, 0.1), transparent),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.light .hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(198, 166, 118, 0.2), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(198, 166, 118, 0.15), transparent),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Animated gradient background */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.header.scrolled {
    padding: 0.5rem 0;
}

/* Nav link animation */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--bg-primary);
    transform: translateX(-100%);
    transition: transform var(--transition-smooth);
    display: none;
    flex-direction: column;
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

#mobile-menu a:hover {
    color: var(--gold);
}

#mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1999;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity var(--transition-normal);
    display: none;
}

/* ============================================
   Search Bar
   ============================================ */
.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(198, 166, 118, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   Form Elements
   ============================================ */
.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(198, 166, 118, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* ============================================
   Cart Badge
   ============================================ */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--gold);
    color: #0A0A0A;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

/* ============================================
   Cart Notification
   ============================================ */
.cart-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px var(--shadow-color);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-smooth);
    z-index: 3000;
    color: var(--text-primary);
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================
   Theme Toggle
   ============================================ */
#theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    overflow: hidden;
}

#theme-toggle:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--glow-color);
}

#theme-toggle svg {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: all var(--transition-normal);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}

footer p,
footer a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

footer a:hover {
    color: var(--gold);
}

footer h4 {
    color: var(--text-primary);
}

/* ============================================
   Links
   ============================================ */
a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   Sections with backgrounds
   ============================================ */
.section-alt {
    background: var(--bg-secondary);
}

.section-gradient {
    background: linear-gradient(to bottom, transparent, var(--glass-bg), transparent);
}

/* ============================================
   Cart Items
   ============================================ */
.cart-item {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
}

.cart-item h4 {
    color: var(--text-primary);
}

.cart-item p {
    color: var(--text-secondary);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--glow-color); }
    50% { box-shadow: 0 0 40px var(--glow-color), 0 0 60px var(--glow-color); }
}

/* Reveal animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-slow);
}

[data-reveal="left"] {
    transform: translateX(-30px);
}

[data-reveal="right"] {
    transform: translateX(30px);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translate(0);
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ============================================
   Selection
   ============================================ */
::selection {
    background: var(--gold);
    color: var(--bg-primary);
}

/* ============================================
   Responsive Utilities
   ============================================ */
@media (max-width: 640px) {
    .btn-primary, .btn-outline {
        width: 100%;
        padding: 1rem 2rem;
    }
    
    .hero-section {
        min-height: 90vh;
    }
}

@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
    
    .container-ultrawide {
        max-width: 90%;
    }
}

/* ============================================
   Loading States
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--glass-bg) 25%,
        var(--bg-tertiary) 50%,
        var(--glass-bg) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ============================================
   Grid System
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 1920px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.gold-glow {
    box-shadow: 0 0 30px var(--glow-color);
}

.border-glow:hover {
    border-color: var(--gold);
    box-shadow: 0 0 30px var(--glow-color);
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-glow {
    animation: glow 3s ease-in-out infinite;
}

/* ============================================
   Override Tailwind neutral colors with theme
   ============================================ */
.dark .bg-neutral-900,
.dark .bg-neutral-800 {
    background-color: var(--bg-tertiary) !important;
}

.light .bg-neutral-900,
.light .bg-neutral-800 {
    background-color: var(--bg-tertiary) !important;
}

.text-neutral-400,
.text-neutral-500,
.text-neutral-600 {
    color: var(--text-secondary) !important;
}

/* Border overrides */
.border-white\/10,
.border-white\/5 {
    border-color: var(--border-color) !important;
}

/* Background overrides for specific sections */
.dark .bg-gradient-to-b,
.dark .bg-gradient-to-br,
.dark .bg-gradient-to-t {
    --tw-gradient-from: var(--bg-primary);
    --tw-gradient-to: var(--bg-secondary);
}

.light .bg-gradient-to-b,
.light .bg-gradient-to-br,
.light .bg-gradient-to-t {
    --tw-gradient-from: var(--bg-primary);
    --tw-gradient-to: var(--bg-secondary);
}

/* Fix for category cards overlay */
.dark .from-black\/80 {
    --tw-gradient-from: rgba(0, 0, 0, 0.8);
}

.light .from-black\/80 {
    --tw-gradient-from: rgba(0, 0, 0, 0.7);
}

/* Breadcrumb styling */
nav ol li,
nav ol li a {
    color: var(--text-secondary);
}

nav ol li a:hover {
    color: var(--gold);
}

/* Image containers */
.dark .bg-neutral-900 img,
.light .bg-neutral-900 img {
    opacity: 1;
}

/* Stats cards */
.bg-blue-500\/20,
.bg-green-500\/20,
.bg-gold\/20,
.bg-gold\/10 {
    background-color: rgba(198, 166, 118, 0.1) !important;
}

/* Error states */
.text-red-400,
.text-red-500 {
    color: #f87171 !important;
}

.border-red-500 {
    border-color: #f87171 !important;
}

/* Info elements */
.dark .bg-white\/5,
.dark .bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.light .bg-white\/5,
.light .bg-white\/10 {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* Checkbox styling */
input[type="checkbox"] {
    accent-color: var(--gold);
}

/* Radio buttons */
input[type="radio"] {
    accent-color: var(--gold);
}

/* Placeholder images background */
.aspect-square,
.aspect-\[3\/4\],
.aspect-\[4\/5\] {
    background-color: var(--bg-tertiary);
}
