/*
Theme Name: Aaima
Theme URI: https://nasir.fr/aaima
Author: Nasir Mehmood
Author URI: https://nasir.fr
Description: A professional, marketplace-style WooCommerce WordPress theme built for modern online stores. Fully compatible with Elementor and featuring AJAX-powered functionality, mega menus, product comparison, wishlist tools, and seamless page builder integration.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aaima
Tags: woocommerce, e-commerce, page-builder-friendly, elementor, full-width-template, custom-header, custom-menu, featured-images, rtl-language-support, translation-ready

Aaima is a powerful marketplace-style WooCommerce theme designed for maximum compatibility with page builders while maintaining exceptional standalone functionality.
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ========================================================================== */
:root {
    /* Primary Colors - Amazon-inspired */
    --aaima-primary: #131921;
    --aaima-primary-light: #232f3e;
    --aaima-secondary: #febd69;
    --aaima-accent: #ff9900;
    --aaima-accent-hover: #ff8000;
    
    /* Text Colors */
    --aaima-text: #0f1111;
    --aaima-text-light: #565959;
    --aaima-text-muted: #767676;
    --aaima-link: #007185;
    --aaima-link-hover: #c7511f;
    
    /* Background Colors */
    --aaima-bg: #ffffff;
    --aaima-bg-light: #f5f5f5;
    --aaima-bg-gray: #eaeded;
    --aaima-bg-dark: #37475a;
    
    /* Status Colors */
    --aaima-success: #067d62;
    --aaima-error: #c40000;
    --aaima-warning: #ffa41c;
    --aaima-info: #007185;
    
    /* Border Colors */
    --aaima-border: #ddd;
    --aaima-border-light: #e7e7e7;
    --aaima-border-dark: #888;
    
    /* Spacing */
    --aaima-spacing-xs: 0.25rem;
    --aaima-spacing-sm: 0.5rem;
    --aaima-spacing-md: 1rem;
    --aaima-spacing-lg: 1.5rem;
    --aaima-spacing-xl: 2rem;
    --aaima-spacing-2xl: 3rem;
    
    /* Typography */
    --aaima-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --aaima-font-size-xs: 0.75rem;
    --aaima-font-size-sm: 0.875rem;
    --aaima-font-size-base: 1rem;
    --aaima-font-size-lg: 1.125rem;
    --aaima-font-size-xl: 1.25rem;
    --aaima-font-size-2xl: 1.5rem;
    --aaima-font-size-3xl: 1.875rem;
    
    /* Border Radius */
    --aaima-radius-sm: 4px;
    --aaima-radius-md: 8px;
    --aaima-radius-lg: 12px;
    --aaima-radius-full: 9999px;
    
    /* Shadows */
    --aaima-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --aaima-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --aaima-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --aaima-shadow-card: 0 2px 5px 0 rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --aaima-transition: all 0.3s ease;
    --aaima-transition-fast: all 0.15s ease;
    
    /* Z-index */
    --aaima-z-dropdown: 1000;
    --aaima-z-sticky: 1020;
    --aaima-z-modal: 1050;
    --aaima-z-tooltip: 1070;
    
    /* Container */
    --aaima-container-max: 1500px;
    --aaima-container-padding: 15px;
    
    /* Header & Navigation */
    --aaima-header-bg: #131921;
    --aaima-nav-bg: #232f3e;
    
    /* Footer */
    --aaima-footer-bg: #232f3e;
    --aaima-footer-text: #dddddd;
    --aaima-footer-link: #dddddd;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --aaima-bg: #0f1111;
    --aaima-bg-light: #1a1a1a;
    --aaima-bg-gray: #232323;
    --aaima-text: #e7e7e7;
    --aaima-text-light: #b7b7b7;
    --aaima-border: #3d3d3d;
    --aaima-border-light: #2d2d2d;
}

/* ==========================================================================
   BASE RESET & TYPOGRAPHY
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--aaima-font-family);
    font-size: var(--aaima-font-size-base);
    line-height: 1.6;
    color: var(--aaima-text);
    background-color: var(--aaima-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
    color: var(--aaima-link);
    text-decoration: none;
    transition: var(--aaima-transition-fast);
}

a:hover,
a:focus {
    color: var(--aaima-link-hover);
    text-decoration: underline;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--aaima-spacing-md);
    font-weight: 600;
    line-height: 1.3;
    color: var(--aaima-text);
}

h1 { font-size: var(--aaima-font-size-3xl); }
h2 { font-size: var(--aaima-font-size-2xl); }
h3 { font-size: var(--aaima-font-size-xl); }
h4 { font-size: var(--aaima-font-size-lg); }
h5 { font-size: var(--aaima-font-size-base); }
h6 { font-size: var(--aaima-font-size-sm); }

p {
    margin: 0 0 var(--aaima-spacing-md);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */
.aaima-container {
    width: 100%;
    max-width: var(--aaima-container-max);
    margin: 0 auto;
    padding: 0 var(--aaima-container-padding);
}

.aaima-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--aaima-container-padding) * -1);
}

.aaima-col {
    flex: 1;
    padding: 0 var(--aaima-container-padding);
}

/* Grid System */
.aaima-grid {
    display: grid;
    gap: var(--aaima-spacing-lg);
}

.aaima-grid-2 { grid-template-columns: repeat(2, 1fr); }
.aaima-grid-3 { grid-template-columns: repeat(3, 1fr); }
.aaima-grid-4 { grid-template-columns: repeat(4, 1fr); }
.aaima-grid-5 { grid-template-columns: repeat(5, 1fr); }
.aaima-grid-6 { grid-template-columns: repeat(6, 1fr); }

/* ==========================================================================
   PAGE LAYOUTS - Sidebar & Full Width
   ========================================================================== */

/* Container with sidebar */
.aaima-with-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aaima-spacing-xl, 30px);
    padding-top: var(--aaima-spacing-xl, 30px);
    padding-bottom: var(--aaima-spacing-xl, 30px);
}

.aaima-with-sidebar .aaima-content-area {
    flex: 1;
    min-width: 0;
}

.aaima-with-sidebar .aaima-sidebar,
.aaima-with-sidebar .widget-area {
    width: 300px;
    flex-shrink: 0;
}

/* Full width container - no sidebar */
.aaima-fullwidth {
    padding-top: var(--aaima-spacing-xl, 30px);
    padding-bottom: var(--aaima-spacing-xl, 30px);
}

.aaima-fullwidth .aaima-content-area {
    width: 100%;
}

.aaima-fullwidth .aaima-content-area.fullwidth {
    max-width: 100%;
}

/* Hide sidebar on full width pages */
.aaima-fullwidth .aaima-sidebar,
.aaima-fullwidth .widget-area {
    display: none !important;
}

/* No sidebar body class - hide sidebar everywhere */
body.no-sidebar .aaima-sidebar,
body.no-sidebar .widget-area,
body.no-sidebar #secondary {
    display: none !important;
}

body.no-sidebar .aaima-container {
    display: block;
}

body.no-sidebar .aaima-content-area,
body.no-sidebar .site-main,
body.no-sidebar #primary {
    width: 100%;
    max-width: 100%;
    flex: none;
}

/* WooCommerce specific pages - full width */
.woocommerce-cart .aaima-container,
.woocommerce-checkout .aaima-container,
.woocommerce-account .aaima-container {
    display: block;
}

.woocommerce-cart .aaima-sidebar,
.woocommerce-checkout .aaima-sidebar,
.woocommerce-account .aaima-sidebar,
.woocommerce-cart .widget-area,
.woocommerce-checkout .widget-area,
.woocommerce-account .widget-area,
.woocommerce-cart #secondary,
.woocommerce-checkout #secondary,
.woocommerce-account #secondary {
    display: none !important;
}

.woocommerce-cart .site-main,
.woocommerce-checkout .site-main,
.woocommerce-account .site-main {
    width: 100%;
    max-width: 100%;
}

/* Cart page layout */
body.woocommerce-cart .aaima-cart-page {
    max-width: 100%;
}

/* Checkout page layout */
body.woocommerce-checkout .woocommerce-checkout {
    max-width: 100%;
}

/* Contact page */
.page-template-default.page-id-contact .aaima-sidebar,
.page-template-default.page-id-contact .widget-area,
body.contact .aaima-sidebar,
body.contact .widget-area {
    display: none !important;
}

/* Responsive sidebar */
@media (max-width: 992px) {
    .aaima-with-sidebar {
        flex-direction: column;
    }
    
    .aaima-with-sidebar .aaima-sidebar,
    .aaima-with-sidebar .widget-area {
        width: 100%;
        order: 2;
    }
    
    .aaima-with-sidebar .aaima-content-area {
        order: 1;
    }
}

/* Sidebar widget styling */
.aaima-sidebar .widget,
.widget-area .widget {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: var(--aaima-radius-md, 8px);
    padding: var(--aaima-spacing-md, 1rem);
    margin-bottom: var(--aaima-spacing-md, 1rem);
}

.aaima-sidebar .widget-title,
.widget-area .widget-title,
.aaima-sidebar .wp-block-heading,
.widget-area .wp-block-heading {
    font-size: var(--aaima-font-size-lg, 18px);
    font-weight: 700;
    margin-bottom: var(--aaima-spacing-md, 15px);
    padding-bottom: var(--aaima-spacing-sm, 10px);
    border-bottom: 2px solid var(--aaima-accent, #ff9900);
}

.aaima-sidebar .widget ul,
.widget-area .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aaima-sidebar .widget ul li,
.widget-area .widget ul li {
    padding: var(--aaima-spacing-xs, 5px) 0;
    border-bottom: 1px solid #f0f0f0;
}

.aaima-sidebar .widget ul li:last-child,
.widget-area .widget ul li:last-child {
    border-bottom: none;
}

.aaima-sidebar .widget ul li a,
.widget-area .widget ul li a {
    color: var(--aaima-text, #111);
    text-decoration: none;
    transition: color 0.2s ease;
}

.aaima-sidebar .widget ul li a:hover,
.widget-area .widget ul li a:hover {
    color: var(--aaima-link-hover, #c7511f);
}
