:root {
    --primary-color: #2196f3;
    --secondary-color: #ffc107;
    --dark-color: #333;
    --light-color: #f4f4f4;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Header Styles */
.navbar {
    background-color: #131921;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    position: relative;
    z-index: 1000;
}

.navbar-brand {
    color: #fff;
    font-size: 1.8rem;
    padding: 0;
    margin: 0;
}

.navbar-brand h1 {
    font-size: 1.8rem;
    color: #fff;
}

.deliver-to {
    display: flex;
    align-items: center;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
}

.deliver-to:hover {
    border: 1px solid #fff;
    border-radius: 2px;
    padding: calc(0.5rem - 1px);
}

.deliver-to i {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.deliver-text {
    display: flex;
    flex-direction: column;
}

.deliver-text small {
    font-size: 0.7rem;
    color: #ccc;
}

.deliver-text span {
    font-size: 0.9rem;
    font-weight: bold;
}

.search-bar {
    max-width: 800px;
}

.search-bar .input-group {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.category-select {
    max-width: 120px;
    border: none;
    background-color: #f3f3f3;
    color: #333;
    border-right: 1px solid #ddd;
}

.btn-search {
    background-color: #febd69;
    color: #333;
    border: none;
    width: 45px;
}

.btn-search:hover {
    background-color: #f3a847;
}

.cart-section {
    padding: 0.5rem;
}

.cart-section:hover {
    border: 1px solid #fff;
    border-radius: 2px;
    padding: calc(0.5rem - 1px);
}

.cart-link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.cart-count {
    color: #f08804;
    margin: 0 0.5rem;
    font-weight: bold;
}

.secondary-nav {
    background-color: #232f3e;
    padding: 0.5rem 0;
}

.secondary-nav .nav-link {
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.secondary-nav .nav-link:hover {
    border: 1px solid #fff;
    border-radius: 2px;
    padding: calc(0.5rem - 1px) calc(1rem - 1px);
}

/* Hero Section */
.hero-section {
    margin: 0;
    padding: 0;
    width: 100%;
    margin-top: 10px;
}

.carousel {
    position: relative;
    margin: 0;
    width: 100%;
}

.carousel-inner {
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.carousel-item {
    height: 550px;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-indicators {
    margin-bottom: 1rem;
    z-index: 15;
    position: absolute;
    bottom: 10px;
}

.carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: #000;
    transform: scale(1.2);
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Categories Section */
.categories-container {
    position: relative;
    padding: 0 40px;
    margin-bottom: 2rem;
}

.categories-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 1rem;
    padding: 1rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-wrapper::-webkit-scrollbar {
    display: none;
}

.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-button.left {
    left: 5px;
}

.scroll-button.right {
    right: 5px;
}

.category-card {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #131921;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #131921;
}

.category-name {
    font-size: 1rem;
    margin: 0;
    color: #131921;
}

/* Product Cards Styling */
.product-card {
    transition: all 0.3s ease;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.product-card .card-img-top {
    width: 100%;
    height: 280px;
    object-fit: contain;
    background: transparent;
    padding: 12px;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.25rem;
    background: transparent;
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: #333;
    line-height: 1.4;
    min-height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center !important;
    width: 100%;
}

.product-card .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00796b;
    margin-bottom: 0.5rem;
    text-align: center !important;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.product-card .original-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 0.9rem;
    margin-right: 8px;
    display: block;
    text-align: center;
    margin-bottom: 4px;
    opacity: 0.7;
}

.product-card .current-price {
    color: #ffb300;
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
    text-align: center;
    background: linear-gradient(45deg, #ffb300, #ffb301);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    padding: 2px 0;
}

.product-card .current-price::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #ffb300, #ffb301);
    transition: width 0.3s ease;
}

.product-card:hover .current-price::after {
    width: 100%;
}

.product-card:hover .current-price {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.product-card .wishlist-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #e74c3c;
    font-size: 1.2rem;
    z-index: 2;
    cursor: pointer;
    transition: transform 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px;
    border-radius: 50%;
}

.product-card .wishlist-icon:hover {
    transform: scale(1.1);
}

.product-card .wishlist-icon.active {
    color: #e74c3c;
}

/* تحسينات للعرض على الأجهزة المحمولة */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 15px;
    }

    .product-card .card-img-top {
        height: 220px;
    }

    .product-card .card-title {
        font-size: 0.9rem;
        min-height: 2.4rem;
    }
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 10px 0;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-price {
    font-size: 1.2rem;
    color: #e67e22;
    font-weight: 700;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.sale-price {
    color: #ff4444;
    font-weight: bold;
}

.regular-price {
    color: #333;
    font-weight: bold;
}

.add-to-cart-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin-top: auto;
    transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
    background: #0056b3;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 2;
}

.wishlist-btn i {
    color: #666;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.wishlist-btn:hover i {
    color: #ff4444;
}

.wishlist-btn.active i {
    color: #ff4444;
}

/* Feature Cards */
.feature-card {
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.feature-card i {
    color: #ffb300;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin: 1rem 0;
}

/* Section Titles */
.section-title {
    position: relative;
    margin-bottom: 2rem;
    font-weight: bold;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #ffb300;
    margin: 1rem auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .product-card {
        margin-bottom: 1rem;
    }

    .feature-card {
        margin-bottom: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
    }

    .product-title {
        font-size: 1rem;
    }

    .navbar-brand h1 {
        font-size: 1.5rem;
    }
}

/* Footer Styling */
footer {
    background-color: #131921 !important;
}

footer h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: #ff9900;
}

footer .list-unstyled li {
    margin-bottom: 0.8rem;
}

footer .list-unstyled li a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

footer .list-unstyled li a::before {
    content: '←';
    position: absolute;
    right: -20px;
    opacity: 0;
    transition: all 0.3s ease;
}

footer .list-unstyled li a:hover {
    color: #ff9900;
    padding-right: 20px;
}

footer .list-unstyled li a:hover::before {
    opacity: 1;
}

footer .social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background-color: #ff9900;
    transform: translateY(-3px);
}

/* About Page Styling */
.about-page {
    background-color: #f8f9fa;
}

.about-page .display-4 {
    color: #131921;
    font-weight: 600;
}

.about-page .lead {
    color: #666;
}

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.value-card i {
    font-size: 2.5rem;
    color: #ff9900;
}

.value-card h3 {
    color: #131921;
    font-size: 1.5rem;
    margin: 1rem 0;
}

.value-card p {
    color: #666;
    margin: 0;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.statistics .stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.statistics .counter {
    color: #ff9900;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.statistics p {
    color: #131921;
    font-weight: 500;
    margin: 0;
}

.about-page ul li {
    margin-bottom: 1rem;
    color: #666;
}

.about-page ul li i {
    color: #28a745;
}

/* تأثيرات حركية للبطاقات */
.value-card,
.stat-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.value-card.show,
.stat-card.show {
    opacity: 1;
    transform: translateY(0);
}

.value-card:nth-child(2) {
    transition-delay: 0.2s;
}

.value-card:nth-child(3) {
    transition-delay: 0.4s;
}

/* تحسين تنسيق الأرقام في الإحصائيات */
.counter {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(45deg, #ff9900, #ff5722);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Privacy & Terms Pages Styling */
.privacy-page,
.terms-page {
    background-color: #f8f9fa;
}

.privacy-page h1,
.terms-page h1 {
    color: #131921;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.privacy-page h1::after,
.terms-page h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #ff9900, #ff5722);
}

.privacy-section,
.terms-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.privacy-section h2,
.terms-section h2 {
    color: #131921;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ff9900;
    display: inline-block;
}

.privacy-section p,
.terms-section p {
    color: #666;
    line-height: 1.6;
}

.privacy-section ul,
.terms-section ul {
    list-style: none;
    padding-left: 0;
}

.privacy-section ul li,
.terms-section ul li {
    color: #666;
    margin-bottom: 0.8rem;
    padding-right: 1.5rem;
    position: relative;
}

.privacy-section ul li::before,
.terms-section ul li::before {
    content: '•';
    color: #ff9900;
    font-size: 1.2rem;
    position: absolute;
    right: 0;
    top: -2px;
}

/* تحسين تجربة المستخدم */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover:after {
    width: 100%;
}

.btn-primary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.category-title {
    font-size: 1.5rem;
    color: #34495e;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

/* تحسينات للموبايل */
@media (max-width: 768px) {

    /* تحسين القائمة العلوية */
    .navbar-brand span {
        font-size: 1.2rem;
    }

    /* تحسين عرض المنتجات */
    .product-card {
        margin-bottom: 1rem;
    }

    .product-card .card-body {
        padding: 0.8rem;
    }

    .product-card .card-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    /* تحسين أزرار الشراء */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        margin: 0.2rem 0;
    }

    /* تحسين سلة المشتريات */
    .cart-item {
        padding: 0.5rem;
    }

    .cart-item img {
        max-width: 80px;
    }

    /* تحسين النماذج */
    .form-control {
        font-size: 1rem;
        padding: 0.5rem;
    }

    /* تحسين التباعد */
    .container {
        padding: 0.5rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin: 1rem 0;
    }

    /* تحسين صفحة تفاصيل المنتج */
    .product-details img {
        max-height: 300px;
        object-fit: contain;
    }

    /* تحسين الهوامش والمسافات */
    .my-4 {
        margin: 1rem 0 !important;
    }

    .py-4 {
        padding: 1rem 0 !important;
    }
}

/* تحسينات إضافية للشاشات الصغيرة جداً */
@media (max-width: 576px) {

    /* تصغير العناصر أكثر */
    .navbar-brand span {
        font-size: 1rem;
    }

    .product-card .card-title {
        font-size: 0.9rem;
    }

    /* تحسين عرض الأسعار */
    .price {
        font-size: 1.1rem;
    }

    /* تعديل حجم الصور */
    .product-card img {
        height: 180px;
        object-fit: contain;
    }

    /* تحسين القوائم المنسدلة */
    .dropdown-menu {
        width: 100%;
        margin-top: 0.5rem;
    }
}