/* ==========================================
   HEADER STYLES - Plasti Surge Industries
   ========================================== */

/* Base Header Styles */
.drop_sub_menu {
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 22px 28px;
    background: #fff;
}
.primary-nav-menu > li.menu-item-has-children::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(135deg, #41B353 0%, #2E8B57 50%, #14532D 100%);
    transition: width 0.3s ease;
}

.primary-nav-menu > li.menu-item-has-children:hover::before {
    width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 5px 0px;
}

.search-icon-btn svg {
    stroke: #fff;
}

.search-submit svg {
    stroke: #fff;
}

.search-input::placeholder {
    color: #000;
}

.main-navigation {
    width: 100%;
}

.nav-container {
    max-width: 85%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 20px;
}

/* Logo Section */
.header-logo {
    flex-shrink: 0;
    z-index: 1001;
}

.logo-link {
    display: block;
    line-height: 0;
}

.logo-img {
    width: 170px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    height: 50px;
}

/*.logo-link:hover .logo-img {*/
/*    transform: scale(1.05);*/
/*}*/

/* Navigation Menu */
.header-nav-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-right: 50px;
}

.primary-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 44px;
    height: 90px;
    flex-direction: row;
    align-items: center;
}

.primary-nav-menu>li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    justify-content: center;
}

.primary-nav-menu>li>a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0px;
    color: #333333;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 30px;
}

/* Dropdown Arrow Icon */
.primary-nav-menu .menu-item-has-children>a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.primary-nav-menu .menu-item-has-children:hover>a::after {
    transform: rotate(180deg);
}

/* .primary-nav-menu > li > a:hover,
.primary-nav-menu > li.current-menu-item > a {
    color: #0066cc;
    background: rgba(0, 102, 204, 0.05);
} */

/* Dropdown Menus */
.primary-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #f8f8f8;
    min-width: 360px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 18px;
    list-style: none;
    margin: 0px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    border-top: 1px solid #c3c3c3;
}

.primary-nav-menu li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-nav-menu .sub-menu li a {
    display: block;
    padding: 10px 15px;
    color: #000;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
    line-height: 26px;
    /* border-bottom: 1px solid #000; */
    font-weight: 500;
}

.primary-nav-menu .sub-menu li {margin-bottom: 0px;}

.primary-nav-menu .sub-menu li:last-child {
    margin-bottom: 0px;
    border-bottom: 0px;
}

.primary-nav-menu .sub-menu li a:hover {background: #f5f5f5;border-radius: 10px;color: var(--primary-green);}

/* Nested Dropdown Arrow */
.primary-nav-menu .sub-menu .menu-item-has-children>a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid currentColor;
    margin-left: auto;
    float: right;
}

/* Desktop Search Section */
.nav-search {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.search-icon-btn {
    background: #41B353;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.search-icon-btn:hover {}

.search-form {
    position: absolute;
    right: 0;
    top: 0px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 4px 4px 4px 15px;
    width: 42px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    height: 42px;
}

.search-form.active {
    width: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #41B353;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
    opacity: 0;
    width: 0;
    transition: opacity 0.3s ease;
}

.search-form.active .search-input {
    opacity: 1;
    width: auto;
}

.search-submit {
    background: #181818;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s ease;
    flex-shrink: 0;
    opacity: 0;
    pointer-events: none;
}

.search-form.active .search-submit {
    opacity: 1;
    pointer-events: all;
}

.search-submit:hover {
    background: #218838;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #333333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-11px);
}

/* ==========================================
   MOBILE SEARCH - FLOATING BUTTON & OVERLAY
   ========================================== */

.mobile-search-wrapper {
    display: none;
}

.mobile-search-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #28a745;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(40, 167, 69, 0.6);
    }
}

.mobile-search-btn:active {
    transform: scale(0.95);
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(40, 167, 69, 0.96);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mobile-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-search-content {
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-search-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s ease;
}

.mobile-search-close:active {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.mobile-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border-radius: 50px;
    padding: 8px 8px 8px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.mobile-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 12px 0;
    color: #333333;
}

.mobile-search-input::placeholder {
    color: #999999;
}

.mobile-search-submit {
    background: #28a745;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-search-submit:active {
    background: #218838;
    transform: scale(0.95);
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

/* Tablet & Below - 1200px */
@media screen and (max-width: 1200px) {
    .nav-container {
        height: 70px;
        padding: 0 15px;
        gap: 10px;
    }

    .logo-img {
        height: 45px;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }

    /* Hide Desktop Search on Tablet & Mobile */
    .desktop-search {
        display: none !important;
    }

    /* Show Mobile Search */
    .mobile-search-wrapper {
        display: block;
    }

    .header-nav-wrapper {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        padding: 20px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        order: 4;
        justify-content: flex-start;
    }

    .header-nav-wrapper.active {
        transform: translateX(0);
    }

    .primary-nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .primary-nav-menu>li>a {
        padding: 15px 20px;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 0;
        justify-content: space-between;
    }

    /* Mobile Dropdown Arrow */
    .primary-nav-menu .menu-item-has-children>a::after {
        border-top: 6px solid currentColor;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        margin-left: 0;
        z-index: 99999;
    }

    .primary-nav-menu .menu-item-has-children.active>a::after {
        transform: rotate(180deg);
    }

    .primary-nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: #f8f8f8;
        margin: 0;
        padding: 0px;
    }

    .primary-nav-menu .menu-item-has-children.active>.sub-menu {
        max-height: 500px;
    }

    .primary-nav-menu .sub-menu li a {
        padding: 12px 30px;
    }

    .primary-nav-menu .sub-menu .menu-item-has-children>a::after {
        border-left: 5px solid currentColor;
        border-top: 4px solid transparent;
        border-bottom: 4px solid transparent;
    }
}

/* Medium Tablet */
@media screen and (max-width: 768px) {
    .nav-container {
        height: 65px;
    }

    .logo-img {
        height: 40px;
    }

    .header-nav-wrapper {
        top: 65px;
    }
}

/* Mobile */
@media screen and (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }

    .logo-img {
        height: 35px;
    }

    .mobile-search-btn {
        width: 52px;
        height: 52px;
        bottom: 70px;
        right: 15px;
    }

    .mobile-search-content {
        width: 85%;
    }
}

/* Body scroll lock when menu open */
body.menu-open,
body.search-open {
    overflow: hidden;
}

.site-header.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}