/* ==========================================================================
   B2C E-COMMERCE MODERN STYLES
   ========================================================================== */

/* 1. HEADER (Always White, Central Search) */
.b2c-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #f0f0f0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 20px;
}

.nav-logo, .nav-item, .lang-switch a, .lang-switch span, .nav-cart-btn {
    color: var(--b2c-text) !important;
}

.nav-logo span {
    color: var(--b2c-primary) !important;
}

.header-search-form {
    flex: 1;
    max-width: 600px;
    position: relative;
    display: flex;
}

.header-search-form input {
    width: 100%;
    padding: 10px 20px;
    border: 1px solid var(--b2c-border);
    border-radius: 8px 0 0 8px;
    outline: none;
    font-size: 14px;
    background-color: var(--b2c-bg);
}

.header-search-form input:focus {
    border-color: var(--b2c-primary);
    background-color: #ffffff;
}

.header-search-form select {
    padding: 10px;
    border: 1px solid var(--b2c-border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    background-color: var(--b2c-bg);
    color: var(--b2c-text-light);
    font-weight: 600;
}

.header-search-form input.with-select {
    border-radius: 0;
    border-left: 1px solid #e5e7eb;
}

.header-search-form button {
    padding: 10px 20px;
    background-color: var(--b2c-primary);
    color: var(--b2c-white);
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 14px;
}

.header-search-form button:hover {
    background-color: var(--b2c-primary-hover);
}

/* 2. HERO CAROUSEL */
.ecommerce-hero {
    margin-top: 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ecommerce-hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* 3. CATEGORY ICONS (Quick Links) */
.category-grid {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 15px 0;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: none;
}
.category-grid::-webkit-scrollbar {
    display: none;
}

.category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    cursor: pointer;
    text-align: center;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-umroh { background: linear-gradient(135deg, #008744 0%, #006C35 100%); color: #ffffff; }
.cat-haji { background: linear-gradient(135deg, #006C35 0%, #004F27 100%); color: #ffffff; }
.cat-hotel { background: #E6F3EA; color: #006C35; }
.cat-transport { background: #E6F3EA; color: #006C35; }
.cat-handling { background: #E6F3EA; color: #006C35; }
.cat-mutawwif { background: #E6F3EA; color: #006C35; }
.cat-airline { background: #E6F3EA; color: #006C35; }

.category-icon-item:hover .category-icon {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.category-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--b2c-text);
}

/* 4. PRODUCT CARDS */
.product-card {
    border-radius: 12px !important;
    border: 1px solid #f0f0f0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1) !important;
}

.card-img-wrapper {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    position: relative;
}

.price-amount {
    color: var(--b2c-primary) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}

/* 5. MOBILE BOTTOM NAVIGATION */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 9999;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--b2c-text-light);
    font-size: 11px;
    font-weight: 500;
    position: relative;
}

.bottom-nav-item.active {
    color: var(--b2c-secondary);
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-cart-badge {
    position: absolute;
    top: -5px;
    right: 15px;
    background-color: var(--b2c-danger);
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
}

.mobile-header-search {
    display: none; /* Hidden on desktop */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-search-form {
        display: none; /* Hide desktop search on mobile */
    }
    
    .b2c-main-content {
        padding-bottom: 70px !important; /* Space for bottom nav */
    }

    .mobile-bottom-nav {
        display: block;
    }

    .nav-menu, .nav-actions {
        display: none !important;
    }

    /* Small search for mobile header */
    .mobile-header-search {
        display: flex;
        flex: 1;
        margin-left: 15px;
        position: relative;
    }
    
    .mobile-header-search input {
        width: 100%;
        padding: 8px 15px 8px 35px;
        border-radius: 20px;
        border: 1px solid #e0e0e0;
        background-color: #f5f5f5;
        font-size: 13px;
    }
    
    .mobile-header-search i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 14px;
    }
    
    .footer-hide-mobile {
        display: none !important;
    }
}

/* MARKETPLACE: Seller Info on Product Cards */
.card-seller {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 14px 14px;
}
.card-seller .seller-logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}
.card-seller .seller-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-seller .seller-country {
    font-size: 14px;
}
.card-seller .seller-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #E6F3EA;
    color: #006C35;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* MARKETPLACE: Store Profile */
.store-banner {
    background: linear-gradient(135deg, #006C35, #004F27);
    border-radius: 16px;
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 24px;
}
.store-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.store-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.store-info h1 {
    margin: 0;
    font-size: 24px;
    color: white;
}
.store-info p {
    margin: 4px 0 0;
    opacity: 0.8;
    font-size: 14px;
}
.store-meta {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.store-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.85;
}

/* Country Selector Dropdown */
.country-selector {
    position: relative;
    display: inline-block;
}
.country-selector-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: all 0.3s;
}
.country-selector-btn:hover {
    background: rgba(255,255,255,0.25);
}
.country-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}
.country-dropdown.open {
    display: block;
}
.country-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}
.country-dropdown a:hover {
    background: #f0fdf4;
}
.country-dropdown a.active {
    background: #E6F3EA;
    font-weight: 700;
    color: #006C35;
}
