/*
Temporary CSS Refactor Map (to be removed after verification)
- Tokens, resets, base, utilities, animations moved here from style.css
- Reused components moved to dedicated files
*/

/* Reset */
* {
    box-sizing: border-box;
}
*::before,
*::after {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Improve scroll performance */
    overflow-x: hidden;
}

/* Performance optimizations for smooth scrolling */
.parallax,
.cart-dropdown,
.site-header,
.scroll-progress {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}
body {
    margin: 0;
    padding: 0;
    /* Optimize scrolling on mobile */
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    transform: translateZ(0);
    /* Prevent bouncing on iOS */
    overscroll-behavior: none;
}

/* Design Tokens System */
:root {
    /* Color Palette - Core */
    --color-black: #0b0b0b;
    --color-black-secondary: #121212;
    --color-black-premium: #0a0a0a;
    --color-card-dark: #1a1a1a;
    
    /* Color Palette - Gold */
    --color-gold: #c8a951;
    --color-gold-dark: #9d8033;
    --color-gold-light: #e6d07d;
    --color-gold-accent: #caa945;
    --color-gold-muted: #a88e3b;
    
    /* Color Palette - Red */
    --color-red: #350000;
    
    /* Color Palette - Text */
    --color-text-primary: #ffffff;
    --color-text-secondary: #e0e0e0;
    --color-text-muted: #b0b0b0;
    --color-text-premium: #f5f5f5;
    
    /* Color Palette - Overlays & Transparencies */
    --color-red-overlay: rgba(53, 0, 0, 0.6);
    --color-gold-overlay-light: rgba(200, 169, 81, 0.1);
    --color-gold-overlay: rgba(200, 169, 81, 0.2);
    --color-gold-overlay-medium: rgba(200, 169, 81, 0.3);
    --color-gold-overlay-strong: rgba(200, 169, 81, 0.4);
    --color-black-overlay: rgba(0, 0, 0, 0.2);
    --color-black-overlay-medium: rgba(0, 0, 0, 0.3);
    --color-black-overlay-strong: rgba(0, 0, 0, 0.4);
    
    /* Color Palette - Status */
    --color-success: #28a745;
    --color-success-light: rgba(40, 167, 69, 0.3);
    --color-danger: #dc3545;
    --color-danger-light: rgba(220, 53, 69, 0.2);
    
    /* Typography - Font Families */
    --font-serif: 'Playfair Display', 'Georgia', serif;
    --font-sans: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    --font-heading: 'Montserrat', 'Inter', sans-serif;
    
    /* Typography - Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Typography - Font Sizes */
    --font-size-heading-xl: clamp(48px, 8vw, 72px);
    --font-size-heading-lg: clamp(32px, 6vw, 48px);
    --font-size-heading-md: clamp(24px, 4vw, 32px);
    --font-size-heading-sm: clamp(18px, 3vw, 24px);
    --font-size-body-xl: clamp(18px, 2.5vw, 20px);
    --font-size-body-lg: 18px;
    --font-size-body-md: 16px;
    --font-size-body-sm: 14px;
    --font-size-body-xs: 12px;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s ease-out;
    --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-slow: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    
    /* Layout - Containers & Spacing */
    --content-max-width: 1200px;
    --section-padding: 80px;
    --section-margin: 120px;
    --container-padding: 24px;
    --grid-gap: 24px;
    --grid-gap-lg: 32px;
    --grid-gap-sm: 16px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 80px;
    
    /* Borders & Shapes */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --border-radius-pill: 9999px;
    --border-width-thin: 1px;
    --border-width-regular: 2px;
    --border-width-thick: 3px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
    --shadow-gold: 0 4px 20px rgba(200, 169, 81, 0.3);
    --shadow-gold-lg: 0 8px 32px rgba(200, 169, 81, 0.4);
    
    /* Z-index Layers */
    --z-index-header: 1000;
    --z-index-modal: 2000;
    --z-index-overlay: 3000;
    --z-index-tooltip: 4000;
    
    /* Backwards compatibility (will be deprecated) */
    --velviq-black: var(--color-black);
    --velviq-secondary: var(--color-black-secondary);
    --velviq-red: var(--color-red);
    --velviq-gold: var(--color-gold);
    --velviq-gold-dark: var(--color-gold-dark);
    --velviq-gold-light: var(--color-gold-light);
    --velviq-gold-accent: var(--color-gold-accent);
    --velviq-gold-muted: var(--color-gold-muted);
    --velviq-text: var(--color-text-primary);
    --velviq-text-secondary: var(--color-text-secondary);
    --velviq-text-muted: var(--color-text-muted);
    --velviq-text-premium: var(--color-text-premium);
    --velviq-premium-black: var(--color-black-premium);
    --velviq-premium-card: var(--color-card-dark);
    --velviq-red-overlay: var(--color-red-overlay);
    --heading-xl: var(--font-size-heading-xl);
    --heading-lg: var(--font-size-heading-lg);
    --heading-md: var(--font-size-heading-md);
    --heading-sm: var(--font-size-heading-sm);
    --body-xl: var(--font-size-body-xl);
    --body-lg: var(--font-size-body-lg);
    --body-md: var(--font-size-body-md);
    --body-sm: var(--font-size-body-sm);
    --body-xs: var(--font-size-body-xs);
    --element-border-radius: var(--border-radius-md);
    --element-border-radius-lg: var(--border-radius-lg);
    --z-header: var(--z-index-header);
    --z-modal: var(--z-index-modal);
    --z-overlay: var(--z-index-overlay);
    --z-tooltip: var(--z-index-tooltip);
}

/* Button System - Theme Variants */
.btn,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: var(--border-width-thin) solid transparent;
    border-radius: var(--element-border-radius);
    font-family: var(--font-sans);
    font-size: var(--font-size-body-md);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
    white-space: nowrap;
    min-height: 44px;
}

/* Primary Button */
.btn-primary,
.button--primary {
    background: var(--velviq-gold);
    color: var(--velviq-black);
    border-color: var(--velviq-gold);
}

.btn-primary:hover,
.button--primary:hover {
    background: var(--velviq-black);
    color: var(--velviq-gold);
    border-color: var(--velviq-gold);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

/* Secondary Button (Outline) */
.btn-secondary,
.button--secondary {
    background: transparent;
    color: var(--velviq-gold);
    border-color: var(--velviq-gold);
}

.btn-secondary:hover,
.button--secondary:hover {
    background: var(--velviq-gold);
    color: var(--velviq-black);
    border-color: var(--velviq-gold);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

/* Ghost Button */
.btn-ghost,
.button--ghost {
    background: var(--color-gold-overlay-light);
    color: var(--velviq-gold);
    border-color: transparent;
}

.btn-ghost:hover,
.button--ghost:hover {
    background: var(--velviq-gold);
    color: var(--velviq-black);
    border-color: var(--velviq-gold);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

/* Disabled Button */
.btn:disabled,
.button:disabled,
.btn-disabled,
.button--disabled {
    background: var(--velviq-secondary);
    color: var(--velviq-text-secondary);
    border-color: var(--velviq-secondary);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover,
.button:disabled:hover,
.btn-disabled:hover,
.button--disabled:hover {
    background: var(--velviq-secondary);
    color: var(--velviq-text-secondary);
    border-color: var(--velviq-secondary);
    transform: none;
    box-shadow: none;
}

/* Button Sizes */
.btn-sm,
.button--sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-body-sm);
    min-height: 36px;
}

.btn-lg,
.button--lg {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-size-body-lg);
    min-height: 52px;
}

/* Base elements */
body {
    font-family: var(--font-sans);
    background: var(--velviq-black);
    color: var(--velviq-text);
    font-weight: var(--font-weight-normal);
    font-size: var(--body-md);
    line-height: 1.6;
    overflow-x: hidden;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: var(--font-weight-bold);
    margin: 0;
    color: var(--velviq-text);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
h1 {
    font-size: var(--heading-xl);
    font-weight: var(--font-weight-extrabold);
    line-height: 0.9;
}
h2 {
    font-size: var(--heading-lg);
}
h3 {
    font-size: var(--heading-md);
    font-weight: var(--font-weight-semibold);
}
h4 {
    font-size: var(--heading-sm);
    font-weight: var(--font-weight-medium);
}
p {
    margin: 0 0 1.5rem 0;
    font-size: var(--body-md);
    line-height: 1.7;
    color: var(--velviq-text-secondary);
}
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* Layout primitives */
.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}
.section {
    padding: var(--section-padding) 0;
    margin: var(--section-margin) 0;
}
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
    align-items: start;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
}
.col-1 {
    grid-column: span 1;
}
.col-2 {
    grid-column: span 2;
}
.col-3 {
    grid-column: span 3;
}
.col-4 {
    grid-column: span 4;
}
.col-6 {
    grid-column: span 6;
}
.col-8 {
    grid-column: span 8;
}
.col-12 {
    grid-column: span 12;
}

/* Utilities */
.button,
a.button {
    background: var(--velviq-gold);
    color: var(--velviq-black);
    border: 2px solid var(--velviq-gold);
    padding: 16px 32px;
    font-family: var(--font-sans);
    font-weight: var(--font-weight-semibold);
    font-size: var(--body-sm);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: var(--element-border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 15px rgba(200, 169, 81, 0.3);
    min-width: 150px;
}
.button:hover,
a.button:hover {
    background: var(--velviq-black);
    color: var(--velviq-gold);
    border-color: var(--velviq-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(200, 169, 81, 0.4);
}
.button--secondary {
    background: transparent;
    color: var(--velviq-gold);
    border: 2px solid var(--velviq-gold);
}
.button--secondary:hover {
    background: var(--velviq-gold);
    color: var(--velviq-black);
}
.main-content {
    margin-top: 64px;
}
@media (max-width: 768px) {
    .main-content {
        margin-top: 52px;
    }
}
.text-center {
    text-align: center;
}
.text-gold {
    color: var(--velviq-gold);
}
.bg-secondary {
    background: var(--velviq-secondary);
}
.mt-lg {
    margin-top: 48px;
}
.mb-lg {
    margin-bottom: 48px;
}
.hidden {
    display: none;
}
.visible {
    display: block;
}

/* Header-shared: profile button (base) */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    height: 44px;
    width: auto;
    padding: 0 10px;
    border-radius: 24px;
    background: rgba(200, 169, 81, 0.08);
    color: var(--velviq-gold);
    border: none;
    outline: none;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.2s, color 0.2s;
}
.profile-btn:hover,
.profile-btn:focus {
    background: var(--velviq-gold);
    color: #181818;
}
.profile-btn svg {
    display: block;
    flex: 0 0 auto;
    color: inherit;
}
.profile-username {
    color: var(--velviq-gold);
    font-weight: 600;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Notices */
.woocommerce-message {
    display: none !important;
}

/* Product card and price styling moved to assets/css/components/product-cards.css */

/* Add to cart button states */
.add-to-cart-btn.loading {
    position: relative;
    color: transparent !important;
    cursor: not-allowed;
    opacity: 0.8;
    pointer-events: none;
}

.add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--velviq-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.add-to-cart-btn.added {
    background: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 1 !important;
    transform: translateY(0) !important;
    position: relative;
}

/* Page loader (global utility) */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--velviq-black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease-out;
}
.loader-content {
    text-align: center;
}
.loader-logo img {
    height: 80px;
    width: auto;
    margin-bottom: 32px;
    animation: pulse 2s ease-in-out infinite;
}
.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(200, 169, 81, 0.2);
    border-top: 4px solid var(--velviq-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Testimonials (global component if used) */
.testimonials-slider {
    overflow: hidden;
    position: relative;
}
.testimonial-slide {
    padding: 40px;
    text-align: center;
    background: var(--velviq-secondary);
    border-radius: var(--element-border-radius-lg);
    border: 1px solid rgba(200, 169, 81, 0.2);
    margin: 0 16px;
}
.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--velviq-gold);
    overflow: hidden;
}
.testimonial-stars {
    color: var(--velviq-gold);
    font-size: 20px;
    margin-bottom: 16px;
}
.testimonial-text {
    font-style: italic;
    color: var(--velviq-text-secondary);
    margin-bottom: 20px;
    font-size: var(--body-md);
    line-height: 1.6;
}
.testimonial-author {
    color: var(--velviq-gold);
    font-weight: var(--font-weight-semibold);
    font-size: var(--body-sm);
}

/* Newsletter popup (global) */
.newsletter-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}
.newsletter-popup.active {
    opacity: 1;
    visibility: visible;
}
.newsletter-popup-content {
    background: linear-gradient(135deg, var(--velviq-secondary), var(--velviq-black));
    border: 2px solid var(--velviq-gold);
    border-radius: var(--element-border-radius-lg);
    padding: 48px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: var(--transition-smooth);
}
.newsletter-popup.active .newsletter-popup-content {
    transform: scale(1);
}
.newsletter-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--velviq-text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.newsletter-popup-close:hover {
    color: var(--velviq-gold);
    transform: scale(1.2);
}

/* Helpers */
.loading {
    pointer-events: none;
    position: relative;
}
.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* Animation System */
:root {
    /* Animation Durations */
    --animation-duration-fast: 0.2s;
    --animation-duration-medium: 0.4s;
    --animation-duration-slow: 0.8s;
    
    /* Animation Timing Functions */
    --animation-easing-standard: ease-out;
    --animation-easing-accelerate: cubic-bezier(0.4, 0.0, 1, 1);
    --animation-easing-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1);
    --animation-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Keyframe Animations */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 var(--color-gold-overlay-medium);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px transparent;
    }
}

@keyframes ripple {
    to {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px var(--color-gold-overlay-medium);
    }
    50% {
        box-shadow: 0 0 30px var(--color-gold-overlay-strong), 0 0 60px var(--color-gold-overlay-medium);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes checkmark {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeInCart {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animation Utility Classes */
.fade-in-up {
    animation: fadeInUp var(--animation-duration-slow) var(--animation-easing-standard) forwards;
}

.fade-in-scale {
    animation: fadeInScale var(--animation-duration-medium) var(--animation-easing-standard) forwards;
}

.fade-in-left {
    animation: fadeInLeft var(--animation-duration-slow) var(--animation-easing-standard) forwards;
}

.fade-in-right {
    animation: fadeInRight var(--animation-duration-slow) var(--animation-easing-standard) forwards;
}

.bounce-in {
    animation: bounceIn var(--animation-duration-slow) var(--animation-easing-bounce) forwards;
}

.spin {
    animation: spin 1s linear infinite;
}

.pulse {
    animation: badgePulse 2s infinite;
}

/* Animation Delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

/* Accessibility */
*:focus {
    outline: 2px solid var(--velviq-gold);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
@media (prefers-contrast: high) {
    :root {
        --velviq-black: #000000;
        --velviq-text: #ffffff;
        --velviq-gold: #ffff00;
        --velviq-red: #ff0000;
    }
}