/* تصميم الصفحة الرئيسية الحديث */

/* New Products Section - قسم المنتجات الجديدة */
.new-products-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 0, 119, 182), 0.05) 0%, rgba(var(--secondary-rgb, 0, 180, 216), 0.05) 100%);
    border-radius: 25px;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.new-products-section::before {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.1;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.2;
    }
}

.new-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 10px;
    animation: pulse-badge 2s ease-in-out infinite;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

@keyframes pulse-badge {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
    }
}

.new-products-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.new-products-section .products-grid {
    margin-top: 20px;
}

.new-products-subheader {
    font-size: 0.95rem;
    margin: 0;
}

/* تأثير hover خاص للمنتجات الجديدة */
.new-products-section .product-card {
    position: relative;
}

.new-products-section .product-card::after {
    content: 'جديد';
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    z-index: 2;
}

.new-products-section .product-card:hover {
    transform: translateY(-8px) scale(1.02);
}

@media (max-width: 768px) {
    .new-products-section {
        padding: 20px;
        margin: 30px 0;
    }

    .new-products-section::before {
        font-size: 2rem;
        top: 15px;
        right: 15px;
    }

    .new-badge {
        font-size: 0.7rem;
        padding: 3px 10px;
    }
}

/* Hero Section - القسم الرئيسي */
.hero-section {
    /* Styles moved to banners.css to avoid duplication and ghost cards */
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero-section h2,
.hero-section p {
    position: relative;
    z-index: 2;
    color: white !important;
}

.hero-section .btn {
    position: relative;
    z-index: 2;
    background: white;
    color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.hero-section .btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.hero-section .btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* Features Section - قسم الميزات */
.features-section {
    margin: 50px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Categories Section - قسم الفئات */
.categories-section {
    margin: 50px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.1;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.category-card:hover::before {
    width: 300px;
    height: 300px;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
}

/* Stats Section - قسم الإحصائيات */
.stats-section {
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 25px;
    color: white;
}

.stats-header-white {
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 0;
    }

    .hero-section h2 {
        font-size: 1.8rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 25px 20px;
    }

    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .category-card {
        padding: 25px 15px;
    }

    .category-icon {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 0;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* QR Scanner Specific Styles */
.qr-scanner-container {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    min-height: 250px;
}

.scanner-flex-column {
    gap: 10px;
    flex-direction: column;
}

.scanner-instruction {
    font-size: 0.9rem;
    margin-top: 15px;
}