/* =====================================================
   MOBILE HOME PAGE - Responsive Styles
   Only applies on screens <= 768px
   ===================================================== */

@media (max-width: 768px) {
    /* =====================================================
       HEADER & MENU BAR FIXES
       ===================================================== */

    /* Reduce body padding for mobile header */
    body {
        padding-top: 110px !important;
    }

    /* Header Top - Compact */
    .header-top {
        padding: 8px 0 !important;
        min-height: 55px !important;
    }

    .header-top .container {
        padding: 0 10px !important;
        gap: 10px !important;
    }

    /* Logo smaller on mobile */
    .header-logo img {
        height: 40px !important;
        max-width: 130px !important;
    }

    /* Search bar expanded */
    .header-search {
        max-width: 100% !important;
        margin: 0 !important;
        order: 2 !important;
    }

    .header-search .form-control {
        padding: 10px 20px !important;
        height: 48px;
        font-size: 14px !important;
    }

    .header-search .search-btn {
        padding: 0 20px !important;
    }

    /* Top links - hide some on mobile */
    .top-links {
        gap: 4px !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        order: 3 !important;
    }

    .top-links>a,
    .top-links>div:not(.user-profile-pill) {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }

    /* Hide location selector on mobile */
    .top-links>div:first-child {
        display: none !important;
    }

    /* Category Bar - Vertical Toggle */
    .category-bar {
        padding: 0 !important;
        /* overflow: hidden; Removed to allow dropdown */
    }

    .category-bar .container {
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* 
    .category-menu {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0 !important;
        padding: 0 10px !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }
    */

    .category-menu::-webkit-scrollbar {
        display: none;
    }

    .category-menu>li {
        flex: 0 0 auto;
    }
    
    /* Handled in YellowMenu.css */
    /*
    .category-menu>li>a {
        padding: 0 12px !important;
        font-size: 11px !important;
        line-height: 40px !important;
        white-space: nowrap;
    }
    */

    /* Hide menu icons on mobile */
    .category-menu>li>a i.me-1,
    .category-menu>li>a i.fas {
        display: none !important;
    }

    /* All Categories button compact */
    .allcat-toggle {
        padding: 0 12px !important;
        line-height: 28px !important;
        font-size: 11px !important;
        margin: 6px 0 !important;
    }

    /* Hide mega menu on mobile - COMMENTED OUT TO ALLOW ACCORDION
    .allcat-menu.mega-menu {
        display: none !important;
    }
    */

    /* =====================================================
       HERO SLIDER - MOBILE SIZE
       ===================================================== */
    .hero-slider-compact {
        height: 180px !important;
        margin-top: 8px !important;
        width: calc(100% - 12px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 14px !important;
    }

    .hero-slider-compact .slide {
        background-position: center top 20px !important; /* Shift content down slightly on mobile */
        background-size: cover !important;
        border-radius: 14px !important;
    }

    .hero-slider-compact .slide-overlay {
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%) !important;
    }

    .hero-slider-compact .slide-content {
        padding: 15px 0 !important;
    }

    .hero-slider-compact .container {
        padding: 0 15px !important;
    }

    .hero-slider-compact .slide-title {
        font-size: 1.1rem !important;
        line-height: 1.2;
        margin-bottom: 6px !important;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    }

    .hero-slider-compact .slide-subtitle {
        font-size: 0.75rem !important;
        margin-bottom: 10px !important;
    }

    .hero-slider-compact .btn {
        padding: 6px 14px !important;
        font-size: 0.75rem !important;
        min-height: 32px !important;
    }

    .hero-slider-compact .slider-nav {
        width: 28px !important;
        height: 28px !important;
    }

    .hero-slider-compact .slider-nav.prev {
        left: 8px !important;
    }

    .hero-slider-compact .slider-nav.next {
        right: 8px !important;
    }

    .hero-slider-compact .slider-dots {
        bottom: 8px !important;
    }

    .hero-slider-compact .dot {
        width: 6px !important;
        height: 6px !important;
    }

    /* =====================================================
       FEATURES BAR - COMPACT
       ===================================================== */
    .features-bar {
        display: none !important;
    }

    .features-bar .container {
        padding: 0 10px !important;
    }

    .feature-item-compact {
        flex-direction: column !important;
        text-align: center !important;
        gap: 4px !important;
        padding: 5px !important;
    }

    .feature-item-compact .feature-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem !important;
    }

    .feature-item-compact .feature-text h6 {
        font-size: 0.7rem !important;
        line-height: 1.2;
    }

    .feature-item-compact .feature-text p {
        font-size: 0.6rem !important;
        display: none;
    }

    /* =====================================================
       CATEGORIES - HORIZONTAL SCROLL
       ===================================================== */
    .categories-section {
        padding: 25px 0 !important;
    }

    .section-header {
        margin-bottom: 15px !important;
        padding: 0 15px;
    }

    .section-header h2 {
        font-size: 1.3rem !important;
    }

    .section-header p {
        font-size: 0.8rem !important;
    }

    .categories-wrapper {
        overflow: hidden;
        width: 100%;
    }

    .categories-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        padding: 10px 15px 15px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .category-circle {
        flex: 0 0 auto;
        scroll-snap-align: start;
        min-width: 70px;
    }

    .category-circle .circle-img {
        width: 60px !important;
        height: 60px !important;
        border-width: 2px !important;
    }

    .category-circle .cat-name {
        font-size: 0.7rem !important;
        max-width: 60px !important;
    }

    .category-circle .cat-count {
        font-size: 0.65rem !important;
    }

    /* =====================================================
       PRODUCT SECTIONS - 2 COLUMN GRID
       ===================================================== */
    .products-section {
        padding: 25px 0 !important;
    }

    .section-header-row {
        padding: 0 12px;
        margin-bottom: 15px !important;
    }

    .section-header-row h2 {
        font-size: 1.2rem !important;
    }

    .section-header-row .view-all-btn {
        font-size: 0.75rem !important;
    }

    /* Product Grid - 2 columns on mobile */
    .products-section .row {
        margin: 0 !important;
    }

    .products-section .col-6,
    .products-section .col-md-4,
    .products-section .col-lg-3,
    .products-section .col-xl-2 {
        padding: 6px !important;
    }

    /* Force 2 columns on mobile */
    .products-section [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    /* =====================================================
       PRODUCT CARD - COMPACT
       ===================================================== */
    .product-card-modern {
        border-radius: 8px !important;
    }

    .product-card-modern .card-img-wrap {
        padding-top: 100% !important;
    }

    .product-card-modern .card-badges {
        top: 6px !important;
        left: 6px !important;
    }

    .product-card-modern .badge-new,
    .product-card-modern .badge-sale {
        font-size: 0.55rem !important;
        padding: 2px 5px !important;
    }

    .product-card-modern .quick-actions {
        opacity: 1 !important;
        transform: translateX(0) !important;
        top: 6px !important;
        right: 6px !important;
    }

    .product-card-modern .quick-action-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }

    .product-card-modern .card-body {
        padding: 8px !important;
    }

    .product-card-modern .card-category {
        font-size: 0.6rem !important;
        margin-bottom: 2px !important;
    }

    .product-card-modern .card-title {
        font-size: 0.75rem !important;
        min-height: 2.4em !important;
        margin-bottom: 4px !important;
    }

    .product-card-modern .card-rating {
        font-size: 0.65rem !important;
        margin-bottom: 4px !important;
    }

    .product-card-modern .card-rating .stars i {
        font-size: 0.6rem !important;
    }

    .product-card-modern .card-price {
        flex-wrap: wrap;
        gap: 4px !important;
        margin-bottom: 6px !important;
    }

    .product-card-modern .price-current {
        font-size: 0.9rem !important;
    }

    .product-card-modern .price-old {
        font-size: 0.7rem !important;
    }

    .product-card-modern .price-discount {
        font-size: 0.6rem !important;
    }

    .product-card-modern .card-footer {
        padding-top: 6px !important;
    }

    .product-card-modern .add-to-cart-btn {
        padding: 6px 8px !important;
        font-size: 0.7rem !important;
        min-height: 32px;
    }

    /* =====================================================
       PROMO BANNERS - STACKED
       ===================================================== */
    .promo-section {
        padding: 20px 0 !important;
    }

    .promo-section .col-md-6 {
        margin-bottom: 12px;
    }

    .promo-card {
        height: 140px !important;
        border-radius: 8px !important;
    }

    .promo-card .promo-overlay {
        padding: 15px !important;
    }

    .promo-card .promo-title {
        font-size: 1rem !important;
    }

    .promo-card .promo-text {
        font-size: 0.75rem !important;
        margin-bottom: 8px !important;
    }

    .promo-card .promo-btn {
        padding: 5px 12px !important;
        font-size: 0.7rem !important;
    }

    /* =====================================================
       NEWSLETTER - STACKED
       ===================================================== */
    .newsletter-section {
        padding: 20px 0 !important;
    }

    .newsletter-section h4 {
        font-size: 1.1rem !important;
        text-align: center;
    }

    .newsletter-section p {
        font-size: 0.8rem !important;
        text-align: center;
        margin-bottom: 15px !important;
    }

    .newsletter-form {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .newsletter-form input {
        padding: 12px 16px !important;
        font-size: 0.9rem !important;
    }

    .newsletter-form button {
        width: 100% !important;
        padding: 12px 20px !important;
    }

    /* =====================================================
       GENERAL MOBILE IMPROVEMENTS
       ===================================================== */

    /* Reduce container padding on mobile */
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide scrollbars but keep functionality */
    .categories-scroll::-webkit-scrollbar {
        height: 3px !important;
    }

    /* =====================================================
       PRODUCT DETAILS PAGE - MOBILE STYLES
       ===================================================== */

    /* Product Section Container */
    .product-section {
        padding: 15px 0 30px !important;
    }

    /* Gallery - Reorganize for Mobile */
    .product-gallery {
        flex-direction: column !important;
    }

    /* Keep sticky gallery non-sticky on mobile */
    .sticky-gallery {
        position: static !important;
    }

    /* Main Image Area - Order 1 (first) */
    .product-gallery .main-area {
        order: 1 !important;
    }

    /* Main Image */
    .main-image-container {
        padding: 10px !important;
        border-radius: 8px !important;
    }

    .main-image {
        max-height: 280px !important;
    }

    /* Slider Navigation Buttons */
    .slider-btn {
        width: 30px !important;
        height: 30px !important;
    }

    /* Thumbnail Rail - Order 2 (after main image, before buttons) */
    .product-gallery .thumbnail-rail {
        width: 100% !important;
        order: 2 !important;
        margin-top: 10px !important;
    }

    /* Thumbnail Container - Horizontal Scroll */
    .thumbnail-container {
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        max-height: none !important;
        gap: 8px !important;
        padding: 5px 0 !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .thumbnail-container::-webkit-scrollbar {
        display: none;
    }

    /* Individual Thumbnails */
    .thumbnail {
        width: 55px !important;
        height: 55px !important;
        min-width: 55px !important;
        flex-shrink: 0;
        border-radius: 6px !important;
    }

    /* Gallery Actions (Buttons) - Order 3 (after thumbnails) */
    .gallery-actions {
        order: 3 !important;
        margin-top: 12px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .btn-add-to-cart.custom,
    .btn-buy-now.custom {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 13px !important;
        min-height: 44px !important;
    }

    .btn-wishlist.custom {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        z-index: 10;
    }

    /* Hide zoom on mobile */
    .zoom-result {
        display: none !important;
    }

    .zoom-lens {
        display: none !important;
    }

    /* Product Title */
    .product-title {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
    }

    /* Product Rating */
    .product-rating {
        padding: 4px 8px !important;
        margin-bottom: 8px !important;
    }

    .product-rating i {
        font-size: 11px !important;
    }

    .product-rating span {
        font-size: 11px !important;
    }

    /* Product Price */
    .product-price {
        padding: 6px 10px !important;
        margin-bottom: 10px !important;
    }

    .product-price #product-price {
        font-size: 1.2rem !important;
    }

    /* Product Description */
    .product-description {
        font-size: 12px !important;
        padding: 8px 10px !important;
        margin-bottom: 10px !important;
    }

    /* Variant Sections */
    .variant-section {
        margin-bottom: 10px !important;
        padding: 10px !important;
    }

    .variant-title {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }

    /* Color Options */
    .color-options {
        gap: 8px !important;
    }

    .color-option {
        width: 32px !important;
        height: 32px !important;
    }

    /* Variant Options Grid */
    .variant-options {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .variant-option {
        padding: 6px !important;
    }

    .variant-content .age-badge {
        font-size: 10px !important;
    }

    .variant-price {
        font-size: 11px !important;
    }

    /* Quantity Group */
    .quantity-group.inline {
        display: flex !important;
        justify-content: center !important;
    }

    /* Delivery and Payment Row */
    .delivery-payment-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .delivery-options,
    .payment-options {
        width: 100% !important;
        padding: 8px !important;
    }

    .delivery-options h5,
    .payment-options h5 {
        font-size: 10px !important;
        margin-bottom: 5px !important;
    }

    .pincode-check input {
        font-size: 12px !important;
        padding: 8px !important;
    }

    .pincode-check button {
        font-size: 11px !important;
        padding: 8px 12px !important;
        min-height: 36px;
    }

    .payment-methods {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .payment-method {
        font-size: 9px !important;
        padding: 4px 8px !important;
    }

    /* Tabs Section */
    .tabs-section {
        padding: 20px 0 !important;
    }

    .tabs-section .nav-tabs .nav-link {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }

    .tabs-section .tab-content {
        padding: 15px !important;
    }

    /* Related Products */
    .related-products {
        padding: 20px 0 !important;
    }

    .related-products .section-title {
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
    }

    .related-products .col-md-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 6px !important;
    }

    .related-products .product-card .card-img-top {
        height: 120px !important;
    }

    .related-products .product-card-body {
        padding: 10px !important;
    }

    .related-products .product-card-title {
        font-size: 11px !important;
        min-height: 28px !important;
    }

    .related-products .product-card-price {
        font-size: 0.9rem !important;
    }
}
