/* ============================================
   LUXE Fashion - Main Stylesheet
   ============================================ */

/* CSS Custom Properties */
:root {
    --color-primary: #8b7355;
    --color-primary-dark: #6b5344;
    --color-accent: #d4af37;
    --transition-base: all 0.3s ease;
    --shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px -15px rgba(0, 0, 0, 0.2);
}

/* Dark Mode Variables */
.dark {
    --shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px -15px rgba(0, 0, 0, 0.7);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Enhancements */
.font-serif {
    letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection Color */
::selection {
    background: var(--color-primary);
    color: white;
}

/* Form Elements Enhancement */
input:focus, 
textarea:focus, 
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

/* Button Hover Effects */
button, 
a {
    transition: var(--transition-base);
}

/* Image Hover Zoom Effect */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.7s ease;
}

.image-zoom:hover img {
    transform: scale(1.05);
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Skeleton Animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #2d3748 25%, #4a5568 50%, #2d3748 75%);
    background-size: 200% 100%;
}

/* Product Card Hover */
.product-card {
    transition: var(--transition-base);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Cart Badge Animation */
@keyframes bounce-in {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.cart-badge-update {
    animation: bounce-in 0.3s ease;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.dark .toast {
    background: #1f2937;
    color: white;
}

/* Video Container Aspect Ratio */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Price Styling */
.price {
    font-variant-numeric: tabular-nums;
}

/* Size Selector */
.size-btn {
    transition: all 0.2s ease;
}

.size-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Filter Checkbox Customization */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--color-primary);
}

/* Smooth Page Transitions */
.page-transition {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Accessibility: Focus Visible */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

/* High DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}