/* ============================================
   HEADER FABRIKA BIRE - Frontend Styles
   ============================================ */

/* Reset for header elements */
.hfb-cta-bar *,
.hfb-header *,
.hfb-mobile-menu * {
    box-sizing: border-box;
}

/* ============================================
   CTA BAR
   ============================================ */
.hfb-cta-bar {
    background: var(--hfb-cta-bg);
    height: var(--hfb-cta-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    position: relative;
    z-index: 9999;
}

.hfb-cta-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 36px;
    border: 2.5px solid var(--hfb-cta-border);
    background: transparent;
    color: var(--hfb-cta-text);
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hfb-cta-bar a:hover {
    background: var(--hfb-cta-text);
    color: var(--hfb-cta-bg);
}

/* ============================================
   MAIN HEADER
   ============================================ */
.hfb-header {
    background: var(--hfb-header-bg);
    height: var(--hfb-header-height);
    position: relative;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hfb-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

/* ============================================
   LOGO
   ============================================ */
.hfb-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.hfb-logo img {
    height: var(--hfb-logo-height);
    width: auto;
    display: block;
}

.hfb-logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 24px;
    color: var(--hfb-header-text);
    letter-spacing: 1px;
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */
.hfb-desktop-nav {
    display: none;
}

.hfb-desktop-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hfb-desktop-item {
    position: relative;
    list-style: none;
}

.hfb-desktop-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--hfb-header-text);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 16px;
    position: relative;
    transition: color 0.3s ease;
}

.hfb-desktop-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--hfb-header-hover);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.hfb-desktop-link:hover {
    color: var(--hfb-header-hover);
}

.hfb-desktop-link:hover::after {
    transform: scaleX(1);
}

.hfb-desktop-chevron {
    width: 10px;
    height: 10px;
    transition: transform 0.3s ease;
}

.hfb-has-children:hover .hfb-desktop-chevron {
    transform: rotate(180deg);
}

/* Desktop submenu dropdown */
.hfb-desktop-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--hfb-header-bg);
    border-top: 2px solid var(--hfb-header-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.hfb-has-children:hover .hfb-desktop-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hfb-desktop-subitem {
    list-style: none;
}

.hfb-desktop-sublink {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.hfb-desktop-sublink:hover {
    color: var(--hfb-header-hover);
    background: rgba(255, 255, 255, 0.05);
    padding-left: 25px;
    border-left-color: var(--hfb-header-hover);
}

/* ============================================
   HAMBURGER BUTTON
   ============================================ */
.hfb-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
    position: relative;
}

.hfb-hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--hfb-header-text);
    margin: 3px 0;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border-radius: 2px;
}

.hfb-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hfb-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hfb-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
}

/* ============================================
   MOBILE FULLSCREEN MENU
   ============================================ */
.hfb-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background:
        var(--hfb-mobile-overlay),
        var(--hfb-mobile-bg-image) center / cover no-repeat;
    background-color: var(--hfb-header-bg);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hfb-mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
}

/* Close button (X) */
.hfb-mobile-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--hfb-header-text);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.hfb-mobile-close:hover {
    border-color: var(--hfb-header-hover);
    color: var(--hfb-header-hover);
    transform: rotate(90deg);
}

/* Mobile Logo */
.hfb-mobile-logo {
    padding: 20px 25px 10px;
    flex-shrink: 0;
}

.hfb-mobile-logo img {
    height: var(--hfb-logo-height);
    width: auto;
}

.hfb-mobile-logo .hfb-logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 28px;
    color: var(--hfb-header-text);
}

/* Stars / Particles effect */
.hfb-mobile-menu.hfb-stars::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 50% 30%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 60%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 15%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 20% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 85%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 45%, rgba(255, 255, 255, 0.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 35%, rgba(255, 255, 255, 0.25) 0%, transparent 100%);
    pointer-events: none;
    animation: hfb-twinkle 4s ease-in-out infinite alternate;
}

@keyframes hfb-twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Mobile Menu Items */
.hfb-mobile-menu-items {
    flex: 1;
    padding: 10px 0 40px;
    position: relative;
    z-index: 2;
}

.hfb-mobile-menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.hfb-mobile-menu.active .hfb-mobile-menu-item {
    opacity: 1;
    transform: translateY(0);
}

.hfb-mobile-menu.active .hfb-mobile-menu-item:nth-child(1) { transition-delay: 0.1s; }
.hfb-mobile-menu.active .hfb-mobile-menu-item:nth-child(2) { transition-delay: 0.15s; }
.hfb-mobile-menu.active .hfb-mobile-menu-item:nth-child(3) { transition-delay: 0.2s; }
.hfb-mobile-menu.active .hfb-mobile-menu-item:nth-child(4) { transition-delay: 0.25s; }
.hfb-mobile-menu.active .hfb-mobile-menu-item:nth-child(5) { transition-delay: 0.3s; }
.hfb-mobile-menu.active .hfb-mobile-menu-item:nth-child(6) { transition-delay: 0.35s; }
.hfb-mobile-menu.active .hfb-mobile-menu-item:nth-child(7) { transition-delay: 0.4s; }
.hfb-mobile-menu.active .hfb-mobile-menu-item:nth-child(8) { transition-delay: 0.45s; }

/* Mobile menu link / button */
.hfb-mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 24px 25px;
    color: var(--hfb-header-text);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.hfb-mobile-menu-link:hover,
.hfb-mobile-menu-link:focus {
    background: rgba(255, 255, 255, 0.05);
}

/* Chevron */
.hfb-chevron {
    color: var(--hfb-chevron);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.hfb-mobile-menu-link[aria-expanded="true"] .hfb-chevron {
    transform: rotate(180deg);
}

/* Submenu accordion */
.hfb-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(0, 0, 0, 0.15);
}

.hfb-submenu.open {
    max-height: 500px;
}

.hfb-submenu-link {
    display: block;
    padding: 14px 25px 14px 45px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.hfb-submenu-link:hover {
    color: var(--hfb-header-hover);
    padding-left: 55px;
}

/* Overlay */
.hfb-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.hfb-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent scroll when menu is open */
body.hfb-menu-open {
    overflow: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hfb-header-inner {
        padding: 0 15px;
    }

    .hfb-logo img {
        height: calc(var(--hfb-logo-height) * 0.75);
    }
}

/* ============================================
   THEME COMPATIBILITY OVERRIDES
   ============================================ */
.hfb-cta-bar,
.hfb-header,
.hfb-mobile-menu {
    font-family: 'Montserrat', sans-serif;
}

.hfb-desktop-menu-list li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hfb-desktop-menu-list li::before {
    content: none;
    display: none;
}

.hfb-desktop-submenu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hfb-desktop-submenu li::before {
    content: none;
    display: none;
}

/* ============================================
   HEADER ICONS (Cart & My Account)
   ============================================ */
.hfb-header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    margin-right: 12px;
}

.hfb-icon {
    color: var(--hfb-header-text);
    transition: color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.hfb-icon:hover {
    color: var(--hfb-header-hover);
}

.hfb-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--hfb-header-hover);
    color: var(--hfb-header-bg);
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
}
