/* ============================================
   RHS Plant Database - Frontend v1.2.0
   Clean, Modern, Joyful
   ============================================ */

:root {
    --green-500: #2d8a4e;
    --green-600: #1e6b38;
    --green-700: #145226;
    --beige: #f9f8f4;
    --white: #ffffff;
    --gray-50: #f8f8f5;
    --gray-100: #f0f0eb;
    --gray-200: #e2e2da;
    --gray-400: #b0b0a8;
    --gray-500: #888888;
    --gray-700: #444444;
    --gray-900: #1a1a1a;
    --orange-400: #f59e4b;
    --red-400: #e74c3c;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }

body {
    direction: rtl;
    font-family: 'IRANSans', 'Vazirmatn', 'Tahoma', sans-serif;
}

/* ============================================
   SEARCH PAGE
   ============================================ */

.rhs-search-page {
    background: linear-gradient(180deg, #f0f4ee 0%, var(--beige) 100%);
    min-height: 80vh;
}

.rhs-search-wrapper {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Hero */
.rhs-search-hero {
    text-align: center;
    padding: 80px 20px 40px;
    transition: all 0.4s ease;
}

.rhs-search-hero--compact {
    padding: 20px;
}

.rhs-search-hero-inner {
    max-width: 480px;
    margin: 0 auto;
}

.rhs-search-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.rhs-search-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.rhs-search-desc {
    font-size: 15px;
    color: var(--gray-500);
    margin: 0 0 28px;
}

/* Search Box */
.rhs-search-box {
    display: flex;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.rhs-search-box:focus-within {
    border-color: var(--green-500);
    box-shadow: 0 0 0 4px rgba(45,138,78,0.1);
}

.rhs-search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    background: transparent;
    color: var(--gray-900);
}

.rhs-search-input::placeholder {
    color: var(--gray-400);
}

.rhs-search-btn {
    width: 52px;
    min-width: 52px;
    background: var(--green-500);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.rhs-search-btn:hover {
    background: var(--green-600);
}

/* Filter Toggle */
.rhs-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 18px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: 13px;
    color: var(--gray-700);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.rhs-filter-toggle:hover {
    border-color: var(--green-500);
    color: var(--green-500);
    box-shadow: var(--shadow-sm);
}

.rhs-filter-badge {
    background: var(--green-500);
    color: white;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Filters Panel */
.rhs-filters-wrap {
    margin-bottom: 30px;
}

.rhs-filters-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid var(--gray-100);
}

.rhs-filters-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.rhs-filters-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.rhs-filters-close {
    background: var(--gray-50);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all 0.2s;
}

.rhs-filters-close:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.rhs-filters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rhs-filter-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.rhs-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rhs-filter-options.rhs-scroll {
    max-height: 160px;
    overflow-y: auto;
}

.rhs-filter-options.rhs-filter-row {
    flex-direction: row;
}

.rhs-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: 13px;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.rhs-filter-chip:hover {
    border-color: var(--green-500);
    background: #f0f7f2;
}

.rhs-filter-chip input {
    display: none;
}

.rhs-filter-chip:has(input:checked) {
    background: var(--green-500);
    border-color: var(--green-500);
    color: white;
}

.rhs-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.rhs-filter-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rhs-range-input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-family: inherit;
    transition: border 0.2s;
}

.rhs-range-input:focus {
    outline: none;
    border-color: var(--green-500);
}

.rhs-range-divider {
    font-size: 13px;
    color: var(--gray-400);
}

.rhs-filters-bottom {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.rhs-filter-apply {
    padding: 10px 24px;
    background: var(--green-500);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.rhs-filter-apply:hover {
    background: var(--green-600);
}

.rhs-filter-reset {
    padding: 10px 24px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.rhs-filter-reset:hover {
    color: var(--red-400);
}

/* Results */
.rhs-results-section {
    margin-top: 20px;
}

.rhs-results-bar {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.rhs-results-count {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.rhs-results-for {
    font-size: 14px;
    color: var(--gray-500);
}

.rhs-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Plant Card */
.rhs-plant-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    display: block;
    border: 1px solid var(--gray-100);
}

.rhs-plant-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: var(--green-500);
}

.rhs-plant-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--gray-50);
}

.rhs-plant-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.rhs-plant-card:hover .rhs-plant-card-img img {
    transform: scale(1.05);
}

.rhs-plant-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rhs-plant-card-info {
    padding: 14px;
}

.rhs-plant-card-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 4px;
}

.rhs-card-sci {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0 0 2px;
}

.rhs-card-eng {
    font-size: 12px;
    color: var(--gray-400);
    margin: 0 0 8px;
}

.rhs-card-sun {
    font-size: 11px;
    color: var(--gray-500);
    margin: 0;
}

/* No Results */
.rhs-no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
}

.rhs-no-results-icon {
    margin-bottom: 16px;
}

.rhs-no-results h3 {
    color: var(--gray-700);
    margin: 0 0 8px;
}

.rhs-no-results p {
    color: var(--gray-500);
}

/* Pagination */
.rhs-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.rhs-pagination .page-numbers {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
}

.rhs-pagination .page-numbers a,
.rhs-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.rhs-pagination .page-numbers a:hover {
    border-color: var(--green-500);
    color: var(--green-500);
}

.rhs-pagination .page-numbers .current {
    background: var(--green-500);
    border-color: var(--green-500);
    color: white;
    font-weight: 700;
}

/* ============================================
   PLANT DETAIL PAGE
   ============================================ */

.plant-page {
    background: var(--beige);
    min-height: 80vh;
}

.plant-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* Breadcrumb */
.plant-breadcrumb {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.plant-breadcrumb a {
    color: var(--green-500);
    text-decoration: none;
}

.plant-breadcrumb a:hover {
    text-decoration: underline;
}

.plant-breadcrumb span {
    margin: 0 6px;
}

/* Hero Card */
.plant-hero {
    display: grid;
    grid-template-columns: 350px 1fr;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    margin-bottom: 20px;
}

.plant-hero-img {
    min-height: 320px;
    background: var(--gray-50);
    position: relative;
    overflow: hidden;
}

.plant-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.plant-hero-placeholder {
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.plant-hero-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plant-hero-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 4px;
    line-height: 1.4;
}

.plant-hero-sci {
    font-size: 16px;
    color: var(--gray-500);
    margin: 0 0 2px;
}

.plant-hero-eng {
    font-size: 14px;
    color: var(--gray-400);
    margin: 0 0 14px;
}

.plant-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.plant-tag {
    display: inline-block;
    padding: 5px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: 12px;
    color: var(--gray-700);
}

.plant-hero-stats {
    display: flex;
    gap: 16px;
}

.plant-hero-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.plant-stat-icon {
    font-size: 22px;
}

.plant-stat-val {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
}

.plant-stat-lbl {
    display: block;
    font-size: 11px;
    color: var(--gray-400);
}

/* Tabs */
.plant-tabs {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    margin-bottom: 20px;
}

.plant-tabs-nav {
    display: flex;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 4px;
    gap: 4px;
}

.plant-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
}

.plant-tab:hover {
    color: var(--gray-700);
    background: rgba(0,0,0,0.03);
}

.plant-tab.active {
    background: var(--white);
    color: var(--green-500);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.plant-tab-content {
    display: none;
    padding: 28px;
}

.plant-tab-content.active {
    display: block;
}

.plant-tab-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 20px;
}

/* Info Cards */
.plant-info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.plant-info-card {
    text-align: center;
    padding: 20px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.plant-info-card:hover {
    background: #f0f7f2;
    border-color: var(--green-500);
}

.plant-info-card-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.plant-info-card-val {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.plant-info-card-lbl {
    display: block;
    font-size: 11px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart */
.plant-chart {
    margin-bottom: 24px;
}

.plant-chart img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

/* Description */
.plant-desc {
    border-top: 1px solid var(--gray-100);
    padding-top: 24px;
}

.plant-desc-text {
    line-height: 1.9;
    color: var(--gray-700);
    font-size: 15px;
}

/* Content Box */
.plant-content-box {
    line-height: 1.9;
    color: var(--gray-700);
    font-size: 15px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.plant-content-box--warning {
    background: #fff8f0;
    border: 1px solid #ffe0c0;
}

.plant-empty {
    color: var(--gray-400);
    font-style: italic;
}

/* Q&A */
.rhs-qa-section h4 {
    font-size: 15px;
    margin: 0 0 12px;
    color: var(--gray-900);
}

.rhs-qa-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.rhs-qa-item {
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
}

.rhs-qa-question {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.rhs-qa-meta {
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.rhs-qa-answer {
    padding: 12px;
    background: #f0f7f2;
    border-radius: var(--radius-xs);
    margin-top: 8px;
    font-size: 14px;
    color: var(--gray-700);
}

.rhs-qa-answer-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--green-500);
    margin-bottom: 4px;
}

.rhs-qa-pending {
    color: var(--orange-400);
    font-size: 13px;
}

.rhs-question-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border 0.2s;
}

.rhs-question-form textarea:focus {
    outline: none;
    border-color: var(--green-500);
}

.rhs-question-submit {
    padding: 10px 24px;
    background: var(--green-500);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 10px;
    transition: background 0.2s;
}

.rhs-question-submit:hover {
    background: var(--green-600);
}

/* Related */
.rhs-related-section {
    margin-top: 24px;
}

.rhs-related-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 16px;
}

.rhs-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.rhs-related-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: all 0.3s;
}

.rhs-related-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.rhs-related-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.rhs-related-card-body {
    padding: 10px;
}

.rhs-related-card-body h3 {
    font-size: 13px;
    margin: 0;
}

.rhs-related-card-body h3 a {
    color: var(--gray-700);
    text-decoration: none;
}

.rhs-related-card-body h3 a:hover {
    color: var(--green-500);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .rhs-search-title { font-size: 24px; }
    .rhs-search-hero { padding: 40px 16px 30px; }

    .rhs-filters-grid { grid-template-columns: 1fr 1fr; }
    .rhs-results-grid { grid-template-columns: 1fr 1fr; }

    .plant-hero { grid-template-columns: 1fr; }
    .plant-hero-img { min-height: 240px; }
    .plant-hero-body { padding: 20px; }
    .plant-hero-title { font-size: 22px; }
    .plant-hero-stats { flex-wrap: wrap; }

    .plant-tab { padding: 10px 14px; font-size: 13px; }
    .plant-tab-content { padding: 20px; }
    .plant-info-cards { grid-template-columns: repeat(2, 1fr); }
    .rhs-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .rhs-filters-grid { grid-template-columns: 1fr; }
    .rhs-results-grid { grid-template-columns: 1fr; }
    .plant-info-cards { grid-template-columns: 1fr 1fr; }
    .rhs-related-grid { grid-template-columns: 1fr; }
    .plant-tabs-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}