:root {
    --h03-background: #ffffff;
    --h03-foreground: #09090b;
    --h03-primary: #18181b;
    --h03-primary-foreground: #fafafa;
    --h03-secondary: #f4f4f5;
    --h03-secondary-foreground: #18181b;
    --h03-muted-foreground: #71717a;
    --h03-border: #e4e4e7;
    --h03-popover: #ffffff;
    --h03-popover-foreground: #09090b;
    --h03-ring: #18181b;
    --h03-header-height: 5rem;
}

.dark {
    --h03-background: #09090b;
    --h03-foreground: #fafafa;
    --h03-primary: #fafafa;
    --h03-primary-foreground: #18181b;
    --h03-secondary: #27272a;
    --h03-secondary-foreground: #fafafa;
    --h03-muted-foreground: #a1a1aa;
    --h03-border: #27272a;
    --h03-popover: #09090b;
    --h03-popover-foreground: #fafafa;
}

@keyframes h03-accordion-down {
    from { height: 0; }
    to { height: var(--h03-accordion-height, auto); }
}

@keyframes h03-accordion-up {
    from { height: var(--h03-accordion-height, auto); }
    to { height: 0; }
}

@keyframes h03-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes h03-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes h03-zoom-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes h03-zoom-out {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

.header-03 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background-color: color-mix(in srgb, var(--h03-background) 50%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-03__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--h03-header-height);
}

.header-03__logo-box {
    display: flex;
    align-items: center;
    height: 3.5rem;
}

.header-03__logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-03__logo-link img {
    height: 3.5rem;
    width: auto;
    object-fit: contain;
}

.header-03__desktop-nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 1024px) {
    .header-03__desktop-nav {
        display: flex;
    }
}

.header-03__nav-item {
    position: relative;
}

.header-03__nav-trigger,
a.header-03__nav-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 3.5rem;
    padding: 0 1.5rem;
    border: none;
    border-radius: 0.375rem;
    background-color: var(--h03-foreground);
    color: var(--h03-background);
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-family: inherit;
}

.header-03__nav-trigger:hover,
a.header-03__nav-trigger:hover {
    opacity: 0.92;
}

.header-03__nav-trigger svg {
    width: 0.75rem;
    height: 0.75rem;
    transition: transform 0.3s ease;
}

.header-03__nav-item.is-open .header-03__nav-trigger svg {
    transform: rotate(180deg);
}

.header-03__nav-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 0.375rem);
    min-width: 550px;
    padding: 1rem;
    border: 1px solid var(--h03-border);
    border-radius: 0.375rem;
    background-color: var(--h03-popover);
    color: var(--h03-popover-foreground);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transform-origin: top center;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 60;
}

.header-03__nav-item.is-open .header-03__nav-panel {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.header-03__nav-grid {
    display: grid;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-03__nav-grid--cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.header-03__nav-link {
    display: block;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header-03__nav-link:hover,
.header-03__nav-link:focus {
    background-color: var(--h03-primary);
    color: var(--h03-primary-foreground);
    outline: none;
}

.header-03__search {
    display: none;
    flex: 1;
    max-width: 20rem;
    margin: 0 0.75rem;
}

@media (min-width: 1024px) {
    .header-03__search {
        display: block;
    }
}

.header-03__search-form {
    position: relative;
    width: 100%;
}

.header-03__search-input {
    width: 100%;
    height: 3rem;
    padding: 0 3rem 0 1rem;
    border: 1px solid var(--h03-border);
    border-radius: 0.375rem;
    background: var(--h03-secondary);
    color: var(--h03-foreground);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-03__search-input::placeholder {
    color: var(--h03-muted-foreground);
}

.header-03__search-input:focus {
    outline: none;
    border-color: var(--h03-foreground);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--h03-foreground) 15%, transparent);
}

/* Command palette */
.header-03__cmd-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--h03-muted-foreground);
    margin-bottom: 0.25rem;
}

.header-03__cmd-input-wrap {
    position: relative;
}

.header-03__cmd-input {
    width: 100%;
    height: 2.25rem;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    border: 1px solid var(--h03-border);
    border-radius: 0.5rem;
    background: var(--h03-secondary);
    color: var(--h03-foreground);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.header-03__cmd-input:focus {
    border-color: var(--h03-foreground);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--h03-foreground) 15%, transparent);
}

.header-03__cmd-input::placeholder {
    color: var(--h03-muted-foreground);
}

.header-03__cmd-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--h03-muted-foreground);
    pointer-events: none;
}

.header-03__cmd-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.25rem);
    border: 1px solid var(--h03-border);
    border-radius: 0.375rem;
    background: var(--h03-popover);
    color: var(--h03-popover-foreground);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    overflow: hidden;
    z-index: 70;
}

.header-03__cmd-dropdown.is-open {
    display: block;
    animation: h03-fade-in 0.15s ease;
}

.header-03__cmd-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0.25rem;
}

.header-03__cmd-dropdown li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.15s ease;
}

.header-03__cmd-dropdown li:hover {
    background: var(--h03-secondary);
}

.header-03__cmd-dropdown li .cmd-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-03__cmd-dropdown li .cmd-left .cmd-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-03__cmd-dropdown li .cmd-left .cmd-label {
    font-weight: 500;
    color: var(--h03-foreground);
    font-size: 0.875rem;
}

.header-03__cmd-dropdown li .cmd-left .cmd-desc {
    font-size: 0.75rem;
    color: var(--h03-muted-foreground);
}

.header-03__cmd-dropdown li .cmd-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-03__cmd-dropdown li .cmd-right .cmd-short {
    font-size: 0.75rem;
    color: var(--h03-muted-foreground);
}

.header-03__cmd-dropdown li .cmd-right .cmd-end {
    font-size: 0.75rem;
    color: var(--h03-muted-foreground);
    text-align: right;
}

.header-03__cmd-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--h03-border);
    font-size: 0.75rem;
    color: var(--h03-muted-foreground);
}

/* Override for mobile search wrapper */
.header-03__mobile-search .header-03__cmd-dropdown {
    position: relative;
    top: 0;
    margin-top: 0.25rem;
}

.header-03__search-btn {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.25rem;
    background: var(--h03-foreground);
    color: var(--h03-background);
    cursor: pointer;
}

.header-03__search-btn svg {
    width: 1rem;
    height: 1rem;
}

.header-03__mobile-search {
    display: block;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--h03-border);
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .header-03__mobile-search {
        display: none;
    }
}

.header-03__mobile-search-form {
    position: relative;
}

.header-03__mobile-search-input {
    width: 100%;
    height: 2.75rem;
    padding: 0 2.75rem 0 0.875rem;
    border: 1px solid var(--h03-border);
    border-radius: 0.375rem;
    background: var(--h03-secondary);
    color: var(--h03-foreground);
    font-size: 0.875rem;
    font-family: inherit;
}

.header-03__mobile-search-input:focus {
    outline: none;
    border-color: var(--h03-foreground);
}

.header-03__mobile-search-btn {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.25rem;
    background: var(--h03-foreground);
    color: var(--h03-background);
    cursor: pointer;
}

.header-03__actions {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 1024px) {
    .header-03__actions {
        display: flex;
    }
}

.header-03__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--h03-secondary);
    color: var(--h03-secondary-foreground);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.header-03__icon-btn:hover {
    background-color: color-mix(in srgb, var(--h03-secondary) 80%, var(--h03-muted-foreground));
}

.header-03__icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.header-03__cart-badge {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    border-radius: 9999px;
    background: var(--h03-primary);
    color: var(--h03-primary-foreground);
    font-size: 0.625rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

.header-03__theme-toggle {
    position: relative;
}

.header-03__theme-toggle svg {
    position: absolute;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-03__theme-toggle .header-03__icon-sun {
    opacity: 1;
    transform: scale(1);
}

.header-03__theme-toggle .header-03__icon-moon {
    opacity: 0;
    transform: scale(0);
}

.dark .header-03__theme-toggle .header-03__icon-sun {
    opacity: 0;
    transform: scale(0);
}

.dark .header-03__theme-toggle .header-03__icon-moon {
    opacity: 1;
    transform: scale(1);
}

.header-03__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3.5rem;
    padding: 0 1.5rem;
    border: none;
    border-radius: 0.375rem;
    background-color: var(--h03-primary);
    color: var(--h03-primary-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    font-family: inherit;
}

.header-03__cta:hover {
    opacity: 0.9;
}

.header-03__cta svg {
    width: 1rem;
    height: 1rem;
}

.header-03__mobile-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--h03-foreground);
    cursor: pointer;
    font-family: inherit;
}

@media (min-width: 1024px) {
    .header-03__mobile-open {
        display: none;
    }
}

.header-03__mobile-open svg {
    width: 2rem;
    height: 2rem;
}

.header-03__account-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 14rem;
    padding: 0.5rem 0;
    border: 1px solid var(--h03-border);
    border-radius: 0.75rem;
    background: var(--h03-popover);
    color: var(--h03-popover-foreground);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    z-index: 70;
}

.header-03__account-dropdown.hidden {
    display: none;
}

.header-03__account-dropdown a,
.header-03__account-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.header-03__account-dropdown a:hover,
.header-03__account-dropdown button:hover {
    background: var(--h03-secondary);
}

.header-03__sheet {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.header-03__sheet.hidden {
    display: none;
}

.header-03__sheet-overlay {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.8);
    animation: h03-fade-in 0.2s ease;
}

.header-03__sheet-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 550px;
    padding: 1.5rem;
    overflow-y: auto;
    background: var(--h03-background);
    color: var(--h03-foreground);
    border-left: 1px solid var(--h03-border);
    animation: h03-slide-in 0.3s ease;
}

@keyframes h03-slide-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.header-03__sheet-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.25rem;
    background: transparent;
    color: var(--h03-foreground);
    opacity: 0.7;
    cursor: pointer;
}

.header-03__sheet-close:hover {
    opacity: 1;
}

.header-03__accordion {
    width: 100%;
}

.header-03__accordion-item {
    border-bottom: 1px solid var(--h03-border);
}

.header-03__accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.header-03__accordion-trigger svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.header-03__accordion-item.is-open .header-03__accordion-trigger svg {
    transform: rotate(180deg);
}

.header-03__accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

.header-03__accordion-item.is-open .header-03__accordion-content {
    max-height: 500px;
}

.header-03__accordion-links {
    list-style: none;
    margin: 0;
    padding: 0 0 1rem 1rem;
}

.header-03__accordion-links a {
    display: block;
    padding: 0.5rem 0;
    color: var(--h03-muted-foreground);
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-03__accordion-links a:hover {
    color: var(--h03-foreground);
}

.header-03__sheet-link {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--h03-border);
    color: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
}

.header-03__sheet-footer {
    padding: 1.5rem 0;
}

.header-03__sheet-footer .header-03__cta {
    width: 100%;
}

.site-body--header-03 {
    padding-top: var(--h03-header-height);
}

/* ==========================================================================
   Mobile Header Actions (Cart / Account / Menu trigger) — visible < 1024px
   ========================================================================== */

.header-03__mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

@media (min-width: 1024px) {
    .header-03__mobile-actions {
        display: none;
    }
}

.header-03__mobile-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border: none;
    border-radius: 0.375rem;
    background: var(--h03-secondary);
    color: var(--h03-secondary-foreground);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.header-03__mobile-icon-btn:hover {
    background-color: color-mix(in srgb, var(--h03-secondary) 80%, var(--h03-muted-foreground));
}

.header-03__mobile-icon-btn svg {
    width: 1.125rem;
    height: 1.125rem;
}

.header-03__mobile-icon-btn .header-03__cart-badge {
    top: 0.15rem;
    right: 0.15rem;
}

/* ==========================================================================
   Mobile Sheet — Profile Block (My Account / Admin Panel / Logout)
   ========================================================================== */

.header-03__mobile-profile {
    margin-bottom: 1rem;
    border: 1px solid var(--h03-border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.header-03__mobile-profile-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--h03-border);
}

.header-03__mobile-profile-links {
    display: flex;
    flex-direction: column;
}

.header-03__mobile-profile-links a,
.header-03__mobile-profile-links button {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid var(--h03-border);
    background: transparent;
    color: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease;
}

.header-03__mobile-profile-links a:last-child,
.header-03__mobile-profile-links button:last-child {
    border-bottom: none;
}

.header-03__mobile-profile-links a:hover,
.header-03__mobile-profile-links button:hover {
    background: var(--h03-secondary);
}

.header-03__mobile-profile-links button {
    color: #dc2626;
}

.header-03__mobile-login-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--h03-border);
    border-radius: 0.75rem;
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.header-03__mobile-login-link:hover {
    border-color: var(--h03-foreground);
}