/**
 * Header Styles - Matches fiorentini.com/en/
 */

.pf-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: transparent;
    transition: background 0.3s, box-shadow 0.3s;
}

.pf-header.scrolled {
    background: var(--pf-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pf-header.scrolled .pf-header__top {
    display: none;
}

.pf-header.scrolled .pf-header__menu a {
    color: var(--pf-secondary);
}

.pf-header.scrolled .pf-header__logo-text {
    color: var(--pf-secondary);
}


/* Container */
.pf-header__container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Large screens - scale up header */
@media (min-width: 1600px) {
    .pf-header__container {
        max-width: 1800px;
        padding: 0 60px;
    }

    .pf-header__main {
        height: 100px;
    }

    .pf-header__main-inner {
        height: 100px;
    }

    .pf-header__logo img,
    .pf-header__logo .custom-logo,
    .pf-header__logo-white,
    .pf-header__logo-dark {
        max-height: 70px;
        height: 70px;
    }

    .pf-header__menu {
        gap: 40px;
    }

    .pf-header__menu a {
        font-size: 15px;
    }

    .pf-header__top {
        height: 42px;
    }

    .pf-header__top-left {
        padding-left: 60px;
    }

    .pf-header__top-right {
        padding-right: 60px;
    }
}

/* Extra large screens */
@media (min-width: 1920px) {
    .pf-header__container {
        max-width: 1920px;
        padding: 0 80px;
    }

    .pf-header__main {
        height: 110px;
    }

    .pf-header__main-inner {
        height: 110px;
    }

    .pf-header__logo img,
    .pf-header__logo .custom-logo,
    .pf-header__logo-white,
    .pf-header__logo-dark {
        max-height: 80px;
        height: 80px;
    }

    .pf-header__menu {
        gap: 50px;
    }

    .pf-header__menu a {
        font-size: 16px;
    }

    .pf-header__top-left {
        padding-left: 80px;
    }

    .pf-header__top-right {
        padding-right: 80px;
    }
}

@media (max-width: 767px) {
    .pf-header__container {
        padding: 0 20px;
    }
}

/* Top Bar - Split Design */
.pf-header__top {
    height: 36px;
    display: flex;
}

.pf-header__top-left {
    flex: 1;
    background: var(--pf-white);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 40px;
}

.pf-header__top-right {
    flex: 1;
    background: var(--pf-primary);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 40px;
    gap: 20px;
}

.pf-header__lang {
    display: flex;
    gap: 12px;
}

.pf-header__lang-item {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.pf-header__lang-item.active,
.pf-header__lang-item:hover {
    color: var(--pf-primary);
}

/* Phone */
.pf-header__phone {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pf-white);
    text-decoration: none;
    transition: opacity 0.2s;
}

.pf-header__phone:hover {
    opacity: 0.8;
}

.pf-header__phone svg {
    flex-shrink: 0;
    stroke: var(--pf-white);
}

/* Social Icons */
.pf-header__social {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.pf-header__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pf-white);
    transition: opacity 0.2s, transform 0.2s;
}

.pf-header__social a:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Main Header */
.pf-header__main {
    height: 80px;
}

.pf-header__main-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding-top: 10px;
}

/* Logo */
.pf-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.pf-header__logo img,
.pf-header__logo .custom-logo {
    max-height: 55px;
    width: auto;
}

.pf-header__logo-text {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 800;
    color: var(--pf-white);
    text-decoration: none;
}

/* Logo Images */
.pf-header__logo-white,
.pf-header__logo-dark {
    height: 55px;
    width: auto;
    transition: opacity 0.3s ease;
}

.pf-header__logo-white {
    display: block;
}

.pf-header__logo-dark {
    display: none;
}

.pf-header.scrolled .pf-header__logo-white {
    display: none;
}

.pf-header.scrolled .pf-header__logo-dark {
    display: block;
}

/* Navigation */
.pf-header__nav {
    display: flex;
    align-items: center;
}

.pf-header__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 32px;
}

.pf-header__menu li {
    list-style: none;
}

.pf-header__menu a {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    color: var(--pf-white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.pf-header__menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--pf-primary);
    transition: width 0.3s;
}

.pf-header__menu a:hover::after {
    width: 100%;
}

.pf-header__menu a:hover {
    color: var(--pf-primary);
}

.pf-header.scrolled .pf-header__menu a:hover {
    color: var(--pf-primary);
}

/* Mobile Toggle */
.pf-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.pf-header__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--pf-white);
    transition: transform 0.3s, opacity 0.3s;
}

.pf-header__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.pf-header__toggle.active span:nth-child(2) {
    opacity: 0;
}

.pf-header__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.pf-header.scrolled .pf-header__toggle span {
    background: var(--pf-secondary);
}

/* Desktop - Force nav visible and toggle hidden */
@media (min-width: 992px) {
    .pf-header__nav {
        display: flex !important;
    }

    .pf-header__toggle {
        display: none !important;
    }
}

/* Mobile Menu */
.pf-header__mobile {
    display: none;
    position: absolute;
    top: 116px;
    left: 0;
    right: 0;
    background: var(--pf-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

.pf-header__mobile.active {
    display: block;
}

.pf-header__mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pf-header__mobile-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.pf-header__mobile-menu li:last-child {
    border-bottom: none;
}

.pf-header__mobile-menu a {
    display: block;
    padding: 16px 0;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--pf-white);
    text-decoration: none;
    text-transform: uppercase;
}

.pf-header__mobile-menu a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Product Detail Pages - Show scrolled header from start */
body[class*="page-template-page-product-"] .pf-header,
body.single-product .pf-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: var(--pf-white) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

body[class*="page-template-page-product-"] .pf-header .pf-header__top,
body.single-product .pf-header .pf-header__top {
    display: none !important;
}

body[class*="page-template-page-product-"] .pf-header .pf-header__menu a,
body.single-product .pf-header .pf-header__menu a {
    color: var(--pf-secondary) !important;
}

body[class*="page-template-page-product-"] .pf-header .pf-header__menu a:hover,
body.single-product .pf-header .pf-header__menu a:hover {
    color: var(--pf-primary) !important;
}

body[class*="page-template-page-product-"] .pf-header .pf-header__logo-text,
body.single-product .pf-header .pf-header__logo-text {
    color: var(--pf-secondary) !important;
}


body[class*="page-template-page-product-"] .pf-header .pf-header__logo-white,
body.single-product .pf-header .pf-header__logo-white {
    display: none !important;
}

body[class*="page-template-page-product-"] .pf-header .pf-header__logo-dark,
body.single-product .pf-header .pf-header__logo-dark {
    display: block !important;
}

body[class*="page-template-page-product-"] .pf-header .pf-header__toggle span,
body.single-product .pf-header .pf-header__toggle span {
    background: var(--pf-secondary) !important;
}

/* Responsive - Mobile/Tablet */
@media (max-width: 991px) {
    .pf-header__nav {
        display: none !important;
    }

    .pf-header__toggle {
        display: flex !important;
    }

    .pf-header__mobile {
        top: 80px;
    }

    .pf-header__top {
        display: none;
    }
}

@media (max-width: 767px) {
    .pf-header__top-left,
    .pf-header__top-right {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ==========================================================================
   DROPDOWN MENU STYLES
   ========================================================================== */

/* Desktop Dropdown */
.pf-header__has-dropdown {
    position: relative;
}

.pf-header__dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pf-white);
    min-width: 200px;
    padding: 12px 0;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.pf-header__has-dropdown:hover .pf-header__dropdown {
    opacity: 1;
    visibility: visible;
}

.pf-header__dropdown li {
    margin: 0;
}

.pf-header__dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--pf-secondary) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.pf-header__dropdown a:hover {
    background: var(--pf-bg-light);
    color: var(--pf-primary) !important;
}

/* Mobile Dropdown */
.pf-header__mobile-has-dropdown {
    position: relative;
}

.pf-header__mobile-has-dropdown > a {
    display: inline-block;
}

.pf-header__mobile-dropdown-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--pf-white);
    vertical-align: middle;
    margin-left: 5px;
    transition: transform 0.2s;
}

.pf-header__mobile-dropdown-toggle.active {
    transform: rotate(180deg);
}

.pf-header__mobile-dropdown {
    display: none;
    list-style: none;
    padding: 10px 0 10px 20px;
    margin: 0;
}

.pf-header__mobile-dropdown.active {
    display: block;
}

.pf-header__mobile-dropdown a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: var(--pf-white);
    opacity: 0.85;
}

.pf-header__mobile-dropdown a:hover {
    opacity: 1;
}

