/**
 * Romeo is Alive Theme Styles
 *
 * @package Romeo_Is_Alive
 */

/* ========================================
   CSS Variables - Theme Configuration
   ======================================== */
:root {
    /* Primary Colors */
    --color-gold: #D4AF37;
    --color-gold-hover: #E5C048;
    --color-gold-dark: #B8962F;

    /* Background Colors */
    --color-obsidian: #050505;
    --color-charcoal: #0a0a0a;
    --color-dark: #111111;

    /* Text Colors */
    --color-white: #ffffff;
    --color-platinum: #E5E4E2;
    --color-silver: #C0C0C0;
    --color-soft-white: rgba(255, 255, 255, 0.85);
    --color-muted: rgba(255, 255, 255, 0.6);

    /* Border Colors */
    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-light: rgba(255, 255, 255, 0.2);
    --color-border-hover: rgba(255, 255, 255, 0.3);

    /* State Colors */
    --color-success: #16a34a;
    --color-error: #dc2626;
    --color-warning: #f59e0b;

    /* Font Families */
    --font-serif: 'Cinzel', serif;
    --font-body: 'Cormorant Garamond', serif;
    --font-system: ui-sans-serif, system-ui, sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-none: 0;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-smooth: 700ms cubic-bezier(0.23, 1, 0.32, 1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);

    /* Z-Index Scale */
    --z-dropdown: 40;
    --z-sticky: 45;
    --z-overlay: 50;
    --z-modal: 60;
    --z-toast: 70;
    --z-popup: 80;
}

/* ========================================
   Base Styles
   ======================================== */
body {
    background-color: var(--color-obsidian) !important;
    color: var(--color-silver) !important;
    overflow-x: hidden;
}

/* Smooth Scroll Container Setup */
.mrd-smooth {
    width: 100%;
    height: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--color-obsidian);
}
::-webkit-scrollbar-thumb {
    background: var(--color-border-hover);
}

/* Off-Canvas Cart Scrollbar - Hidden track */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 0 !important;
}
.custom-scrollbar::-webkit-scrollbar:horizontal {
    display: none !important;
    height: 0 !important;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--color-gold);
    border-radius: var(--radius-sm);
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-hover);
}
/* Firefox scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold) transparent;
    overflow-x: hidden !important;
}

/* Image Filters for Dark Mode Cohesion */
.vespera-img {
    filter: grayscale(100%) contrast(110%) brightness(80%);
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}
.vespera-img:hover {
    filter: grayscale(0%) contrast(100%) brightness(100%);
    transform: scale(1.02);
}

/* Text Selection */
::selection {
    background: var(--color-gold);
    color: var(--color-obsidian);
}

/* Alpine.js Cloak - Hide elements before Alpine initializes */
[x-cloak] {
    display: none !important;
}

/* Ensure x-cloak wins over button classes */
.romeo-btn-view-cart[x-cloak],
.romeo-btn-primary[x-cloak],
.romeo-btn-secondary[x-cloak],
.romeo-btn-tertiary[x-cloak] {
    display: none !important;
}

/* Utility for Off-Canvas Transition */
.slide-enter-active, .slide-leave-active {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-enter-start, .slide-leave-end {
    transform: translateX(100%);
}

/* Custom Soft White (85% Opacity) */
.text-soft-white {
    color: var(--color-soft-white);
}

/* Hero Slider Styles */
.hero-animate {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-animate.delay-100 {
    animation-delay: 0.1s;
}

.hero-animate.delay-200 {
    animation-delay: 0.2s;
}

.hero-animate.delay-300 {
    animation-delay: 0.3s;
}

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

/* Swiper Navigation Arrows */
.hero-arrow {
    color: rgba(255, 255, 255, 0.5) !important;
    transition: color 0.3s ease;
}

.hero-arrow:hover {
    color: var(--color-gold) !important;
}

.hero-arrow::after {
    font-size: 24px !important;
}

/* Swiper Pagination */
.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.3) !important;
    opacity: 1 !important;
    width: 8px !important;
    height: 8px !important;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--color-gold) !important;
    width: 24px !important;
    border-radius: var(--radius-md) !important;
}

/* Typography Resets for Tailwind Compatibility */
h1, h2, h3, h4, h5, h6 {
    margin: 0 !important;
    padding: 0 !important;
}

p {
    margin: 0 !important;
}

a {
    text-decoration: none !important;
}

/* Tailwind Spacing Utilities - Ensure space-y works */
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))) !important;
    margin-bottom: calc(1rem * var(--tw-space-y-reverse)) !important;
}

.space-y-6 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))) !important;
    margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)) !important;
}

.space-y-8 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse))) !important;
    margin-bottom: calc(2rem * var(--tw-space-y-reverse)) !important;
}

.space-x-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(1rem * var(--tw-space-x-reverse)) !important;
    margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))) !important;
}

.space-x-6 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(1.5rem * var(--tw-space-x-reverse)) !important;
    margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse))) !important;
}

.space-x-12 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(3rem * var(--tw-space-x-reverse)) !important;
    margin-left: calc(3rem * calc(1 - var(--tw-space-x-reverse))) !important;
}

/* Tailwind Margin Utilities - Ensure mb-* works */
.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-6 {
    margin-bottom: 1.5rem !important;
}

.mb-8 {
    margin-bottom: 2rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.mt-6 {
    margin-top: 1.5rem !important;
}

.mt-8 {
    margin-top: 2rem !important;
}

.mt-12 {
    margin-top: 3rem !important;
}

.mt-16 {
    margin-top: 4rem !important;
}

.mt-20 {
    margin-top: 5rem !important;
}

/* Gap utilities */
.gap-2 {
    gap: 0.5rem !important;
}

.gap-4 {
    gap: 1rem !important;
}

.gap-6 {
    gap: 1.5rem !important;
}

.gap-8 {
    gap: 2rem !important;
}

.gap-12 {
    gap: 3rem !important;
}

.gap-16 {
    gap: 4rem !important;
}

/* Padding utilities */
.pr-2\.5 {
    padding-right: 0.625rem !important;
}

/* ========================================
   Unified Button System
   ======================================== */

/* Primary Button - Main CTA (White bg, gold hover) */
.romeo-btn-primary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 60px !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    background-color: var(--color-white) !important;
    color: #000000 !important;
    font-size: var(--text-sm) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3em !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 300ms ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.romeo-btn-primary:hover {
    background-color: var(--color-gold) !important;
    color: #5D4037 !important;
}

.romeo-btn-primary:disabled,
.romeo-btn-primary.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.romeo-btn-primary.loading {
    background-color: rgba(255, 255, 255, 0.8) !important;
    color: rgba(0, 0, 0, 0.8) !important;
    cursor: wait !important;
}

.romeo-btn-primary.success {
    background-color: var(--color-success) !important;
    color: var(--color-white) !important;
}

/* Secondary Button - Outline gold */
.romeo-btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 60px !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    background-color: transparent !important;
    color: var(--color-gold) !important;
    font-size: var(--text-sm) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3em !important;
    text-decoration: none !important;
    border: 1px solid var(--color-gold) !important;
    cursor: pointer !important;
    transition: all 300ms ease !important;
}

.romeo-btn-secondary:hover {
    background-color: var(--color-gold) !important;
    color: var(--color-obsidian) !important;
}

/* Tertiary Button - Text link style */
.romeo-btn-tertiary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background-color: transparent !important;
    color: var(--color-gold) !important;
    font-size: var(--text-xs) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 300ms ease !important;
}

.romeo-btn-tertiary:hover {
    color: var(--color-white) !important;
}

/* Button Sizes */
.romeo-btn-sm {
    height: 44px !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    font-size: var(--text-xs) !important;
    letter-spacing: 0.2em !important;
}

.romeo-btn-lg {
    height: 70px !important;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
}

/* Full Width */
.romeo-btn-full {
    width: 100% !important;
}

/* View Cart Button - Dark variant */
.romeo-btn-view-cart {
    align-items: center !important;
    justify-content: center !important;
    height: 50px !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    background-color: #3D2914 !important;
    color: var(--color-white) !important;
    font-size: var(--text-xs) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 300ms ease !important;
}

/* When View Cart is visible (Alpine removes x-cloak and sets display) */
.romeo-btn-view-cart:not([x-cloak]) {
    display: flex !important;
}

.romeo-btn-view-cart:hover {
    background-color: #5D4037 !important;
}

/* WooCommerce Checkout - Place Order Button */
#place_order,
.woocommerce-checkout #place_order,
button[name="woocommerce_checkout_place_order"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 60px !important;
    margin-top: 2rem !important;
    background-color: var(--color-white) !important;
    color: #000000 !important;
    font-size: var(--text-sm) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3em !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 300ms ease !important;
}

#place_order:hover,
.woocommerce-checkout #place_order:hover,
button[name="woocommerce_checkout_place_order"]:hover {
    background-color: var(--color-gold) !important;
    color: #5D4037 !important;
}

/* Elementor Override - Remove Default Padding */
.elementor-section {
    padding: 0 !important;
}

.elementor-widget-container {
    padding: 0 !important;
}

/* Gold Color Utilities */
.text-gold {
    color: var(--color-gold) !important;
}

.border-gold {
    border-color: var(--color-gold) !important;
}

.bg-gold {
    background-color: var(--color-gold) !important;
}

/* Background Colors */
.bg-obsidian {
    background-color: var(--color-obsidian) !important;
}

.bg-charcoal {
    background-color: var(--color-charcoal) !important;
}

/* Platinum Text */
.text-platinum {
    color: var(--color-platinum) !important;
}

/* Silver Text */
.text-silver {
    color: var(--color-silver) !important;
}

/* Add to Cart Button States */
.add_to_cart_button.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.add_to_cart_button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.add_to_cart_button.loading span,
.add_to_cart_button.loading::before {
    visibility: hidden;
}

.add_to_cart_button.added {
    background-color: var(--color-success) !important;
    color: var(--color-white) !important;
}

.add_to_cart_button.added::before {
    content: '\2713';
    margin-right: 0.5em;
}

/* Hide WooCommerce "View Cart" button - we use off-canvas cart instead */
.added_to_cart {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom scrollbar for cart */
.custom-scrollbar::-webkit-scrollbar {
    width: 3px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Olfactory Pyramid SVG Icons */
.romeo-svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
}

.romeo-svg-icon svg {
    width: 72px;
    height: 72px;
    stroke: currentColor;
    fill: none;
}

/* Key Ingredients Tags */
.romeo-ingredient-tag {
    display: inline-block;
    position: relative;
}

.romeo-ingredient-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.romeo-ingredient-tag:hover::before {
    opacity: 1;
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Product description drop cap enhancement */
.product-drop-cap {
    float: left;
    font-size: var(--text-4xl);
    line-height: 0.8;
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    color: var(--color-gold);
    font-family: var(--font-serif);
}
