/* ==========================================
   1. GENERAL RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

:root {
    --primary-color: #e91e63;
    --primary-hover: #c2185b;
    --secondary-color: #4A148C;
    --secondary-hover: #8E24AA;
    --dark-bg: #222222;
    --light-bg: #f9f9f9;
    --text-dark: #333333;
    --text-muted: #777777;
    --border-color: #eeeeee;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    color: var(--text-dark);
    font-weight: 700;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    display: block;
    margin: 8px auto 0;
    border-radius: 2px;
}

/* ==========================================
   2. TOP & MAIN HEADER
   ========================================== */
.top-header {
    background-color: var(--dark-bg);
    color: #ffffff;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.main-header {
    background-color: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: 1px;
}

.logo a span {
    color: var(--primary-color);
}

/* Container ko maximum space lene ke liye flex-grow diya hai */
.search-box {
    position: relative;
    flex: 1; /* Space automatically fill karega */
    max-width: 650px; /* Bada width space fill karne ke liye */
    margin: 0 20px;
}

.search-box form {
    display: flex;
    align-items: center;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    background: #ffffff;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box form:focus-within {
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.25);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Left Magnifying Glass Icon */
.search-icon-inside {
    padding-left: 16px;
    color: #999;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 12px 14px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    background: transparent;
}

.search-box input::placeholder {
    color: #aaa;
    font-weight: 400;
}

/* Search Button */
.search-box button {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 0 25px;
    height: 46px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 0 28px 28px 0;
    white-space: nowrap;
}

.search-box button:hover {
    background-color: var(--primary-hover, #d81b60);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Dynamic Search Dropdown / Auto-complete Box */
.search-suggestions-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid #f0f0f0;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none; /* JS control karega */
}

/* Custom Scrollbar for Dropdown */
.search-suggestions-box::-webkit-scrollbar {
    width: 6px;
}
.search-suggestions-box::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Mobile View Optimization (768px se chhoti screens ke liye) */
@media (max-width: 768px) {
    /* Header layout ko stacked/column-wise flex karein */
    .header-container, 
    header .container { 
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    /* Search Box ko full width aur zero side margins karein */
    .search-box {
        width: 100%;
        max-width: 100%;
        margin: 5px 0 0 0; /* Logo se halka gap */
        order: 2; /* Ensure karega ki logo ke niche hi aaye */
    }

    /* Search Form inside mobile */
    .search-box form {
        width: 100%;
    }

    .search-box input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .search-box button {
        padding: 0 18px;
        font-size: 13px;
        height: 42px;
    }
}

.header-icons {
    display: flex;
    gap: 22px;
    align-items: center;
}

.header-icons a {
    font-size: 20px;
    position: relative;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.header-icons a:hover {
    color: var(--primary-color);
}

.header-icons .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    padding: 2px 6px;
    line-height: 1;
}

/* ==========================================
   3. NAVIGATION BAR (DESKTOP)
   ========================================== */
.navbar {
    background-color: #333333;
    position: relative;
    z-index: 999;
}

.nav-links {
    display: flex;
    justify-content: center;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 22px;
    color: #ffffff;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    background-color: var(--primary-color);
}

.nav-links li a i {
    display: none; /* Hide icons on desktop */
}

/* ==========================================
   4. HERO SLIDER
   ========================================== */
.hero-slider {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?auto=format&fit=crop&w=1350&q=80') center/cover no-repeat;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
}

.hero-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-overlay h2 {
    font-size: 45px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.hero-overlay p {
    font-size: 18px;
    margin-bottom: 24px;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(233, 30, 99, 0.4);
}

/* ==========================================
   5. CATEGORIES (HORIZONTAL SCROLL)
   ========================================== */
.categories-section {
    padding: 35px 0;
    background: #ffffff;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.section-header-flex .section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    text-align: left;
}

.section-header-flex .section-title::after {
    display: none;
}

.section-header-flex .section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.scroll-actions {
    display: flex;
    gap: 8px;
}

.category-scroll-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.category-scroll-btn:hover {
    background: var(--secondary-color);
    color: #ffffff;
    border-color: var(--secondary-color);
}

.category-horizontal-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px 15px 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-horizontal-wrapper::-webkit-scrollbar {
    display: none;
}

.category-item-card {
    flex: 0 0 auto;
    width: 105px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.category-item-card:hover {
    transform: translateY(-4px);
}

.category-img-box {
    position: relative;
    width: 95px;
    height: 95px;
    margin: 0 auto 10px auto;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.category-item-card:hover .category-img-box {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    box-shadow: 0 6px 18px rgba(74, 20, 140, 0.25);
}

.category-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #ffffff;
    display: block;
}

.category-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.category-item-card:hover .category-name {
    color: var(--secondary-color);
}

/* ==========================================
   6. PRODUCTS SECTION
   ========================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.product-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.wishlist-btn {
    position: absolute;
    top: 50px;
    right: 0px;
    background: #ffffff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.wishlist-btn:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: scale(1.1);
}

.product-details {
    padding: 16px;
}

.product-category {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 6px 0 10px;
    line-height: 1.3;
}

.product-title a {
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--primary-color);
}

.price {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 13px;
    color: #999999;
    text-decoration: line-through;
    margin-left: 8px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 11px;
    background-color: var(--dark-bg);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: var(--primary-color);
}

/* ==========================================
   7. FOOTER
   ========================================== */
footer {
    background-color: var(--dark-bg);
    color: #ffffff;
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
    font-size: 14px;
}

/* ==========================================
   8. MOBILE APP RESPONSIVE STYLES (<= 768px)
   ========================================== */
@media (max-width: 768px) {
    body {
        padding-bottom: 65px; /* Clear fixed bottom bar */
    }

    .desktop-only {
        display: none !important;
    }

    /* Fixed App-Style Bottom Navigation */
    .navbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        background-color: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-color);
        z-index: 2000;
        height: 60px;
    }

    .navbar .container {
        padding: 0;
        height: 100%;
    }

    .nav-links {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
    }

    .nav-links li {
        flex: 1;
        text-align: center;
    }

    .nav-links li a {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 6px 0;
        font-size: 11px;
        color: #666666;
        background-color: transparent !important;
        gap: 3px;
    }

    .nav-links li a i {
        display: block;
        font-size: 18px;
    }

    .nav-links li a.active,
    .nav-links li a:hover {
        color: var(--primary-color) !important;
    }

    .icon-wrap {
        position: relative;
    }

    .icon-wrap .badge {
        position: absolute;
        top: -6px;
        right: -10px;
        background: var(--primary-color);
        color: #ffffff;
        font-size: 9px;
        font-weight: 700;
        border-radius: 50%;
        padding: 2px 5px;
    }

    /* Header & General Mobile Spacing */
    .header-content {
        gap: 12px;
    }

    .search-box form {
        width: 100%;
        border-radius: 20px;
    }

    .hero-slider {
        height: 220px;
    }

    .hero-overlay h2 {
        font-size: 22px;
    }

    .hero-overlay p {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .category-item-card {
        width: 85px;
    }

    .category-img-box {
        width: 75px;
        height: 75px;
    }

    .category-name {
        font-size: 12px;
    }

    .category-horizontal-wrapper {
        gap: 14px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-image {
        height: 180px;
    }

    .product-details {
        padding: 10px;
    }

    .product-title {
        font-size: 14px;
    }
    /* Mobile Bottom Navigation Bar Container */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 6px 0;
}

/* Items wrapper (Ul List) */
.mobile-bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Sabhi 5 items ko barabar (Equal Width) space dene ke liye */
.mobile-bottom-nav-item {
    flex: 1; /* Sabhi li items exact same size ke honge */
    text-align: center;
}

/* Individual Link Styling */
.mobile-bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
    color: #666666;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.3s ease;
}

/* Icon ki sizing bilkul fixed aur uniform karne ke liye */
.mobile-bottom-nav-link i {
    font-size: 18px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
}

/* Text Label */
.mobile-bottom-nav-link span:not(.badge) {
    display: block;
    line-height: 1.2;
    white-space: nowrap;
}

/* Active & Hover State */
.mobile-bottom-nav-link.active,
.mobile-bottom-nav-link:hover {
    color: var(--primary-color, #e91e63);
}

/* Badge (Cart & Wishlist Count) Alignment */
.mobile-bottom-nav-link .badge {
    position: absolute;
    top: -2px;
    right: calc(50% - 18px); /* Icon ke upar perfectly center-right set karne ke liye */
    background-color: var(--primary-color, #e91e63);
    color: #ffffff;
    font-size: 9px;
    font-weight: bold;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid #ffffff;
}

}