.tsh-header-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Top Flash Bar - Centered message without subscribe button */
.tsh-flash-bar {
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    min-height: 44px;
}

.tsh-flash-message {
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
}

.tsh-flash-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* Logo Section - Desktop size controlled by PHP */
.tsh-logo-section {
    display: flex;
    align-items: center;
}

.tsh-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.tsh-logo-img {
    object-fit: contain;
    transition: opacity 0.3s ease;
    /* Desktop size now controlled by PHP inline styles */
}

.tsh-logo-img:hover {
    opacity: 0.8;
}

.tsh-logo {
    font-size: 28px; /* Larger font */
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.tsh-logo i {
    margin-right: 8px;
    font-size: 24px; /* Larger icon */
}

/* Main Header Layout - DESKTOP LAYOUT PRESERVED */
.tsh-main-header {
    background: white;
    padding: 15px 20px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
    min-height: 80px; /* Increased height for larger logo */
}

.tsh-search-section {
    display: flex;
    justify-content: center;
    width: 100%;
}

.tsh-search-container {
    width: 100%;
    max-width: 800px;
    position: relative;
}

.tsh-search-form {
    display: flex;
    width: 100%;
    position: relative;
}

.tsh-search-field {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
    transition: border 0.3s;
    color: #000000 !important;
    height: 44px; /* Search bar height */
    box-sizing: border-box;
}

.tsh-search-field::placeholder {
    color: #666666 !important;
}

.tsh-search-field:focus {
    border-color: #3498db;
}

.tsh-search-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
    height: 44px; /* Match search field height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.tsh-search-button:hover {
    background: #2980b9;
}

/* AJAX Search Results */
.tsh-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.tsh-search-results.active {
    display: block;
}

.tsh-search-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
    cursor: pointer;
}

.tsh-search-item:hover {
    background: #f8f9fa;
}

.tsh-search-item:last-child {
    border-bottom: none;
}

.tsh-search-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

.tsh-search-item-info {
    flex: 1;
    min-width: 0;
}

.tsh-search-item-title {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tsh-search-item-price {
    color: #e74c3c;
    font-weight: 600;
    font-size: 13px;
}

.tsh-search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tsh-search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

.tsh-search-loading .fas {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header Actions - Increased spacing between icons and text */
.tsh-header-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.tsh-account-link, .tsh-cart-link {
    display: flex;
    align-items: center;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    gap: 12px;
}

.tsh-account-link:hover, .tsh-cart-link:hover {
    color: #3498db;
}

.tsh-account-content, .tsh-cart-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tsh-action-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    margin-top: 4px;
    white-space: nowrap;
}

.tsh-account-icon, .tsh-cart-icon {
    font-size: 22px;
    transition: color 0.3s;
}

.tsh-separator {
    height: 20px;
    width: 1px;
    background: #ddd;
}

.tsh-cart-count {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    position: absolute;
    top: -5px;
    right: -5px;
    order: 3;
}

.tsh-cart-content {
    position: relative;
}

/* Mobile Search Header - Hidden on desktop */
.tsh-mobile-search-header {
    display: none;
}

/* Mobile Toggle Button - Hidden on desktop */
.tsh-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #2c3e50;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: none;
}

.tsh-mobile-toggle:hover {
    background-color: transparent;
    color: #2c3e50;
}

/* Navigation Menu with Dropdowns */
.tsh-nav-header {
    background: #2c3e50;
    padding: 0 20px;
    position: relative;
}

.tsh-main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.tsh-menu-item {
    position: relative;
    margin: 0;
}

.tsh-menu-item > a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.tsh-menu-item > a:hover {
    color: #3498db;
    background: transparent;
}

.tsh-menu-item.tsh-has-children > a {
    padding-right: 30px;
}

.tsh-menu-item.tsh-has-children > a .fa-chevron-down {
    font-size: 12px;
    margin-left: 5px;
    transition: transform 0.3s;
}

.tsh-menu-item.tsh-has-children:hover > a .fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Menu - Remove bullet points */
.tsh-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tsh-menu-item:hover > .tsh-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tsh-dropdown-menu .tsh-menu-item {
    border-bottom: 1px solid #f0f0f0;
    list-style: none;
    margin: 0;
}

.tsh-dropdown-menu .tsh-menu-item:last-child {
    border-bottom: none;
}

.tsh-dropdown-menu .tsh-menu-item > a {
    color: #333;
    padding: 12px 20px;
    white-space: nowrap;
    text-decoration: none;
    display: block;
}

.tsh-dropdown-menu .tsh-menu-item > a:hover {
    background: #f8f9fa;
    color: #3498db;
}

/* Nested Dropdowns (second level) */
.tsh-dropdown-menu .tsh-has-children > a {
    position: relative;
    padding-right: 30px;
}

.tsh-dropdown-menu .tsh-has-children > a::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.tsh-dropdown-menu .tsh-dropdown-menu {
    top: 0;
    left: 100%;
    transform: translateX(10px);
    list-style: none;
}

.tsh-dropdown-menu .tsh-menu-item:hover > .tsh-dropdown-menu {
    transform: translateX(0);
}

/* Mobile Contact Info */
.tsh-mobile-contact {
    display: none;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.tsh-contact-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    color: #fff;
    text-align: center;
}

.tsh-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #ddd;
}

.tsh-contact-item i {
    width: 20px;
    text-align: center;
}

.tsh-contact-item a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.tsh-contact-item a:hover {
    color: #3498db;
}

/* Responsive Styles for Tablet */
@media (max-width: 992px) {
    .tsh-main-header {
        gap: 20px;
    }
    
    .tsh-search-section {
        max-width: 500px;
    }
    
    .tsh-flash-bar {
        padding: 10px 15px;
    }
    
    .tsh-flash-message {
        margin: 0 12px;
        font-size: 13px;
    }
    
    .tsh-action-text {
        font-size: 11px;
    }
    
    .tsh-account-icon, .tsh-cart-icon {
        font-size: 20px;
    }
    
    .tsh-header-actions {
        gap: 25px;
    }
    
    .tsh-account-link, .tsh-cart-link {
        gap: 10px;
    }
    
    .tsh-account-content, .tsh-cart-content {
        gap: 10px;
    }
}

/* NEW MOBILE LAYOUT ONLY - Desktop layout remains unchanged */
@media (max-width: 768px) {
    .tsh-flash-bar {
        padding: 10px 12px !important;
        justify-content: center;
        position: relative;
        min-height: 40px;
    }

    .tsh-flash-message {
        text-align: center;
        justify-content: center;
        width: 100%;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* MOBILE LAYOUT: Hamburger (left) - Logo (center) - Icons (right) */
    .tsh-main-header {
        display: flex;
        padding: 12px 15px;
        gap: 15px;
        align-items: center;
        min-height: 70px;
        grid-template-columns: none;
        justify-content: space-between;
    }

    /* Hide desktop search section in main header on mobile */
    .tsh-main-header .tsh-search-section {
        display: none !important;
    }

    /* Show mobile search header with search bar below */
    .tsh-mobile-search-header {
        display: block;
        background: white;
        padding: 12px 15px;
        border-top: 1px solid #eee;
    }

    /* Add padding to search bar on mobile view only */
    .tsh-mobile-search-header .tsh-search-container {
        padding: 0 10px !important;
    }

    /* Mobile toggle (hamburger) on left */
    .tsh-mobile-toggle {
        display: flex;
        order: 1;
        background: none;
        border: none;
        color: #2c3e50;
        font-size: 22px;
        cursor: pointer;
        padding: 10px;
        border-radius: 4px;
        flex: 0 0 auto;
    }

    /* Logo section in center */
    .tsh-logo-section {
        order: 2;
        flex: 1;
        display: flex;
        justify-content: center;
        margin: 0 10px;
    }

    /* Logo size now controlled by PHP for mobile - larger default */
    .tsh-logo {
        font-size: 22px;
    }

    /* Header actions on right - icons only, no text */
    .tsh-header-actions {
        order: 3;
        margin-left: 0;
        gap: 15px;
        flex: 0 0 auto;
    }

    /* Remove text on mobile */
    .tsh-action-text {
        display: none;
    }

    .tsh-separator {
        display: none;
    }
    
    .tsh-account-content, .tsh-cart-content {
        flex-direction: row;
        gap: 0;
    }
    
    .tsh-account-icon, .tsh-cart-icon {
        font-size: 22px;
    }

    .tsh-account-link, .tsh-cart-link {
        gap: 0;
        flex-direction: column;
        align-items: center;
        padding: 8px;
    }

    .tsh-nav-header {
        padding: 0;
    }

    .tsh-main-menu {
        flex-direction: column;
        display: none;
        list-style: none;
    }

    .tsh-main-menu.active {
        display: flex;
    }

    .tsh-menu-item > a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .tsh-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        /* Background will use the same as desktop from settings */
        width: 100%;
        padding: 0;
        list-style: none;
        display: none;
    }

    .tsh-dropdown-menu.active {
        display: block;
    }

    .tsh-dropdown-menu .tsh-menu-item > a {
        padding-left: 40px;
        color: #ddd;
    }

    .tsh-menu-item.tsh-has-children > a .fa-chevron-down {
        float: right;
        transition: transform 0.3s;
    }

    .tsh-menu-item.tsh-has-children.active > a .fa-chevron-down {
        transform: rotate(180deg);
    }

    .tsh-mobile-contact {
        display: block;
    }
}

@media (max-width: 640px) {
    .tsh-flash-message {
        font-size: 12px;
    }
    
    .tsh-flash-icon {
        font-size: 14px;
    }
    
    .tsh-header-actions {
        gap: 12px;
    }
    
    .tsh-account-icon, .tsh-cart-icon {
        font-size: 20px;
    }

    .tsh-mobile-toggle {
        font-size: 20px;
    }
    
    .tsh-logo {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .tsh-header-actions {
        gap: 10px;
    }

    .tsh-flash-message {
        font-size: 11px;
    }

    .tsh-mobile-toggle {
        padding: 6px;
        font-size: 18px;
    }

    .tsh-flash-bar {
        padding: 10px 10px !important;
    }

    .tsh-logo {
        font-size: 18px;
    }
    
    .tsh-account-icon, .tsh-cart-icon {
        font-size: 18px;
    }

    .tsh-main-header {
        gap: 8px;
        padding: 10px 12px;
        min-height: 65px;
    }
    
    .tsh-mobile-search-header {
        padding: 10px 12px;
    }
}

@media (max-width: 360px) {
    .tsh-main-header {
        padding: 8px 10px;
        gap: 6px;
        min-height: 60px;
    }

    .tsh-mobile-search-header {
        padding: 8px 10px;
    }

    .tsh-logo {
        font-size: 16px;
    }

    .tsh-mobile-toggle {
        padding: 5px;
        font-size: 16px;
    }

    .tsh-flash-bar {
        padding: 10px 8px !important;
    }

    .tsh-flash-message {
        font-size: 10px;
        gap: 4px;
    }
    
    .tsh-flash-icon {
        font-size: 12px;
    }
    
    .tsh-header-actions {
        gap: 8px;
    }
    
    .tsh-account-icon, .tsh-cart-icon {
        font-size: 16px;
    }
}