/* Media Queries for Responsiveness */

/* Large Tablets & Small Desktops */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .search-container {
        margin: 0 15px;
    }

    .nav-actions span {
        display: none;
    }

    .slide-base {
        width: 33.33%;
        flex: 0 0 33.33%;
    }
}

/* Tablets & Large Mobiles */
@media (max-width: 768px) {
    .index-products-section .product-card {
        flex: 0 0 200px !important;
    }
    main:not(.home-main) {
        padding: 25px 2% !important;
    }

    .breadcrumb-container {
        padding: 10px 0;
    }

    .navbar {
        height: 60px;
        padding: 0 15px;
    }

    .search-container {
        display: none;
    }

    .mobile-search-bar {
        display: block;
        padding: 10px 15px;
        background: var(--white);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    .nav-logo img {
        height: 35px;
    }

    .main-slider-section {
        padding: 10px;
    }

    .hero-slider {
        height: 200px;
        border-radius: 20px;
        overflow: hidden;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .coupon-ad {
        flex-direction: column;
        padding: 40px 20px;
        gap: 20px;
    }

    .coupon-divider {
        width: 80%;
        height: 2px;
        margin: 20px 0;
    }

    .discount-text {
        font-size: 40px;
    }

    .save-text {
        font-size: 32px;
    }

    .code-box {
        font-size: 16px;
    }

    .carousel-item img {
        height: 250px;
    }
}

/* Small Mobiles */
@media (max-width: 600px) {

    .slide-base,
    .brand-slider-reverse .slide-base {
        width: 50% !important;
        flex: 0 0 50% !important;
        height: 250px;
    }
}

/* Footer Responsive */
@media (max-width: 991px) {
    .flipkart-footer {
        padding: 40px 20px 20px;
    }

    .footer-top-row {
        flex-direction: column;
        gap: 30px;
    }

    .footer-links-container {
        padding-right: 0;
        border-right: none;
        flex-wrap: wrap;
        gap: 20px;
    }

    .footer-address-container {
        padding-left: 0;
        flex-direction: column;
        gap: 20px;
        border-top: 1px solid var(--text-muted);
        padding-top: 30px;
    }

    .footer-col {
        flex: 1 1 45%;
    }

    .footer-bottom-row {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    /* .footer-col {
        flex: 1 1 100%;
    } */

    .bottom-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

/* Mobile Categories Scroll */
.mobile-categories-scroll {
    display: none;
}

/* Mobile Ad Banner */
.mobile-ad-section {
    display: none;
}

@media (max-width: 768px) {
    .mobile-ad-section {
        display: block;
        padding: 0 15px 0;
    }

    .mobile-ad-banner {
        background: linear-gradient(90deg, var(--grad-gray-1) 0%, var(--grad-gray-2) 50%, var(--grad-gray-3) 100%);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        position: relative;
    }

    .ad-left {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .ad-left h3 {
        font-size: 20px;
        font-weight: 800;
        color: var(--black);
        margin: 0;
    }

    .ad-divider {
        width: 2px;
        height: 35px;
        background-color: var(--black);
    }

    .ad-right {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
    }

    .ad-right p {
        font-size: 10px;
        font-weight: 700;
        color: var(--black);
        margin-bottom: 2px;
        letter-spacing: 0.5px;
    }

    .ad-code {
        background: var(--black);
        color: var(--white);
        font-size: 12px;
        font-weight: 800;
        padding: 4px 10px;
        border-radius: 4px;
        letter-spacing: 1px;
    }

    .sparkle {
        color: var(--white);
        font-size: 12px;
    }

    .sparkle.top-right {
        position: absolute;
        top: -8px;
        right: -15px;
    }

    .mobile-categories-scroll {
        display: block;
        padding: 15px;
        overflow-x: auto;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
    }

    .mobile-categories-scroll::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }

    .mobile-cat-grid {
        display: grid;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        gap: 5px 12px;
    }

    .m-cat-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 65px;
        margin: 0 0 10px 0;
    }

    .m-cat-img {
        width: 100%;
        aspect-ratio: 1;
        background: linear-gradient(180deg, var(--grad-peach-1) 0%, var(--grad-peach-2) 100%);
        border-radius: 16px;
        overflow: hidden;
    }

    .m-cat-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .m-cat-item span {
        font-size: 11px;
        color: var(--text-color);
        text-align: center;
        font-weight: 500;
        line-height: 1.2;
    }
}

/* Pocket Friendly Bargain */
.mobile-pocket-bargain {
    display: none;
}

@media (max-width: 768px) {
    .flipkart-footer.mt-5 {
        margin-top: 0 !important;
    }

    .mobile-pocket-bargain {
        display: block;
        padding: 0px 15px;
        background: var(--white);
    }

    .bargain-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .bargain-title h2 {
        font-size: 20px;
        font-weight: 800;
        color: var(--text-color);
        margin: 0 0 4px;
        letter-spacing: -0.5px;
    }

    .bargain-title p {
        font-size: 12px;
        color: var(--text-muted);
        margin: 0;
    }

    .bargain-coins {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .bargain-coins i {
        font-size: 45px;
        color: var(--yellow-warning);
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }

    .mobile-bargain-scroll {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin: 0 -15px;
        padding: 0 15px;
    }

    .mobile-bargain-scroll::-webkit-scrollbar {
        display: none;
    }

    .bargain-grid {
        display: grid;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        gap: 12px;
        width: max-content;
    }

    .bargain-item {
        position: relative;
        width: 120px;
        height: 160px;
        border-radius: 12px;
        overflow: hidden;
        background: var(--bg-main);
    }

    .bargain-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .bargain-info {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 30px 10px 10px;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
        color: var(--white);
        display: flex;
        flex-direction: column;
    }

    .b-under {
        font-size: 10px;
        font-weight: 500;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }

    .b-price {
        font-size: 20px;
        font-weight: 800;
        line-height: 1;
        margin: 2px 0;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }

    .b-cat {
        font-size: 12px;
        font-weight: 600;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 65px;
        /* Prevent content from hiding behind nav */
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        z-index: 1000;
        justify-content: space-around;
        padding: 10px 0;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-color);
        gap: 6px;
        flex: 1;
        border-right: 1px solid var(--bg-main);
    }

    .bottom-nav-item:last-child {
        border-right: none;
    }

    .bottom-nav-item i {
        font-size: 20px;
    }

    .bottom-nav-item img {
        height: 20px;
        width: auto;
    }

    .bottom-nav-item span {
        font-size: 12px;
        font-weight: 600;
    }

    .bottom-nav-item.active {
        color: var(--primary-color);
    }

    .bottom-nav-item.active span {
        font-weight: 700;
    }
}

@media (max-width: 768px) {
    .policy-content {
        padding: 25px;
    }

    .policy-content h1 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .terms-content {
        padding: 25px;
    }

    .terms-content h1 {
        font-size: 24px;
    }
}


/* Responsive */
@media (max-width: 992px) {
    .filters-sidebar {
        border-radius: 0 !important;
        width: 90% !important;
        z-index: 9999 !important;
    }

    /* .filters-sidebar {
        display: none;
    } */

    .products-top-bar {
        display: none;
    }

    .mobile-bottom-bar {
        display: flex;
    }

    .products-section-main,
    .product-gallery {
        padding: 10px 0px !important;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-img-wrapper {
        height: 220px;
    }
}


@media (max-width: 768px) {
    .home-main {
        padding: 15px 0 !important;
    }

    .step-nav {
        padding: 5px !important;
    }

    .terms-container,
    .policy-container {
        padding: 15px 0;
    }

    .terms-content,
    .policy-content,
    .wishlist-container,
    .wishlist-section {
        padding: 0 !important;
    }

    .card-custom,
    .summary-box {
        border: none !important;
        padding: 8px !important;
    }

    .cart-items-section,
    .coupon-section {
        padding: 0 !important;
    }

    .premium-card {
        border-top: none !important;
        box-shadow: none !important;
        margin-bottom: 0 !important;
    }

    .widget-img {
        width: 50px;
        height: 50px;
    }

    .category-widgets-wrapper {
        gap: 0px;
    }

    .category-widget span {
        font-size: 12px;
        font-weight: 600;
    }

    .product-price-box {
        display: block;
    }

    .mobile-nav-links {
        padding: 23px 15px 30px 15px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sort-menu {
        width: 180px;
    }

    .sort-select-box {
        width: auto;
        min-width: 160px;
        padding: 6px 10px;
    }

    .sort-label {
        font-size: 12px;
    }
}

/* Responsive Styles */
@media (max-width: 991px) {
    .product-gallery {
        flex-direction: column;
    }

    .thumbnail-list {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .thumbnail-item {
        width: 70px;
        flex-shrink: 0;
        aspect-ratio: 4/5;
    }

    .main-image-container {
        height: auto;
        aspect-ratio: 5/5;
    }

    .product-info-wrapper {
        padding-left: 0;
        padding: 10px 0 !important;
        margin-top: 0px !important;
    }
}

@media (max-width: 576px) {

    .product-gallery {
        position: static !important;
    }

    .action-buttons-group {
        width: 100%;
        margin-top: 0;
        background: white;
        padding: 10px 0;
        z-index: 1050;
        margin-top: 10px;
        gap: 10px;
    }

    .add-to-bag-btn,
    .wishlist-btn {
        padding: 12px;
        font-size: 14px;
    }

    .product-details-container {
        padding-bottom: 80px;
    }
}

@media (min-width: 992px) {
    .product-gallery {
        position: sticky;
        top: 100px;
    }

    .product-main-section .row {
        align-items: flex-start;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .cart-container {
        padding-bottom: 80px;
    }
}

@media (max-width: 576px) {
    .item-img-wrapper {
        width: 80px;
        height: 100px;
    }

    .item-name {
        font-size: 14px;
    }

    .item-meta {
        gap: 8px;
    }
}


/* Mobile Responsiveness for Wishlist */
@media (max-width: 768px) {
    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .bk-details {
        padding: 8px;
    }

    .bk-name {
        font-size: 11px;
    }

    .bk-current-price {
        font-size: 14px;
    }

    .bk-actions {
        flex-direction: row;
    }

    .bk-delete-btn {
        width: 60%;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        padding: 8px;
    }

    .bk-add-bag-btn {
        width: 100%;
        padding: 10px;
    }
}


/* Mobile Responsiveness */
@media (max-width: 767.98px) {
    .checkout-container {
        padding: 1rem 10px;
    }

    .step-nav {
        padding: 0;
        margin-bottom: 1.5rem;
        justify-content: space-between;
    }

    .step-item {
        flex-direction: column;
        text-align: center;
        width: auto;
    }

    .step-circle {
        margin-right: 0;
        margin-bottom: 5px;
        width: 25px;
        height: 25px;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.65rem;
    }

    .step-line {
        margin: 0 5px;
        flex-grow: 1;
        margin-top: -15px;
        /* align with circles */
    }

    .card-custom {
        padding: 1rem;
    }

    .summary-box {
        margin-top: 1rem;
        padding: 1rem;
    }

    .btn-primary-action,
    .btn-outline-secondary {
        width: auto;
        margin-bottom: 0rem;
        padding: 1rem;
    }

    /* Make the form navigation buttons full width on mobile */
    .d-flex.justify-content-end.mt-2 {
        flex-direction: column;
    }

    #btnNext,
    #btnSubmit {
        width: 100%;
        margin-left: 0 !important;
    }
}

/* Tablet / Smaller Laptops */
@media (min-width: 768px) and (max-width: 991.98px) {
    .step-label {
        font-size: 0.75rem;
    }

    .step-line {
        margin: 0 5px;
    }
}

/* Mobile specific styling to stack status block correctly */
@media (max-width: 767.98px) {
    .order-status-block {
        text-align: left;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px dashed var(--border-color);
    }
}


/* Responsive adjustments */
@media (min-width: 768px) {
    .tracking-container {
        padding: 30px 20px;
    }

    .tracking-product-img {
        width: 100px;
        height: 133px;
    }

    .tracking-brand {
        font-size: 1.1rem;
    }

    .tracking-name {
        font-size: 1rem;
    }

    .tracking-price {
        font-size: 1.15rem;
    }

    .step-desc {
        font-size: 0.9rem;
        padding: 12px 16px;
    }
}

/* Profile Menu Mobile Tabs */
@media (max-width: 768px) {
    .profile-sidebar-menu {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
        border-bottom: 1px solid var(--border-color);
    }

    .profile-sidebar-menu::-webkit-scrollbar {
        display: none;
    }

    .profile-sidebar-menu .profile-menu-item {
        border-left: none !important;
        border-bottom: 3px solid transparent !important;
        white-space: nowrap;
        padding: 12px 20px !important;
        border-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    .profile-sidebar-menu .profile-menu-item.active {
        border-left: none !important;
        border-bottom: 3px solid var(--primary-color) !important;
        background-color: rgba(255, 63, 108, 0.05) !important;
    }
}

/* Product Gallery Mobile */
@media (max-width: 991px) {
    .product-gallery {
        flex-direction: column-reverse;
    }

    .thumbnail-list {
        flex-direction: row !important;
        width: 100% !important;
        overflow-x: auto;
        padding-bottom: 10px;
        scrollbar-width: none;
    }

    .thumbnail-list::-webkit-scrollbar {
        display: none;
    }

    .thumbnail-item {
        width: 70px !important;
        flex-shrink: 0;
    }
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .border-end-md {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 24px;
        margin-bottom: 12px;
    }

    .main-image-container {
        height: 380px;
    }

    .thumbnail-slider-container .thumbnail-item {
        flex: 0 0 calc((100% - 24px) / 4); /* Display 3 on smaller screens */
    }

    /* Product Card - Myntra Style */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
        /* Increased gap slightly */
    }
}

@media (max-width: 480px) {
    .main-image-container {
        height: 280px;
    }

    .thumbnail-slider-container .thumbnail-item {
        flex: 0 0 calc((100% - 12px) / 4); /* Display 2 on very small screens */
    }

    .product-badges-row {
        justify-content: center;
    }
}
