/* Header Original - Safari Fixes & Search Overlay */
/* Reset for Safari */
        #master_head * {
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
        }
        
        /* Safari Header Fix */
        #master_head {
            position: relative;
            z-index: 99;
            width: 100%;
        }
        
        #master_head .wrapper {
            width: 100%;
            background: #fff;
            border-bottom: 1px solid #e9e9e9;
            position: relative;
            top: 0;
            left: 0;
            right: 0;
            z-index: 98;
        }
        
        /* Remove problematic animations for Safari */
        .safari #master_head .wrapper,
        .safari #master_head.fixed .wrapper {
            animation: none !important;
            -webkit-animation: none !important;
        }
        
        /* Safari fixed positioning */
        .safari #master_head.fixed .wrapper {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            width: 100%;
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
        
        /* Mobile logo fix */
        #master_head .mobile .logo {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        #master_head .mobile .logo img {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            height: 40px;
            width: auto;
        }
        
        /* Desktop menu for mobile Safari */
        @media (max-width: 999px) {
            #master_head .desktop {
                position: fixed;
                z-index: 99;
                background: #FFFBFB;
                max-width: 100vw;
                left: -100vw;
                top: 0;
                height: 100vh;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                border-radius: 0 15px 15px 0;
                box-shadow: 0px 10px 10px rgba(169, 134, 134, 0.3);
                border-top: 1px solid #FEF2F3;
                transition: left 0.3s ease-out;
                -webkit-transition: left 0.3s ease-out;
            }
            
            #master_head.opened .desktop {
                left: 0;
            }
        }
        
        /* Search styles */
        .search-icon {
            cursor: pointer;
            display: flex;
            align-items: center;
            width: 21px;
            height: 23px;
        }

        .search-icon:hover svg {
            transform: scale(1.1);
        }
        
        .search-icon svg path {
            fill: #333333;
            transition: fill 0.3s ease;
        }

        .fullscreen-search-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.85);
            z-index: 9999;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .fullscreen-search-overlay.active {
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 1;
        }

        .search-container {
            width: 80%;
            max-width: 800px;
            text-align: center;
            position: relative;
        }

        .close-search {
            position: absolute;
            top: -40px;
            right: 0;
            color: white;
            font-size: 30px;
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .close-search:hover {
            transform: rotate(90deg);
        }

        .search-container h2 {
            color: white;
            margin-bottom: 20px;
            font-size: 28px;
        }

        .search-input-wrapper {
            position: relative;
            display: flex;
            border-bottom: 2px solid white;
        }

        .search-input {
            width: 100%;
            padding: 15px 50px 15px 0;
            background: transparent;
            border: none;
            color: white;
            font-size: 18px;
            outline: none;
            -webkit-appearance: none;
        }

        .search-input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        .search-submit {
            background: transparent;
            border: none;
            cursor: pointer;
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            padding: 5px;
        }

        .search-submit svg {
            width: 21px;
            height: 23px;
        }
        
        .search-submit svg path {
            fill: white;
        }

        @media (max-width: 768px) {
            .search-container {
                width: 90%;
            }
            
            .search-container h2 {
                font-size: 22px;
            }
            
            .search-input {
                font-size: 16px;
            }
        }
/* iOS Safari: 100dvh fallback */
@supports (height: 100dvh) {
    @media (max-width: 999px) {
        #master_head .desktop {
            height: 100dvh;
        }
    }
    .fullscreen-search-overlay {
        height: 100dvh;
    }
}
