/* نسخ كامل لستايل كروت وصفحة PS4 لضمان التطابق التام مع صفحة PS5 */

/* إعدادات المتجر الأساسية - Gaming Theme */
:root {
    --primary-color: #ff0000;
    --secondary-color: #ffd700;
    --bg-dark: #0a0a0a;
    --card-bg: #161616;
    --text-color: #ffffff;
    --whatsapp-color: #25d366;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-dark);
    color: var(--text-color);
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    direction: rtl;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* الهيدر - VIP Gaming Style */
.acc-header {
    background: 
        radial-gradient(ellipse at top, rgba(255, 0, 0, 0.15), transparent 70%),
        linear-gradient(180deg, #111 0%, #050505 100%);
    padding: 35px 20px 25px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 0, 0, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 -4px 15px rgba(255,0,0,0.1);
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.acc-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff0000, transparent);
    animation: scanline-header 3s linear infinite;
}

@keyframes scanline-header {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.acc-header .header-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.main-logo {
    width: 85px;
    border: 2px solid #ff0000;
    border-radius: 20px;
    padding: 5px;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    margin-bottom: 5px;
    transition: 0.4s ease;
    animation: acc-logo-pulse 2s infinite;
}

@keyframes acc-logo-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

.acc-header h1,
.acc-header .store-name {
    font-size: 2.1rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to bottom, #ffffff 0%, #aaaaaa 50%, #777777 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.8));
    position: relative;
    display: inline-block;
}

.acc-header h1::after,
.acc-header .store-name::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    animation: acc-text-shine 5s infinite ease-in-out;
}

@keyframes acc-text-shine {
    0% { left: -150%; transform: skewX(-20deg); }
    20% { left: 150%; transform: skewX(-20deg); }
    100% { left: 150%; transform: skewX(-20deg); }
}

/* لون اللينك حول اللوجو */
.acc-header a {
    display: inline-block;
    text-decoration: none;
    border: none;
    outline: none;
}

.acc-header p.store-slogan {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffd700;
    margin-top: 5px;
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 0, 0, 0.4);
    padding: 6px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5), inset 0 0 8px rgba(255,0,0,0.2);
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

/* شبكة المنتجات */
.container {
    padding: 5px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
        padding: 16px;
    }
}

/* ==============================
   كارت المنتج - محسّن
   ============================== */
.product-card {
    background: #111;
    border-radius: 16px;
    padding: 0;
    text-align: center;
    border: 1.5px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

/* صورة اللعبة */
.product-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* معلومات الكارت السفلية */
.product-card h3 {
    font-size: 0.78rem;
    margin: 8px 8px 2px;
    line-height: 1.3;
    height: 30px;
    overflow: hidden;
    color: #eee;
    font-weight: 700;
}

.game-size-tag {
    color: var(--secondary-color);
    font-size: 0.72rem;
    font-weight: 900;
    margin: 0 8px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.game-size-tag::before {
    content: '💾';
    font-size: 0.65rem;
}

.price {
    font-size: 0.95rem;
    font-weight: 900;
    color: #fff;
    margin: 0 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.price::before {
    content: '💰';
    font-size: 0.75rem;
}

/* زر إضافة للسلة */
.add-btn {
    width: calc(100% - 16px);
    margin: 0 8px 10px;
    background: linear-gradient(135deg, #ff0000, #cc0000) !important;
    color: #fff !important;
    border: none;
    padding: 10px 5px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: 0.82rem;
    cursor: pointer;
    transition: 0.25s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255,0,0,0.3);
}

.add-btn:hover {
    background: linear-gradient(135deg, #ff2222, #ff0000) !important;
    box-shadow: 0 6px 18px rgba(255,0,0,0.5);
    transform: translateY(-1px);
}

.add-btn:active {
    transform: scale(0.96);
    background: #cc0000 !important;
}

/* كارت مضاف للسلة */
.product-card.added-to-cart {
    border-color: var(--whatsapp-color) !important;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4) !important;
}

.product-card.added-to-cart .add-btn {
    background: linear-gradient(135deg, #25d366, #1aaa50) !important;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}

/* badge "جديد" */
.new-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 4;
    box-shadow: 0 2px 8px rgba(255,0,0,0.4);
    letter-spacing: 0.5px;
}

/* السلة */
.cart-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.cart-content {
    background: #121212;
    width: 95%;
    max-width: 420px;
    border-radius: 25px;
    border: 2px solid var(--primary-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-items-list {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid #333;
}

.cart-item-info { display: flex; align-items: center; gap: 10px; }

.cart-item-img {
    width: 45px; height: 45px;
    object-fit: contain;
    border-radius: 5px;
    background: #000;
}

.cart-item-details { display: flex; flex-direction: column; text-align: right; }

.cart-item-name {
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price { font-size: 0.75rem; color: var(--primary-color); }

.remove-item-btn { background: transparent; border: none; cursor: pointer; font-size: 1rem; }

.checkout-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }

.checkout-form input {
    width: 100%;
    padding: 14px;
    background: #000;
    border: 1px solid #333;
    border-radius: 10px;
    color: white;
    text-align: center;
    font-family: 'Cairo';
    font-size: 16px !important;
}

.confirm-btn {
    width: 100%;
    background: var(--whatsapp-color);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

.clear-cart-btn {
    width: 100%;
    background: rgba(255, 0, 0, 0.12);
    color: #fff;
    padding: 12px;
    border: 1px solid rgba(255, 0, 0, 0.45);
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 6px;
    transition: 0.25s ease;
}

.clear-cart-btn:hover {
    background: rgba(255, 0, 0, 0.22);
    box-shadow: 0 0 16px rgba(255, 0, 0, 0.35);
    transform: translateY(-1px);
}

.close-modal-btn {
    width: 100%;
    background: transparent;
    color: #888;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Cairo';
    margin-top: 5px;
}

/* الفلتر */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 20px 0;
    flex-wrap: wrap;
    padding: 0 10px;
}

.filter-btn {
    background: #161616;
    color: #fff;
    border: 1px solid #333;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Cairo';
    font-weight: bold;
    font-size: 0.82rem;
    transition: 0.25s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

/* أيقونة السلة العائمة */
.cart-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--primary-color);
    width: 55px; height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,0,0,0.4);
    transition: transform 0.2s ease;
}

.cart-toggle:hover { transform: scale(1.1); }

.cart-count {
    position: absolute;
    top: 0; right: 0;
    background: white;
    color: black;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* البحث */
.search-container {
    padding: 10px 20px;
    max-width: 600px;
    margin: 0 auto;
}

#gameSearch {
    width: 100%;
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid #333;
    background: #161616;
    color: white;
    font-family: 'Cairo', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

#gameSearch:focus { border-color: var(--primary-color); }

/* أنيميشن الطيران */
.flying-img {
    pointer-events: none;
    z-index: 10001;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.5);
    filter: brightness(1.1);
}

@keyframes basket-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.cart-bounce { animation: basket-bounce 0.4s ease-in-out; }

/* أيقونة القلب */
.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    border: none;
    color: #fff;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.wishlist-btn:hover { background: rgba(255,0,0,0.7); transform: scale(1.15); }
.wishlist-btn.active { color: #ff0000; background: rgba(0,0,0,0.8); }

/* زر المفضلة العائم */
.wishlist-toggle {
    position: fixed;
    bottom: 90px;
    left: 20px;
    background: #1a1a1a;
    border: 1px solid #ff0000;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: 0.3s;
}

.wishlist-toggle:hover { background: #ff0000; transform: scale(1.1); }

/* ==============================
   نافذة وصف اللعبة (Popup)
   ============================== */
.desc-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    z-index: 20000;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.desc-content {
    background: #121212;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    padding: 20px;
    width: 95%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    text-align: center;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.3);
    animation: popIn 0.25s ease;
}

@keyframes popIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.desc-img-large {
    width: 100%;
    max-width: 280px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #333;
    margin: 0 auto;
    display: block;
}

.close-desc {
    position: absolute;
    top: 12px;
    left: 15px;
    font-size: 1.8rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-desc:hover { color: #ff0000; }

.desc-info-bar {
    display: flex;
    justify-content: space-around;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: bold;
}