/* ========================================
   تصميم هجين: Bazzarry + Smart
   البساطة + العصرية = الاحترافية
   ======================================== */

/* إزالة المساحات الزائدة بشكل كامل */
/* Fixed: Comprehensive spacing cleanup to remove all unwanted white space */

.shop-by-category {
    margin: 0 !important;
    padding: 20px 0 !important;
}

.container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

section, .container.my-4, .container.my-5 {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

/* Fixed: Remove extra spacing after hero slider */
.hero-slider-container + .container,
.hero-slider-container + * {
    margin-top: 20px !important; /* Consistent spacing after slider */
}

/* Hero Slider بدون مساحة */
.hero-slider-enhanced {
    margin: 0 !important;
}

/* Fixed: Ensure no extra spacing in main content wrapper */
main {
    padding: 0 !important;
    margin: 0 !important;
}

/* Fixed: Remove any default spacing from body that might cause white space */
body {
    margin: 0;
    padding: 0;
}

/* Fixed: Ensure sections have consistent spacing */
section > div,
.container > div:first-child {
    padding-top: 0;
}

.container > div:last-child {
    padding-bottom: 0;
}

/* ===== 1. Top Navigation Bar (من Bazzarry) ===== */
.top-nav-bar {
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    padding: 0;
    font-size: 14px;
    border-bottom: 2px solid #5D4037;
}

.top-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    gap: 5px;
}

.top-nav-links li a {
    display: block;
    padding: 12px 22px;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-weight: 600;
}

.top-nav-links li a:hover,
.top-nav-links li a.active {
    background: rgba(255, 107, 0, 0.15);
    border-bottom-color: #5D4037;
    color: #5D4037;
}

/* ===== 2. Delivery Bar (من Bazzarry) ===== */
.delivery-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 0;
}

.store-selector,
.delivery-location {
    position: relative;
}

.store-btn,
.location-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #2c3e50;
}

.store-btn:hover,
.location-btn:hover {
    border-color: #5D4037;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.1);
}

.store-btn strong,
.location-btn strong {
    color: #5D4037;
    font-weight: 700;
}

.store-dropdown,
.location-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.store-dropdown.show,
.location-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.store-dropdown .dropdown-item,
.location-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #2c3e50;
    text-decoration: none;
    transition: background 0.2s ease;
}

.store-dropdown .dropdown-item:hover,
.location-dropdown .dropdown-item:hover {
    background: #f8f9fa;
    color: #5D4037;
}

.store-dropdown .dropdown-item:first-child,
.location-dropdown .dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.store-dropdown .dropdown-item:last-child,
.location-dropdown .dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* ===== 3. بطاقة المنتج الهجينة ===== */
.product-card-hybrid {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-hybrid:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* شارة الخصم */
.discount-badge-hybrid {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

/* شارة جديد */
.new-badge-hybrid {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #5D4037 0%, #4E342E 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

/* زر المفضلة */
.wishlist-btn-hybrid {
    position: absolute;
    top: 50px;
    left: 12px;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.product-card-hybrid:hover .wishlist-btn-hybrid {
    opacity: 1;
}

.wishlist-btn-hybrid:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.1);
}

/* صورة المنتج */
.product-image-hybrid {
    position: relative;
    width: 100%;
    height: 220px;
    background: #f8f9fa;
    overflow: hidden;
}

.product-image-hybrid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card-hybrid:hover .product-image-hybrid img {
    transform: scale(1.08);
}

.product-placeholder-hybrid {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.product-placeholder-hybrid i {
    font-size: 48px;
    color: #bdc3c7;
}

/* معلومات المنتج */
.product-info-hybrid {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.product-name-hybrid {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name-hybrid a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name-hybrid a:hover {
    color: #5D4037;
}

/* السعر */
.product-price-hybrid {
    margin: 8px 0;
}

.price-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.price-new-hybrid {
    font-size: 20px;
    font-weight: 900;
    color: #5D4037;
}

.price-old-hybrid {
    font-size: 14px;
    color: #95a5a6;
    text-decoration: line-through;
}

.price-current-hybrid {
    font-size: 20px;
    font-weight: 900;
    color: #2c3e50;
}

/* معلومات التوصيل */
.delivery-info-hybrid {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f5ebe8;
    border-radius: 6px;
    font-size: 13px;
    color: #5D4037;
    font-weight: 600;
}

.delivery-info-hybrid i {
    font-size: 16px;
}

/* أزرار الإجراءات */
.btn-add-cart-hybrid {
    width: 100%;
    background: linear-gradient(135deg, #5D4037 0%, #ff8533 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.btn-add-cart-hybrid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.3);
}

.btn-out-of-stock-hybrid {
    width: 100%;
    background: #ecf0f1;
    color: #95a5a6;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: not-allowed;
}

.btn-login-hybrid {
    width: 100%;
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-login-hybrid:hover {
    background: #2980b9;
    color: white;
}

/* ===== 4. قسم خصومات اليوم ===== */
.deal-of-the-day-section {
    padding: 50px 0;
    background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
}

.section-header-deal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.deal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.deal-title-group i {
    font-size: 32px;
    color: #5D4037;
    animation: pulse 2s ease-in-out infinite;
}

.section-title-deal {
    font-size: 28px;
    font-weight: 900;
    color: #2c3e50;
    margin: 0;
}

.deal-subtitle {
    background: linear-gradient(135deg, #5D4037 0%, #ff8533 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* مؤقت العد التنازلي */
.countdown-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.timer-value {
    font-size: 24px;
    font-weight: 900;
    color: #e74c3c;
    line-height: 1;
}

.timer-label {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 600;
}

.timer-separator {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
    margin: 0 4px;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #5D4037;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    gap: 10px;
    color: #ff8533;
}

/* التمرير الأفقي للمنتجات */
.products-horizontal-scroll {
    position: relative;
}

.products-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #5D4037 #f1f1f1;
}

.products-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.products-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.products-scroll-container::-webkit-scrollbar-thumb {
    background: #5D4037;
    border-radius: 4px;
}

.products-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #ff8533;
}

.products-scroll-container .product-card-hybrid {
    min-width: 250px;
    flex-shrink: 0;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: all 0.3s ease;
}

.scroll-btn:hover {
    background: #5D4037;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.scroll-left {
    right: auto;
    left: -20px;
}

.scroll-right {
    left: auto;
    right: -20px;
}

.scroll-btn i {
    font-size: 20px;
}

.no-products {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.no-products i {
    font-size: 64px;
    margin-bottom: 16px;
}

/* ===== 5. Responsive Design ===== */
@media (max-width: 1024px) {
    .section-header-deal {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .countdown-timer {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .top-nav-links {
        flex-wrap: wrap;
        gap: 0;
    }
    
    .top-nav-links li a {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .delivery-bar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .store-btn,
    .location-btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title-deal {
        font-size: 22px;
    }
    
    .timer-value {
        font-size: 20px;
    }
    
    .scroll-btn {
        display: none;
    }
    
    .products-scroll-container .product-card-hybrid {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .products-scroll-container .product-card-hybrid {
        min-width: 160px;
    }
    
    .product-image-hybrid {
        height: 180px;
    }
    
    .countdown-timer {
        padding: 10px 15px;
    }
    
    .timer-value {
        font-size: 18px;
    }
}





