/*
Theme Name: Astra Child
Theme URI: http://wpastra.com/
Description: This is a child theme for Astra theme.
Author: Brainstorm Force
Author URI: http://wpastra.com/
Template: astra
Version: 1.0.0
*/

/* === Import Font === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* === CSS Variables === */
:root {
    --brand-color: #0071e3;
    --text-dark: #1d1d1f;
    --text-light: #86868b;
    --background-light: #ffffff;
    --border-color: #d2d2d7;
    --header-height-pro: 75px;
    --font-primary: 'Inter', sans-serif;
}

body { font-family: var(--font-primary); }

/* === Top Bar === */
.header-top-bar {
    background-color: #f5f5f7;
    text-align: center;
    padding: 8px 15px;
    font-size: 0.8rem;
    color: var(--text-dark);
}
@media (max-width: 767px) {
    .header-top-bar { display: none; }
}
.container { max-width: 1300px; margin: 0 auto; padding: 0 15px; }

/* === Main Header === */
.site-header-pro {
    background-color: var(--background-light);
    height: var(--header-height-pro);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.site-logo-pro img { max-height: 40px; }

/* === Desktop Navigation & Mega Menu === */
.main-navigation-pro { display: none; }
@media (min-width: 1024px) {
    .main-navigation-pro { display: block; }
    .main-navigation-pro ul { list-style: none; margin: 0; padding: 0; display: flex; }
    .main-navigation-pro ul li a { display: block; padding: 10px 16px; text-decoration: none; color: var(--text-dark); font-weight: 500; transition: color 0.2s ease; }
    .main-navigation-pro ul li a:hover { color: var(--brand-color); }
    /* Mega Menu */
    .main-navigation-pro .menu-item-has-children .sub-menu {
        display: none;
        position: absolute;
        top: calc(var(--header-height-pro) - 1px);
        left: 0;
        width: 100%;
        background-color: var(--background-light);
        box-shadow: 0 10px 20px rgba(0,0,0,0.07);
        padding: 30px;
        border-top: 1px solid var(--border-color);
    }
    .main-navigation-pro .menu-item-has-children:hover > .sub-menu { display: block; }
    .main-navigation-pro .mega-menu-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
    .main-navigation-pro .mega-menu-content .sub-menu { all: unset; list-style: none; } /* Reset nested submenu */
    .main-navigation-pro .mega-menu-content li a { padding: 8px 0; font-weight: 400; color: var(--text-light); }
    .main-navigation-pro .mega-menu-content li a:hover { color: var(--brand-color); background: none; }
}


/* === Header Search & Actions === */
.header-actions-pro.desktop-only { display: none; }
.action-icon { color: var(--text-dark); text-decoration: none; position: relative; background: none; border: none; cursor: pointer; }
.action-icon svg { width: 22px; height: 22px; }
.cart-count {
    position: absolute; top: -5px; right: -8px; background-color: var(--brand-color); color: white;
    width: 18px; height: 18px; border-radius: 50%; font-size: 0.7rem; font-weight: bold;
    display: flex; align-items: center; justify-content: center;
}
@media (min-width: 1024px) {
    .header-actions-pro.desktop-only { display: flex; align-items: center; gap: 15px; }
    .search-form-pro { position: relative; }
    .search-field-pro {
        border: 1px solid var(--border-color); border-radius: 8px;
        padding: 8px 15px 8px 40px; width: 250px; transition: all 0.3s ease;
    }
    .search-field-pro:focus { border-color: var(--brand-color); box-shadow: 0 0 0 2px rgba(0,113,227,0.2); outline: none; }
    .search-submit-pro { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 0; color: var(--text-light); cursor: pointer; }
}

/* === Mobile Specific Styles === */
.mobile-only { display: none; }
@media (max-width: 1023px) {
    .main-navigation-pro, .header-actions-pro.desktop-only { display: none; }
    .mobile-only { display: flex; align-items: center; gap: 15px; }
}

/* === Mobile Navigation Drawer === */
.mobile-nav-drawer {
    position: fixed; top: 0; right: -100%; width: 85%; max-width: 320px; height: 100%;
    background-color: var(--background-light); box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1002; transition: right 0.4s ease; overflow-y: auto; padding: 20px;
}
.mobile-nav-drawer.active { right: 0; }
.close-drawer { position: absolute; top: 15px; right: 15px; font-size: 30px; background: none; border: none; cursor: pointer; }
.drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5);
    z-index: 1001; opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.drawer-overlay.active { opacity: 1; visibility: visible; }
.mobile-nav-drawer .mobile-search { margin-bottom: 20px; }
.mobile-navigation ul { list-style: none; padding: 0; }
.mobile-navigation li a { display: block; padding: 15px 0; text-decoration: none; color: var(--text-dark); font-size: 1.1rem; border-bottom: 1px solid var(--border-color); }
.mobile-navigation .sub-menu { padding-left: 20px; }
.mobile-navigation .sub-menu a { font-size: 1rem; color: var(--text-light); }
.mobile-actions { margin-top: 30px; }

/* --- Search Overlay (for Mobile Search Icon) --- */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(245, 245, 247, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 9999; display: none; align-items: center; justify-content: center;
}
.search-overlay.active { display: flex; }
.close-search { position: absolute; top: 30px; right: 40px; font-size: 40px; background: none; border: none; color: #000; cursor: pointer; }
.search-overlay-content .search-form { width: 90%; max-width: 600px; position: relative; }
.search-overlay-content .search-field {
    width: 100%; padding: 15px 20px; font-size: 1.5rem; border: none;
    border-bottom: 2px solid var(--text-dark); background: transparent; outline: none;
}
.search-overlay-content .search-submit {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-dark); cursor: pointer;
}

/* === MOBILE HEADER: CENTERED LOGO (NEW UPDATE) === */
@media (max-width: 1023px) {
    .header-container-pro {
        display: grid;
        grid-template-columns: 1fr auto 1fr; /* Left-Spacer | Logo | Right-Actions */
        padding: 0 15px; /* Add some padding for smaller screens */
    }

    .site-logo-pro {
        grid-column: 2 / 3;
        justify-self: center;
    }

    .mobile-header-actions {
        grid-column: 3 / 4;
        justify-self: end;
    }
}

/*
========================================
PROFESSIONAL FOOTER STYLES (UPDATED)
========================================
*/

.site-footer-pro {
    background-color: #f5f5f7;
    color: var(--text-light);
    padding: 60px 0 0;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 40px;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-main {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
    }
}

@media (min-width: 1024px) {
    .footer-main {
        grid-template-columns: 2fr 1fr 1fr; /* Desktop: 3 columns */
    }
}

.footer-column .footer-logo {
    max-width: 60px;
    margin-bottom: 15px;
}

.footer-tagline {
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--brand-color);
}

.social-icons svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
    fill: none;
    stroke: currentColor;
}

.footer-widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.links-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-column ul li {
    margin-bottom: 10px;
}

.links-column ul li a {
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.links-column ul li a:hover {
    color: var(--brand-color);
}


/* --- Footer Bottom --- */
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.copyright-text {
    margin: 0;
    font-size: 0.8rem;
}

.payment-icons {
    display: flex;
    align-items: center;
}

.payment-icons img {
    height: 25px; /* Updated height for the single image */
    width: auto;
}

/*
========================================
ALWAYS STICKY HEADER (NEW UPDATE)
========================================
*/

/* Make the entire header wrapper fixed to the top */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001; /* Ensure it's above other elements */
}

/* Add padding to the top of the body to prevent content from being hidden behind the header */
/* 108px is an approximate height: 75px (main header) + 33px (top bar) */
body {
    padding-top: 108px;
}

/* Reset the position of the main header bar as it's inside a fixed wrapper now */
.site-header-pro {
    position: static;
}


/*
========================================
PROFESSIONAL ADD TO CART & BUY NOW BUTTONS (UI/UX UPDATE)
========================================
*/

/* --- Button Container --- */
/* This will align the quantity input and both buttons in a row */
.single-product div.product form.cart {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows buttons to wrap on smaller screens */
    gap: 10px;
}

/* --- Base Button Style (for consistency) --- */
/* This style applies to BOTH buttons to make them the same size */
.single-product div.product form.cart .button,
.buy_now_button {
    padding: 12px 25px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
    text-align: center;
    display: inline-block;
}

/* --- Primary Button: Add to Cart --- */
/* This is the main, solid button */
.single-product div.product form.cart .single_add_to_cart_button {
    background-color: var(--brand-color) !important;
    color: #ffffff !important;
    order: 1; /* Keep it first */
}

/* --- Secondary Button: Buy Now --- */
/* This is the outline-style button */
.buy_now_button {
    background-color: transparent !important;
    color: var(--brand-color) !important;
    border: 2px solid var(--brand-color) !important;
    order: 2; /* Keep it second */
}

/* --- Hover Effects for a better UX --- */
/* Primary button hover */
.single-product div.product form.cart .single_add_to_cart_button:hover {
    background-color: #0056b3 !important; /* A darker shade of the brand color */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.3);
}

/* Secondary button hover */
.buy_now_button:hover {
    background-color: var(--brand-color) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.3);
}

/* --- Mobile Responsiveness --- */
/* On smaller screens, make buttons full width and stack them */
@media (max-width: 480px) {
    .single-product div.product form.cart {
        flex-direction: column;
        align-items: stretch; /* Make buttons take full width */
    }

    .single-product div.product form.cart .quantity {
        margin-bottom: 10px;
        width: 100%;
        text-align: center;
    }
}