/**
 * Header V2 Styles
 * Kumrat Tourism OS
 * Standard Light Theme
 */

/* ========================================
   REMOVE TOP GAP - HEADER FLUSH TO TOP
   ======================================== */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* WordPress admin bar adjustments */
html {
    margin-top: 0 !important;
    scroll-padding-top: 0;
}

body.admin-bar {
    margin-top: -32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        margin-top: -46px !important;
    }
}

/* Ensure header starts at absolute top */
#wpadminbar {
    position: absolute !important;
}

.site {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* WordPress admin bar fix */
body.admin-bar .kt-header-v2 {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .kt-header-v2 {
        top: 46px;
    }
}

:root {
    /* Light Mode Only */
    --kt-header-bg: #ffffff;
    --kt-header-border: #e5e5e5;
    --kt-header-text: #1a1a1a;
    --kt-header-text-secondary: #666666;
    --kt-header-icon-color: #444444;
    --kt-header-icon-hover: #0066FF;
    --kt-header-search-bg: #f5f5f5;
    --kt-header-search-border: #dddddd;
    --kt-header-search-text: #333333;
    --kt-header-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    
    /* Transitions */
    --kt-transition-fast: 0.2s ease;
    --kt-transition-normal: 0.3s ease;
}

/* ========================================
   DESKTOP HEADER - STICKY
   ======================================== */
.kt-header-v2 {
    background-color: var(--kt-header-bg);
    border-bottom: 1px solid var(--kt-header-border);
    box-shadow: var(--kt-header-shadow);
    transition: background-color var(--kt-transition-normal), 
                border-color var(--kt-transition-normal),
                box-shadow var(--kt-transition-normal);
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 1000;
    margin-top: 0 !important;
}

/* Sticky state styles */
.kt-header-v2.is-sticky,
.kt-header-v2[style*="position: fixed"],
.kt-header-v2.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.kt-header-v2__container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    height: 80px;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Brand Section */
.kt-header-v2__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.kt-header-v2__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform var(--kt-transition-fast);
}

.kt-header-v2__logo:hover {
    transform: scale(1.05);
}

.kt-header-v2__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kt-header-v2__logo--placeholder {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
}

.kt-header-v2__company {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kt-header-v2__name {
    font-size: 16px;
    font-weight: 600;
    color: var(--kt-header-text);
    margin: 0;
    line-height: 1.2;
    transition: color var(--kt-transition-normal);
}

.kt-header-v2__tagline {
    font-size: 12px;
    color: var(--kt-header-text-secondary);
    margin: 0;
    line-height: 1.3;
    transition: color var(--kt-transition-normal);
}

/* Menu Button (4-square grid) */
.kt-header-v2__menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color var(--kt-transition-fast);
    flex-shrink: 0;
}

.kt-header-v2__menu-btn:hover {
    background-color: var(--kt-header-search-bg);
}

.kt-header-v2__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--kt-header-icon-color);
    transition: color var(--kt-transition-fast);
}

.kt-header-v2__icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

.kt-header-v2__menu-btn:hover .kt-header-v2__icon {
    color: var(--kt-header-icon-hover);
}

/* Search Bar */
.kt-header-v2__search {
    flex: 1;
    max-width: 500px;
}

.kt-header-v2__search form {
    position: relative;
    width: 100%;
}

.kt-header-v2__search input {
    width: 100%;
    height: 44px;
    padding: 0 45px 0 20px;
    border: 1px solid var(--kt-header-search-border);
    border-radius: 25px;
    background-color: var(--kt-header-search-bg);
    color: var(--kt-header-search-text);
    font-size: 14px;
    transition: all var(--kt-transition-fast);
    outline: none;
}

.kt-header-v2__search input::placeholder {
    color: var(--kt-header-text-secondary);
    opacity: 0.7;
}

.kt-header-v2__search input:focus {
    border-color: var(--kt-header-icon-hover);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.kt-header-v2__search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kt-header-icon-color);
    border-radius: 50%;
    transition: all var(--kt-transition-fast);
}

.kt-header-v2__search button:hover {
    background-color: var(--kt-header-search-bg);
    color: var(--kt-header-icon-hover);
}

.kt-header-v2__search button svg {
    width: 18px;
    height: 18px;
}

/* Action Buttons */
.kt-header-v2__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.kt-header-v2__action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    text-decoration: none;
    position: relative;
    transition: background-color var(--kt-transition-fast);
}

.kt-header-v2__action:hover {
    background-color: var(--kt-header-search-bg);
}

.kt-header-v2__action .kt-header-v2__icon {
    width: 24px;
    height: 24px;
}

.kt-header-v2__action:hover .kt-header-v2__icon {
    color: var(--kt-header-icon-hover);
}

/* Cart Badge */
.kt-header-v2__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ff006e 0%, #ff4d6d 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--kt-header-bg);
    transition: border-color var(--kt-transition-normal);
}

/* User Avatar */
.kt-header-v2__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   MOBILE HEADER - STICKY
   ======================================== */
.kt-header-mobile {
    background-color: var(--kt-header-bg);
    border-bottom: 1px solid var(--kt-header-border);
    box-shadow: var(--kt-header-shadow);
    transition: all var(--kt-transition-normal);
    display: none;
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 1000;
}

/* Top Row */
.kt-header-mobile__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    height: 60px;
}

.kt-header-mobile__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kt-header-mobile__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.kt-header-mobile__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kt-header-mobile__logo--placeholder {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.kt-header-mobile__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--kt-header-text);
}

.kt-header-mobile__actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kt-header-mobile__action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    position: relative;
    color: var(--kt-header-icon-color);
    transition: all var(--kt-transition-fast);
}

.kt-header-mobile__action:hover {
    background-color: var(--kt-header-search-bg);
    color: var(--kt-header-icon-hover);
}

.kt-header-mobile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.kt-header-mobile__icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

.kt-header-mobile__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ff006e 0%, #ff4d6d 100%);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--kt-header-bg);
}

.kt-header-mobile__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Bottom Row */
.kt-header-mobile__bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    height: 56px;
    border-top: 1px solid var(--kt-header-border);
}

.kt-header-mobile__search {
    flex: 1;
}

.kt-header-mobile__search form {
    position: relative;
    width: 100%;
}

.kt-header-mobile__search input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 15px;
    border: 1px solid var(--kt-header-search-border);
    border-radius: 20px;
    background-color: var(--kt-header-search-bg);
    color: var(--kt-header-search-text);
    font-size: 14px;
    outline: none;
    transition: all var(--kt-transition-fast);
}

.kt-header-mobile__search input:focus {
    border-color: var(--kt-header-icon-hover);
}

.kt-header-mobile__search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kt-header-icon-color);
    border-radius: 50%;
}

.kt-header-mobile__search button svg {
    width: 16px;
    height: 16px;
}

.kt-header-mobile__menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    color: var(--kt-header-icon-color);
    flex-shrink: 0;
    transition: all var(--kt-transition-fast);
}

.kt-header-mobile__menu-btn:hover {
    background-color: var(--kt-header-search-bg);
    color: var(--kt-header-icon-hover);
}

.kt-header-mobile__menu-btn .kt-header-mobile__icon {
    width: 24px;
    height: 24px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .kt-header-v2__container {
        padding: 0 15px;
        gap: 15px;
    }
    
    .kt-header-v2__company {
        display: none;
    }
    
    .kt-header-v2__search {
        max-width: 350px;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .kt-header-v2 {
        display: none;
    }
    
    .kt-header-mobile {
        display: block;
    }
}

/* Hide mobile on desktop */
@media (min-width: 769px) {
    .kt-header-mobile {
        display: none !important;
    }
}
