/**
 * Shop Unified CSS
 * ملف CSS موحد للـ Categories Navbar و Footer
 * أي تعديل هنا ينعكس تلقائياً على جميع الصفحات
 * Version: 1.0
 */

/* ===== CATEGORIES NAVBAR ===== */
.categories-navbar {
    padding: 15px 0 10px;
    background: rgba(20, 20, 30, 0.98);
    backdrop-filter: blur(20px);
    overflow-x: auto;
    scrollbar-width: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 998;
    border-bottom: 1px solid var(--border-color);
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Adjust position when header collapses on scroll */
.header-collapsed .categories-navbar {
    top: 55px;
}

/* Auto-hide categories bar on scroll */
.categories-navbar.navbar-hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.categories-navbar::-webkit-scrollbar {
    display: none;
}

.categories-navbar-inner {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.cat-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
    text-decoration: none;
}

.cat-nav-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cat-nav-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 600;
}

/* Featured Category Link */
.cat-nav-link.featured-link {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
}

.cat-nav-link.featured-link:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.cat-nav-link.featured-link.active {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    border-color: #ffd700;
    color: #000;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
}

.cat-nav-link.featured-link i {
    animation: crown-shine 2s ease-in-out infinite;
}

@keyframes crown-shine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; text-shadow: 0 0 10px #ffd700; }
}

/* ===== FOOTER ===== */
.shop-footer {
    position: relative;
    background: var(--bg-secondary);
    border-top: 2px solid transparent;
    background-image: 
        linear-gradient(var(--bg-secondary), var(--bg-secondary)),
        linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    padding: 40px 0 0;
    margin-top: 20px;
    overflow: hidden;
}

.footer-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 100px;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.shop-footer .container {
    position: relative;
    z-index: 1;
}

.footer-top {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 30px;
}

/* قسم معلومات المتجر */
.footer-about {
    padding-left: 30px;
}

.footer-logo {
    margin-bottom: 15px;
}

.footer-logo img {
    height: 45px;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
}

.footer-logo h2 {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.footer-stats {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: center;
}

.footer-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    width: 85px;
    height: 85px;
}

.footer-stat:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.footer-stat i {
    font-size: 1.1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-stat strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

.footer-stat span {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 1;
}

/* قسم طرق الدفع تحت الإحصائيات */
.footer-payment-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-payment-section h3,
.footer-payment-section h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.payment-methods {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.payment-badge {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: help;
}

.payment-badge:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

/* الحقوق في المنتصف */
.footer-copyright-center {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* الحقوق في الموبايل - مخفية بشكل افتراضي */
.footer-copyright-mobile {
    display: none;
}

.copyright-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    direction: ltr;
    white-space: nowrap;
}

.copyright-text strong {
    color: var(--primary);
}

.copyright-text .separator {
    color: var(--text-muted);
    font-weight: bold;
}

.copyright-text i.fa-heart {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* عناوين الأقسام */
.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-bottom: 12px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.footer-title i {
    font-size: 1.1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* قوائم الروابط */
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 8px;
}

.footer-links-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.footer-links-list a i {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.footer-links-list a:hover {
    color: var(--primary);
    padding-right: 10px;
}

.footer-links-list a:hover i {
    transform: translateX(-5px);
}

/* قسم التواصل */
.footer-contact {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-item:hover::before {
    opacity: 1;
}

.contact-item:hover {
    transform: translateX(-5px);
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.2);
}

.contact-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-icon.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.contact-icon.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #005580 100%);
    color: white;
}

.contact-icon.email {
    background: linear-gradient(135deg, #ea4335 0%, #c5221f 100%);
    color: white;
}

.contact-info {
    flex: 1;
}

.contact-info span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-info strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.85rem;
    direction: ltr;
    text-align: right;
}

/* وسائل التواصل الاجتماعي */
.footer-social {
    margin-top: 20px;
}

.footer-social h3,
.footer-social h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon:hover {
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.social-icon.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5ec4 100%);
}

.social-icon.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #005580 100%);
}

.social-icon.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.social-icon.instagram {
    background: linear-gradient(135deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

/* ===== RESPONSIVE - Categories Navbar ===== */
@media (max-width: 992px) {
    .categories-navbar {
        top: 70px;
        justify-content: flex-start;
    }
    
    .categories-navbar-inner {
        justify-content: flex-start;
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .categories-navbar {
        top: 55px;
        padding: 8px 0;
    }
    
    /* Keep mobile position constant when header collapsed */
    .header-collapsed .categories-navbar {
        top: 55px;
    }
    
    .categories-navbar-inner {
        justify-content: flex-start;
        padding: 0 15px;
    }
    
    .cat-nav-link {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

/* ===== RESPONSIVE - Footer ===== */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Footer Responsive */
    .footer { padding: 40px 0 20px; }
    .footer-grid { 
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }
    .footer-section { text-align: center; }
    
    /* 1. معلومات المتجر - عرض كامل */
    .footer-about { 
        order: 1;
        width: 100%;
        padding-left: 0; 
        border-left: none; 
        padding-bottom: 20px; 
        border-bottom: 1px solid var(--border-color); 
    }
    .footer-logo { justify-content: center; }
    .footer-description { text-align: center; }
    .footer-stats { justify-content: center; flex-wrap: nowrap; gap: 10px; }
    .footer-stat { 
        width: 75px;
        height: 75px;
        padding: 10px;
    }
    .footer-stat i { font-size: 1rem; }
    .footer-stat strong { font-size: 0.85rem; }
    .footer-stat span { font-size: 0.6rem; }
    .footer-payment-section { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border-color); }
    .footer-payment-section h4 { font-size: 0.8rem; }
    .payment-methods { justify-content: center; gap: 8px; }
    .payment-badge { width: 40px; height: 40px; font-size: 1rem; }
    
    /* 2 & 3. روابط سريعة والأقسام جنب بعض */
    .footer-grid .footer-section:nth-child(2),
    .footer-grid .footer-section:nth-child(3) {
        order: 2;
        width: calc(50% - 10px);
        text-align: right;
        padding: 0 5px;
    }
    
    .footer-title { font-size: 0.9rem; justify-content: flex-start; }
    .footer-links-list { text-align: right; }
    .footer-links-list li a { justify-content: flex-start; font-size: 0.85rem; }
    .footer-categories { columns: 1; text-align: right; }
    .footer-category-link { font-size: 0.85rem; }
    
    /* إخفاء الحقوق من داخل الروابط السريعة */
    .footer-grid .footer-section:nth-child(2) .footer-copyright-center {
        display: none !important;
    }
    
    /* 4. تواصل معنا - عرض كامل */
    .footer-grid .footer-section:nth-child(4) { 
        order: 3;
        width: 100%;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
    }
    .contact-items { gap: 10px; }
    .contact-item { padding: 10px; font-size: 0.85rem; }
    .contact-icon { width: 48px; height: 48px; font-size: 1rem; }
    
    /* 5. تابعنا على - عرض كامل */
    .footer-grid .footer-section:nth-child(4) .footer-social {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
    }
    .social-icons { justify-content: center; gap: 8px; }
    .social-icon { width: 48px; height: 48px; font-size: 1rem; }
    
    /* 6. الحقوق في النهاية - للموبايل فقط */
    .footer-copyright-mobile {
        display: block;
        width: 100%;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
        text-align: center;
    }
    .footer-copyright-mobile .copyright-text { 
        font-size: 0.75rem; 
        gap: 5px; 
        flex-wrap: wrap; 
    }
}

/* ===== CHANNELS CTA BANNER ABOVE FOOTER ===== */
.shop-channels-banner-section {
    padding: 40px 0 20px;
    position: relative;
    z-index: 5;
    margin-top: 30px;
    border-top: 2px solid transparent;
    background-image: 
        linear-gradient(var(--bg-primary), var(--bg-primary)),
        linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.shop-channels-banner-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 100px;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.cta-channels-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 768px) {
    .cta-channels-container.has-both {
        grid-template-columns: 1fr 1fr;
    }
}

/* Telegram CTA Banner */
.telegram-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 40px;
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 136, 204, 0.3);
    position: relative;
    overflow: hidden;
}

.telegram-cta::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: left 0.5s ease;
}

.telegram-cta:hover::before {
    left: 100%;
}

.telegram-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 136, 204, 0.4);
}

.telegram-cta i {
    font-size: 1.8rem;
    animation: pulse-telegram 2s infinite;
}

@keyframes pulse-telegram {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* WhatsApp CTA Banner */
.whatsapp-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 40px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    position: relative;
    overflow: hidden;
}

.whatsapp-cta::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: left 0.5s ease;
}

.whatsapp-cta:hover::before {
    left: 100%;
}

.whatsapp-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.4);
}

.whatsapp-cta i {
    font-size: 1.8rem;
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (max-width: 768px) {
    .telegram-cta, .whatsapp-cta {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
        font-size: 0.95rem;
    }
    .telegram-cta i, .whatsapp-cta i { font-size: 1.5rem; }
}

/* ===== LIGHT THEME OVERRIDES FOR UNIFIED COMPONENTS ===== */
[data-theme="light"] .categories-navbar {
    background: rgba(241, 245, 249, 0.96);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .cat-nav-link.featured-link {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
    border-color: rgba(217, 119, 6, 0.3);
    color: #b45309; /* Darker amber/gold for readability in light mode */
}

[data-theme="light"] .cat-nav-link.featured-link:hover {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    border-color: #b45309;
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.2);
}

[data-theme="light"] .cat-nav-link.featured-link.active {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    border-color: #ffd700;
    color: #000;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

[data-theme="light"] .shop-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background-image: 
        linear-gradient(var(--bg-secondary), var(--bg-secondary)),
        linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

[data-theme="light"] .footer-glow {
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
}

[data-theme="light"] .shop-channels-banner-section::before {
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .cat-nav-link:hover {
    border-color: var(--secondary) !important;
    color: var(--secondary) !important;
}

[data-theme="light"] .copyright-text strong {
    color: var(--secondary) !important;
}

[data-theme="light"] .footer-links-list a:hover {
    color: var(--secondary) !important;
}

[data-theme="light"] .contact-item:hover {
    border-color: var(--secondary) !important;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .payment-badge:hover {
    border-color: var(--secondary) !important;
    color: var(--secondary) !important;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .footer-stat:hover {
    border-color: var(--secondary) !important;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15) !important;
}

[data-theme="light"] .cat-nav-link.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

@media (max-width: 768px) {
    .categories-navbar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--bg-secondary) !important;
        -webkit-overflow-scrolling: touch;
    }
}
