/* =========================================================
   I LAB - Responsive Overrides
   ========================================================= */

@media (max-width: 1199.98px) {
  section { padding: 80px 0; }
}

@media (max-width: 991.98px) {
  .top-bar { text-align: center; }
  .top-bar .text-end { text-align: center !important; margin-top: 6px; }
  .hero { padding: 110px 0 90px; }
  .hero .stats-row { gap: 24px; }
  .navbar-collapse {
    background: #fff;
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
  }
  .navbar-nav .nav-link::after { display: none; }
  .about-img-wrap { margin-bottom: 40px; }
  .about-img-wrap .exp-badge { left: 20px; bottom: -14px; }
  section { padding: 70px 0; }

  .contact-btn{
      width:100%;
      margin-top:10px;
      margin-left:0 !important;
      height:44px;
  }
}

@media (max-width: 767.98px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  section { padding: 60px 0; }
  .hero { padding: 90px 0 70px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .cta-group { justify-content: center; }
  .hero .stats-row { justify-content: center; }
  .counter-item h2 { font-size: 2.2rem; }
  .testimonial-card { padding: 26px; }
  .page-hero { padding: 100px 0 50px; text-align: center; }
  .page-hero .breadcrumb { justify-content: center; }
  .footer { padding: 50px 0 0; text-align: center; }
  .footer .social { justify-content: center; display: flex; }
  .product-gallery .thumbs { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 575.98px) {
  .top-bar { font-size: .78rem; }
  .top-bar a { margin-right: 10px; }
  .navbar-brand { font-size: 1.25rem; }
  .navbar-brand .logo-mark { width: 32px; height: 32px; font-size: 1rem; }
  .btn { padding: 10px 18px; font-size: .9rem; }
  .hero .badge-strip { font-size: .75rem; }
  .category-card, .feature-item, .service-card { padding: 22px 18px; }
}




/* =========================================
   MOBILE LEFT SIDE NAVIGATION - I LAB
========================================= */

@media (max-width: 991.98px) {

  .navbar {
    position: sticky;
    top: 0;
    z-index: 1040;
  }

  /* Left slide-out menu */
  .navbar-collapse {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;

    width: min(82vw, 320px) !important;
    height: 100vh !important;
    height: 100dvh !important;

    margin: 0 !important;
    padding: 85px 20px 30px !important;

    background: #ffffff !important;
    border-radius: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    display: block !important;

    transform: translateX(-105%);
    visibility: hidden;

    transition: transform 0.3s ease,
                visibility 0.3s ease;

    z-index: 1055 !important;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
  }

  /* When hamburger is clicked */
  .navbar-collapse.show {
    transform: translateX(0);
    visibility: visible;
  }

  /* Bootstrap animation */
  .navbar-collapse.collapsing {
    height: 100vh !important;
    height: 100dvh !important;
    transition: transform 0.3s ease;
  }

  /* Vertical navigation */
  .navbar-nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  .navbar-nav .nav-item {
    width: 100%;
  }

  .navbar-nav .nav-link {
    display: block;
    width: 100%;
    padding: 13px 10px !important;
    font-size: 16px;
    border-bottom: 1px solid #eeeeee;
  }

  .navbar-nav .nav-link::after {
    display: none !important;
  }

  /* Products dropdown */
  .navbar .mega-dropdown {
    width: 100%;
  }

  .navbar .mega-menu {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 10px !important;
  }

  .navbar .mega-menu .row {
    margin: 0;
  }

  .navbar .mega-menu [class*="col-"] {
    width: 100%;
  }

  /* Hamburger button */
  .navbar-toggler {
    border: 1px solid #C42B26;
    padding: 7px 10px;
    box-shadow: none !important;
    z-index: 1060;
  }

  .navbar-toggler:focus {
    box-shadow: none !important;
  }

}

/* MOBILE NAVBAR CLOSE ICON */
@media (max-width: 991.98px) {

  .navbar-collapse.show::before {
    content: "×";
    position: absolute;
    top: 15px;
    right: 20px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 34px;
    font-weight: 400;
    line-height: 1;

    color: #C42B26;
    background: #fff;

    cursor: pointer;
    z-index: 1100;
  }

}

/* ==========================================
   I LAB -  PRODUCT FIX
========================================== */

/* COMMON PRODUCT CARD FIX */
.product-card {
    width: 100%;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
}

.product-card .img-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
}

.product-card .img-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain !important;
    object-position: center;
}

.product-card .body {
    min-width: 0;
    padding: 16px;
    overflow-wrap: anywhere;
}

.product-card h5 {
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.product-card p {
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.product-card .btn {
    max-width: 100%;
    white-space: normal;
}

/* 3. FEATURED PRODUCTS */
.featured-products-section {
    width: 100%;
    overflow: hidden;
}

.featured-products-section .container-fluid {
    min-width: 0;
}

.featured-products-track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    gap: 0;
}

.featured-products-track > .product-item {
    flex: 0 0 25%;
    max-width: 25%;
    min-width: 0;
    padding: 0 12px;
    box-sizing: border-box;
}

.featured-products-track .product-card {
    min-width: 0;
    height: 100%;
}

.featured-products-track .product-card .img-wrap {
    height: auto;
    aspect-ratio: 4 / 3;
    display: flex;
}

.featured-products-track .product-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
}

.featured-products-section .section-subtitle {
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 12px;
}

/* 4. PRODUCTS CATALOGUE PAGE */
.catalog-layout {
    grid-template-columns: 245px minmax(0, 1fr);
    width: 100%;
    min-width: 0;
}

.catalog-products {
    min-width: 0;
    width: 100%;
}

#productGrid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
    margin: 0;
}

#productGrid > .product-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
}

.catalog-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

/* 5. TABLET */
@media (max-width: 991.98px) {

    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    #productGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .featured-products-track > .product-item {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .about-img-wrap .exp-badge {
        bottom: 12px !important;
        left: 12px !important;
    }
}

/* 6. MOBILE */
@media (max-width: 575.98px) {

    .about-img-wrap {
        margin-bottom: 25px;
    }

    .about-img-wrap .exp-badge {
        bottom: 10px !important;
        left: 10px !important;
        max-width: calc(100% - 20px);
        padding: 10px 14px !important;
    }

    .about-img-wrap .exp-badge h3 {
        font-size: 24px !important;
    }

    .about-img-wrap .exp-badge span {
        font-size: 11px;
    }

    /* Featured products: one card at a time */
    .featured-products-track > .product-item {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 8px;
    }

    .featured-products-track .product-card .body {
        padding: 14px;
    }

    /* Catalogue products: one card per row */
    #productGrid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    #productGrid > .product-item {
        width: 100% !important;
    }

    .catalog-results-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .catalog-results-bar label {
        flex-wrap: wrap;
    }

    .products-section {
        padding: 40px 0;
    }

    .product-card .img-wrap {
        aspect-ratio: 4 / 3;
    }

    .product-card .body {
        padding: 15px;
    }

    .product-card h5 {
        font-size: 14px;
    }

    .product-card p {
        font-size: 13px;
    }

    .product-pagination {
        max-width: 100%;
        overflow-x: auto;
    }

    .product-pagination ul {
        flex-wrap: nowrap;
        white-space: nowrap;
    }
}

/* 7. VERY SMALL MOBILE */
@media (max-width: 360px) {

    .about-img-wrap .exp-badge {
        padding: 8px 11px !important;
    }

    .about-img-wrap .exp-badge h3 {
        font-size: 21px !important;
    }

    .product-card .body {
        padding: 12px;
    }

    .featured-products-section .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}




/* MOBILE CATEGORY DROPDOWN - EXACT DESKTOP STYLE */

.mobile-category-dropdown {
    display: none;
}

@media (max-width: 991.98px) {

    .catalog-sidebar {
        display: none !important;
    }

    .mobile-category-dropdown {
        display: block;
        position: relative;
        width: 100%;
        margin-bottom: 22px;
        padding: 20px 16px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: var(--shadow-sm);
        box-sizing: border-box;
        z-index: 20;
    }

    .mobile-category-dropdown h3 {
        font-family: 'Poppins', sans-serif;
        font-size: 17px;
        margin: 0 0 14px;
        padding: 0 4px 14px;
        border-bottom: 1px solid var(--border);
    }

    .mobile-category-dropdown h3 i {
        color: var(--primary);
        margin-right: 7px;
    }

    .mobile-category-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: 7px;
        background: #fff;
        color: #4b5563;
        font-size: 14px;
        font-weight: 500;
        text-align: left;
        cursor: pointer;
    }

    .mobile-category-menu {
        display: none;
        flex-direction: column;
        gap: 5px;
        margin-top: 10px;
        padding: 8px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 8px;
        max-height: 260px;
        overflow-y: auto;
    }

    .mobile-category-menu.open {
        display: flex;
    }

    /* Same as desktop category buttons */
    .mobile-category-item {
        display: block;
        width: 100%;
        padding: 10px 12px;
        border: 0;
        border-radius: 7px;
        background: transparent;
        color: #4b5563;
        font-size: 14px;
        font-weight: 500;
        text-align: left;
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease;
    }

    /* Desktop hover style */
    .mobile-category-item:hover {
        background: #eef5fb;
        color: var(--primary);
    }

    /* Desktop selected style */
    .mobile-category-item.active {
        background: var(--primary);
        color: #fff;
    }

    .mobile-category-item.active:hover {
        background: var(--primary);
        color: #fff;
    }
}

@media (min-width: 992px) {
    .mobile-category-dropdown {
        display: none !important;
    }
}



/* FOOTER - QUICK LINKS & PRODUCTS SIDE BY SIDE */

@media (max-width: 575.98px) {

    /* Quick Links column */
    .footer > .container > .row > div:nth-child(2) {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
    }

    /* Products column */
    .footer > .container > .row > div:nth-child(3) {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
    }

    /* Keep footer content within screen */
    .footer > .container > .row > div {
        min-width: 0;
        box-sizing: border-box;
    }

    .footer > .container > .row > div:nth-child(2) a,
    .footer > .container > .row > div:nth-child(3) a {
        font-size: 12px;
        overflow-wrap: anywhere;
    }

    .footer h6 {
        font-size: 13px;
        margin-bottom: 14px;
    }
}

/* FOOTER LOGO AND DESCRIPTION SIDE BY SIDE */

@media (max-width: 767.98px) {

    .footer .container > .row > div:first-child {
        display: grid;
        grid-template-columns: 80px minmax(0, 1fr);
        column-gap: 15px;
        align-items: center;
        text-align: left;
    }

    .footer-logo {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
    }

    .footer-logo img {
        width: 80px;
        max-width: 100%;
        height: auto;
        margin: 0;
    }

    .footer .container > .row > div:first-child > p {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        font-size: 12px;
        line-height: 1.6;
    }

    .footer .container > .row > div:first-child .social {
        grid-column: 1 / -1;
        margin-top: 18px !important;
        justify-content: flex-start;
    }
}



/* ===== 12+ EXPERIENCE BADGE - MOBILE FIX ===== */
@media (max-width: 767.98px) {
    .about-img-wrap {
        position: relative !important;
        overflow: visible !important;
    }

    .about-img-wrap .exp-badge {
        position: absolute !important;
        top: 8px !important;
        left: 8px !important;
        right: auto !important;
        bottom: auto !important;

        width: auto !important;
        max-width: calc(100% - 16px) !important;

        padding: 8px 12px !important;
        border-radius: 10px !important;

        z-index: 5 !important;
        box-sizing: border-box !important;
    }

    .about-img-wrap .exp-badge h3 {
        font-size: 22px !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }

    .about-img-wrap .exp-badge span {
        font-size: 11px !important;
        display: block !important;
        line-height: 1.3 !important;
    }
}

/* HOME SERVICES - MOBILE IMAGE FIX */
@media (max-width: 767.98px) {

    .services-section .service-card {
        width: 100%;
        height: auto;
        overflow: hidden;
    }

    .services-section .service-img {
        display: block;
        width: 100%;
        height: 220px;
        object-fit: cover;
        object-position: center;
    }

    .services-section .service-content {
        width: 100%;
        box-sizing: border-box;
    }

}