/* Structural and Theme Styles for Fitz Header Widget */

.fitz-header-wrapper {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    box-sizing: border-box;
}

.fitz-header-wrapper * {
    box-sizing: border-box;
}

/* Top Announcement bar */
.fitz-top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    padding: 6px 20px;
    font-size: 11px;
    font-weight: 500;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}

.fitz-top-currency {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Main row structure */
.fitz-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    gap: 20px;
}

/* Elegant Burger Toggle Button (Desktop + Mobile) */
.fitz-header-burger-container {
    display: flex;
    align-items: center;
}

.fitz-burger-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #111111;
    font-size: 16px;
    transition: color 0.2s ease-in-out;
    padding: 6px 0;
}

.fitz-burger-icon {
    display: inline-block;
    width: 18px;
    height: 12px;
    position: relative;
}

.fitz-burger-icon::before,
.fitz-burger-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transition: background-color 0.2s ease-in-out;
}

.fitz-burger-icon::before {
    top: 0;
    box-shadow: 0 5px 0 currentColor;
}

.fitz-burger-icon::after {
    bottom: 0;
}

.fitz-logo {
    display: flex;
    align-items: center;
}

.fitz-logo img {
    height: auto;
    display: block;
}

/* Search Box & Right utilities */
.fitz-search-utilities {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    justify-content: flex-end;
}

.fitz-search-form {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 50px;
    padding: 2px 4px 2px 14px;
    width: 100%;
    max-width: 350px;
    background-color: #fafafa;
}

.fitz-search-input {
    border: none !important;
    background: transparent !important;
    flex-grow: 1;
    font-size: 12px;
    height: 32px;
    outline: none !important;
    padding: 0 !important;
    color: #444;
}

.fitz-search-submit {
    border: none;
    background: #00c3e3;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, color 0.2s;
}

.fitz-search-submit svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.fitz-search-submit:hover {
    transform: scale(1.05);
}

.fitz-utilities {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fitz-utility-icon {
    display: inline-flex;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
    position: relative;
    align-items: center;
}

.fitz-mobile-search-btn {
    display: none;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

/* Cart dynamic badge count */
.fitz-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--fitz-gradient, linear-gradient(135deg, #00c3e3 0%, #f02fc2 100%));
    color: #fff;
    font-size: 9px;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Category Strip (horizontal scrolling) */
.fitz-category-strip-outer {
    width: 100%;
    overflow: hidden;
    padding: 10px 20px;
    position: relative;
    border-top: 1px solid #f2f2f2;
    border-bottom: 1px solid #f2f2f2;
}

.fitz-category-strip {
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}

.fitz-category-strip::-webkit-scrollbar {
    display: none;
}

.fitz-category-track {
    display: flex;
    gap: 10px;
    align-items: center;
    white-space: nowrap;
}

/* Auto Scroll Marquee Styles (Flowing seamlessly Left to Right) */
.fitz-marquee-enabled .fitz-category-strip {
    overflow: hidden !important;
}

.fitz-marquee-enabled .fitz-category-track {
    display: flex;
    width: max-content;
    animation: fitzMarquee var(--fitz-scroll-duration, 18s) linear infinite;
}

/* Pauses on Hover & enables hover color transition */
.fitz-marquee-enabled .fitz-category-strip-outer:hover .fitz-category-track {
    animation-play-state: paused;
}

@keyframes fitzMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.3333%);
    }
}

.fitz-cat-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #dcdcdc;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    color: #111111;
}

/* Highlight / Hover logic - pure black & white defaults, transitions to cyan/pink glow */
.fitz-cat-item:hover, .fitz-cat-item:active, .fitz-cat-item.fitz-highlight {
    background: var(--fitz-gradient, linear-gradient(135deg, #00c3e3 0%, #f02fc2 100%)) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 0 10px rgba(240, 47, 194, 0.6);
}

.fitz-cat-icon {
    font-size: 11px;
    display: flex;
    align-items: center;
}

.fitz-cat-icon svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
}

/* -------------------------------------------------------------------------- */
/* Elegant Sidebar Navigation Drawer (Completely customizable matching reference) */
/* -------------------------------------------------------------------------- */
.fitz-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 99999;
}

body.admin-bar .fitz-drawer-backdrop {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
}

@media screen and (max-width: 782px) {
    body.admin-bar .fitz-drawer-backdrop {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

.fitz-drawer-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

.fitz-drawer-inner {
    position: absolute;
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background-color: #f5f6f9;
    border: 1px solid #eef1f6;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transform: translateX(-50px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    padding: 30px 24px;
}

.fitz-drawer-backdrop.is-active .fitz-drawer-inner {
    transform: translateX(0);
    opacity: 1;
}

/* Drawer Header with Title and Close icon */
.fitz-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.fitz-drawer-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
}

.fitz-drawer-title {
    color: #111111;
}

.fitz-drawer-icon {
    font-size: 1.1em;
}

.fitz-drawer-close {
    background-color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #111111;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.fitz-drawer-close:hover {
    background-color: #eef1f6;
    transform: rotate(90deg);
}

/* Vertical Menu Items styling */
.fitz-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
}

.fitz-drawer-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fitz-drawer-item a {
    text-decoration: none;
    color: #111111;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 14px;
    display: block;
    transition: all 0.2s ease-in-out;
}

.fitz-drawer-item a:hover {
    color: #00c3e3;
    padding-left: 18px;
}

/* -------------------------------------------------------------------------- */
/* Mobile Responsive Layout Options (25 Styles)                               */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .fitz-main-header {
        flex-wrap: nowrap;
        padding: 10px 15px;
        align-items: center;
        gap: 10px;
    }
    
    .fitz-drawer-inner {
        top: 10px;
        left: 10px;
        bottom: 10px;
        max-width: calc(100vw - 20px);
        border-radius: 16px;
        padding: 20px 16px;
    }

    /* 25 different responsive style presets for mobile viewports */
    
    /* Preset 1: Default clean top row, mobile search toggle */
    .fitz-m-style-1 .fitz-search-form { display: none !important; }
    .fitz-m-style-1 .fitz-mobile-search-btn { display: inline-block !important; }

    /* Preset 2: Double row - Search bar permanently visible at bottom */
    .fitz-m-style-2 .fitz-main-header { flex-wrap: wrap; }
    .fitz-m-style-2 .fitz-search-form { display: flex !important; width: 100% !important; max-width: 100% !important; order: 10; margin-top: 8px; }
    .fitz-m-style-2 .fitz-mobile-search-btn { display: none !important; }

    /* Preset 3: Centered Logo style, icons on right, burger on left */
    .fitz-m-style-3 .fitz-main-header { display: grid; grid-template-columns: 1fr auto 1fr; }
    .fitz-m-style-3 .fitz-header-burger-container { justify-content: flex-start; }
    .fitz-m-style-3 .fitz-logo { justify-content: center; }
    .fitz-m-style-3 .fitz-search-utilities { justify-content: flex-end; }
    .fitz-m-style-3 .fitz-search-form { display: none !important; }
    .fitz-m-style-3 .fitz-mobile-search-btn { display: inline-block !important; }

    /* Preset 4: Compact minimal - hides wishlist and announcement on mobile */
    .fitz-m-style-4 .fitz-top-bar { display: none !important; }
    .fitz-m-style-4 .fitz-wishlist { display: none !important; }
    .fitz-m-style-4 .fitz-search-form { display: none !important; }
    .fitz-m-style-4 .fitz-mobile-search-btn { display: inline-block !important; }

    /* Preset 5: Left-aligned Logo with right aligned Burger and Cart icon */
    .fitz-m-style-5 .fitz-main-header { display: flex; flex-direction: row; justify-content: space-between; }
    .fitz-m-style-5 .fitz-header-burger-container { order: 3; }
    .fitz-m-style-5 .fitz-logo { order: 1; }
    .fitz-m-style-5 .fitz-search-utilities { order: 2; }
    .fitz-m-style-5 .fitz-search-form { display: none !important; }

    /* Preset 6: Pill Shaped Header row with shadow */
    .fitz-m-style-6 .fitz-main-header { margin: 8px 12px; border-radius: 40px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); border: 1px solid #f0f0f0; }
    .fitz-m-style-6 .fitz-search-form { display: none !important; }

    /* Preset 7: Dark Aesthetic header bar */
    .fitz-m-style-7 .fitz-main-header { background-color: #111111 !important; }
    .fitz-m-style-7 .fitz-burger-toggle { color: #ffffff !important; }
    .fitz-m-style-7 .fitz-utility-icon { color: #ffffff !important; }
    .fitz-m-style-7 .fitz-search-form { display: none !important; }

    /* Preset 8: Bottom-bordered thin header border */
    .fitz-m-style-8 .fitz-main-header { border-bottom: 2px solid #00c3e3; }
    .fitz-m-style-8 .fitz-search-form { display: none !important; }

    /* Preset 9: Soft gradient layout background */
    .fitz-m-style-9 .fitz-main-header { background: linear-gradient(135deg, rgba(0, 195, 227, 0.05) 0%, rgba(240, 47, 194, 0.05) 100%) !important; }
    .fitz-m-style-9 .fitz-search-form { display: none !important; }

    /* Preset 10: Stacked central columns style */
    .fitz-m-style-10 .fitz-main-header { flex-direction: column; gap: 8px; padding: 12px; }
    .fitz-m-style-10 .fitz-logo { margin: 0 auto; }
    .fitz-m-style-10 .fitz-search-form { display: none !important; }

    /* Preset 11: Extra large icons for accessible touch targets */
    .fitz-m-style-11 .fitz-utility-icon { font-size: 26px !important; }
    .fitz-m-style-11 .fitz-burger-toggle { font-size: 22px !important; }
    .fitz-m-style-11 .fitz-search-form { display: none !important; }

    /* Preset 12: Accent Color background header */
    .fitz-m-style-12 .fitz-main-header { background-color: #00c3e3 !important; }
    .fitz-m-style-12 .fitz-burger-toggle { color: #ffffff !important; }
    .fitz-m-style-12 .fitz-utility-icon { color: #ffffff !important; }
    .fitz-m-style-12 .fitz-search-form { display: none !important; }

    /* Preset 13: Neon shadow styling */
    .fitz-m-style-13 .fitz-main-header { box-shadow: 0 0 15px rgba(0, 195, 227, 0.4); }
    .fitz-m-style-13 .fitz-search-form { display: none !important; }

    /* Preset 14: Retro bordered design */
    .fitz-m-style-14 .fitz-main-header { border: 3px solid #111111; margin: 5px; }
    .fitz-m-style-14 .fitz-search-form { display: none !important; }

    /* Preset 15: No labels, iconic representation only */
    .fitz-m-style-15 .fitz-burger-label-text { display: none !important; }
    .fitz-m-style-15 .fitz-search-form { display: none !important; }

    /* Preset 16: Centered utilities underneath Logo */
    .fitz-m-style-16 .fitz-main-header { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .fitz-m-style-16 .fitz-logo { width: 100%; justify-content: center; }
    .fitz-m-style-16 .fitz-search-form { display: none !important; }

    /* Preset 17: Sleek glassmorphism effect */
    .fitz-m-style-17 .fitz-main-header { backdrop-filter: blur(10px); background: rgba(255,255,255,0.75) !important; }
    .fitz-m-style-17 .fitz-search-form { display: none !important; }

    /* Preset 18: Pink themed elements */
    .fitz-m-style-18 .fitz-burger-toggle { color: #f02fc2 !important; }
    .fitz-m-style-18 .fitz-utility-icon { color: #f02fc2 !important; }
    .fitz-m-style-18 .fitz-search-form { display: none !important; }

    /* Preset 19: Double line with category strip integrated vertically */
    .fitz-m-style-19 .fitz-category-strip-outer { border: none; padding: 5px 15px; }
    .fitz-m-style-19 .fitz-search-form { display: none !important; }

    /* Preset 20: Simple monochrome flat styling */
    .fitz-m-style-20 .fitz-main-header { border-bottom: 1px solid #11; }
    .fitz-m-style-20 .fitz-search-form { display: none !important; }

    /* Preset 21: Full width minimal category row overlay */
    .fitz-m-style-21 .fitz-category-strip-outer { background: #fafafa; }
    .fitz-m-style-21 .fitz-search-form { display: none !important; }

    /* Preset 22: Thin header grid layout */
    .fitz-m-style-22 .fitz-main-header { padding: 4px 10px; }
    .fitz-m-style-22 .fitz-search-form { display: none !important; }

    /* Preset 23: Clean borderless minimal */
    .fitz-m-style-23 .fitz-main-header { border: none !important; background: transparent !important; }
    .fitz-m-style-23 .fitz-search-form { display: none !important; }

    /* Preset 24: High contrast highlighted burger menu button */
    .fitz-m-style-24 .fitz-burger-toggle { background: #111; color: #fff !important; padding: 6px 12px; border-radius: 4px; }
    .fitz-m-style-24 .fitz-search-form { display: none !important; }

    /* Preset 25: Gradient background full row styling */
    .fitz-m-style-25 .fitz-main-header { background: var(--fitz-gradient, linear-gradient(135deg, #00c3e3 0%, #f02fc2 100%)) !important; }
    .fitz-m-style-25 .fitz-burger-toggle { color: #fff !important; }
    .fitz-m-style-25 .fitz-utility-icon { color: #fff !important; }
    .fitz-m-style-25 .fitz-search-form { display: none !important; }
}
