/*
Theme Name: Pintomar Mobile
Theme URI: https://pintomar.com
Author: Pintomar Team
Author URI: https://pintomar.com
Description: A lightweight, mobile-first WooCommerce theme with OTP authentication and RTL support
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pintomar-mobile
Tags: e-commerce, rtl-language-support, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* --- 1. DESIGN TOKENS (VARIABLES) --- */
:root {
    /* Brand Colors */
    --color-primary-green: #21AA58;
    --color-brand-orange: #FF5722;
    --color-accent-blue: #0084FF;

    /* Neutral Colors */
    --color-text-main: #212121;
    --color-text-secondary: #757575;
    --color-text-disabled: #BDBDBD;
    --color-bg-body: #FAFAFA;
    --color-bg-white: #FFFFFF;
    --color-border: #EEEEEE;

    /* Typography */
    --font-family-base: 'IranSans', 'IranYekan', 'Vazirmatn', sans-serif;
    --font-size-xs: 0.6875em;  /* 11px */
    --font-size-sm: 0.8125em;  /* 13px */
    --font-size-md: 0.9375em;  /* 15px */
    --font-size-lg: 1.125em;   /* 18px */
    --font-size-xl: 1.375em;   /* 22px */

    /* Spacing & Layout */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --box-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);

    /* Legacy compatibility */
    --primary: var(--color-text-main);
    --secondary: #f4f4f5;
    --secondary-text: var(--color-text-secondary);
    --accent: var(--color-accent-blue);
    --danger: var(--color-brand-orange);
    --success: var(--color-primary-green);
    --bg-body: var(--color-bg-white);
    --bg-surface: var(--color-bg-body);
    --radius-full: 9999px;
    --bottom-nav-height: 60px;
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    margin: 0;
    padding: 0;
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    line-height: 1.6;
    direction: rtl;
    font-size: 16px;
}

h1, h2, h3 { 
    margin-top: 0; 
    font-weight: 800; 
    letter-spacing: -0.5px; 
}

p { 
    color: var(--secondary-text); 
    margin-bottom: 1rem; 
}

a {
    color: var(--primary);
    text-decoration: none;
}

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

/* --- 2. BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: var(--font-size-md);
    border: none;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s ease, transform 0.1s ease;
    margin-bottom: 10px;
    text-decoration: none;
    gap: 8px;
}

.btn:active { 
    transform: scale(0.98); 
}

.btn-primary,
button.btn-primary,
.button.btn-primary,
.add-to-cart-btn {
    background-color: var(--color-brand-orange) !important;
    color: #fff !important;
}

.btn-secondary,
button.btn-secondary,
.button.btn-secondary {
    background-color: var(--color-primary-green) !important;
    color: #fff !important;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

/* --- 3. PRODUCT GRID --- */
/* Moved to assets/css/woocommerce.css */

/* --- 4. BOTTOM NAVIGATION --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    background: var(--color-bg-white);
    display: flex;
    justify-content: space-around;
    padding-bottom: var(--safe-area-bottom);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--box-shadow-card);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-disabled);
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-decoration: none;
    gap: 4px;
    transition: color 0.2s;
}

.nav-item.active { 
    color: var(--color-primary-green); 
}
.nav-item.home {
    color: var(--color-primary-green);
}

.nav-item .icon {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: 8px;
    background: var(--color-brand-orange);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* --- 5. HEADER --- */
.site-header {
    background: var(--color-bg-white);
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-title {
    font-weight: 800;
    font-size: 20px;
    margin: 0;
    flex-shrink: 0;
}

.header-search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg-body);
    font-size: var(--font-size-sm);
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

div.cart-controls > div > input.qty {
    width: 30px;
    border: #eeeeee 1px;
    background: #f5f5f5;
    text-align: center;
    font-family: Vazirmatn, "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
    font-size: 16px;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 20px;
    stroke: var(--color-text-disabled);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    pointer-events: none;
}

/* --- 6. CONTENT AREA --- */
.site-content {
    padding: 0;
    min-height: 50vh;
}

.site-content.page-content {
    padding: 15px;
}