/* أنماط عامة */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #4895ef;
    --secondary-color: #f72585;
    --secondary-dark: #e21b75;
    --success-color: #06d6a0;
    --warning-color: #ffbe0b;
    --danger-color: #dc2f02;
    --dark-color: #2b2d42;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 35px rgba(0,0,0,0.15);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), #ff5d8f);
    --gradient-success: linear-gradient(135deg, var(--success-color), #0bb5a0);
    --gradient-warning: linear-gradient(135deg, var(--warning-color), #ff9f1c);
    --gradient-dark: linear-gradient(135deg, var(--dark-color), #1e1f2e);
    --gradient-light: linear-gradient(135deg, #f8f9fa, #e9ecef);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-circle: 50%;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #ffffff;
    color: var(--dark-color);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

/* أنماط العلامة التجارية */
.navbar {
    padding: 1rem 0;
    background: white !important;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 45px;
    width: auto;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover img {
    transform: rotate(5deg) scale(1.05);
}

.navbar-nav .nav-link {
    color: var(--dark-color) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(67, 97, 238, 0.05);
}

/* أنماط العناوين */
.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2.5rem;
    font-weight: 800;
    font-size: 2rem;
    color: var(--dark-color);
    text-align: center;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* أنماط شريط العروض */
#offersCarousel {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    position: relative;
}

.carousel-item {
    background: var(--gradient-light);
    position: relative;
    overflow: hidden;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.offer-banner {
    padding: 3rem;
    display: flex;
    align-items: center;
    min-height: 400px;
    position: relative;
    z-index: 1;
}

.offer-banner h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.offer-banner p {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.offer-product {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.offer-product img {
    max-height: 200px;
    border-radius: var(--border-radius-md);
    transition: transform var(--transition-normal);
}

.offer-product:hover img {
    transform: scale(1.05) rotate(2deg);
}

.price-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.original-price {
    text-decoration: line-through;
    color: var(--gray-color);
    font-size: 1.1rem;
}

.discount-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin: 0.25rem 0;
}

.discount-badge {
    background: var(--gradient-secondary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

/* أنماط البطاقات */
.product-card {
    background: white;
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    margin-bottom: 1.5rem;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card .image-wrapper {
    height: 220px;
    padding: 1.5rem;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card .image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.03) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-card:hover .image-wrapper::after {
    opacity: 1;
}

.product-card img {
    max-height: 180px;
    max-width: 100%;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card .card-body {
    padding: 1.5rem;
    flex: 1;
}

.product-card .card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    height: 3rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card .card-text {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    height: 2.7rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-top: auto;
}

.discount-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-secondary);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.price {
    margin: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price .original-price {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.price .discount-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.price .current-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* أنماط الفئات */
.category-card {
    background: white;
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.category-card .image-wrapper {
    height: 200px;
    padding: 1.5rem;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.category-card .image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.category-card:hover .image-wrapper::before {
    opacity: 0.1;
}

.category-card img {
    max-height: 150px;
    max-width: 100%;
    object-fit: contain;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 2;
}

.category-card:hover img {
    transform: scale(1.1) rotate(5deg);
}

.category-card .card-body {
    padding: 1.5rem;
}

.category-card .card-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.category-card .product-count {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* أنماط الأزرار */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    box-shadow: 0 5px 15px rgba(247, 37, 133, 0.3);
}

.btn-secondary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 37, 133, 0.4);
}

/* أنماط التقييمات */
.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    font-size: 1.8rem;
    color: #ddd;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.rating-stars label:hover,
.rating-stars label:hover ~ label,
.rating-stars input:checked ~ label {
    color: var(--warning-color);
    transform: scale(1.1);
}

.rating-stars input:checked + label {
    color: var(--warning-color);
}

.stars {
    color: var(--warning-color);
    font-size: 1rem;
}

.stars i {
    margin: 0 1px;
    transition: all var(--transition-fast);
}

.stars i:hover {
    transform: scale(1.2);
}

/* أنماط التذييل */
footer {
    background: var(--gradient-dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

footer h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

footer h5:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-primary);
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin-bottom: 0.75rem;
}

footer ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
    display: inline-block;
}

footer ul li a:hover {
    color: white;
    transform: translateX(-5px);
}

.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-circle);
    color: white;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
}

.social-icons a:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px) scale(1.1);
}

.payment-methods {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.payment-methods img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: all var(--transition-fast);
}

.payment-methods img:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* أنماط الاستجابة */
@media (max-width: 1200px) {
    .offer-banner {
        padding: 2rem;
        min-height: 350px;
    }
    
    .offer-banner h3 {
        font-size: 2rem;
    }
    
    .offer-product {
        flex-direction: column;
        text-align: center;
    }
    
    .offer-product img {
        max-height: 150px;
    }
}

@media (max-width: 992px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        text-align: center;
    }
    
    .offer-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .offer-banner h3 {
        font-size: 1.5rem;
    }
    
    .product-card .image-wrapper {
        height: 180px;
    }
    
    .product-card img {
        max-height: 140px;
    }
    
    .category-card .image-wrapper {
        height: 150px;
    }
    
    .category-card img {
        max-height: 120px;
    }
    
    footer {
        text-align: center;
    }
    
    footer h5:after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .payment-methods {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .offer-banner {
        padding: 1.5rem;
    }
    
    .offer-banner h3 {
        font-size: 1.3rem;
    }
    
    .offer-product {
        padding: 1rem;
    }
    
    .discount-price {
        font-size: 1.5rem;
    }
}

/* تأثيرات إضافية */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* شريط التمرير المخصص */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}