/* =================================================
   PINGO DIGITAL SHOWROOM - CSS
   LUXURY FUTURISTIC STORE
   VERSION 6.0 - 2026
================================================= */

/* ===============================
   استيراد الخطوط (GOOGLE FONTS)
================================ */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700&family=Cairo:wght@300;400;600;700&display=swap');

/* ===============================
   المتغيرات الأساسية (ROOT VARIABLES)
================================ */
:root {
    --bg-dark: #000000;
    --bg-soft: #060606;
    
    --primary-blue: #4FC3F7;
    --primary-blue-dark: #00AEEF;
    
    --text-white: #ffffff;
    --text-gray: #8b8b8b;
    
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    
    --transition-main: 0.6s cubic-bezier(.23, 1, .32, 1);
    
    --perspective: 1400px;
}

/* ===============================
   الإعدادات العامة (GLOBAL RESET)
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Cairo', sans-serif;
    color: var(--text-white);
    background-color: var(--bg-dark);
    /* الخلفية الافتراضية - ستتغير بواسطة الجافاسكريبت */
    background-image: url('bg.jpg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden; /* لمنع التمرير (السكرول) العادي ليكون العرض ثلاثي الأبعاد */
    position: relative;
}

/* العناوين والأرقام بالخط الأجنبي الاحترافي */
h1, h2, h3, .item-price, .size-btn, .add-to-cart-btn, .cart-count {
    font-family: 'Orbitron', sans-serif;
}

/* ===============================
   الإضاءة الخلفية (DYNAMIC SPOTLIGHT)
================================ */
.dynamic-spotlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle at center, rgba(79, 195, 247, 0.15) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
    transition: background 0.8s ease;
}

/* ===============================
   الشريط العلوي (TOP BAR)
================================ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.brand-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-white);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-login-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-gray);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: var(--transition-main);
}

.admin-login-btn:hover {
    color: var(--text-white);
    border-color: var(--text-white);
}

.floating-cart {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(10px);
    transition: var(--transition-main);
}

.floating-cart:hover {
    transform: scale(1.1);
    border-color: var(--primary-blue);
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.3);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-blue);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

/* ===============================
   شريط الأندية الجانبي (CLUBS SIDEBAR) - الميزة الجديدة
================================ */
.clubs-sidebar {
    position: absolute;
    right: 2%; /* يقع على يمين الشاشة */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.club-btn {
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* تأثير ارتداد جميل */
}

.club-btn img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: 0.3s;
}

/* النص الذي يظهر عند تمرير الماوس على أيقونة النادي (Tooltip) */
.club-btn .club-name {
    position: absolute;
    right: 75px; /* يظهر على يسار الزر */
    background: var(--primary-blue);
    color: #000;
    padding: 8px 15px;
    border-radius: 20px;
    font-family: 'Orbitron', 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translateX(15px);
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.club-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-blue);
    transform: scale(1.1);
}

.club-btn:hover .club-name {
    opacity: 1;
    transform: translateX(0);
}

/* حالة الزر النشط (النادي المختار) */
.club-btn.active {
    border-color: var(--primary-blue);
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.6);
    background: rgba(79, 195, 247, 0.15);
    transform: scale(1.15);
}

.club-btn.active img {
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.8));
}

/* ===============================
   منطقة العرض الرئيسية (MAIN VIEWPORT)
================================ */
.main-viewport {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* ===============================
   العرض ثلاثي الأبعاد (3D CAROUSEL TRACK)
================================ */
.depth-track-container {
    perspective: var(--perspective);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 0;
    top: 0;
}

.depth-track {
    position: relative;
    width: 500px;
    height: 600px;
    transform-style: preserve-3d;
}

.product-item {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), 
                opacity 0.8s ease, 
                filter 0.8s ease;
    will-change: transform, opacity;
}

.hanger-system {
    width: 4px;
    height: 60px;
    background: linear-gradient(to bottom, #555, #222);
    border-radius: 2px;
    margin-bottom: -10px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    z-index: 2;
}

.shirt-visual {
    width: 100%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 30px 20px rgba(0,0,0,0.6));
    animation: floatingCloth 6s ease-in-out infinite;
    z-index: 3;
}

.floor-reflection {
    width: 60%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 70%);
    margin-top: 20px;
    border-radius: 50%;
}

/* ===============================
   لوحة معلومات المنتج (INFO PANEL UI)
================================ */
.info-panel-ui {
    position: absolute;
    /* تم تعديل الموقع لليسار قليلاً كي لا يغطي على شريط الأندية الذي على اليمين */
    right: 15%; 
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: linear-gradient(135deg, rgba(10,10,10,0.8), rgba(20,20,20,0.4));
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.item-name {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.3s ease;
}

.item-desc {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
}

.item-price {
    font-size: 2rem;
    color: var(--primary-blue);
    font-weight: 700;
}

/* ===============================
   اختيار المقاسات (SIZE SELECTOR)
================================ */
.size-selector-ui {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.size-selector-ui .label {
    font-size: 0.8rem;
    color: var(--text-gray);
    letter-spacing: 2px;
}

.size-grid {
    display: flex;
    gap: 10px;
}

.size-btn {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-main);
    font-size: 1rem;
}

.size-btn:hover {
    background: rgba(255,255,255,0.1);
}

.size-btn.active {
    background: var(--text-white);
    color: #000;
    border-color: var(--text-white);
    font-weight: 700;
}

/* ===============================
   زر الإضافة للسلة (ADD TO CART BUTTON)
================================ */
.add-to-cart-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    padding: 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: var(--transition-main);
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover {
    background: var(--text-white);
    color: #000;
    box-shadow: 0 10px 20px rgba(255,255,255,0.2);
}

/* ===============================
   عناصر الديكور (DECORATION)
================================ */
.measuring-tape-ui {
    position: absolute;
    left: 40px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0.5;
    z-index: 10;
}

.tape-line {
    width: 2px;
    height: 100px;
    background: repeating-linear-gradient(to bottom, var(--text-white) 0, var(--text-white) 2px, transparent 2px, transparent 10px);
}

.measuring-tape-ui span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 3px;
}

/* ===============================
   سلة التسوق (CART OVERLAY & MODAL)
================================ */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-modal {
    background: #111;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--glass-border);
    position: relative;
    transform: translateY(50px);
    transition: transform 0.4s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.cart-overlay.active .cart-modal {
    transform: translateY(0);
}

.close-cart {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-cart:hover {
    color: white;
}

/* نموذج الشراء داخل السلة */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkout-form input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 14px;
    border-radius: 12px;
    color: white;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.checkout-form input:focus {
    border-color: var(--primary-blue);
    background: rgba(255,255,255,0.1);
}

/* ===============================
   الأنيميشن (ANIMATIONS)
================================ */
@keyframes floatingCloth {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-14px) rotate(1deg);
    }
    66% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

/* ===============================
   الاستجابة للشاشات (RESPONSIVE)
================================ */
@media(max-width: 1024px) {
    .depth-track {
        width: 420px;
        height: 520px;
    }
    .item-name {
        font-size: 2.2rem;
    }
    .info-panel-ui {
        right: 12%;
        width: 300px;
    }
    .clubs-sidebar {
        right: 1%;
    }
}

@media(max-width: 768px) {
    .main-viewport {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 15vh;
    }
    .depth-track-container {
        position: relative;
        height: 50vh;
    }
    .depth-track {
        width: 300px;
        height: 360px;
    }
    
    /* تعديل شريط الأندية للموبايل ليصبح أفقياً في الأسفل أو الأعلى */
    .clubs-sidebar {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        width: 100%;
        margin-bottom: 20px;
        z-index: 100;
    }
    
    .club-btn .club-name {
        display: none; /* إخفاء الاسم في الموبايل للحفاظ على المساحة */
    }

    .info-panel-ui {
        position: relative;
        width: 90%;
        right: 0;
        top: 0;
        transform: none;
        text-align: center;
        padding: 20px;
        margin: 0 auto;
        background: rgba(10,10,10,0.9);
    }
    
    .size-selector-ui {
        align-items: center;
    }
    
    .size-grid {
        justify-content: center;
        width: 100%;
    }

    .measuring-tape-ui {
        display: none; /* إخفاء الديكور في الموبايل */
    }
}
