/* ===========================
   ROOT & RESET
   =========================== */
:root {
    --header-h: 65px;
    --mobile-nav-h: 68px;
    --mockup-h: clamp(260px, 45vh, 480px);
    --mockup-w: calc(var(--mockup-h) * (371 / 673));
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0; width: 100%; height: 100%;
    overflow: hidden; font-family: 'Vazirmatn', sans-serif;
    background: #111; direction: rtl;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ===========================
   HEADER
   =========================== */
header {
    display: flex; height: var(--header-h); justify-content: space-between; align-items: center;
    padding: 0 clamp(20px, 5vw, 50px); position: fixed; top: 0; left: 0; right: 0; z-index: 500;
    color: #fff; background: rgba(0,0,0,0.3); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand { font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 900; white-space: nowrap; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.desktop-nav ul { padding: 0; margin: 0; list-style: none; display: flex; gap: 20px; }
.header-right { display: flex; align-items: center; gap: 10px; }

/* ===========================
   MOBILE BOTTOM NAV — Bubble Style
   =========================== */
.mobile-nav {
    display: none; position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 50%; transform: translateX(-50%);
    width: calc(100% - 32px); max-width: 400px;
    height: 68px;
    background: rgba(18, 20, 30, 0.72);
    backdrop-filter: blur(30px) saturate(1.8);
    -webkit-backdrop-filter: blur(30px) saturate(1.8);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 34px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.25),
                inset 0 1px 0 rgba(255,255,255,0.18);
    z-index: 500; justify-content: space-around; align-items: center; padding: 0 8px;
}

.mobile-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; flex: 1; height: 54px;
    color: rgba(255,255,255,0.42); text-decoration: none;
    font-size: clamp(0.58rem, 1.8vw, 0.65rem); font-weight: 700; letter-spacing: 0.01em;
    transition: color 0.28s ease;
    border-radius: 26px; position: relative;
    font-family: 'Vazirmatn', sans-serif;
}

.mobile-nav-item::before {
    content: '';
    position: absolute; inset: 3px;
    border-radius: 22px;
    background: transparent;
    transition: background 0.28s ease, box-shadow 0.28s ease;
    z-index: 0;
}

.mobile-nav-item.active-nav { color: #fff; }
.mobile-nav-item.active-nav::before {
    background: rgba(255,255,255,0.13);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 10px rgba(0,0,0,0.2);
}

.mnav-icon-wrap {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mobile-nav-item.active-nav .mnav-icon-wrap { transform: scale(1.12); }

.mnav-svg { width: 22px; height: 22px; transition: 0.3s; }
.mobile-nav-item.active-nav .mnav-svg { filter: drop-shadow(0 0 6px rgba(255,255,255,0.35)); }

.mobile-nav-item span:not(.mnav-icon-wrap) { position: relative; z-index: 1; }

/* ===========================
   GLASS BUTTON & LANG
   =========================== */
.glass-btn {
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.35); color: #fff !important;
    padding: 8px 18px; border-radius: 30px; cursor: pointer; font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center;
    justify-content: center; transition: 0.2s;
}
.glass-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,0.25); }

.lang-switcher { position: relative; }
.arrow-down { font-size: 0.75em; margin-right: 4px; }
.lang-dropdown {
    display: none; position: absolute; top: calc(100% + 10px); right: 0;
    background: rgba(15,15,20,0.95); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px; flex-direction: column; padding: 8px 0; min-width: 130px; z-index: 600;
    list-style: none; margin: 0;
}
html[dir="ltr"] .lang-dropdown { right: auto; left: 0; }
.lang-dropdown.open { display: flex; }
.lang-option { padding: 10px 20px; cursor: pointer; font-size: 0.9rem; color: #fff; transition: 0.2s; font-family: 'Vazirmatn', sans-serif; }
.lang-option:hover { background: rgba(255,255,255,0.15); }

/* ===========================
   PAGES SYSTEM
   =========================== */
.pages-wrapper { position: fixed; inset: 0; perspective: 1000px; }
.page {
    position: absolute; inset: 0; opacity: 0; pointer-events: none;
    transform: scale(0.95); transition: transform 0.5s ease, opacity 0.5s ease;
}
.page.active { opacity: 1; pointer-events: auto; transform: scale(1); }
.page.exit   { opacity: 0; transform: scale(1.05); pointer-events: none; }

/* ===========================
   CAROUSEL
   =========================== */
.carousel {
    width: 100vw; height: 100vh; position: relative; overflow: hidden; perspective: 1000px;
    background-color: #111; transition: background-color 0.6s ease;
}
.list { width: 100%; height: 100%; }
.item {
    width: 100%; height: 100%; background-color: transparent;
    position: absolute; top: 0; left: 0; overflow: hidden; display: none;
}
.item.active { display: block; z-index: 10; }
.item.hidden { display: block; pointer-events: none; background-color: transparent; z-index: 1; }

.item img.fruit {
    height: calc(var(--mockup-h) * 1.15); width: auto; max-width: 90vw; object-fit: contain;
    position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%);
    z-index: 15; pointer-events: none; filter: drop-shadow(0 30px 40px rgba(0,0,0,0.5));
}

.item .content {
    position: absolute;
    top: calc(42% + (var(--mockup-h) / 2) + 35px);
    left: 50%; transform: translateX(-50%); text-align: center; width: 90vw;
    font-size: clamp(1.4rem, 4.5vw, 3.5rem); color: #fff; font-weight: 900;
    font-family: 'Vazirmatn', sans-serif; white-space: nowrap; z-index: 20; pointer-events: none;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

#prev, #next {
    position: absolute; top: 42%; transform: translateY(-50%);
    width: clamp(45px, 6vw, 60px); height: clamp(45px, 6vw, 60px); border-radius: 50%;
    background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(5px); color: #fff; font-size: clamp(1.8rem, 4vw, 2.5rem);
    cursor: pointer; z-index: 30; display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
#prev:hover, #next:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.05); }
#prev { right: clamp(15px, 4vw, 30px); }
#next { left: clamp(15px, 4vw, 30px); }

.mockup {
    position: absolute; top: 42%; left: 50%; --left: 0%; transform: translate(-50%, -50%);
    height: var(--mockup-h); width: var(--mockup-w);
    background: url(img/mockup.png) 0 0 no-repeat, url(img/listSoda.jpg) var(--left) 0;
    background-size: auto 100%; background-blend-mode: multiply;
    -webkit-mask-image: url(img/mockup.png); -webkit-mask-repeat: no-repeat; -webkit-mask-size: auto 100%;
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1); z-index: 12;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6)); cursor: pointer;
}
.mockup:hover { transform: translate(-50%, -52%) scale(1.02); }

.shadow {
    width: calc(var(--mockup-w) * 0.85); height: 40px; background-color: rgba(0,0,0,0.6); border-radius: 50%;
    position: absolute; top: calc(42% + (var(--mockup-h) / 2) - 15px); left: 50%;
    transform: translateX(-50%); filter: blur(15px); z-index: 11; pointer-events: none;
}

.leaves {
    position: absolute; width: clamp(100px, 18vh, 180px); height: clamp(100px, 18vh, 180px);
    background-image: url(img/leaves.png); background-size: contain; background-repeat: no-repeat;
    top: calc(42% - (var(--mockup-h) / 2.5)); left: calc(50% + (var(--mockup-w) / 3));
    z-index: 16; pointer-events: none; filter: drop-shadow(0 15px 20px rgba(0,0,0,0.4));
    animation: leafSway 6s ease-in-out infinite;
}
@keyframes leafSway { 0%,100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-12px); } }

@keyframes toActive     { from { transform: translate(-50%, 100vh);  opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
@keyframes toOut        { from { transform: translate(-50%, -50%);   opacity: 1; } to { transform: translate(-50%, -100vh); opacity: 0; } }
@keyframes toActivePrev { from { transform: translate(-50%, -100vh); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
@keyframes toOutPrev    { from { transform: translate(-50%, -50%);   opacity: 1; } to { transform: translate(-50%, 100vh); opacity: 0; } }

.item.active img.fruit          { animation: toActive     0.6s cubic-bezier(0.4,0,0.2,1) forwards; }
.item.hidden img.fruit          { animation: toOut        0.6s cubic-bezier(0.4,0,0.2,1) forwards; }
.carousel.right .item.active img.fruit { animation: toActivePrev 0.6s cubic-bezier(0.4,0,0.2,1) forwards; }
.carousel.right .item.hidden img.fruit { animation: toOutPrev    0.6s cubic-bezier(0.4,0,0.2,1) forwards; }

@keyframes textIn  { from { opacity: 0; transform: translate(-50%, 30px);  } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes textOut { from { opacity: 1; transform: translate(-50%, 0);      } to { opacity: 0; transform: translate(-50%, -30px); } }
.item.active .content { animation: textIn  0.6s ease-out 0.1s forwards; opacity: 0; }
.item.hidden .content { animation: textOut 0.4s ease-in  forwards; }

/* ===========================
   INNER PAGES
   =========================== */
.inner-page {
    width: 100%; height: 100%; background-color: var(--page-color);
    display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.light-orb { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(80px); opacity: 0.6; }
.orb-a { width: 50vw; height: 50vw; background: rgba(100,160,255,0.3); top: -20%; right: -10%; }
.orb-b { width: 40vw; height: 40vw; background: rgba(120,255,180,0.25); bottom: -10%; left: -10%; }

.inner-content {
    text-align: center; color: #fff;
    padding: calc(var(--header-h) + 20px) 20px calc(var(--mobile-nav-h) + 40px);
    width: 100%; max-width: 800px; position: relative; z-index: 2;
    overflow-y: auto; max-height: 100vh; scrollbar-width: none;
}
.inner-content::-webkit-scrollbar { display: none; }
.inner-content h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; margin: 0 0 10px; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.inner-content > p { font-size: clamp(0.9rem, 2vw, 1.1rem); line-height: 1.6; opacity: 0.85; margin: 0 0 25px; }

/* ===========================
   ACTION BUTTONS
   =========================== */
.wide-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 13px 18px; border-radius: 50px; font-family: 'Vazirmatn', sans-serif;
    font-size: clamp(0.82rem, 1.8vw, 0.98rem); font-weight: 700; color: #fff !important;
    text-decoration: none; cursor: pointer; transition: 0.3s; border: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box;
    line-height: 1.3;
}
.wide-action-btn:active { transform: scale(0.97); }
.catalog-btn  { background: linear-gradient(135deg,#2980b9,#1a5276); margin-top: 20px; box-shadow: 0 6px 20px rgba(41,128,185,0.35); }
.consult-btn  { background: linear-gradient(135deg,#27ae60,#1a5c38); margin-top: 10px; box-shadow: 0 6px 20px rgba(39,174,96,0.35); }
.shop-btn     { background: linear-gradient(135deg,#c0874a,#8b5a2b); margin-top: 10px; box-shadow: 0 6px 20px rgba(192,135,74,0.35); }
.catalog-popup-btns .catalog-btn,
.catalog-popup-btns .consult-btn { margin: 0; }
.ai-assistant-btn { background: linear-gradient(135deg,#6c3fa0,#4a1fa8); margin-bottom: 14px; box-shadow: 0 6px 20px rgba(108,63,160,0.4); }
.phone-btn { background: linear-gradient(135deg,#229954,#145a32); margin-top: 10px; }

/* ===========================
   PRODUCT CARDS
   =========================== */
.product-cards-row { display: flex; gap: 12px; width: 100%; justify-content: center; margin-bottom: 24px; }
.product-card-new {
    flex: 1; background: rgba(255,255,255,0.08); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 12px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    cursor: pointer; transition: 0.3s;
}
.product-card-new:hover { transform: translateY(-5px); background: rgba(255,255,255,0.15); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.pcard-img-wrap { width: 100%; aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; background: rgba(0,0,0,0.2); }
.pcard-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.pcard-name { font-size: clamp(0.68rem, 1.4vw, 0.9rem); font-weight: 700; color: #fff; line-height: 1.4; text-align: center; }
.pcard-detail-btn {
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff;
    border-radius: 20px; padding: 7px 10px; font-size: clamp(0.65rem, 1.3vw, 0.78rem); font-weight: 700;
    cursor: pointer; width: 100%; transition: 0.2s; font-family: 'Vazirmatn', sans-serif;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pcard-detail-btn:hover { background: rgba(255,255,255,0.25); }

/* ===========================
   PLANT GRID — MAGAZINE
   =========================== */
.plant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; width: 100%; }
.plant-banner-card {
    position: relative; border-radius: 16px; overflow: hidden; cursor: pointer;
    border: 2px solid rgba(255,255,255,0.2); aspect-ratio: 4/5;
    background: rgba(0,0,0,0.2); display: flex; align-items: flex-end; transition: 0.3s;
}
.plant-banner-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.plant-banner-img   { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.plant-banner-img-2 { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; opacity: 0; }

@media (hover: hover) { .plant-banner-img-2 { transition: opacity 0.6s ease-in-out; } .plant-banner-card:hover .plant-banner-img-2 { opacity: 1; } }
@media (hover: none)  {
    .plant-banner-img-2 { animation: crossFade 4s infinite ease-in-out !important; }
    @keyframes crossFade {
        0%, 5%    { opacity: 0; }
        20%, 48%  { opacity: 1; }
        52%, 100% { opacity: 0; }
    }
}

.plant-banner-overlay {
    position: relative; z-index: 3; width: 100%; padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent); text-align: center;
}
.plant-banner-name { font-size: 0.9rem; font-weight: 700; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.plant-banner-card.missing .plant-banner-overlay { background: rgba(0,0,0,0.7); height: 100%; display: flex; flex-direction: column; justify-content: center; }
.soon-text { color: #4fc3a1; font-size: 0.8rem; margin-top: 5px; display: block; }

/* ===========================
   CONTACT
   =========================== */
.contact-list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.contact-social-row { display: flex; gap: 12px; }
.social-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 10px; border-radius: 50px; font-weight: 700; color: #fff; text-decoration: none;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); transition: 0.3s;
    font-family: 'Vazirmatn', sans-serif;
}
.social-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-3px); }
.social-icon-img { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }

/* ===========================
   POPUPS
   =========================== */
.popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
    padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.popup-overlay.open { opacity: 1; pointer-events: auto; }
.popup-box {
    background: rgba(20,25,35,0.98); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px; padding: 25px; width: 100%; max-width: 450px; max-height: 85vh;
    overflow-y: auto; color: #fff;
    transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6); scrollbar-width: none; position: relative;
}
.popup-box::-webkit-scrollbar { display: none; }
.popup-overlay.open .popup-box { transform: scale(1); }
.popup-close-btn {
    position: absolute; top: 15px; left: 15px; width: 35px; height: 35px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; z-index: 5; transition: 0.2s;
}
html[dir="ltr"] .popup-close-btn { left: auto; right: 15px; }
.popup-close-btn:hover { background: rgba(255,255,255,0.25); }
.popup-product-title { font-size: 1.3rem; font-weight: 900; margin: 0 0 15px; padding-left: 45px; line-height: 1.3; }
html[dir="ltr"] .popup-product-title { padding-left: 0; padding-right: 45px; }
.popup-video-wrap { width: 100%; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 15px; aspect-ratio: 16/9; }
.popup-video-wrap video { width: 100%; height: 100%; object-fit: contain; display: block; }
.popup-product-desc { font-size: 0.92rem; line-height: 2; opacity: 0.9; margin: 0; }
.catalog-popup-box { max-width: 380px; text-align: center; }
.catalog-popup-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.catalog-cancel-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15) !important; box-shadow: none; }
.soon-label { font-size: 1rem; opacity: 0.7; text-align: center; padding: 20px 0; }

/* ===========================
   RESPONSIVE
   =========================== */
@media screen and (min-width: 769px) {
    .mobile-nav { display: none !important; }
    .inner-content { padding-bottom: 40px; }
    .plant-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Tablet & small desktop */
@media screen and (max-width: 768px) {
    :root { --header-h: 58px; --mobile-nav-h: 68px; }
    .desktop-nav { display: none !important; }
    .mobile-nav { display: flex; }
    .inner-content {
        padding: calc(var(--header-h) + 14px) 14px calc(var(--mobile-nav-h) + 32px);
    }
    .product-cards-row { gap: 8px; margin-bottom: 18px; }
    .plant-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .popup-box { padding: 20px; border-radius: 20px; }
    .wide-action-btn { padding: 11px 14px; font-size: clamp(0.78rem, 3.5vw, 0.92rem); }
}

/* Compact phones (≤375px — iPhone SE, small Androids) */
@media screen and (max-width: 375px) {
    :root { --header-h: 54px; --mobile-nav-h: 68px; }
    .mobile-nav { height: 62px; bottom: calc(10px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
    .mobile-nav-item { height: 50px; font-size: 0.55rem; }
    .mnav-svg { width: 20px; height: 20px; }
    .mnav-icon-wrap { width: 26px; height: 26px; }
    .inner-content {
        padding: calc(var(--header-h) + 10px) 11px calc(var(--mobile-nav-h) + 26px);
    }
    .inner-content h1 { font-size: clamp(1.3rem, 6vw, 1.7rem); margin-bottom: 6px; }
    .inner-content > p { font-size: 0.8rem; margin-bottom: 14px; }
    .plant-grid { gap: 7px; }
    .plant-banner-name { font-size: 0.75rem; }
    .product-cards-row { gap: 6px; margin-bottom: 14px; }
    .pcard-name { font-size: 0.64rem; }
    .pcard-detail-btn { font-size: 0.64rem; padding: 6px 7px; }
    .wide-action-btn { padding: 10px 12px; font-size: 0.78rem; }
    .social-btn { padding: 11px 7px; font-size: 0.78rem; gap: 6px; }
    .social-icon-img { width: 20px; height: 20px; }
    .brand { font-size: 1.25rem; }
    .glass-btn { padding: 6px 11px; font-size: 0.75rem; }
    .popup-box { padding: 14px; }
    .popup-product-title { font-size: 1rem; }
}

/* Large phones (≥ 430px — S24 Ultra, iPhone Pro Max) */
@media screen and (min-width: 430px) and (max-width: 768px) {
    .mobile-nav { max-width: 440px; height: 70px; }
    .mnav-svg { width: 24px; height: 24px; }
    .mnav-icon-wrap { width: 32px; height: 32px; }
    .mobile-nav-item { font-size: 0.68rem; }
    .plant-grid { grid-template-columns: repeat(3, 1fr); }
    .inner-content h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); }
}


/* ══════════════════════════════════════════════════════
   آنالیز هوشمند گیاهان — استایل‌های پاپ‌آپ
   ══════════════════════════════════════════════════════ */

/* جعبه اصلی پاپ‌آپ آنالیز */
.ai-analyze-box {
    max-width: 420px;
    width: 94vw;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(160deg, #0f2318 0%, #1a3a25 50%, #0d1f14 100%);
    border: 1px solid rgba(168,213,186,.18);
    border-radius: 22px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

/* صفحه‌های داخلی */
.ai-screen {
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    flex: 1;
}
.ai-screen.hidden { display: none; }

/* هدر */
.ai-header { text-align: center; }
.ai-icon { font-size: 3rem; margin-bottom: 6px; }
.ai-header h2 {
    color: #a8d5ba;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 6px;
}
.ai-header p {
    color: rgba(255,255,255,.6);
    font-size: .9rem;
    margin: 0;
}

/* عنوان صفحه‌های دیگر */
.ai-screen > h2 {
    color: #a8d5ba;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

/* دکمه‌های انتخاب روش */
.ai-btn-group { display: flex; flex-direction: column; gap: 12px; }

.ai-choice-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 14px;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    direction: rtl;
}
.ai-choice-btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.ai-choice-btn:active { transform: scale(.97); }

.ai-camera-btn {
    background: linear-gradient(135deg, #a8d5ba, #6db7f2);
    color: #0a1f14;
}
.ai-gallery-btn {
    background: rgba(255,255,255,.07);
    color: #d4edd9;
    border: 1px solid rgba(168,213,186,.25);
}
.ai-camera-btn:hover { box-shadow: 0 6px 20px rgba(168,213,186,.35); }
.ai-gallery-btn:hover { background: rgba(255,255,255,.12); }

/* دوربین */
.ai-camera-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 4/3;
}
.ai-camera-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ai-cam-loading {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.75);
    color: #a8d5ba;
    font-size: .9rem;
}

/* پیش‌نمایش تصویر */
.ai-preview-wrap {
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0,0,0,.4);
    max-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-preview-wrap img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    display: block;
}

/* دکمه اکشن اصلی */
.ai-action-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #a8d5ba, #6db7f2);
    color: #0a1f14;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.ai-action-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(168,213,186,.3); }
.ai-action-btn:active { transform: scale(.97); }

.ai-pdf-btn {
    background: linear-gradient(135deg, #f3a6b5, #e87393);
    color: #fff;
}

/* دکمه بازگشت */
.ai-back-btn {
    padding: 11px 20px;
    border: 1px solid rgba(168,213,186,.25);
    border-radius: 12px;
    background: transparent;
    color: rgba(255,255,255,.6);
    font-family: inherit;
    font-size: .9rem;
    cursor: pointer;
    transition: background .15s;
}
.ai-back-btn:hover { background: rgba(255,255,255,.07); color: #d4edd9; }

/* صفحه لودینگ */
.ai-loading-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
    min-height: 180px;
}
.ai-loading-wrap p { color: #a8d5ba; font-size: 1.05rem; margin: 0; }
.ai-loading-wrap span { color: rgba(255,255,255,.45); font-size: .85rem; }

.ai-spinner {
    width: 52px; height: 52px;
    border: 4px solid rgba(168,213,186,.2);
    border-top-color: #a8d5ba;
    border-radius: 50%;
    animation: aiSpin .85s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }

/* جدول نتایج */
.ai-results-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(168,213,186,.15);
    max-height: 340px;
    overflow-y: auto;
}
.ai-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.ai-results-table thead th {
    background: rgba(168,213,186,.15);
    color: #a8d5ba;
    padding: 11px 14px;
    text-align: right;
    font-weight: 700;
    border-bottom: 1px solid rgba(168,213,186,.15);
}
.ai-results-table tbody tr { border-bottom: 1px solid rgba(255,255,255,.05); }
.ai-results-table tbody tr:last-child { border-bottom: none; }
.ai-results-table tbody td {
    padding: 10px 14px;
    color: rgba(255,255,255,.85);
    text-align: right;
    line-height: 1.5;
    vertical-align: top;
}
.ai-results-table tbody td:first-child {
    font-weight: 600;
    color: #a8d5ba;
    white-space: nowrap;
    width: 38%;
}
.ai-results-table .ai-fertilizer-row td { background: rgba(168,213,186,.08); }

/* رسپانسیو موبایل */
@media (max-width: 480px) {
    .ai-analyze-box { width: 98vw; max-height: 92vh; }
    .ai-screen { padding: 22px 18px 20px; }
    .ai-results-table { font-size: .82rem; }
}
