/* =========================================
   ✨ CLEO SHOP - LUXURY PERFORMANCE (V10)
   ========================================= */

:root {
    --gold: #D4AF37;
    --gold-light: #F2D06B;
    --dark-bg: #0a0a0a;
    --card-bg: #141414;
    --border: #333333;
    --white: #ffffff;
    --success: #28a745;
}

/* 1. Base Reset & RTL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--dark-bg);
    color: var(--white);
    direction: rtl;
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.luxury-font {
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
}

.text-gold { color: var(--gold) !important; }

/* 2. Optimized Navbar */
.navbar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    z-index: 1000;
}

/* 3. 🚀 PERFORMANCE FIX: Matches 1216x880 image ratio to kill CLS */
.product-main-img-container {
    background: #fff;
    border-radius: 20px;
    aspect-ratio: 1216 / 880; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
}

#p-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: opacity 0.15s ease-in-out;
}

/* 4. Selection Logic: Offer Cards */
.offer-card {
    background: #1a1a1a;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

/* Active selection highlight */
.offer-card.active {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.offer-mini-img {
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
}

/* 5. 🚀 ACCESSIBILITY FIX: Visible Focus Rings */
.custom-input:focus, 
.btn-gold:focus, 
.offer-card:focus {
    outline: 3px solid var(--gold-light);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.2) !important;
}

/* 6. Form Styling & Wilaya Fix */
.custom-input {
    background: #1a1a1a !important;
    border: 1px solid var(--border) !important;
    color: white !important;
    padding: 14px !important;
    border-radius: 12px !important;
}

/* 🚀 FIX: إصلاح مشكلة تداخل أسهم القائمة المنسدلة */
.form-select.custom-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23D4AF37' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: left 0.75rem center !important; /* وضع السهم في اليسار لأن الموقع RTL */
    background-size: 16px 12px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    padding-left: 2.5rem !important;
}

/* 7. Performance: Review Container */
.main-review-container {
    content-visibility: auto; 
    contain-intrinsic-size: 1px 1000px;
}

.btn-gold {
    background: linear-gradient(45deg, var(--gold), var(--gold-light));
    border: none;
    color: #000;
    font-weight: 700;
    border-radius: 50px;
    padding: 12px 24px;
    transition: 0.2s;
}

.btn-gold:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transform: scale(1.03);
}

/* 8. Mobile Fixes */
@media (max-width: 768px) {
    .custom-input {
        background-repeat: no-repeat !important;
    }
}