/* ============================================================
   RESET & VARIABLES
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --g-dark:    #155a29;
    --g-main:    #27833f;
    --g-light:   #4caf50;
    --g-pale:    #e8f5e9;
    --g-xpale:   #f1f8f2;
    --yellow:    #f5c518;
    --yellow-d:  #d4a017;
    --orange:    #ff9800;
    --red:       #e53935;
    --blue:      #1976d2;
    --white:     #ffffff;
    --gray-50:   #fafafa;
    --gray-100:  #f4f4f4;
    --gray-200:  #e8e8e8;
    --gray-400:  #bdbdbd;
    --gray-600:  #757575;
    --gray-800:  #2d2d2d;
    --shadow-xs: 0 1px 4px rgba(0,0,0,.07);
    --shadow-sm: 0 2px 10px rgba(0,0,0,.09);
    --shadow-md: 0 6px 24px rgba(0,0,0,.12);
    --shadow-lg: 0 12px 48px rgba(0,0,0,.16);
    --r:         12px;
    --r-lg:      20px;
    --t:         .25s ease;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.75;
    font-size: 15px;
}

/* Bootstrap override برای RTL */
.form-control,
.form-select {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    border-radius: 9px;
    border: 2px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-800);
    font-size: .9rem;
    padding: 11px 14px;
    transition: border-color var(--t), background var(--t);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--g-main);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(39,131,63,.15);
}
.form-label {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: .85rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: 700;
    border-radius: 8px;
    transition: all var(--t);
    border-width: 2px;
}
.btn-primary {
    background: var(--g-main);
    border-color: var(--g-main);
    color: #fff;
}
.btn-primary:hover {
    background: var(--g-dark);
    border-color: var(--g-dark);
    transform: translateY(-1px);
    color: #fff;
}
.btn-yellow {
    background: var(--yellow);
    border-color: var(--yellow);
    color: #333;
}
.btn-yellow:hover {
    background: var(--yellow-d);
    border-color: var(--yellow-d);
    color: #333;
}
.btn-outline {
    background: transparent;
    border-color: var(--g-main);
    color: var(--g-main);
}
.btn-outline:hover {
    background: var(--g-pale);
    color: var(--g-main);
    border-color: var(--g-main);
}
.btn-ghost {
    background: transparent;
    border-color: var(--gray-200);
    color: var(--gray-600);
}
.btn-ghost:hover {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-600);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar { padding: 10px 0; }
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
}
.logo-badge {
    width: 30px; height: 30px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-weight: 900; font-size: .88rem;
}
.logo-n { background: var(--g-main); color: #fff; }
.logo-k { background: var(--yellow); color: #333; }
.logo-text { color: var(--g-dark); font-size: .95rem; }
.nav-link {
    padding: 8px 14px !important;
    border-radius: 8px;
    color: var(--gray-800) !important;
    font-weight: 500;
    font-size: .9rem;
    transition: all var(--t);
}
.nav-link:hover, .nav-link.active {
    background: var(--g-pale);
    color: var(--g-main) !important;
}
.nav-phone { font-size: .85rem; color: var(--g-main); font-weight: 600; text-decoration: none; }
.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,.15);
    background: rgba(255,255,255,.97) !important;
    backdrop-filter: blur(8px);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background: linear-gradient(135deg, #0d4a20 0%, var(--g-main) 55%, #3dab56 100%);
    position: relative;
    overflow: hidden;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.06) 0%, transparent 60%);
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.18);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,.3);
}
.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 18px;
}
.hero-highlight {
    color: var(--yellow);
    text-shadow: 0 2px 12px rgba(245,197,24,.4);
}
.hero-desc { color: rgba(255,255,255,.85); font-size: 1rem; }
.hero-stats { border-top: 1px solid rgba(255,255,255,.2); }
.stat-num   { font-size: 1.6rem; font-weight: 800; color: var(--yellow); }
.stat-label { font-size: .8rem; color: rgba(255,255,255,.75); }

.hero-img-wrap {
    width: 280px; height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,.3);
    box-shadow: var(--shadow-lg);
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
}
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-fallback { font-size: 6rem; }
.floating-card {
    position: absolute;
    background: var(--white);
    border-radius: 10px;
    padding: 10px 16px;
    box-shadow: var(--shadow-md);
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    display: flex; gap: 6px; align-items: center;
    animation: floatY 3s ease-in-out infinite;
}
.fc-1 { top: 20px;    left: -60px; animation-delay: 0s; }
.fc-2 { bottom: 30px; left: -80px; animation-delay: 1.5s; }
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
.trust-bar { background: rgba(0,0,0,.25); }
.trust-item { color: rgba(255,255,255,.9); font-size: .85rem; font-weight: 500; }
.trust-sep  { color: rgba(255,255,255,.35); font-size: 1.2rem; }

/* ============================================================
   FEATURES
   ============================================================ */
.feature-card {
    border-radius: var(--r-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--gray-200);
    transition: all var(--t);
    background: var(--gray-50);
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--g-light);
}
.feature-card--accent {
    background: linear-gradient(145deg, var(--g-main), var(--g-dark));
    border-color: transparent;
    color: #fff;
}
.feature-icon-wrap { font-size: 2.8rem; margin-bottom: 18px; }
.feature-card h3   { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.feature-card p    { font-size: .9rem; color: var(--gray-600); line-height: 1.8; }
.feature-card--accent p { color: rgba(255,255,255,.8); }
.feature-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--g-main);
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    transition: color var(--t);
}
.feature-link:hover       { color: var(--g-dark); }
.feature-link--light      { color: rgba(255,255,255,.9); }
.feature-link--light:hover{ color: #fff; }

/* ============================================================
   TOOL CARDS
   ============================================================ */
.main-tools { background: var(--g-xpale); }
.tool-card {
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
.tool-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--g-pale);
}
.tool-header-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--g-pale);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.tool-header h2 { font-size: 1.15rem; font-weight: 700; color: var(--g-dark); margin-bottom: 4px; }
.tool-header p  { font-size: .85rem; color: var(--gray-600); margin: 0; }

/* Quick questions */
.quick-questions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.qq-label { font-size: .8rem; color: var(--gray-600); font-weight: 600; }
.qq-btn {
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--g-pale);
    border: 1px solid var(--g-light);
    color: var(--g-dark);
    font-size: .8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--t);
}
.qq-btn:hover { background: var(--g-light); color: #fff; }

/* Clinic textarea */
.textarea-wrap   { position: relative; }
.clinic-textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    background: var(--gray-50) !important;
}
.char-count {
    position: absolute;
    bottom: 10px; left: 12px;
    font-size: .75rem;
    color: var(--gray-400);
}
.clinic-response {
    background: var(--g-pale);
    border-radius: 10px;
    padding: 16px;
    border-right: 4px solid var(--g-main);
}
.response-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.response-icon { font-size: 1.2rem; }
.response-footer small { color: var(--gray-600); font-size: .8rem; }

/* Soil test */
.soil-test-section {
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}
.soil-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gray-100);
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    color: var(--gray-800);
    transition: background var(--t);
}
.soil-test-header:hover { background: var(--g-pale); }
.toggle-icon { font-size: 1.2rem; font-weight: 700; color: var(--g-main); }
.soil-test-body { display: none; padding: 16px; background: var(--white); }
.soil-test-body.open { display: block; }
.soil-test-hint { font-size: .82rem; color: var(--gray-600); margin-bottom: 12px; }

/* Calc result */
.calc-result {
    background: var(--g-pale);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(39,131,63,.2);
}
.calc-result h4 { font-size: .9rem; color: var(--g-dark); }
.rbi-track {
    height: 10px;
    background: var(--gray-200);
    border-radius: 5px;
    overflow: hidden;
}
.rbi-fill {
    height: 100%;
    border-radius: 5px;
    transition: width .8s ease;
}
.rbi-fill--n { background: linear-gradient(to right, #66bb6a, #2e7d32); }
.rbi-fill--p { background: linear-gradient(to right, #ffee58, #f9a825); }
.rbi-fill--k { background: linear-gradient(to right, #42a5f5, #1565c0); }

.recommended-fertilizers {
    background: var(--white);
    border-radius: 10px;
    padding: 16px;
}
.recommended-fertilizers h5 { font-size: .88rem; color: var(--g-dark); }
.rf-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: .85rem;
    border: 1px solid var(--gray-200);
}
.rf-name   { color: var(--gray-800); font-weight: 500; }
.rf-amount { font-weight: 800; color: var(--g-main); font-size: .95rem; }

/* ============================================================
   CATEGORIES
   ============================================================ */
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--g-dark);
    margin-bottom: 8px;
    display: inline-block;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px; height: 4px;
    background: var(--g-main);
    border-radius: 2px;
    margin: 8px auto 0;
}
.section-title--right::after { margin: 8px 0 0; }
.section-sub { color: var(--gray-600); font-size: .9rem; }

.cat-card {
    background: var(--white);
    border-radius: var(--r);
    border: 2px solid var(--gray-200);
    text-decoration: none;
    transition: all var(--t);
    gap: 6px;
}
.cat-card:hover {
    border-color: var(--g-main);
    background: var(--g-pale);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.cat-icon  { font-size: 2rem; }
.cat-name  { font-size: .82rem; font-weight: 700; color: var(--gray-800); }
.cat-count { font-size: .75rem; }

/* ============================================================
   PRODUCTS
   ============================================================ */
.product-card {
    background: var(--gray-50);
    border-radius: var(--r);
    overflow: hidden;
    border: 2px solid var(--gray-200);
    transition: all var(--t);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    border-color: var(--g-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.product-badge {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 800;
}
.badge--green  { background: var(--g-main); color: #fff; }
.badge--red    { background: var(--red);    color: #fff; }
.badge--blue   { background: var(--blue);   color: #fff; }
.badge--yellow { background: var(--yellow); color: #333; }

.product-img {
    height: 130px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}
.product-img img { max-height: 110px; object-fit: contain; }
.product-img-ph  { font-size: 3.5rem; }
.product-info h4 { font-size: .88rem; font-weight: 700; }
.product-desc    { font-size: .78rem; color: var(--gray-600); line-height: 1.6; }
.product-rating  { display: flex; align-items: center; gap: 4px; }
.star--full  { color: var(--yellow); font-size: .9rem; }
.star--half  { color: var(--yellow); opacity: .6; font-size: .9rem; }
.star--empty { color: var(--gray-400); font-size: .9rem; }
.rating-num  { font-size: .78rem; font-weight: 700; color: var(--gray-800); }
.sold-count  { font-size: .75rem; color: var(--gray-600); }
.price-old   { font-size: .75rem; color: var(--gray-400); text-decoration: line-through; }
.price-main  { font-size: .88rem; font-weight: 800; color: var(--g-dark); }

/* ============================================================
   CONSULTATION CARD
   ============================================================ */
.consultation-card {
    background: linear-gradient(145deg, var(--g-dark), #0d3a1a);
    border-radius: var(--r-lg);
    padding: 28px;
    color: #fff;
    box-shadow: var(--shadow-md);
}
.consult-header { border-bottom: 1px solid rgba(255,255,255,.15); }
.consult-icon   { font-size: 2.4rem; margin-bottom: 8px; }
.consult-header h3 { font-size: 1.1rem; font-weight: 800; }
.consult-header p  { font-size: .85rem; color: rgba(255,255,255,.7); }
.form-label--light { color: rgba(255,255,255,.9) !important; }
.input-field--dark {
    background: rgba(255,255,255,.12) !important;
    border-color: rgba(255,255,255,.2) !important;
    color: #fff !important;
}
.input-field--dark::placeholder { color: rgba(255,255,255,.5); }
.input-field--dark:focus {
    background: rgba(255,255,255,.18) !important;
    border-color: var(--yellow) !important;
    box-shadow: 0 0 0 3px rgba(245,197,24,.2) !important;
}
.select-field--dark {
    background: rgba(255,255,255,.12) !important;
    border-color: rgba(255,255,255,.2) !important;
    color: #fff !important;
}
.select-field--dark option { background: var(--g-dark); color: #fff; }
.select-field--dark:focus {
    border-color: var(--yellow) !important;
    box-shadow: 0 0 0 3px rgba(245,197,24,.2) !important;
}
.consult-direct  { border-top: 1px solid rgba(255,255,255,.15); }
.consult-direct p { font-size: .8rem; color: rgba(255,255,255,.6); }
.consult-phone-link { color: var(--yellow); font-size: 1rem; font-weight: 800; text-decoration: none; }
.success-msg {
    text-align: center;
    padding: 24px;
    background: rgba(255,255,255,.15);
    border-radius: 10px;
    font-size: .95rem;
    line-height: 1.8;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 28px; left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}
.toast {
    background: var(--g-dark);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: .88rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: slideUp .3s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #1a1a1a; color: rgba(255,255,255,.8); }
.footer-brand p       { font-size: .88rem; color: rgba(255,255,255,.55); line-height: 1.8; }
.footer-col-title     { color: var(--g-light); font-size: .95rem; font-weight: 700; margin-bottom: 16px; }
.footer ul li a,
.footer p a           { color: rgba(255,255,255,.6); text-decoration: none; font-size: .88rem; transition: color var(--t); }
.footer ul li a:hover,
.footer p a:hover     { color: var(--g-light); }
.footer-bottom        { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom p      { font-size: .82rem; color: rgba(255,255,255,.4); }
.footer-bottom a      { font-size: .82rem; color: rgba(255,255,255,.4); text-decoration: none; transition: color var(--t); }
.footer-bottom a:hover{ color: var(--g-light); }

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 992px) {
    .hero-title { font-size: 2rem; }
}
@media (max-width: 576px) {
    .hero-title   { font-size: 1.7rem; }
    .trust-item   { font-size: .78rem; }
    .tool-card    { padding: 20px; }
    .feature-card { padding: 24px 18px; }
}
