/* CSS for Header, Footer, and Navigation Elements */

/* --- PULSE ANIMATION --- */
@keyframes pulse-animation {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        transform: scale(1.03);
        box-shadow: 0 0 10px 15px rgba(59, 130, 246, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Top Bar Styling */
.top-bar {
    background-color: #1E3A8A; /* Dark Blue */
    color: #FFFFFF; /* White Text */
    border-bottom: 1px solid #172E6B;
}

/* NEW: Top Bar WhatsApp Button */
.top-bar-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    background-color: #25D366;
    color: #1E3A8A; /* Changed from white to dark blue for visibility */
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600; /* Increased font weight for visibility */
    text-decoration: none;
    transition: all 0.3s ease;
}
.top-bar-whatsapp-btn:hover {
    background-color: #128C7E;
    color: #ffffff; /* Keep font white on hover */
    transform: scale(1.05);
}


/* MODIFIED: Phone Number Pills in Top Bar */
.phone-capsule {
    display: inline-flex;
    align-items: center;
    background-color: #E0E7FF; /* Light lavender background */
    color: #1E3A8A !important; /* Dark blue text */
    font-size: 0.875rem;
    font-weight: 600; /* Bolder */
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse-animation 2.5s infinite cubic-bezier(0.66, 0, 0, 1);
    position: relative; /* For the dot */
}

.phone-capsule:hover {
    background-color: #FFFFFF;
    color: #1d4ed8 !important;
    transform: scale(1.05);
    animation-play-state: paused; /* Pause animation on hover */
}

/* NEW: Color dot */
.color-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}


/* Header Styling */
header {
    background-color: #EFF6FF; /* Light Blue */
    border-bottom: 1px solid #DBEAFE; /* Lighter Blue Border */
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, background-color 0.3s ease, backdrop-filter 0.3s ease, border-bottom-color 0.3s ease;
}

/* Style for hidden header (when scrolling up) */
header.header-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none; /* Disable interactions when hidden */
}

/* Glassmorphism effect for sticky header when scrolled */
header.glass-morphism {
    background-color: rgba(239, 246, 255, 0.7); /* Semi-transparent light blue */
    backdrop-filter: blur(10px); /* Blur effect */
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    border-bottom-color: rgba(219, 234, 254, 0.5); /* Lighter border for glass effect */
}

/* Override .container padding specifically for the header */
header .container {
    padding-left: 0.75rem; /* Reduced horizontal padding */
    padding-right: 0.75rem; /* Reduced horizontal padding */
}

/* --- MODIFIED: Navigation Link Styling --- */
.desktop-nav .nav-link {
    color: #1F2937; /* Dark Gray Text */
    font-weight: 500;
    padding: 0.6rem 1.25rem; /* Adjusted padding for pill shape */
    border-radius: 9999px; /* Pill shape */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    position: relative;
    text-decoration: none;
    background-color: transparent; /* Default state is transparent */
}

/* Remove the old underline effect */
.desktop-nav .nav-link::after {
    content: none;
}

.desktop-nav .nav-link:hover,
.desktop-nav .dropdown:hover > a { /* Target dropdown link on hover of parent */
    background-color: var(--accent-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
}


/* Dropdown specific styles (for regular dropdowns, not mega-menu) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #FFFFFF; /* Changed from var(--card-bg) */
    min-width: 280px;
    box-shadow: 0px 8px 20px 0px rgba(0,0,0,0.1); /* Lighter shadow */
    z-index: 101;
    border: 1px solid #E5E7EB; /* Light gray border */
    border-radius: 0.75rem;
    padding: 0.75rem 0;
    left: 0;
    top: 100%;
    margin-top: 0.75rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.dropdown-content a {
    color: #1F2937; /* Dark Gray Text */
    padding: 12px 18px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 0.5rem;
    margin: 0 0.5rem;
}

.dropdown-content a:hover {
    background-color: #EFF6FF; /* Light Blue BG */
    color: var(--accent-primary); /* Blue Text */
}

.dropdown-content strong {
    color: #6B7280; /* Medium Gray */
    padding: 8px 18px;
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
}

.dropdown-content .separator {
    border-top: 1px solid #E5E7EB; /* Light Gray */
    margin: 0.5rem 0.5rem;
    width: calc(100% - 1rem);
    margin-left: 0.5rem;
}

/* Mega Menu Specific Styles */
.mega-menu {
    position: absolute; /* Position relative to the header */
    top: 100%; /* Position right below the header */
    left: 0; /* Align to the left edge of the header */
    width: 100%; /* Span the full width of the header */
    max-width: none; /* Remove max-width constraint */
    background-color: #FFFFFF; /* Changed from var(--card-bg) */
    border: 1px solid #E5E7EB; /* Light gray border */
    border-radius: 0.75rem; /* Rounded corners */
    box-shadow: 0px 8px 20px 0px rgba(0,0,0,0.1); /* Lighter shadow */
    z-index: 99; /* Below sticky header, but above page content */
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns for categories and brands */
    gap: 2rem; /* Gap between columns */
    opacity: 0; /* Initially hidden */
    transform: translateY(10px); /* Initial vertical offset for animation */
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Class to show the mega-menu via JavaScript */
.mega-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Adjust for the container's padding, if necessary, to make its content align */
.mega-menu {
    padding-left: calc(50vw - 640px + 1.5rem);
    padding-right: calc(50vw - 640px + 1.5rem);
}

@media (min-width: 1280px) {
    .mega-menu {
        padding-left: calc((100vw - 1280px) / 2 + 1.5rem);
        padding-right: calc((100vw - 1280px) / 2 + 1.5rem);
    }
}
@media (max-width: 1279px) {
    .mega-menu {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.mega-menu-column h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E5E7EB; /* Light gray border */
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.mega-menu-column.brands-column ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.mega-menu-column ul li a {
    padding: 0.75rem 1.25rem;
    margin: 0;
    display: block;
    border-bottom: 1px solid #F3F4F6; /* Very light gray border */
    font-weight: 400;
    color: #1F2937; /* Dark Gray Text */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.mega-menu-column ul li:last-child a {
    border-bottom: none;
}

.mega-menu-column.brands-column ul li {
    border-bottom: 1px solid #F3F4F6; /* Very light gray border */
}

.mega-menu-column.brands-column ul li:nth-child(odd) {
    border-right: 1px solid #F3F4F6; /* Very light gray border */
}

.mega-menu-column.brands-column ul li:nth-last-child(-n + 2) {
    border-bottom: none;
}
.mega-menu-column.brands-column ul li:last-child {
    border-bottom: none;
}

.mega-menu-column ul li a:hover {
    background-color: #EFF6FF; /* Light Blue BG */
    color: var(--accent-primary); /* Blue Text */
    transform: translateX(5px);
}

/* Mobile menu specific styles (Side Drawer) */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #1F2937; /* Dark Gray */
    z-index: 20;
    transition: transform 0.2s ease;
}

.mobile-menu-button:hover {
    transform: scale(1.1);
    color: var(--accent-primary);
}

.side-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh; /* Use viewport height to ensure it covers the screen */
    background-color: #FFFFFF;
    border-right: 1px solid #E5E7EB;
    z-index: 9999; /* Ensure drawer is on top of everything */
    transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow-y: auto;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
}

.side-drawer.active {
    left: 0;
}

.side-drawer .close-button {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #374151;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, color 0.3s ease;
}

.side-drawer .close-button:hover {
    transform: rotate(90deg) scale(1.1);
    color: var(--accent-primary);
}

.side-drawer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-drawer li {
    margin-bottom: 0.75rem;
}

.side-drawer .nav-link,
.side-drawer .dropdown > a {
    display: block;
    width: 100%;
    border: 1px solid #E5E7EB;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-align: left;
    color: #1F2937;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.side-drawer .nav-link:hover,
.side-drawer .dropdown > a:hover {
    background-color: #EFF6FF;
    color: var(--accent-primary);
}

.side-drawer .dropdown-content {
    position: static;
    box-shadow: none;
    border: none;
    background-color: #F9FAFB;
    width: 100%;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    max-height: 0;
    /* opacity is not needed with max-height transition */
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.side-drawer .dropdown-content a {
    padding-left: 2.5rem;
    border-bottom: 1px solid #E5E7EB;
    color: #374151;
}

.side-drawer .dropdown-content a:last-child {
    border-bottom: none;
}

.side-drawer .dropdown-content a:hover {
    background-color: #EFF6FF;
    color: var(--accent-primary);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Use viewport width to ensure it covers the screen */
    height: 100vh; /* Use viewport height to ensure it covers the screen */
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998; /* Ensure overlay is on top of content but below drawer */
    transition: opacity 0.3s ease;
    opacity: 0;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* --- NEW FOOTER STYLES START --- */

footer {
    background-color: #f1f5f9; /* Slightly darker gray background */
    background-image: url('https://www.toptal.com/designers/subtlepatterns/uploads/double-bubble-outline.png');
    color: #4b5563; /* Gray-600 text color */
    border-top: 1px solid #e5e7eb; /* Light border */
    position: relative;
    overflow: hidden;
    padding-top: 3rem;
    padding-bottom: 2rem;
}

footer .container {
    position: relative;
    z-index: 1;
}

/* New Row Structure */
.footer-row {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}
.footer-row:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}


footer h3 {
    color: #1f2937; /* Darker text for headings */
    font-weight: 700;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left; /* Default left align for desktop */
}

footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0; /* Default left align for desktop */
    transform: translateX(0);
    width: 50px;
    height: 3px;
    background-color: var(--accent-primary);
    border-radius: 2px;
}

/* Remove old list styles */
footer ul { all: unset; }
footer ul li { all: unset; }
footer ul li a { all: unset; }
.footer-brands { all: unset; }
.footer-brands a { all: unset; }

/* Container for pills */
.footer-pills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Default left align for desktop */
    gap: 0.75rem; /* 12px */
}

/* New unified pill style */
.footer-pill {
    background-color: #e5e7eb; /* gray-200 */
    color: #374151; /* gray-700 */
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid transparent;
}
.footer-pill:hover {
    background-color: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-color: var(--accent-primary);
}


/* Footer Enquiry Layers */
.footer-enquiry-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns on desktop */
    gap: 1.5rem;
    align-items: center;
}

.footer-enquiry-layer {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: left;
}

.enquiry-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.75rem;
}
.enquiry-input {
    width: 100%;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #1f2937;
    padding: 0.65rem 1rem;
    border-radius: 0.5rem 0 0 0.5rem;
    outline: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    font-size: 0.875rem;
}
.enquiry-input::placeholder {
    color: #9ca3af;
}
.enquiry-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.enquiry-submit-btn {
    background-color: var(--accent-primary);
    color: white;
    padding: 0.65rem 1rem;
    border: 1px solid var(--accent-primary);
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.enquiry-submit-btn:hover {
    background-color: #2563EB; /* Darker blue */
}


/* WhatsApp Enquiry Button */
.whatsapp-enquiry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}
.whatsapp-enquiry-btn:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


footer .social-icons {
    display: flex;
    gap: 1.5rem; /* Increased gap */
    justify-content: flex-start; /* Default left */
}

footer .social-icons a {
    color: #6b7280; /* gray-500 */
    font-size: 1.25rem; /* Slightly smaller */
    transition: transform 0.3s ease, color 0.3s ease;
}

footer .social-icons a:hover {
    transform: scale(1.2);
    color: var(--accent-primary);
}

footer .copyright-section {
    border-top: 1px solid #e5e7eb; /* gray-200 */
    padding-top: 2rem;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280; /* gray-500 */
}

footer .copyright-section a {
    color: #4b5563; /* gray-600 */
    transition: color 0.3s ease;
    font-weight: 500;
}

footer .copyright-section a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* --- FOOTER STYLES END --- */


/* Floating WhatsApp and Call Button Styles */
.floating-buttons-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.floating-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

.floating-button.whatsapp {
    background-color: #25D366; /* Solid WhatsApp Green */
    border: 2px solid white;
}

.floating-button.whatsapp:hover {
    background-color: #128C7E; /* Darker green on hover */
}

.floating-button.call {
    background-color: #3b82f6;
    border: 2px solid white;
}

.floating-button.call:hover {
    background-color: #1d4ed8;
}

/* Container for WhatsApp button and its popup */
.whatsapp-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Styling for the WhatsApp popup */
.whatsapp-popup {
    position: absolute;
    right: 75px;
    bottom: 5px;
    background-color: #ffffff;
    color: #374151;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateX(10px);
    transform-origin: right center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

/* Added a tail to the popup */
.whatsapp-popup::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    margin-top: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

.whatsapp-popup.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateX(0);
    pointer-events: auto;
}

.whatsapp-popup p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Styling for the popup close button */
.close-popup-btn {
    position: absolute;
    top: 2px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.close-popup-btn:hover {
    color: #374151;
}


/* Responsive Styles for Header/Footer */
@media (max-width: 991px) {
    footer .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 767px) {
    .mobile-menu-button {
        display: block;
    }
    .desktop-nav {
        display: none;
    }
    header .container {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    header .text-3xl {
        font-size: 1.8rem;
    }
    header .btn-primary {
        display: none;
    }
    .top-bar .container {
        justify-content: center;
        flex-direction: row;
    }
    .top-bar-whatsapp-btn {
        display: none;
    }
    
    /* Footer Responsive */
    .footer-row {
        text-align: center;
    }

    footer h3 {
        text-align: center;
        display: inline-block;
    }

    footer h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-pills-container {
        justify-content: center;
    }

    .footer-enquiry-container {
        grid-template-columns: 1fr; /* Stack on mobile */
        max-width: 350px;
        margin: 0 auto;
    }

    footer .social-icons {
        justify-content: center;
    }


    /* Mobile specific mega menu adjustments */
    .side-drawer .dropdown-content.mega-menu {
        position: static;
        transform: none;
        width: 100%;
        max-width: none;
        padding: 0;
        display: block;
        box-shadow: none;
        border: none;
        background-color: transparent;
    }
    .side-drawer .mega-menu-column {
        margin-bottom: 1rem;
    }
    .side-drawer .mega-menu-column h4 {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0.5rem;
        color: #1F2937;
        font-size: 0.9rem; /* MODIFIED: Made smaller */
        padding-left: 1.5rem;
    }
    .side-drawer .mega-menu-column ul {
        display: block;
    }
    .side-drawer .mega-menu-column ul li a {
        padding-left: 2.5rem;
        border-bottom: 1px solid #E5E7EB;
        color: #374151;
        font-size: 0.85rem; /* ADDED: Smaller font */
        padding-top: 0.6rem; /* ADDED: Vertical padding */
        padding-bottom: 0.6rem; /* ADDED: Vertical padding */
    }
    .side-drawer .mega-menu-column ul li:last-child a {
        border-bottom: none;
    }
    .side-drawer .mega-menu-column.brands-column ul li {
        border-right: none;
    }
    .side-drawer .mega-menu-column.brands-column {
        display: none;
    }
    .side-drawer .dropdown-content a:hover {
        background-color: #EFF6FF;
        color: var(--accent-primary);
    }
    .floating-buttons-container {
        bottom: 1rem;
        right: 1rem;
        gap: 0.75rem;
    }
    .floating-button {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* MODIFIED: Pill design for contact info in the main section & footer */
.contact-info-pill, .contact-pill {
    display: inline-flex;
    align-items: center;
    background-color: #eef2ff; /* A light blue/indigo shade */
    color: #374151;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0e7ff;
}
.contact-info-pill:hover, .contact-pill:hover {
    background-color: #3b82f6; /* Primary accent color */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* NEW: Specific style for WhatsApp pill */
.whatsapp-pill {
    background-color: #e6f8f0; /* Light green */
    border-color: #c6f0de;
    color: #155724; /* Dark green text */
}
.whatsapp-pill:hover {
    background-color: #25D366; /* WhatsApp green */
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    border-color: #25D366;
}
