/* css/themes/nexus-theme.css - التصميم فقط */
:root {
    --primary-color: #6c63ff;
    --primary-dark: #5a52d5;
    --secondary-color: #ff6584;
    --accent-color: #36d1dc;
    --background-color: #0f0f23;
    --surface-color: #1a1a2e;
    --card-color: #242442;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d0;
    --text-muted: #8a8aa3;
    --border-color: #343456;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --gradient-primary: linear-gradient(135deg, #6c63ff, #36d1dc);
    --gradient-secondary: linear-gradient(135deg, #ff6584, #ffcb36);
    --shadow-light: 0 4px 12px rgba(108, 99, 255, 0.15);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-heavy: 0 12px 36px rgba(0, 0, 0, 0.35);
}

body {
    background-color: var(--background-color);
    color: var(--text-primary);
}

/* Header */
header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-medium);
}

.logo {
    color: var(--text-primary);
}

.logo span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu a {
    color: var(--text-secondary);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.cart-icon {
    color: var(--text-primary);
}

.cart-count {
    background: var(--gradient-secondary);
    color: white;
}

.category-nav a {
    color: var(--text-secondary);
}

.category-nav a:hover {
    color: var(--primary-color);
}

.category-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

.category-nav a:hover::after {
    width: 100%;
}

.create-bundle {
    background: var(--gradient-primary);
    color: white;
}

.create-bundle:hover {
    background: var(--primary-dark);
}

/* Search Section */
.search-box {
    background: var(--card-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-light);
}

.search-box::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: var(--gradient-primary);
    color: white;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.search-suggestions {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-heavy);
}

.suggestion-group {
    border-bottom-color: var(--border-color);
}

.suggestion-group-title {
    color: var(--text-muted);
}

.suggestion-item {
    color: var(--text-primary);
}

.suggestion-item:hover {
    background: var(--card-color);
}

.suggestion-icon {
    color: var(--primary-color);
}

.suggestion-model {
    color: var(--text-muted);
}

/* Floating Search Button */
.floating-search-btn {
    background: var(--gradient-primary);
    color: white;
}

/* Notification Banner */
.notification-banner {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-medium);
}

.step-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ========== تصاميم الصور الجديدة (مثل موقع alienware) ========== */

/* الصورة في الكروت الرئيسية */
.product-image {
    width: 100%;
    height: 300px;
    /* غير من 200px لـ 300px */
    object-fit: contain;
    background: var(--card-color);
    border-radius: 8px;
    padding: 15px;
}

/* الصورة الكبيرة في صفحة التفاصيل */
.product-image-large {
    flex: 1;
    background: #000000;
    /* خلفية سوداء */
    border-radius: 12px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #333;
    min-height: 500px;
    position: relative;
}

.product-image-large img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    border-radius: 8px;
}

/* صور السلة */
.cart-item-image {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background: #000000;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #333;
}

/* منع حفظ الصور */
.product-image-large {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.product-image-large img {
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* حماية إضافية للصور */
img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* =============================
   Product Detail Page (FINAL FIX)
   ============================= */
.product-detail {
    display: flex;
    gap: 50px;
    margin-top: 30px;
    align-items: flex-start;
    min-height: 70vh;
}

.product-info {
    flex: 1;
    padding-left: 30px;
}

@media (max-width: 768px) {
    .product-detail {
        flex-direction: column;
        gap: 30px;
    }

    .product-info {
        padding-left: 0;
    }
}

/* Add to Cart Button */
.add-to-cart-large {
    background: var(--gradient-primary);
    color: #fff;
    padding: 18px 40px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 30px;
    width: 100%;
}

.add-to-cart-large:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* Bundle Offers Styling */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4444;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
    font-size: 0.9em;
}

/* تحسينات لل features */
.product-features {
    margin: 25px 0;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.product-features h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.product-features li:before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 10px;
}

.product-features li:last-child {
    border-bottom: none;
}

/* ============================
   Focus Accessibility Styles
   ============================ */
a:focus,
button:focus,
.pagination-btn:focus {
    outline: 3px solid rgba(108, 99, 255, 0.22);
    outline-offset: 3px;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .product-detail {
        flex-direction: column;
        gap: 30px;
    }

    .product-image-large {
        min-height: 400px;
        padding: 30px;
    }

    .product-info {
        padding: 0;
    }

    .product-image {
        height: 200px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .product-image-large {
        min-height: 350px;
        padding: 20px;
    }

    .product-image-large img {
        max-height: 400px;
    }

    .product-image {
        height: 180px;
        padding: 12px;
    }
}

/* تحسين عرض الصور في كل الأماكن */
.category-brand-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
}

/* تحسين grid المنتجات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.product-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

/* تحسين محتوى الكارد */
.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
    flex: 1;
}

.product-formats {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.add-to-cart {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.add-to-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* تحسين صفحة تفاصيل المنتج */
.product-detail {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    align-items: flex-start;
}

.product-image-large {
    flex: 1;
    background: var(--card-color);
    border-radius: 15px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.product-info {
    flex: 1;
}

.product-detail-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.product-detail-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.product-detail-price {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.product-detail-formats {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.product-detail-formats span {
    font-weight: bold;
    color: var(--primary-color);
}

.product-meta {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.product-meta-item {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
}

.product-meta-label {
    font-weight: bold;
    width: 120px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.product-meta-value {
    color: var(--text-secondary);
    flex: 1;
}

/* تحسين الـ Home Page */
#homePage .products-grid {
    margin-top: 40px;
}

/* تحسين صفحات العلامات التجارية */
#phoneBrandPage .products-grid,
#tabletBrandPage .products-grid,
#laptopBrandPage .products-grid,
#earbudsBrandPage .products-grid,
#LensesBrandPage .products-grid,
#gamingBrandPage .products-grid,
#cameraBrandPage .products-grid {
    margin-top: 40px;
}

/* تحسين الـ Search Results */
#searchResultsPage .products-grid {
    margin-top: 30px;
}

/* تحسين الـ Cart */
.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.cart-item-price {
    font-weight: bold;
    color: var(--primary-color);
}

.cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--error-color);
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s;
}

.cart-item-remove:hover {
    background: rgba(244, 67, 54, 0.1);
}

.cart-summary {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.checkout-btn {
    background: var(--gradient-primary);
    color: white;
}

.checkout-btn:hover {
    background: var(--primary-dark);
}

/* Checkout */
.billing-info,
.payment-info {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--card-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Category Pages */
.category-brand-card {
    background: var(--card-color);
    box-shadow: var(--shadow-medium);
}

.category-brand-card:hover {
    box-shadow: var(--shadow-heavy);
}

.category-brand-name {
    color: var(--text-primary);
}

.category-brand-models {
    color: var(--text-muted);
}

/* Pagination */
.pagination-btn {
    background: var(--card-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
}

.pagination-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.footer-title {
    color: var(--text-primary);
}

.footer-links li {
    color: var(--text-secondary);
}

.footer-links i {
    color: var(--primary-color);
}

.copyright {
    color: var(--text-muted);
    border-top-color: var(--border-color);
}

/* تحسين الـ Responsive */
@media (max-width: 768px) {
    .nav-menu {
        background: var(--surface-color);
    }

    .product-detail {
        flex-direction: column;
        gap: 20px;
    }

    .product-image-large {
        min-height: 300px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .product-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .cart-item-image {
        width: 120px;
        height: 120px;
    }
}

/* ------------------------
   (2) focus accessibility (global)
   نضيفه بعد كل قواعد الـ responsive
   ------------------------ */
a:focus,
button:focus,
.pagination-btn:focus {
    outline: 3px solid rgba(108, 99, 255, 0.22);
    outline-offset: 3px;
}

/* ------------------------
   (3) reduced motion preference (global)
   نضيفه آخر شيء في الملف
   ------------------------ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* زر Add to Cart في صفحة التفاصيل */
.add-to-cart-large {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    width: 100%;
}

.add-to-cart-large:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* تحسينات لل features */
.product-features {
    margin: 25px 0;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.product-features h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.product-features ul {
    list-style: none;
    padding: 0;
}

.product-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.product-features li:before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 10px;
}

.product-features li:last-child {
    border-bottom: none;
}

/* تأكد من أن الـ product-info في صفحة التفاصيل مش بيكون فيه مشاكل */
#productDetailContent .product-info {
    flex: 1;
    padding: 0 0 0 20px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    #productDetailContent .product-info {
        padding: 20px 0 0 0;
    }
}