/* الألوان الأساسية والمتغيرات */
:root {
    --primary: #ff0000;
    --dark: #0a0a0a;
    --card-bg: #1a1a1a;
    --text: #ffffff;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark);
    color: var(--text);
    overflow-x: hidden;
}

/* شاشة التحميل (Preloader) */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease;
}

.loader-logo {
    font-size: 3rem;
    color: var(--primary);
    font-weight: bold;
    text-shadow: 0 0 20px var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.5; }
}

/* الهيدر والنافبار */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px 0;
}

/* حالة الهيدر عند السكرول */
header.scrolled {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

/* تصميم اللوجو 3D */
.logo {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s;
}

.logo-t {
    color: #ff0000;
    font-size: 2.5rem;
    text-shadow: 0 0 15px #ff0000;
}

.logo span {
    font-weight: 300;
    color: #ccc;
}

/* روابط التنقل التفاعلية */
.nav-links {
    display: flex;
    gap: 35px;
}

.nav-item {
    text-decoration: none;
    color: #eee;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
    transition: 0.3s;
}

.nav-item span {
    position: relative;
    z-index: 1;
}

/* تأثير الخط الأحمر عند الـ Hover */
.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff0000;
    box-shadow: 0 0 10px #ff0000;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.nav-item:hover::after {
    width: 100%;
}

/* خط النيون السفلي */
.header-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0; /* يبدأ من الصفر ويتحرك بالـ JS */
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff0000, transparent);
    transition: 0.5s;
}

header.scrolled .header-line {
    width: 100%;
}

/* Responsive Menu */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* يمكن إضافة قائمة جانبية هنا */
    }
}

/* قسم الترحيب (Home) */
#home {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1558769132-cb1aea458c5e?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    perspective: 1000px;
}
#home {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1a0505 0%, #000 100%);
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

/* فلتر زجاجي للترحيب */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    padding: 60px 80px;
    border-radius: 40px;
    border: 1px solid rgba(255, 0, 0, 0.1);
    text-align: center;
    transform-style: preserve-3d;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: floating 4s infinite ease-in-out;
}

@keyframes floating {
    0%, 100% { transform: translateY(0) rotateX(2deg); }
    50% { transform: translateY(-20px) rotateX(-2deg); }
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 10px;
    transform: translateZ(50px);
}

.red-text {
    color: #ff0000;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.divider {
    width: 80px;
    height: 4px;
    background: #ff0000;
    margin: 20px auto;
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: #ccc;
    margin-bottom: 40px;
    font-weight: 300;
    transform: translateZ(30px);
}

/* أزرار الهوم */
.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    transform: translateZ(40px);
}

.btn-primary {
    background: #ff0000;
    color: #fff;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.4s;
    box-shadow: 0 0 20px rgba(255,0,0,0.4);
}

.btn-outline {
    border: 1px solid #ff0000;
    color: #ff0000;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.4s;
}

.btn-primary:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px #ff0000;
}

/* مؤشر السكرول */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid #ff0000;
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: #ff0000;
    border-radius: 2px;
    animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 20px); }
}

#home h2 {
    font-size: 4rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    transform: translateZ(50px);
    text-shadow: 5px 5px 15px rgba(255,0,0,0.5);
}

#home p {
    font-size: 1.5rem;
    color: #ccc;
}

/* كروت المنتجات 3D */
/* تنسيق قسم المنتجات */
#products {
    background-color: #050505;
    padding: 100px 5%;
    perspective: 1500px; /* لعمق الـ 3D */
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding-top: 40px;
}

/* تصميم الكارت 3D */
.card {
    background: #111;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    transform-style: preserve-3d;
    cursor: pointer;
}
/* استهداف العنوان داخل قسم المنتجات */
#products h2 {
    font-size: 5rem !important; /* حجم ضخم للهيبة */
    text-align: center;
    text-transform: uppercase;
    color: #ff0000;
    font-weight: 900;
    letter-spacing: 15px;
    position: relative;
    margin-bottom: 80px !important;
    cursor: default;
    
    /* تأثير الظل الطبقي لخلق بعد 3D */
    text-shadow: 
        0 1px 0 #800000,
        0 2px 0 #700000,
        0 3px 0 #600000,
        0 4px 0 #500000,
        0 5px 0 #400000,
        0 6px 1px rgba(0,0,0,.1),
        0 0 5px rgba(255,0,0,.1),
        0 1px 3px rgba(255,0,0,.3),
        0 3px 5px rgba(255,0,0,.2),
        0 5px 10px rgba(255,0,0,.25),
        0 10px 10px rgba(255,0,0,.2),
        0 20px 20px rgba(0,0,0,.15);
        
    transition: all 0.5s ease;
    -webkit-box-reflect: below -20px linear-gradient(transparent, rgba(255,0,0,0.1)); /* انعكاس سفلي */
}

/* تأثير الحركة عند مرور الماوس (Hover) */
#products h2:hover {
    letter-spacing: 25px; /* النص يتمدد */
    color: #fff; /* يتحول للأبيض المتوهج */
    text-shadow: 
        0 0 3px #ff0000,
        0 0 20px #ff0000,
        0 0 40px #ff0000,
        0 0 80px #ff0000,
        0 0 120px #ff0000;
    transform: translateY(-10px) rotateX(10deg);
}

/* خط ديناميكي تحت العنوان */
#products h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: #ff0000;
    box-shadow: 0 0 20px #ff0000;
    border-radius: 2px;
    transition: width 0.5s ease;
}

#products h2:hover::after {
    width: 300px; /* الخط يتمدد مع النص */
}

.card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    display: block;
}

/* عند تمرير الماوس */
.card:hover {
    border-color: #ff0000;
    box-shadow: 0 200px 400px rgba(255, 0, 0, 0.25);
}

.card:hover img {
    transform: scale(1.15) translateZ(30px);
}

/* صندوق المعلومات المتحرك */
.info {
    padding: 25px;
    background: linear-gradient(to top, #000 70%, transparent);
    position: absolute;
    bottom: 0;
    width: 100%;
    transform: translateZ(50px); /* تبرز النصوص للأمام */
    transition: 0.4s;
}

.info h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.price {
    color: #ff0000;
    font-size: 1.6rem;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

/* أنيميشن الظهور من الجهات المختلفة */
.card:nth-child(odd) { transform: translateX(-50px); opacity: 0; transition: 1s; }
.card:nth-child(even) { transform: translateX(50px); opacity: 0; transition: 1s; }
.card.reveal-active { transform: translateX(0); opacity: 1; }

.section-heading {
    font-size: 3rem;
    color: #ff0000;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 60px;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.product-card {
    position: relative;
    height: 450px;
    transform-style: preserve-3d;
    cursor: pointer;
}

.card-content {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #151515;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border 0.3s ease;
}

.product-card:hover .card-content {
    border: 1px solid #ff0000;
}

.image-box {
    width: 100%;
    height: 70%;
    overflow: hidden;
    transform: translateZ(20px); /* Image floats slightly */
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.product-card:hover img {
    transform: scale(1.1) translateY(-10px);
}

.product-info {
    padding: 20px;
    text-align: center;
    transform: translateZ(40px); /* Text floats higher than image */
}

.product-info h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.price-tag {
    color: #ff0000;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

.buy-btn {
    background: transparent;
    border: 1px solid #ff0000;
    color: #ff0000;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
    opacity: 0; /* Hidden until hover */
    transform: translateY(20px);
}

.product-card:hover .buy-btn {
    opacity: 1;
    transform: translateY(0);
    background: #ff0000;
    color: #fff;
}

/* 3D shadow effect */
.card-shadow {
    position: absolute;
    bottom: -20px;
    left: 5%;
    width: 90%;
    height: 20px;
    background: rgba(255, 0, 0, 0.1);
    filter: blur(15px);
    border-radius: 50%;
    transition: 0.5s;
}

.product-card:hover .card-shadow {
    background: rgba(255, 0, 0, 0.3);
    width: 100%;
    left: 0;
   
}
.about-3d {
    position: relative;
    padding: 150px 10%;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* التوهج الأحمر في الخلفية */
.about-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,0,0,0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.about-frame {
    position: relative;
    background: rgba(15, 15, 15, 0.7);
    padding: 60px;
    border-radius: 40px;
    border-left: 5px solid #ff0000; /* خط أحمر جانبي */
    backdrop-filter: blur(20px);
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    transform-style: preserve-3d;
    max-width: 800px;
}

.about-title {
    font-size: 3.5rem;
    color: #ff0000;
    text-transform: uppercase;
    font-weight: 900;
    margin-bottom: 30px;
    transform: translateZ(50px);
    text-shadow: 4px 4px 0px #300000;
}

.about-text-box {
    transform: translateZ(30px);
}

.main-text {
    font-size: 1.4rem;
    line-height: 1.8;
    color: #e0e0e0;
    font-weight: 300;
}

.highlight {
    color: #ff0000;
    font-weight: bold;
    font-size: 1.6rem;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

/* الأشكال العائمة Decorative Elements */
.floating-shape {
    position: absolute;
    background: linear-gradient(45deg, #ff0000, transparent);
    border-radius: 50%;
    opacity: 0.2;
    z-index: -1;
}

.shape-1 { width: 100px; height: 100px; top: -20px; right: -20px; animation: float 6s infinite ease-in-out; }
.shape-2 { width: 150px; height: 150px; bottom: -50px; left: -50px; animation: float 8s infinite ease-in-out reverse; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

/* استجابة الموبايل */
@media (max-width: 768px) {
    .about-title { font-size: 2.5rem; }
    .main-text { font-size: 1.1rem; }
}

/* قسم التواصل Contact */
/* تنسيق قسم التواصل */
#contact {
    background: #050505;
    padding: 100px 0;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.contact-info {
    text-align: center;
    transform-style: preserve-3d;
}

/* عنوان القسم بتأثير 3D نيون */
.section-title {
    font-size: 5rem;
    color: transparent;
    -webkit-text-stroke: 1px #ff0000;
    text-transform: uppercase;
    letter-spacing: 10px;
    margin-bottom: 50px;
    position: relative;
    transition: 0.5s;
    cursor: default;
}

.section-title:hover {
    color: #ff0000;
    text-shadow: 0 0 20px #ff0000, 0 0 50px #ff0000;
}

/* شبكة الأيقونات 3D */
.socials-grid {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

.social-box {
    position: relative;
    width: 100px;
    height: 100px;
    background: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: 15px;
    transition: 0.5s;
    border: 1px solid rgba(255, 0, 0, 0.2);
    transform-style: preserve-3d;
}

.social-box img {
    width: 40px;
    filter: invert(1);
    transition: 0.5s;
    transform: translateZ(30px); /* أيقونة تطفو فوق المكعب */
}

.social-box span {
    font-size: 0.7rem;
    color: #fff;
    margin-top: 10px;
    opacity: 0;
    transition: 0.5s;
    transform: translateZ(20px);
}

/* تأثير التوهج عند التحويم */
.social-box:hover {
    transform: rotateY(15deg) rotateX(-15deg) translateY(-10px);
    border-color: #ff0000;
    box-shadow: 
        -5px 5px 0px #800000,
        -10px 10px 20px rgba(255, 0, 0, 0.3);
}

.social-box:hover img {
    filter: invert(1) drop-shadow(0 0 10px #ff0000);
}

.social-box:hover span {
    opacity: 1;
    color: #ff0000;
}

/* تأثير الإضاءة الخلفية */
.social-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--primary);
    filter: blur(40px);
    opacity: 0;
    transition: 0.5s;
    z-index: -1;
}

.social-box:hover::before {
    opacity: 0.4;
}
/* أيقونات السوشيال ميديا */

/* الحركات (Animations) */
.reveal {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.reveal-left { transform: translateX(-100px); }
.reveal-right { transform: translateX(100px); }
.reveal-up { transform: translateY(100px); }

.reveal.active {
    opacity: 1;
    transform: translate(0,0);
}

/* Responsive */
@media (max-width: 768px) {
    #home h2 { font-size: 2.5rem; }
    nav { flex-direction: column; gap: 15px; }
}