/*
Theme Name: BizMall Theme
Theme URI: https://venmiga.com
Author: Edidiong Udoh
Author URI: https://venmiga.com
Description: A modern e-commerce marketplace theme compatible with Elementor and BizMall Plugin - Inspired by Jiji
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: bizmall-theme
Tags: e-commerce, marketplace, elementor, responsive, custom-menu, featured-images
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles - Jiji Inspired Green Header */
.site-header {
    background: var(--bizmall-primary, #00a651);
    position: sticky !important;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

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

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.header-tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
}

.header-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
}

.header-icon .notification-badge,
.header-icon .cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--bizmall-accent, #ff6b35);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.header-icon .notification-badge {
    background: #ff4444;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.btn-sell {
    background: var(--bizmall-accent, #ff6b35);
    color: #fff;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.btn-sell:hover {
    background: var(--bizmall-accent, #ff6b35);
    opacity: 0.9;
}

/* Search Section */
.search-section {
    background: var(--bizmall-primary, #00a651);
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-question {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
}

.search-bar {
    display: flex;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.location-dropdown {
    padding: 12px 20px;
    background: #f5f5f5;
    border: none;
    border-right: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 14px;
    outline: none;
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    padding: 12px 24px;
    background: var(--bizmall-primary, #00a651);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search-button:hover {
    background: var(--bizmall-secondary, #008f45);
}

.search-button svg {
    width: 20px;
    height: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-primary {
    background: var(--bizmall-primary, #00a651);
    color: #fff;
}

.btn-primary:hover {
    background: var(--bizmall-secondary, #008f45);
}

/* Main Content Layout */
.main-content-wrapper {
    display: flex;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Categories Sidebar */
.categories-sidebar {
    width: 280px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.categories-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: color 0.3s;
}

.category-item:hover {
    color: var(--bizmall-primary, #00a651);
}

.category-item:last-child {
    border-bottom: none;
}

.category-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    font-size: 20px;
}

.category-name {
    flex: 1;
    font-size: 14px;
}

.category-count {
    color: #999;
    font-size: 12px;
}

.category-arrow {
    color: #ccc;
    font-size: 12px;
}

/* Products Area */
.products-area {
    flex: 1;
}

.page-header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.view-options {
    display: flex;
    gap: 10px;
    align-items: center;
}

.view-icon {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.view-icon.active {
    background: var(--bizmall-primary, #00a651);
    color: #fff;
    border-color: var(--bizmall-primary, #00a651);
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Product Grid - Jiji Style */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid transparent;
    position: relative;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-left-color: var(--bizmall-primary, #00a651);
}

.product-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badge {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge.verified {
    background: var(--bizmall-primary, #00a651);
}

.badge.popular {
    background: var(--bizmall-accent, #ff6b35);
}

.badge.enterprise {
    background: #4a90e2;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-info {
    padding: 15px;
}

.product-price {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.product-title {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    text-decoration: none;
    color: inherit;
}

.product-title a:hover {
    color: var(--bizmall-primary, #00a651);
}

.product-excerpt {
    color: #666;
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.product-location {
    font-size: 12px;
    color: #999;
}

.product-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.product-tag {
    background: #f5f5f5;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

.seller-rating {
    color: #ffa500;
}

/* Product Single */
.product-single {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    margin: 40px 0;
}

.product-single-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.product-single-image {
    width: 100%;
    border-radius: 8px;
}

.product-single-info h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

.product-single-price {
    font-size: 36px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 20px;
}

.product-single-description {
    margin-top: 30px;
    line-height: 1.8;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-widget h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #fff;
}

.footer-widget p {
    color: #bdc3c7;
    line-height: 1.8;
}

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

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-widget a:hover {
    color: var(--bizmall-primary, #00a651);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    margin-top: 30px;
    color: #95a5a6;
    font-size: 14px;
}

/* Filters Sidebar */
.filters-sidebar {
    width: 280px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 10px;
}

.filter-radio {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

.filter-radio input {
    margin-right: 8px;
}

.filter-radio label {
    flex: 1;
    font-size: 13px;
    cursor: pointer;
}

.filter-count {
    color: #999;
    font-size: 12px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-clear,
.btn-save {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-save {
    background: var(--bizmall-primary, #00a651);
    color: #fff;
    border-color: var(--bizmall-primary, #00a651);
}

.btn-save:hover {
    background: var(--bizmall-secondary, #008f45);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content-wrapper {
        flex-direction: column;
    }

    .categories-sidebar,
    .filters-sidebar {
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .search-section {
        padding: 15px;
    }

    .search-bar {
        flex-direction: column;
    }

    .location-dropdown {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .product-single-header {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .main-content-wrapper {
        padding: 10px;
    }
}

/* List View */
.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
}

.products-grid.list-view .product-image-wrapper {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.products-grid.list-view .product-info {
    flex: 1;
    padding: 20px;
}

.category-item.active {
    background: #f0f9f4;
    color: var(--bizmall-primary, #00a651);
    font-weight: 600;
    border-left: 3px solid var(--bizmall-primary, #00a651);
    padding-left: 15px;
}

/* Pagination */
.pagination-wrapper .page-numbers {
    display: inline-flex;
    gap: 5px;
    list-style: none;
}

.pagination-wrapper .page-numbers li {
    display: inline-block;
}

.pagination-wrapper .page-numbers a,
.pagination-wrapper .page-numbers span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    display: inline-block;
}

.pagination-wrapper .page-numbers .current {
    background: var(--bizmall-primary, #00a651);
    color: #fff;
    border-color: var(--bizmall-primary, #00a651);
}

.pagination-wrapper .page-numbers a:hover {
    background: #f5f5f5;
}

/* Authentication Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    display: inline-block;
    font-size: 28px;
    font-weight: bold;
    color: var(--bizmall-primary, #00a651);
    text-decoration: none;
    margin-bottom: 20px;
}

.auth-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

.auth-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-form {
    margin-top: 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--bizmall-primary, #00a651);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

.auth-form small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-label a {
    color: var(--bizmall-primary, #00a651);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-password {
    color: var(--bizmall-primary, #00a651);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

.auth-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.auth-footer a {
    color: var(--bizmall-primary, #00a651);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .auth-box {
        padding: 30px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-group-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Elementor Compatibility */
.elementor-page {
    background: #fff;
}

.elementor-section {
    position: relative;
}

/* Single Product Add to Cart Improvements */
.single_add_to_cart_button {
    background-color: var(--bizmall-primary, #00a651) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 15px 30px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
    width: 100% !important;
    /* Make full width like the WhatsApp button was */
    margin-top: 10px !important;
    text-transform: uppercase !important;
}

.single_add_to_cart_button:hover {
    background-color: #008c44 !important;
    /* slightly darker green */
}

/* Quantity Input Styling */
.quantity input.qty {
    padding: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    width: 60px !important;
    margin-right: 10px !important;
    text-align: center !important;
}

/* Hide WhatsApp button if it exists with these common classes or similar */
.whatsapp-button,
.btn-whatsapp,
.whatsapp_btn {
    display: none !important;
}