/* =========================================
   patonepal\src\css\base.css
   CONTAINS: Reset, Vars, Unified Header, Nav, Footer, Modals, Toasts
   ========================================= */

/* 1. VARIABLES & RESET */
:root {
    --black: #000000;
    --white: #ffffff;
    --font-head: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;

    --success: #28a745;
    --error: #dc3545;
    --gray-light: #f4f4f4;
    --gray-text: #666;

    /* Dimensions for Unified Header */
    --header-height: 55px;
    /* Logo Row */
    --nav-height: 45px;
    /* Nav Row */
    --total-header-height: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Remove blue highlight on mobile tap */
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    color: var(--black);
    background: var(--white);
    overflow-x: hidden;
    width: 100%;
    /* Push content down to avoid overlap with fixed header */
    padding-top: var(--total-header-height);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    outline: none;
}

input,
select,
textarea {
    font-family: var(--font-body);
}

/* =========================================
   2. UNIFIED MAIN HEADER (Desktop)
   ========================================= */
.main-header {
    background: #fff;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 3000;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #eee;

    /* CORE FIX: Stack items vertically with no gaps */
    display: flex;
    flex-direction: column;
    height: var(--total-header-height);
    justify-content: center;
}

.main-header.header-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

/* --- LOGO ROW (Top) --- */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: var(--header-height);
    padding: 0 40px;
    background: #fff;
    position: relative;
    z-index: 3002;
}

.header-left,
.header-right {
    flex: 1;
    display: flex;
}

.header-right {
    justify-content: flex-end;
    gap: 20px;
    align-items: center;
}

.header-right i {
    font-size: 16px;
    cursor: pointer;
    color: #333;
}

.header-center {
    flex: 2;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Burger Button (Hidden on Desktop) */
.mobile-burger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 10px;
    color: #000;
}

/* --- NAVIGATION ROW (Bottom) --- */
.main-nav {
    width: 100%;
    height: var(--nav-height);
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    /* FIX: No border-top to ensure seamless look */
    border-top: none;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 35px;
    height: 100%;
    align-items: center;
    margin: 0;
}

.nav-links>li,
#dynamic-nav-links>li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links>li>a,
#dynamic-nav-links>li>a {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #222;
    padding: 0;
    display: block;
    position: relative;
    /* Vertically center text in the 45px height */
    line-height: var(--nav-height);
}

/* Hover Underline */
.nav-links>li>a::after,
#dynamic-nav-links>li>a::after {
    content: '';
    position: absolute;
    bottom: 10px;
    /* Adjust to sit just below text */
    left: 0;
    width: 0;
    height: 1px;
    background: #000;
    transition: width 0.3s;
}

.nav-links>li:hover>a::after,
#dynamic-nav-links>li:hover>a::after {
    width: 100%;
}

/* --- DROPDOWNS (Desktop) --- */
.dropdown-parent {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    border-top: 3px solid #000;
    z-index: 2000;
}

.dropdown-parent:hover .dropdown-menu {
    display: block;
    animation: fadeInMenu 0.2s ease-in-out;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    font-size: 11px;
    color: #555;
    text-transform: uppercase;
    font-weight: 500;
    transition: all 0.2s;
    line-height: normal;
}

.dropdown-menu li a:hover {
    background-color: #f9f9f9;
    color: #000;
}

/* --- USER DROPDOWN --- */
.user-menu-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 3100;
    flex-direction: column;
    border-top: 3px solid #000;
}

.user-menu-container.logged-in:hover .user-dropdown {
    display: flex;
}

.user-name-display {
    padding: 15px;
    background: #f8f9fa;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.user-dropdown a {
    padding: 12px 15px;
    font-size: 12px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================
   3. MOBILE RESPONSIVE STYLES
   ========================================= */
@media (max-width: 768px) {

    /* 1. Reset Height: Only top row visible by default */
    body {
        padding-top: 60px;
    }

    .main-header {
        height: 60px;
        display: block;
        /* Break flex to handle fixed drawer */
    }

    .header-container {
        height: 60px;
        padding: 0 20px;
    }

    .mobile-burger {
        display: block;
    }

    /* 2. Hide Desktop Nav BAR Wrapper, but allow Drawer to spill out */
    .main-nav {
        height: 0;
        overflow: visible;
        /* CRITICAL: Allows fixed drawer to be seen */
        border: none;
        display: block;
    }

    /* 3. The Drawer Itself */
    .nav-links {
        position: fixed;
        left: -100%;
        top: 60px;
        /* Below the header */
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 60px);
        background-color: #fff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 20px 0;
        z-index: 2900;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        margin-top: 0;
    }

    .nav-links.nav-active {
        left: 0;
    }

    .nav-links>li,
    #dynamic-nav-links>li {
        width: 100%;
        height: auto;
        display: block;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links>li>a,
    #dynamic-nav-links>li>a {
        padding: 15px 25px;
        font-size: 13px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        line-height: normal;
    }

    .nav-links>li>a::after,
    #dynamic-nav-links>li>a::after {
        display: none;
    }

    /* Accordion Icons (+) */
    .dropdown-parent>a::after {
        content: '+';
        font-size: 16px;
        color: #999;
        position: static;
        width: auto;
        height: auto;
        background: none;
    }

    .dropdown-parent.active>a::after {
        content: '-';
    }

    /* Mobile Dropdown (Hidden default) */
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: #fafafa;
        width: 100%;
        min-width: unset;
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        padding: 0;
    }

    /* Keep block layout so transition works */
    .dropdown-parent:hover .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 12px 35px;
        /* Indent sub-items */
        font-size: 12px;
        color: #666;
        border-bottom: 1px dashed #eee;
    }
}

/* =========================================
   4. FOOTER
   ========================================= */
footer {
    background: #000;
    color: #fff;
    padding: 50px 40px 20px;
    text-align: center;
    position: relative;
    z-index: 1000;
}

.footer-nav {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 60px;
    /* Increased gap between columns */
    flex-wrap: wrap;
    text-align: left;
    /* Align text to left within columns */
}

.nav-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Space between links */
}

.nav-column h4 {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-nav a {
    font-size: 12px;
    color: #ccc;
    text-transform: capitalize;
    /* Changed from uppercase for better readability */
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-nav i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.copyright {
    font-size: 10px;
    color: #555;
    margin-top: 20px;
}

/* FIX: Floating Support Button Styles */
.floating-support-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    /* WhatsApp Green style or Brand Color */
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 5000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 700;
    font-size: 14px;
}

.floating-support-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.floating-support-btn i {
    font-size: 18px;
}

/* =========================================
   5. MODALS & TOASTS
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 4000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    padding: 40px;
    width: 420px;
    max-width: 90%;
    border-radius: 4px;
    position: relative;
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-btn:hover {
    color: #000;
}

.modal-title {
    font-family: var(--font-head);
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: 2px;
}

.auth-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.auth-input:focus {
    border-color: #000;
    outline: none;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: #000;
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-submit-btn:hover {
    background: #333;
}

/* --- UPDATED: Google Button & Divider --- */
.divider-container {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    position: relative;
}

.divider-container::after {
    content: "OR";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 10px;
    color: #999;
    font-size: 10px;
    font-weight: 700;
}

.google-btn {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
    /* Standard for Google Btn */
}

.google-btn:hover {
    background-color: #f7f8f8;
    border-color: #d2e3fc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-btn i {
    font-size: 18px;
    /* Slightly larger Google icon */
}

.toggle-text {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    padding: 15px 20px;
    border-radius: 4px;
    background: #333;
    color: #fff;
    font-size: 13px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

/* =========================================
   6. SEARCH MODAL (Restored)
   ========================================= */
.search-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 4500;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
}

.search-modal-content {
    width: 700px;
    max-width: 90%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideDownSearch 0.3s ease-out;
}

.search-header {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.search-icon-input {
    font-size: 18px;
    color: #999;
    margin-right: 15px;
}

#globalSearchInput {
    flex: 1;
    border: none;
    font-size: 16px;
    font-family: var(--font-body);
    outline: none;
    background: transparent;
    color: #000;
    height: 40px;
}

#globalSearchInput::placeholder {
    color: #ccc;
}

.close-search-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 10px;
}

.close-search-btn:hover {
    color: #000;
}

.search-results-container {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px 0;
    background: #fff;
}

.search-placeholder-msg {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 13px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f9f9f9;
}

.search-result-item:hover {
    background: #f4f4f4;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-img {
    width: 50px;
    height: 60px;
    object-fit: cover;
    margin-right: 20px;
    background: #eee;
}

.search-result-info h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    color: #000;
}

.search-result-info p {
    font-size: 11px;
    color: #666;
}

.search-price {
    margin-left: auto;
    font-weight: 700;
    font-size: 13px;
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        margin-top: 10px;
    }

    to {
        opacity: 1;
        margin-top: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDownSearch {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   0. ANNOUNCEMENT BAR (GLOBAL)
   ========================================= */
.announcement-bar {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 8px 15px;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    z-index: 1001;
    /* Above header */
}

/* =========================================
   7. NEW ARRIVALS SPLIT POPUP
   ========================================= */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 5000;
    justify-content: center;
    align-items: center;
}

.popup-content.new-arrivals-popup {
    background: #fff;
    width: 900px;
    max-width: 95%;
    height: 550px;
    /* Slightly taller to accommodate header */
    display: flex;
    flex-direction: column;
    /* Vertical Layout */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    animation: popupFadeIn 0.5s ease-out;
    border-radius: 4px;
}

/* New Header Style */
.popup-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.popup-header h3 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    letter-spacing: 4px;
    color: #000;
    margin: 0;
    text-transform: uppercase;
}

/* Updated Close Button Position */
.popup-close-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #000;
    /* Black for visibility on white header */
    transition: opacity 0.2s;
    opacity: 0.6;
    padding: 0;
    line-height: 1;
}

.popup-close-btn:hover {
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

/* Split Container */
.popup-split-container {
    flex: 1;
    display: flex;
    position: relative;
    width: 100%;
}

/* Split Sections */
.popup-split-section {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: flex 0.4s ease;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

/* Background Images */
.men-section {
    background: url('/assets/men-hero2.jpg') no-repeat center top/cover;
}

.women-section {
    background: url('/assets/women-hero.jpg') no-repeat center top/cover;
}

/* Hover Effect: Expand Triggered Section */
.popup-split-section:hover {
    flex: 1.4;
}

.popup-split-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.3s;
    z-index: 1;
}

.popup-split-section:hover .popup-split-overlay {
    background: rgba(0, 0, 0, 0.1);
}

/* Text Content */
.popup-split-section h2,
.popup-split-section .popup-cta {
    position: relative;
    z-index: 2;
}

.popup-split-section h2 {
    font-family: var(--font-head);
    font-size: 3rem;
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.popup-cta {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 12px 25px;
    border: 1px solid #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.popup-split-section:hover .popup-cta {
    opacity: 1;
    transform: translateY(0);
    background: #fff;
    color: #000;
}

.popup-split-section:hover h2 {
    transform: translateY(-10px);
}

/* Removed old center text */
.popup-center-text {
    display: none;
}

/* Animations */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .popup-content.new-arrivals-popup {
        height: 85vh;
        /* Taller on mobile to fit split vertically */
    }

    .popup-split-container {
        flex-direction: column;
    }

    .popup-split-section {
        width: 100%;
        height: 50%;
    }

    .men-section {
        border-bottom: 1px solid #fff;
    }

    .popup-split-section h2 {
        font-size: 2rem;
    }

    .popup-cta {
        opacity: 1;
        transform: translateY(0);
    }

    /* Adjust header for mobile */
    .popup-header {
        height: 60px;
    }

    .popup-header h3 {
        font-size: 1.2rem;
    }
}