/**
 * Header Base — Layout, Logo, Nav, Actions, Profile
 * Split from header.css for maintainability
 *
 * @package MyChooz_Aesthetic
 */

/* Skip to content link (accessibility) */
.mca-skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mca-text);
    color: var(--mca-surface);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    z-index: 10001;
    transition: top 0.2s ease;
}

.mca-skip-link:focus {
    top: 8px;
    outline: 2px solid var(--mca-primary);
    outline-offset: 2px;
}

/* Focus-visible for keyboard navigation */
.mca-nav__link:focus-visible,
.mca-search-btn:focus-visible,
.mca-login-btn:focus-visible,
.mca-lang__current:focus-visible,
.mca-menu-toggle:focus-visible {
    outline: 2px solid var(--mca-primary);
    outline-offset: 2px;
}

/* Hide WordPress block header */
header.wp-block-group.site-header,
.wp-block-template-part header.site-header {
    display: none !important; /* override: WordPress core */
}

/* ========================================
   MCA Header - Apple Style Menu
   ======================================== */

.mca-header {
    position: relative;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.mca-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.mca-header__logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.mca-header__logo-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.mca-header__logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -1px;
}

.mca-header__logo-my {
    color: var(--mca-primary);
}

.mca-header__logo-chooz {
    color: var(--mca-text);
}

/* Nav */
.mca-header__nav {
    display: flex;
    gap: 28px;
    align-items: center;
}

.mca-nav__link {
    font-size: 12px;
    font-weight: 400;
    color: rgba(0,0,0,0.8);
    text-decoration: none;
    transition: color 0.15s ease;
}

.mca-nav__link:hover {
    color: var(--mca-text);
}

.mca-nav__link--featured {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* HOT product — NEW badge */
.mca-nav__link--hot::after {
    content: 'NEW';
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--mca-primary);
    border-radius: 3px;
    padding: 1px 4px;
    margin-left: 5px;
    vertical-align: 2px;
}


/* Dropdown trigger */
.mca-nav__dropdown {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 0;
}

/* Actions - unified 44px touch targets */
.mca-header__actions {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 48px;
}

/* Search button - 44px touch target */
.mca-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--mca-text);
    transition: opacity 0.15s ease;
}

.mca-search-btn:hover {
    opacity: 0.6;
}

.mca-search-btn svg {
    width: 20px;
    height: 20px;
}

/* Login button - 44px touch target, icon only */
.mca-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    color: var(--mca-text);
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.mca-login-btn:hover {
    background: none;
    color: var(--mca-text);
    opacity: 0.6;
}

.mca-login-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mca-login-btn span {
    display: none;
}

/* Profile */
.mca-profile {
    position: relative;
    display: flex;
    align-items: center;
}

.mca-profile__trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.mca-profile__avatar {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mca-text);
}

.mca-profile__avatar svg {
    width: 14px;
    height: 14px;
}

.mca-profile__img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
}

.mca-profile__dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    background: var(--mca-primary);
    border-radius: 50%;
    border: 2px solid white;
    z-index: 10;
}

.mca-profile__arrow {
    display: none;
}

.mca-profile__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 200px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s ease;
}

.mca-profile__dropdown::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

.mca-profile:hover .mca-profile__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mca-profile__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 0 6px;
    color: var(--mca-text);
    text-decoration: none;
    font-size: 13px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.mca-profile__item:hover {
    background: rgba(0,0,0,0.04);
}

.mca-profile__item--muted {
    color: rgba(0,0,0,0.5);
}

.mca-profile__icon {
    font-size: 14px;
}

.mca-profile__badge {
    margin-left: auto;
    background: rgba(0,0,0,0.06);
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.mca-profile__badge--red {
    background: var(--mca-primary);
    color: white;
}

.mca-profile__divider {
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 6px 16px;
}
