/**
 * Header & Footer Styles - Pháp Phục Tu Sĩ
 * Dark Professional | 1440px max | 90px padding
 */

/* ============================================================
 * 0. GLOBAL VARIABLES
 * ============================================================ */
:root {
    --pp-max-width: 1440px;
    --pp-padding-x: 90px;
}

/* ============================================================
 * HEADER (Custom Layout)
 * ============================================================ */
.header-wrapper,
#masthead {
    background: rgba(10, 10, 10, 0.96) !important;
    border-bottom: 1px solid var(--pp-border) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 100;
}

/* Sticky header */
.sticky-header.stuck {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.98) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
    border-bottom: 1px solid var(--pp-border-gold) !important;
    animation: fadeInDown 0.5s ease forwards;
}

.header-wrapper .container {
    max-width: var(--pp-max-width);
    padding-left: var(--pp-padding-x);
    padding-right: var(--pp-padding-x);
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
}

/* Header Main Layout */
.pp-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Center Logo Layout adjustments */
.center-logo-layout .left-nav {
    flex: 1;
    justify-content: flex-end;
    padding-right: 40px;
    min-width: 0;
}
.center-logo-layout .pp-header-logo {
    flex-shrink: 0;
    z-index: 10;
}
.center-logo-layout .pp-header-right {
    flex: 1;
    justify-content: space-between;
    padding-left: 40px;
}
.center-logo-layout .right-nav {
    flex: 1;
    justify-content: flex-start;
}

/* Logo Left */
.pp-header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    background: transparent !important;
}

.pp-header-logo .logo-link {
    display: inline-block;
    background: transparent !important;
}

.logo-main {
    max-height: 100px;
    width: auto;
    background: transparent !important;
    display: block;
}

/* Menu Right & Actions Container */
.pp-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

/* Main Navigation */
.pp-main-nav {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
}

.pp-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 40px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pp-menu::-webkit-scrollbar {
    display: none;
}

.pp-menu li {
    flex-shrink: 0;
}

.pp-menu li a {
    color: var(--pp-text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.pp-menu li a:hover {
    color: var(--pp-gold);
}

/* Header Actions */
.pp-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pp-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--pp-transition);
    position: relative;
}

.pp-cart-btn {
    background: transparent;
    color: var(--pp-text-primary);
    border: 1px solid var(--pp-border-strong);
}

.pp-cart-btn:hover {
    border-color: var(--pp-gold);
    color: var(--pp-gold);
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--pp-gold);
    color: #0a0a0a;
    font-weight: 700;
    font-size: 11px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.pp-checkout-btn {
    background: var(--pp-gold);
    color: #0a0a0a;
    border: 1px solid var(--pp-gold);
}

.pp-checkout-btn:hover {
    background: var(--pp-gold-hover);
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 193, 92, 0.3);
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    position: relative;
    z-index: 1001; /* Stay above overlay */
}
.menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 40px;
    height: 40px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--pp-text-primary);
    transition: 0.3s;
    border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background: var(--pp-gold);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background: var(--pp-gold);
}

/* Mobile Nav Overlay */
.mobile-navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-20px);
    border-top: none;
}
.mobile-navigation.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pp-mobile-menu {
    list-style: none;
    margin: 0;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.pp-mobile-menu li {
    margin-bottom: 25px;
}
.pp-mobile-menu li a {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pp-white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: none;
    position: relative;
    transition: var(--pp-transition);
}
.pp-mobile-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--pp-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.pp-mobile-menu li a:hover,
.pp-mobile-menu li.current-menu-item a {
    color: var(--pp-gold);
    background: transparent;
}
.pp-mobile-menu li a:hover::after,
.pp-mobile-menu li.current-menu-item a::after {
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .pp-main-nav,
    .pp-header-actions {
        display: none; /* Hide menus and buttons on mobile */
    }
    
    .pp-header-logo {
        flex: 1;
    }
    
    .logo-main {
        max-height: 40px;
    }
    
    .header-wrapper .container {
        height: 70px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* ============================================================
 * OVERRIDE FLATSOME NATIVE NAVIGATION (Drop-downs, Sidebars)
 * ============================================================ */

/* Dropdowns & Submenus */
.nav-dropdown,
.nav-dropdown ul,
.sub-menu {
    background-color: var(--pp-bg-card) !important;
    border: 1px solid var(--pp-border) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important;
}

.nav-dropdown > li > a,
.sub-menu > li > a {
    color: var(--pp-text-primary) !important;
    border-bottom: 1px solid var(--pp-border-strong) !important;
    font-weight: 500 !important;
    padding: 12px 20px !important;
    transition: var(--pp-transition) !important;
}

.nav-dropdown > li > a:hover,
.sub-menu > li > a:hover,
.nav-dropdown > li.active > a,
.sub-menu > li.current-menu-item > a {
    color: var(--pp-gold) !important;
    background-color: var(--pp-gold-soft) !important;
}

/* Mobile Sidebar (Flatsome native) */
.mobile-sidebar-levels-1, 
.mobile-sidebar-levels-2,
.mfp-content .off-canvas-right,
.mfp-content .off-canvas-left {
    background-color: var(--pp-bg-page) !important;
}

.mobile-sidebar li > a,
.nav-sidebar > li > a {
    color: var(--pp-text-primary) !important;
    border-bottom: 1px solid var(--pp-border) !important;
}

.mobile-sidebar li > a:hover,
.nav-sidebar > li > a:hover {
    color: var(--pp-gold) !important;
    background-color: var(--pp-gold-soft) !important;
}

/* Generic Nav pills/lines */
.nav-line-bottom > li > a,
.nav-pills > li > a,
.nav-dark > li > a {
    color: var(--pp-text-primary) !important;
}

.nav-line-bottom > li > a:hover,
.nav-line-bottom > li.active > a {
    color: var(--pp-gold) !important;
}

.nav-line-bottom > li > a::after,
.nav-line-bottom > li.active > a::after,
.nav-line-bottom > li:hover > a::after {
    background-color: var(--pp-gold) !important;
}

/* My Account / Login dropdowns */
.account-item .nav-dropdown {
    background: var(--pp-bg-card) !important;
}
.account-item .nav-dropdown li a {
    color: var(--pp-text-primary) !important;
}
.account-item .nav-dropdown li a:hover {
    color: var(--pp-gold) !important;
}

/* Active menu item colors globally */
.current-menu-item > a,
.current-menu-ancestor > a,
.current-product_cat-ancestor > a {
    color: var(--pp-gold) !important;
}


/* ============================================================
 * FOOTER
 * ============================================================ */
#footer,
.footer-wrapper,
.footer-primary,
.footer-secondary,
.absolute-footer {
    background: #080808 !important;
    color: var(--pp-text-secondary);
}

.footer-primary {
    border-top: 1px solid var(--pp-border) !important;
    padding: 80px 0 !important;
}

/* Footer widget container - 1440px centered */
.footer-primary .container,
.footer-primary .footer-container {
    max-width: var(--pp-max-width) !important;
    padding-left: var(--pp-padding-x) !important;
    padding-right: var(--pp-padding-x) !important;
    margin: 0 auto !important;
}

/* Footer Headings */
.footer h1,
.footer h2,
.footer h3,
.footer h4,
.footer .widget-title {
    color: var(--pp-white) !important;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pp-border);
}

/* Footer Links */
.footer a {
    color: var(--pp-text-secondary) !important;
    transition: color 0.2s, padding-left 0.2s;
    font-size: 0.9rem;
}

.footer a:hover {
    color: var(--pp-gold) !important;
    padding-left: 4px;
}

.footer .menu li {
    margin-bottom: 10px;
}

/* Footer Bottom / Copyright */
.absolute-footer,
.footer-secondary {
    border-top: 1px solid var(--pp-border) !important;
    padding: 20px 0 !important;
    color: var(--pp-text-muted) !important;
    font-size: 0.875rem;
}

/* Social Icons */
.social-icons a {
    background: var(--pp-bg-card) !important;
    color: var(--pp-text-secondary) !important;
    border: 1px solid var(--pp-border) !important;
    border-radius: var(--pp-radius) !important;
    transition: all 0.2s;
}

.social-icons a:hover {
    background: var(--pp-gold) !important;
    color: #0a0a0a !important;
    border-color: var(--pp-gold) !important;
}

/* Footer Logo */
.footer-logo a {
    color: var(--pp-white) !important;
}

/* Footer description text */
.footer p,
.footer .textwidget {
    color: var(--pp-text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}


/* ============================================================
 * 4. PROFESSIONAL FOOTER RE-DESIGN
 * ============================================================ */
.footer-widget-title {
    color: var(--pp-gold) !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    margin-bottom: 25px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 12px;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--pp-gold);
    border-radius: 2px;
}

/* Category List Styles */
ul.pp-clean-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

ul.pp-clean-list li {
    margin-bottom: 15px !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
}

ul.pp-clean-list li:last-child {
    border-bottom: none;
    margin-bottom: 0 !important;
}

ul.pp-clean-list li a {
    color: var(--pp-text-secondary) !important;
    font-size: 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

ul.pp-clean-list li a i {
    color: var(--pp-gold);
    margin-right: 12px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

ul.pp-clean-list li a:hover {
    color: var(--pp-gold) !important;
    padding-left: 8px;
}

ul.pp-clean-list li a:hover i {
    transform: translateX(4px);
}

ul.pp-clean-list li a .category-count {
    margin-left: auto;
    font-size: 13px;
    color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

ul.pp-clean-list li a:hover .category-count {
    color: var(--pp-black);
    background: var(--pp-gold);
}

/* Contact Info Hover */
.footer-contact-info .contact-item a:hover {
    color: var(--pp-gold) !important;
}


/* Footer Grid - 3 Equal Columns with Gap */
.footer-main .row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 60px !important;
    width: 100% !important;
    max-width: var(--pp-max-width, 1440px) !important;
    margin: 0 auto !important;
    padding: 0 !important;
}
.footer-main .row::before,
.footer-main .row::after {
    display: none !important;
}
.footer-main .col {
    max-width: 100% !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
@media (max-width: 1024px) {
    .footer-main .row {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px !important;
    }
}
@media (max-width: 767px) {
    .footer-main .row {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

