/* ============================================
   ARTEVA Maison - Main Stylesheet
   Luxury Home Décor & Glassware E-commerce
   ============================================ */

/* -------- CSS Variables / Design Tokens -------- */
:root {
    /* Colors - Elegant Luxury Palette */
    --color-primary: #1a1a1a;
    --color-secondary: #c9a962;
    --color-accent: #8b7355;
    --color-gold: #c9a962;
    --color-gold-light: #e5d4a8;
    --color-gold-dark: #a08848;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #f0ede8;
    --bg-dark: #1a1a1a;
    --bg-overlay: rgba(0, 0, 0, 0.5);

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-light: #ffffff;
    --text-gold: #c9a962;

    /* Border Colors */
    --border-light: #e5e5e5;
    --border-medium: #cccccc;
    --border-dark: #333333;

    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-arabic: 'Noto Sans Arabic', 'Segoe UI', sans-serif;

    /* Font Sizes */
    --fs-xs: 0.75rem;
    /* 12px */
    --fs-sm: 0.875rem;
    /* 14px */
    --fs-base: 1rem;
    /* 16px */
    --fs-md: 1.125rem;
    /* 18px */
    --fs-lg: 1.25rem;
    /* 20px */
    --fs-xl: 1.5rem;
    /* 24px */
    --fs-2xl: 2rem;
    /* 32px */
    --fs-3xl: 2.5rem;
    /* 40px */
    --fs-4xl: 3rem;
    /* 48px */
    --fs-5xl: 4rem;
    /* 64px */

    /* Font Weights */
    --fw-light: 300;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Spacing Scale (8px based) */
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.25rem;
    /* 20px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-10: 2.5rem;
    /* 40px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */
    --space-20: 5rem;
    /* 80px */
    --space-24: 6rem;
    /* 96px */

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;

    /* Container Widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1440px;

    /* Header Height */
    --header-height: 70px;
    --header-height-mobile: 60px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-normal);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: var(--fs-4xl);
}

h2 {
    font-size: var(--fs-3xl);
}

h3 {
    font-size: var(--fs-2xl);
}

h4 {
    font-size: var(--fs-xl);
}

h5 {
    font-size: var(--fs-lg);
}

h6 {
    font-size: var(--fs-md);
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* -------- Utility Classes -------- */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-4);
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* Grid Utilities */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns */
    gap: var(--space-6);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-uppercase {
    text-transform: uppercase;
}

.text-gold {
    color: var(--color-gold);
}

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

/* Spacing Utilities */
.mt-4 {
    margin-top: var(--space-4);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.py-8 {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

.py-12 {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

.py-16 {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

/* Display Utilities */
.hidden {
    display: none !important;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

/* -------- Buttons -------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--text-light);
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-primary);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--text-light);
}

.btn-gold {
    background-color: var(--color-gold);
    color: var(--bg-dark);
    border: 2px solid var(--color-gold);
}

.btn-gold:hover {
    background-color: var(--color-gold-dark);
    border-color: var(--color-gold-dark);
}

.btn-white {
    background-color: var(--bg-primary);
    color: var(--color-primary);
    border: 2px solid var(--bg-primary);
}

.btn-white:hover {
    background-color: transparent;
    color: var(--text-light);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--fs-base);
}

/* -------- Form Elements -------- */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* -------- Section Styles -------- */
.section {
    padding: var(--space-16) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-2);
}

.section-subtitle {
    font-size: var(--fs-base);
    color: var(--text-muted);
}

/* -------- Overlay & Modal Styles -------- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-overlay);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    z-index: var(--z-modal);
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
}

.modal.active {
    transform: translateX(0);
}

/* -------- Responsive Breakpoints -------- */
@media (max-width: 1024px) {
    :root {
        --fs-4xl: 2.5rem;
        --fs-3xl: 2rem;
        --fs-2xl: 1.75rem;
    }

    .grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --fs-4xl: 2rem;
        --fs-3xl: 1.75rem;
        --fs-2xl: 1.5rem;
        --header-height: var(--header-height-mobile);
    }

    .container {
        padding: 0 var(--space-4);
    }

    .section {
        padding: var(--space-12) 0;
    }

    .grid-cols-4,
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .btn-lg {
        padding: var(--space-3) var(--space-6);
        font-size: var(--fs-sm);
    }
}

/* -------- Animations -------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation utilities */
.animate-fadeIn {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fadeUp {
    animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slideUp {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Staggered animation delays for grids */
.stagger-1 {
    animation-delay: 0.05s;
}

.stagger-2 {
    animation-delay: 0.1s;
}

.stagger-3 {
    animation-delay: 0.15s;
}

.stagger-4 {
    animation-delay: 0.2s;
}

.stagger-5 {
    animation-delay: 0.25s;
}

.stagger-6 {
    animation-delay: 0.3s;
}

.stagger-7 {
    animation-delay: 0.35s;
}

.stagger-8 {
    animation-delay: 0.4s;
}

/* Scroll reveal state - elements start hidden */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* -------- Arabic Text Support -------- */
.rtl {
    direction: rtl;
    text-align: right;
}

.bilingual {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.bilingual .ar {
    font-family: var(--font-arabic);
    font-size: 0.9em;
    color: var(--text-muted);
}

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

/* Footer Currency Switcher */
.footer-currency {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.currency-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.currency-options {
    display: flex;
    gap: 5px;
}

.currency-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.currency-btn:hover,
.currency-btn.active {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

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

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

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


/* -------- Language Switcher (Header Right) -------- */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 15px;
    position: relative;
    pointer-events: auto;
}

.lang-btn {
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--color-gold);
}

.lang-separator {
    color: var(--border-medium);
    font-size: var(--fs-xs);
    margin: 0 2px;
}

/* -------- Currency Selector (Header Right) -------- */
.header-currency {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 10px;
    position: relative;
}

.currency-selector {
    position: relative;
    display: inline-block;
}

.currency-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 44px;
    justify-content: center;
}

.currency-trigger:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.currency-trigger.active {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.1);
}

.currency-flag {
    width: 20px;
    height: 15px;
    display: inline-block;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.currency-code {
    display: none; /* Hide currency code, show only flag */
}

.currency-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
    max-height: 400px;
    overflow-y: auto;
    pointer-events: none;
}

.currency-selector.open .currency-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.currency-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    font-size: var(--fs-sm);
    color: var(--text-primary);
}

.currency-option > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.currency-option:hover {
    background: var(--bg-secondary);
}

.currency-option.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-gold);
}

.currency-option-flag {
    width: 32px;
    height: 24px;
    display: block !important;
    flex-shrink: 0;
    border-radius: 3px;
    background-size: cover;
    background-position: center;
}

.currency-option-code {
    display: none !important; /* Hide currency code, show only flag */
}

.currency-option-name {
    font-size: var(--fs-sm);
    color: var(--text-primary);
    font-weight: var(--fw-medium);
}

/* Mobile Currency Selector */
@media (max-width: 768px) {
    .header-currency {
        margin: 0 5px;
    }
    
    .currency-trigger {
        padding: 5px 6px;
        min-width: 40px;
    }
    
    .currency-flag {
        font-size: 18px;
    }
    
    .currency-dropdown {
        right: 0;
        min-width: 180px;
    }
}