/**
 * Shop Header & Footer Styles
 * Common styles for all store pages
 */

/* ===== CSS VARIABLES ===== */
:root {
    --primary: #00d4ff;
    --primary-rgb: 0, 212, 255;
    --primary-dark: #00a8cc;
    --secondary: #6366f1;
    --secondary-rgb: 99, 102, 241;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-tertiary: #1a1a25;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b7280;
    --border-color: #2a2a3a;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);
}

/* ===== BASE STYLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; }

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    padding-top: 120px; /* Space for fixed header + categories bar */
}

a { text-decoration: none; color: inherit; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== HEADER ===== */
.shop-header {
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-top {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.shop-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.shop-logo img { height: 45px; }

/* Search Button */
.search-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
}

.search-overlay.active { display: flex; }

.search-box {
    width: 100%;
    max-width: 700px;
    padding: 0 20px;
}

.search-box form { position: relative; }

.search-box input {
    width: 100%;
    padding: 20px 60px 20px 25px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 60px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
}

.search-box button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 1.1rem;
    cursor: pointer;
}

.search-close {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
}

.search-close:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Nav Links */
.shop-nav-links { 
    display: flex; 
    gap: 12px; 
    align-items: center;
}

.shop-nav-links a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    position: relative;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    outline: 1px solid var(--border-color);
    outline-offset: 3px;
}

.shop-nav-links a:hover,
.shop-nav-links a.active {
    color: #fff;
    background: var(--bg-secondary);
    border-color: rgba(255,255,255,0.2);
    outline-color: var(--primary);
    outline-offset: 5px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.shop-nav-links a i {
    color: var(--primary);
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.shop-nav-links a:hover i,
.shop-nav-links a.active i {
    transform: scale(1.1);
    text-shadow: 0 0 10px var(--primary);
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
}

.header-icon:hover,
.header-icon.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

.header-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--danger);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

/* ===== CATEGORIES NAVBAR ===== */
.categories-navbar {
    padding: 10px 0;
    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: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.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 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.cat-nav-link:hover,
.cat-nav-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
}

.cat-nav-link i { font-size: 0.9rem; }

/* ===== MOBILE NAVIGATION ===== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 2000;
    transition: right 0.3s ease;
    padding: 20px;
    box-shadow: -5px 0 30px rgba(0,0,0,0.5);
}

.mobile-nav.active { right: 0; }

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-links a {
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-weight: 600;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: var(--primary);
    color: #000;
}

.mobile-nav-links a i {
    width: 20px;
    text-align: center;
}

.mobile-nav-links a.exit-link {
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.mobile-nav-links a.exit-link:hover {
    background: var(--danger);
    color: #fff;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1999;
}

.mobile-nav-overlay.active { display: block; }

/* ===== FOOTER ===== */
/* ===== 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: 60px;
    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: 15px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
}

.footer-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    border: 2px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
    width: 110px;
    height: 110px;
}

.footer-stat:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.footer-stat i {
    font-size: 1.2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-stat strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
}

.footer-stat span {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* قسم طرق الدفع تحت الإحصائيات */
.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;
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
}

.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 ===== */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    body { padding-top: 70px; }
    
    .shop-nav-links { display: none; }
    
    .mobile-menu-btn { display: flex; }
    
    .categories-navbar {
        top: 70px;
        justify-content: flex-start;
    }
    
    .categories-navbar-inner {
        justify-content: flex-start;
        padding: 0 10px;
    }
    
    .header-icons { gap: 10px; }
    
    .header-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-about {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .footer-about .footer-logo {
        justify-content: center;
        display: flex;
    }
    
    .footer-about .footer-description {
        text-align: center;
    }
    
    .footer-about .footer-stats {
        justify-content: center;
        flex-wrap: nowrap;
        gap: 15px;
    }
    
    .footer-about .footer-stat {
        width: 80px;
        height: 80px;
        padding: 10px;
    }
    
    .footer-about .footer-stat i {
        font-size: 1rem;
    }
    
    .footer-about .footer-stat strong {
        font-size: 0.85rem;
    }
    
    .footer-about .footer-stat span {
        font-size: 0.55rem;
    }
    
    .footer-about .footer-payment-section {
        text-align: center;
    }
    
    .footer-about .footer-payment-section h3 {
        justify-content: center;
    }
    
    .footer-about .payment-methods {
        justify-content: center;
    }
    
    .footer-section:last-child {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .footer-section:last-child .footer-social {
        text-align: center;
    }
    
    .footer-section:last-child .footer-social h3 {
        justify-content: center;
    }
    
    .footer-section:last-child .social-icons {
        justify-content: center;
    }
    
    .footer-stats {
        justify-content: center;
    }
    
    .footer-copyright-center { display: none; }
    .footer-copyright-mobile { display: block; }
    
    .copyright-text { justify-content: center; }
}

@media (max-width: 768px) {
    .container { padding: 0 15px; }
    
    body { padding-top: 135px; }
    
    .shop-nav { 
        flex-wrap: nowrap; 
        gap: 8px; 
        padding: 8px 10px;
        justify-content: space-between;
    }
    
    .shop-logo {
        flex-shrink: 0;
        order: 1;
    }
    
    .shop-logo img { height: 32px; }
    
    .header-icons {
        gap: 6px;
        flex-shrink: 0;
        order: 2;
    }
    
    .header-icons .header-icon { 
        width: 36px; 
        height: 36px; 
        font-size: 0.9rem; 
    }
    
    .header-icons .header-icon .badge {
        top: -3px;
        right: -3px;
        min-width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
    
    .search-btn { 
        width: 36px; 
        height: 36px; 
        font-size: 0.9rem;
    }
    
    .mobile-menu-btn {
        order: 3;
        width: 36px;
        height: 36px;
        padding: 3px;
        font-size: 1.3rem;
        flex-shrink: 0;
    }
    
    .categories-navbar {
        top: 85px;
        padding: 8px 0;
    }
    
    .categories-navbar-inner {
        justify-content: flex-start;
        padding: 0 15px;
    }
    
    .cat-nav-link {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .footer-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .footer-stat {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-icons { gap: 5px; }
    
    .header-icon {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .search-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .mobile-menu-btn {
        width: 34px;
        height: 34px;
        font-size: 1.2rem;
    }
    
    .shop-logo img { height: 28px; }
}
