/*
Theme Name: NexBuying
Theme URI: https://nexbuying.online/
Author: NexBuying Team
Author URI: https://nexbuying.online/
Description: A modern, high-performance, fully responsive WooCommerce e-commerce WordPress theme designed for multi-category shopping marketplaces.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexbuying
Tags: e-commerce, woocommerce, grid-layout, custom-header, custom-menu, responsive-layout, featured-images
*/

/* Reset & Root Variables */
:root {
    --primary-color: #131921;
    --secondary-color: #232F3E;
    --accent-color: #FF9900;
    --btn-color: #FFD814;
    --btn-hover: #F7CA00;
    --bg-color: #F5F6F7;
    --white: #FFFFFF;
    --text-color: #222222;
    --sale-price: #B12704;
    --border-color: #DDD;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 6px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Announcement Bar */
.announcement-bar {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 13px;
    padding: 8px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Main Header */
.site-header {
    background-color: var(--secondary-color);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 20px;
}

.site-logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--white);
}

.site-logo span {
    color: var(--accent-color);
}

.header-search {
    flex: 1;
    max-width: 600px;
}

.header-search form {
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
}

.header-search input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: none;
    outline: none;
    font-size: 14px;
}

.header-search button {
    background-color: var(--accent-color);
    border: none;
    padding: 0 20px;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: bold;
    transition: var(--transition);
}

.header-search button:hover {
    background-color: var(--btn-hover);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.header-action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--white);
}

.header-action-item:hover {
    color: var(--accent-color);
}

.cart-icon-wrapper {
    position: relative;
    background-color: rgba(255,255,255,0.1);
    padding: 8px 14px;
    border-radius: var(--radius);
}

.cart-count {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 12px;
    margin-left: 4px;
}

/* Primary Navigation */
.nav-wrapper {
    background-color: var(--primary-color);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 25px;
    padding: 10px 0;
}

.main-navigation a {
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.main-navigation a:hover {
    color: var(--accent-color);
}

/* Mobile Nav Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #131921 0%, #232F3E 100%);
    color: var(--white);
    padding: 60px 0;
    margin-bottom: 40px;
    border-radius: 0 0 var(--radius) var(--radius);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero-text h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-text p {
    font-size: 18px;
    color: #CCC;
    margin-bottom: 25px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--btn-color);
    color: var(--primary-color);
    padding: 12px 28px;
    font-weight: bold;
    border-radius: 20px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
}

/* Sections & Grids */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: var(--white);
    padding: 20px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.category-card h3 {
    font-size: 16px;
    margin-top: 10px;

}

/* Product Cards Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    padding: 15px;
}

.product-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--sale-price);
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
}

.product-thumb {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.product-thumb img {
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-thumb img {
    transform: scale(1.05);
}

.product-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    height: 40px;
    overflow: hidden;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.product-price del {
    font-size: 14px;
    color: #888;
    margin-right: 6px;
}

.product-price ins {
    text-decoration: none;
    color: var(--sale-price);
}

.product-card .button, .add-to-cart-btn {
    width: 100%;
    text-align: center;
    background-color: var(--btn-color);
    color: var(--primary-color);
    font-weight: bold;
    padding: 8px 12px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
    display: block;
}

.product-card .button:hover, .add-to-cart-btn:hover {
    background-color: var(--btn-hover);
}

/* Newsletter */
.newsletter-section {
    background: var(--secondary-color);
    color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    margin: 50px 0;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 20px auto 0 auto;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border-radius: var(--radius);
    border: none;
    outline: none;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px 0;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h4 {
    color: var(--accent-color);
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 8px;
    font-size: 14px;
}

.footer-widget a {
    color: #CCC;
    transition: var(--transition);
}

.footer-widget a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: #888;
}

/* Page Layouts & WooCommerce Tweaks */
.page-content-wrapper {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.woocommerce-notice {
    background-color: #e5f5ea;
    border-left: 4px solid #2e7d32;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: var(--radius);
}

/* Scroll to top button */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    display: none;
    z-index: 999;
}

/* Responsive */
@media (max-width: 768px) {
    .header-main {
        flex-wrap: wrap;
    }
    .header-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    .hero-content {
        grid-template-columns: 1fr;
    }
    .mobile-toggle {
        display: block;
    }
    .main-navigation {
        display: none;
        width: 100%;
    }
    .main-navigation.active {
        display: block;
    }
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
    }
}
