/* =========================================
   إعدادات عامة
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

:root {
    --bg-dark: #121212;
    --text-light: #f5f5f5;
    --accent: #c9a063;
    --accent-light: #f5e6c8;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* =========================================
   خلفية الصفحة
   ========================================= */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.4) contrast(1.1);
    z-index: -2;
}

.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.7) 0%, 
        rgba(18,18,18,0.95) 50%,
        rgba(18,18,18,1) 100%);
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   حاوية التموجات
   ========================================= */
.ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(201, 160, 99, 0.5);
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    animation: rippleExpand 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    box-shadow: 
        0 0 20px rgba(201, 160, 99, 0.3),
        inset 0 0 20px rgba(201, 160, 99, 0.15);
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(201, 160, 99, 0.3);
}

@keyframes rippleExpand {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    60% { opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* =========================================
   شريط التنقل
   ========================================= */
.navbar {
    position: relative;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(18, 18, 18, 0.5);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(201, 160, 99, 0.1);
}

.logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 3px;
    color: white;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(201, 160, 99, 0.6);
}

.nav-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.back-btn, .cart-btn {
    text-decoration: none;
    color: white;
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 30px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    transition: 0.3s;
    font-weight: 700;
    font-size: 14px;
}

.back-btn:hover {
    background: var(--accent);
    color: black;
    border-color: var(--accent);
    transform: translateX(5px);
}

.cart-btn:hover {
    background: var(--accent);
    color: black;
    border-color: var(--accent);
}

/* =========================================
   قسم المنتجات
   ========================================= */
.products-section {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px 100px;
}

/* رأس الصفحة */
.page-header {
    text-align: center;
    margin-bottom: 70px;
}

.page-title {
    font-size: 68px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.title-line {
    display: block;
}

.highlight-line {
    background: linear-gradient(90deg, #c9a063, #f5e6c8, #c9a063, #a67c3d);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradientMove 4s ease-in-out infinite;
    filter: drop-shadow(0 0 25px rgba(201, 160, 99, 0.4));
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.page-subtitle {
    font-size: 18px;
    color: #aaaaaa;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

/* =========================================
   شبكة التصنيفات
   ========================================= */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    perspective: 1000px;
}

/* =========================================
   بطاقة التصنيف
   ========================================= */
.category-card {
    position: relative;
    padding: 40px 30px;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.8), rgba(15, 15, 15, 0.9));
    border: 1px solid rgba(201, 160, 99, 0.15);
    border-radius: 24px;
    text-decoration: none;
    color: white;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    backdrop-filter: blur(10px);
    min-height: 280px;
}

/* تأثير الإضاءة الداخلية */
.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(201, 160, 99, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.category-card:hover::before {
    opacity: 1;
}

/* تأثير اللمعان المتحرك */
.card-glow {
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 160, 99, 0.2), transparent);
    transition: right 0.8s ease;
    pointer-events: none;
}

.category-card:hover .card-glow {
    right: 100%;
}

/* تأثير الحافة الذهبية */
.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(201, 160, 99, 0.5), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.category-card:hover::after {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(201, 160, 99, 0.4);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(201, 160, 99, 0.2);
}

/* أيقونة البطاقة */
.card-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(201, 160, 99, 0.15), rgba(139, 105, 20, 0.1));
    border: 1px solid rgba(201, 160, 99, 0.3);
    border-radius: 18px;
    color: var(--accent);
    margin-bottom: 25px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
}

.card-icon svg {
    width: 40px;
    height: 40px;
    transition: transform 0.5s ease;
}

.category-card:hover .card-icon {
    background: linear-gradient(135deg, var(--accent), #8B6914);
    color: #121212;
    transform: rotate(-8deg) scale(1.1);
    box-shadow: 0 10px 25px rgba(201, 160, 99, 0.4);
}

.category-card:hover .card-icon svg {
    transform: scale(1.1);
}

/* عنوان البطاقة */
.card-title {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 10px;
    color: #fff;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.category-card:hover .card-title {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(201, 160, 99, 0.5);
}

/* وصف البطاقة */
.card-desc {
    font-size: 14px;
    color: #999999;
    line-height: 1.6;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

/* تذييل البطاقة */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
    transition: border-color 0.3s ease;
}

.category-card:hover .card-footer {
    border-color: rgba(201, 160, 99, 0.3);
}

.card-count {
    font-size: 13px;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-arrow {
    font-size: 20px;
    color: #666;
    transition: all 0.4s ease;
    display: inline-block;
}

.category-card:hover .card-arrow {
    color: var(--accent);
    transform: translateX(-8px);
}

/* =========================================
   التجاوب مع الشاشات
   ========================================= */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .logo { font-size: 22px; }
    
    .back-btn, .cart-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .products-section {
        padding: 40px 20px 60px;
    }
    
    .page-title {
        font-size: 42px;
    }
    
    .page-subtitle {
        font-size: 15px;
    }
    
    .page-header {
        margin-bottom: 45px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .category-card {
        padding: 30px 25px;
        min-height: 240px;
    }
    
    .card-title {
        font-size: 22px;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
    }
    
    .card-icon svg {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 34px;
    }
    
    .navbar {
        padding: 12px 15px;
    }
    
    .nav-icons {
        gap: 8px;
    }
    
    .back-btn, .cart-btn {
        padding: 7px 12px;
        font-size: 11px;
    }
}