/* =========================================================
   THE ENGINEERS GROUP - HEADER RESPONSIVE
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.teg-header {
    width: 100%;
    max-width: 100%;
}

.teg-header .container {
    width: 100%;
    max-width: 100%;
}

.header-wrapper {
    width: 100%;
    min-width: 0;
}

.header-logo {
    min-width: 0;
}

.header-logo a {
    display: flex;
    align-items: center;
    max-width: 100%;
}

.header-logo img,
.header-logo .custom-logo {
    max-width: 100%;
    height: auto;
    width: auto;
}

.main-nav,
.main-navigation {
    min-width: 0;
}

.header-icons {
    flex-shrink: 0;
}

.mobile-menu-toggle {
    display: none;
}


/* =========================================================
   TABLET
   768px - 1100px
   ========================================================= */

@media (max-width: 1100px) {

    .header-wrapper {
        height: 80px;
        gap: 18px;
    }

    .header-logo img,
    .header-logo .custom-logo {
        max-height: 58px;
    }

    .header-logo h2 {
        font-size: 28px;
    }

    /* Hide desktop navigation */
    .main-navigation .nav-menu {
        display: none;
    }

    /* Show hamburger */
    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        padding: 8px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        cursor: pointer;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    .mobile-menu-toggle span:not(.screen-reader-text) {
        display: block;
        width: 25px;
        height: 2px;
        background: #0d2d73;
        border-radius: 2px;
        transition: .3s;
    }

    .mobile-menu-toggle:hover {
        background: rgba(13, 45, 115, .06);
    }

    .main-navigation {
        position: relative;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }

    /* Open menu */
    .main-navigation.menu-open .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        position: absolute;
        top: calc(100% + 15px);
        right: 0;

        width: min(320px, calc(100vw - 30px));
        max-height: calc(100vh - 110px);
        overflow-y: auto;

        padding: 10px 0;

        background: #fff;
        border-radius: 12px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, .14);

        z-index: 1000;
    }

    .main-navigation.menu-open .nav-menu li {
        width: 100%;
        white-space: normal;
    }

    .main-navigation.menu-open .nav-menu li a {
        display: block;
        width: 100%;
        padding: 13px 20px;
        font-size: 16px;
    }

    /* Mobile/tablet dropdown */
    .main-navigation .sub-menu {
        position: static;
        width: 100%;
        min-width: 0;

        display: block;

        padding: 0;
        margin: 0;

        background: #f8f9fc;
        border-radius: 0;
        box-shadow: none;
    }

    .main-navigation .sub-menu li a {
        padding: 11px 30px;
        font-size: 15px;
    }

    .main-navigation .nav-menu li:hover > .sub-menu {
        display: block;
    }

    /* Header icons */
    .header-icons {
        gap: 18px;
    }

    .header-icons a {
        font-size: 22px;
    }

    .cart-icon span {
        width: 20px;
        height: 20px;
        font-size: 11px;
        top: -8px;
        right: -10px;
    }

}


/* =========================================================
   MOBILE
   Up to 767px
   ========================================================= */

@media (max-width: 767px) {

    .teg-header {
        position: sticky;
        top: 0;
    }

    .header-wrapper {
        height: 68px;
        gap: 8px;
    }

    .header-logo {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .header-logo a {
        max-width: 100%;
    }

    .header-logo img,
    .header-logo .custom-logo {
        max-width: 155px;
        width: auto;
        height: auto;
        max-height: 52px;
        object-fit: contain;
    }

    .header-logo h2 {
        font-size: 21px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .main-navigation {
        flex: 0 0 auto;
    }

    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        padding: 6px;
    }

    .mobile-menu-toggle span:not(.screen-reader-text) {
        width: 23px;
        height: 2px;
    }

    .header-icons {
        gap: 12px;
        flex-shrink: 0;
    }

    .header-icons a {
        font-size: 19px;
    }

    .cart-icon span {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -8px;
        right: -9px;
    }

    /* Mobile dropdown menu */
    .main-navigation.menu-open .nav-menu {
        top: calc(100% + 10px);
        right: 0;

        width: min(300px, calc(100vw - 20px));
        max-height: calc(100vh - 90px);
    }

    .main-navigation.menu-open .nav-menu li a {
        padding: 12px 17px;
        font-size: 15px;
    }

    .main-navigation .sub-menu li a {
        padding: 10px 28px !important;
        font-size: 14px !important;
    }

}


/* =========================================================
   SMALL MOBILE
   Up to 480px
   ========================================================= */

@media (max-width: 480px) {

    .header-wrapper {
        height: 64px;
        gap: 5px;
    }

    .header-logo img,
    .header-logo .custom-logo {
        max-width: 125px;
        max-height: 45px;
    }

    .header-logo h2 {
        font-size: 18px;
    }

    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
    }

    .mobile-menu-toggle span:not(.screen-reader-text) {
        width: 21px;
    }

    .header-icons {
        gap: 9px;
    }

    .header-icons a {
        font-size: 18px;
    }

    .cart-icon span {
        width: 17px;
        height: 17px;
        font-size: 9px;
    }

}
/* =========================================================
   DESKTOP HEADER FINAL ALIGNMENT
   ========================================================= */

@media (min-width: 1101px) {

    /* Header container */
    .teg-header .container {
        width: 100%;
        max-width: 1400px;
        margin: 0 auto;
        padding-left: 30px;
        padding-right: 30px;
    }

    /* Main header row */
    .teg-header .header-wrapper {
        width: 100%;
        height: 90px;
        display: flex;
        align-items: center;
        gap: 25px;
    }

    /* Logo */
    .teg-header .header-logo {
        flex: 0 0 auto;
        width: 210px;
        min-width: 210px;
        display: flex;
        align-items: center;
    }

    .teg-header .header-logo a {
        display: flex;
        align-items: center;
        width: 100%;
        height: 100%;
    }

    .teg-header .header-logo img,
    .teg-header .header-logo .custom-logo {
        display: block;
        width: auto !important;
        height: auto !important;
        max-width: 190px !important;
        max-height: 70px !important;
        object-fit: contain;
    }

    .teg-header .header-logo h2 {
        font-size: 28px;
        line-height: 1.1;
        margin: 0;
        white-space: nowrap;
    }


    /* Navigation */
    .teg-header .main-navigation {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .teg-header .main-navigation .nav-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 24px;
        flex-wrap: nowrap;
        width: auto;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .teg-header .main-navigation .nav-menu li {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .teg-header .main-navigation .nav-menu li a {
        padding: 28px 0;
        font-size: 15px;
        line-height: 1.2;
        white-space: nowrap;
    }


    /* Header Icons */
    .teg-header .header-icons {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 20px;
        min-width: 125px;
        margin-left: auto;
    }

    .teg-header .header-icons a {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 40px;
        font-size: 21px;
        line-height: 1;
        color: #111;
        text-decoration: none;
    }

    .teg-header .header-icons a:hover {
        color: #d4a017;
    }

    /* Cart badge */
    .teg-header .header-icons .cart-icon span {
        position: absolute;
        top: -4px;
        right: -7px;

        width: 19px;
        height: 19px;

        border-radius: 50%;
        background: #d4a017;
        color: #fff;

        font-size: 10px;
        font-weight: 700;

        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hamburger hidden on desktop */
    .teg-header .mobile-menu-toggle {
        display: none !important;
    }
}
/* =========================================
   FINAL MOBILE CATEGORY OVERRIDE
========================================= */

@media screen and (max-width: 600px) {

    .categories-section .section-heading h2 {
        font-size: 32px !important;
        line-height: 1.2 !important;
        font-weight: 800 !important;
        white-space: normal !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .categories-section .section-heading {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 35px !important;
    }

    .categories-section .section-heading > span {
        font-size: 12px !important;
        line-height: 1.4 !important;
        letter-spacing: 1.5px !important;
    }

    .categories-section .section-heading p {
        font-size: 15px !important;
        line-height: 1.5 !important;
        margin-top: 12px !important;
    }

}
/* =========================================
   FEATURES MOBILE FIX
========================================= */

@media (max-width: 600px) {

    .features-wrapper {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        overflow: hidden !important;
        border-radius: 18px !important;
    }

    .feature-item {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 18px 20px !important;
        border-right: none !important;
        border-bottom: 1px solid #e8e8e8 !important;
        box-sizing: border-box !important;
    }

    .feature-item:last-child {
        border-bottom: none !important;
    }

    .feature-item > i {
        flex: 0 0 42px !important;
        width: 42px !important;
        min-width: 42px !important;
        font-size: 30px !important;
        text-align: center !important;
    }

    .feature-item > div {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .feature-item h4 {
        font-size: 17px !important;
        line-height: 1.3 !important;
        margin: 0 0 4px !important;
        white-space: normal !important;
    }

    .feature-item p {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        white-space: normal !important;
    }
}
/* =========================================
   PRODUCTS SECTION - RESPONSIVE FIX
========================================= */

/* TABLET */
@media screen and (max-width: 1100px) {

    .products-section {
        padding: 75px 0;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 22px !important;
    }

    .product-image img {
        height: 300px !important;
        object-fit: cover;
    }

    .product-content {
        padding: 20px !important;
    }

    .product-title,
    .product-content h3 {
        height: auto;
        min-height: 54px;
    }

}


/* MOBILE */
@media screen and (max-width: 600px) {

    .products-section {
        padding: 55px 0 60px !important;
    }

    .products-section .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    /* Heading */

    .products-section .section-heading {
        margin-bottom: 35px !important;
        text-align: center !important;
    }

    .products-section .section-heading span {
        font-size: 12px !important;
        letter-spacing: 1.5px !important;
        margin-bottom: 10px !important;
    }

    .products-section .section-heading h2 {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 10px !important;
    }

    .products-section .section-heading p {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }


    /* Product Grid */

    .products-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 22px !important;
        width: 100% !important;
    }


    /* Product Card */

    .products-grid .product-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        border-radius: 18px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }


    /* Product Image */

    .products-grid .product-image {
        width: 100% !important;
        height: auto !important;
        overflow: hidden !important;
    }

    .products-grid .product-image img {
        width: 100% !important;
        height: 300px !important;
        object-fit: cover !important;
        display: block !important;
    }


    /* Badges */

    .products-grid .featured-badge,
    .products-grid .sale-badge {
        top: 12px !important;
        font-size: 11px !important;
        padding: 6px 11px !important;
    }

    .products-grid .featured-badge {
        right: 12px !important;
    }

    .products-grid .sale-badge {
        left: 12px !important;
    }


    /* Product Content */

    .products-grid .product-content {
        padding: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }


    /* Product Title */

    .products-grid .product-title,
    .products-grid .product-content h3 {
        height: auto !important;
        min-height: 0 !important;
        margin: 0 0 12px !important;
        font-size: 18px !important;
        line-height: 1.45 !important;
    }

    .products-grid .product-title a {
        font-size: 18px !important;
        line-height: 1.45 !important;
    }


    /* Rating */

    .products-grid .rating {
        height: auto !important;
        margin-bottom: 12px !important;
    }


    /* Price */

    .products-grid .price,
    .products-grid .product-price {
        margin-top: 0 !important;
        margin-bottom: 18px !important;
    }

    .products-grid .price del {
        font-size: 14px !important;
    }

    .products-grid .price ins {
        font-size: 18px !important;
    }


    /* Add To Cart */

    .products-grid .cart-btn {
        width: 100% !important;
        height: 50px !important;
        font-size: 15px !important;
        border-radius: 10px !important;
    }

}
