/*
Theme Name: RastChin Shop
Theme URI: https://rastchin.com
Author: RastChin
Author URI: https://rastchin.com
Description: قالب فروشگاهی حرفه‌ای راستچین با پشتیبانی از ووکامرس و المنتور
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
WC requires at least: 7.0
WC tested up to: 8.5
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rastchin-shop
Tags: e-commerce, woocommerce, elementor, rtl, right-to-left, shop, store
*/

/* =============================================
   متغیرهای پایه
   ============================================= */
:root {
    --rc-primary:       #E63946;
    --rc-primary-dark:  #C1121F;
    --rc-secondary:     #1D3557;
    --rc-accent:        #F4A261;
    --rc-bg:            #F8F9FA;
    --rc-surface:       #FFFFFF;
    --rc-border:        #E9ECEF;
    --rc-text:          #212529;
    --rc-text-muted:    #6C757D;
    --rc-radius:        8px;
    --rc-radius-lg:     14px;
    --rc-shadow:        0 2px 12px rgba(0,0,0,.08);
    --rc-shadow-hover:  0 6px 24px rgba(0,0,0,.14);
    --rc-transition:    all .22s ease;
    --rc-font:          'Vazirmatn', 'Tahoma', sans-serif;
    --rc-header-h:      70px;
}

/* =============================================
   ریست و پایه
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    direction: rtl;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--rc-font);
    color: var(--rc-text);
    background: var(--rc-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--rc-primary); text-decoration: none; transition: var(--rc-transition); }
a:hover { color: var(--rc-primary-dark); }

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

ul { list-style: none; }

/* =============================================
   کانتینر
   ============================================= */
.rc-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================================
   هدر
   ============================================= */
.rc-header {
    background: var(--rc-surface);
    border-bottom: 1px solid var(--rc-border);
    height: var(--rc-header-h);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.rc-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 24px;
}

/* لوگو */
.rc-header__logo img { height: 44px; width: auto; }
.rc-header__logo span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rc-secondary);
    letter-spacing: -1px;
}
.rc-header__logo span em { color: var(--rc-primary); font-style: normal; }

/* منو */
.rc-nav { display: flex; align-items: center; gap: 6px; }
.rc-nav a {
    color: var(--rc-text);
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--rc-radius);
    font-size: .95rem;
}
.rc-nav a:hover,
.rc-nav a.active { background: var(--rc-bg); color: var(--rc-primary); }

/* ابزارهای هدر */
.rc-header__tools { display: flex; align-items: center; gap: 16px; }

.rc-search-bar {
    display: flex;
    align-items: center;
    background: var(--rc-bg);
    border: 1px solid var(--rc-border);
    border-radius: 50px;
    overflow: hidden;
    width: 260px;
    transition: var(--rc-transition);
}
.rc-search-bar:focus-within {
    border-color: var(--rc-primary);
    box-shadow: 0 0 0 3px rgba(230,57,70,.12);
    width: 300px;
}
.rc-search-bar input {
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-family: var(--rc-font);
    font-size: .9rem;
    width: 100%;
    outline: none;
    direction: rtl;
    color: var(--rc-text);
}
.rc-search-bar button {
    border: none;
    background: var(--rc-primary);
    color: #fff;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--rc-transition);
}
.rc-search-bar button:hover { background: var(--rc-primary-dark); }

/* دکمه سبد */
.rc-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--rc-secondary);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 600;
}
.rc-cart-btn:hover { background: var(--rc-primary); color: #fff !important; }
.rc-cart-btn .rc-badge {
    background: var(--rc-primary);
    color: #fff;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: .7rem;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

/* =============================================
   فوتر
   ============================================= */
.rc-footer {
    background: var(--rc-secondary);
    color: rgba(255,255,255,.85);
    padding: 60px 0 0;
    margin-top: 60px;
    font-size: .93rem;
}

.rc-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.rc-footer__logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
    display: block;
}
.rc-footer__logo em { color: var(--rc-accent); font-style: normal; }

.rc-footer__desc { line-height: 1.8; color: rgba(255,255,255,.65); margin-bottom: 20px; }

.rc-footer__social { display: flex; gap: 10px; }
.rc-footer__social a {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: var(--rc-transition);
}
.rc-footer__social a:hover { background: var(--rc-primary); }

.rc-footer__title {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255,255,255,.1);
}

.rc-footer__links li { margin-bottom: 10px; }
.rc-footer__links a { color: rgba(255,255,255,.65); }
.rc-footer__links a:hover { color: var(--rc-accent); padding-right: 4px; }

.rc-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .85rem;
    color: rgba(255,255,255,.5);
    flex-wrap: wrap;
    gap: 12px;
}

.rc-footer__payment { display: flex; gap: 10px; align-items: center; }
.rc-footer__payment img { height: 28px; opacity: .7; }

/* =============================================
   محتوای اصلی
   ============================================= */
#rc-main { min-height: 60vh; }

/* =============================================
   WooCommerce پایه
   ============================================= */
.woocommerce-notices-wrapper { padding: 0 0 20px; }

.wc-block-cart,
.woocommerce-cart table.cart { direction: rtl; }

/* =============================================
   ریسپانسیو
   ============================================= */
@media (max-width: 1024px) {
    .rc-footer__grid { grid-template-columns: 1fr 1fr; }
    .rc-search-bar { width: 200px; }
    .rc-search-bar:focus-within { width: 240px; }
}

@media (max-width: 768px) {
    .rc-nav { display: none; }
    .rc-footer__grid { grid-template-columns: 1fr; gap: 28px; }
    :root { --rc-header-h: 60px; }
}
