/* ==========================================================
   FIRMAX THEME — تم روشن، سبز کم‌رنگ (الکترونیک / تعمیرات)
   ساختار و نام کلاس‌ها دقیقاً مثل فایل قبلی است؛ فقط رنگ‌ها روشن شده.
========================================================== */

:root {
    /* --- نام‌های قبلی (برای سازگاری با بقیه صفحات) --- */
    --main-bg: linear-gradient(160deg, #f6fcf8 0%, #e7f6ee 50%, #f2fbf6 100%);
    --main-green: linear-gradient(135deg, #2dbf86, #14996a);
    --hover-green: linear-gradient(135deg, #4fd9a2, #1fae79);
    --main-orange: #1fb5b9;
    --hover-orange: #4fcfd2;
    --text-light: #ffffff;
    --text-dark: #0f2e22;
    --text-body: #2f4f41;
    --admin-button-bg: #dff3e8;
    --filename-text: #1f7a55;
    --input-outline: #2dbf86;
    --link-color: #0f8f5e;

    /* --- متغیرهای جدید تم --- */
    --neon: #14a06a;
    --neon-2: #0f8f5e;
    --cyan: #1fb5b9;
    --on-neon: #ffffff;
    --ink: #123828;
    --muted: #5f8271;
    --panel: #ffffff;
    --panel-2: #f1faf5;
    --line: rgba(20, 160, 106, .25);
    --line-strong: rgba(20, 160, 106, .55);
    --glow: 0 4px 16px rgba(20, 160, 106, .28);
    --glow-soft: 0 0 0 3px rgba(20, 160, 106, .18);
}

/* =======================
   RESET
======================= */

* {
    box-sizing: border-box;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("admin/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: "Vazirmatn";
}

.search-bar input,
.search-bar input[type="text"],
.search-bar input[type="submit"] {
    font-family: "Vazirmatn";
}

input,
textarea,
select,
button {
    font-family: "Vazirmatn";
}

body {
    margin: 0;
    padding: 0;
    background-color: #f2fbf6;
    background: var(--main-bg);
    background-attachment: fixed;
    color: var(--text-body);
    text-align: center;
    font-size: 12px;
}

::selection {
    background: var(--neon);
    color: var(--on-neon);
}

a {
    color: var(--link-color);
}

/* اسکرول‌بار هماهنگ با تم */
* {
    scrollbar-width: thin;
    scrollbar-color: #7fcfa8 #e7f6ee;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #e7f6ee;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4fd9a2, #1fae79);
    border-radius: 8px;
    border: 2px solid #e7f6ee;
}

/* فوکوس کیبورد (دسترسی‌پذیری) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--neon);
    outline-offset: 2px;
}

/* =======================
   BACKGROUND (پس‌زمینه مدار چاپی + ابزار تعمیرات، روشن و ملایم)
======================= */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(20, 160, 106, .13) 1px, transparent 1.6px),
        repeating-linear-gradient(45deg, rgba(20, 160, 106, .03) 0 1px, transparent 1px 16px),
        repeating-linear-gradient(-45deg, rgba(20, 160, 106, .03) 0 1px, transparent 1px 16px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320' fill='none' stroke='%2314a06a' stroke-opacity='.14' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 50h80l24 24h70'/%3E%3Cpath d='M174 74v50l24 24h122'/%3E%3Cpath d='M0 148h60l24 24v50'/%3E%3Cpath d='M240 0v46l24 24h56'/%3E%3Cpath d='M0 70h36l16 16h24'/%3E%3Cpath d='M200 320v-50l24-24h50l12-12h34'/%3E%3Cpath d='M120 0v30l16 16h20'/%3E%3Cpath d='M290 320v-20l-16-16'/%3E%3Ccircle cx='174' cy='74' r='3.5'/%3E%3Ccircle cx='198' cy='148' r='3.5'/%3E%3Ccircle cx='84' cy='222' r='3.5'/%3E%3Ccircle cx='264' cy='70' r='3.5'/%3E%3Ccircle cx='76' cy='86' r='3.5'/%3E%3Ccircle cx='274' cy='246' r='3.5'/%3E%3Ccircle cx='156' cy='46' r='3.5'/%3E%3Crect x='96' y='100' width='30' height='30' rx='3'/%3E%3Cpath d='M102 94v6M111 94v6M120 94v6M102 130v6M111 130v6M120 130v6M90 106h6M90 115h6M90 124h6M126 106h6M126 115h6M126 124h6'/%3E%3Ccircle cx='102' cy='106' r='1.6'/%3E%3Cg transform='translate(262 108)'%3E%3Ccircle r='9'/%3E%3Ccircle r='3.5'/%3E%3Cpath d='M0 -9v-5M0 9v5M-9 0h-5M9 0h5M6.4 6.4l3.5 3.5M-6.4 -6.4l-3.5 -3.5M6.4 -6.4l3.5 -3.5M-6.4 6.4l-3.5 3.5'/%3E%3C/g%3E%3Cg transform='translate(46 272) rotate(-45)'%3E%3Crect x='-30' y='-3.5' width='42' height='7' rx='3.5'/%3E%3Cpath d='M12 -9a11 11 0 1 1 0 18'/%3E%3Cpath d='M12 -9h14l-5 9 5 9H12'/%3E%3C/g%3E%3Cg transform='translate(160 262) rotate(40)'%3E%3Crect x='-6' y='-34' width='12' height='24' rx='5'/%3E%3Cpath d='M0 -10v36M-3 26h6l-1 5h-4z'/%3E%3C/g%3E%3Cg transform='translate(230 22) rotate(30)'%3E%3Crect x='-5' y='-6' width='10' height='26' rx='4'/%3E%3Cpath d='M-3 20v8h6v-8M0 28v10'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 12% 8%, rgba(45, 191, 134, .16), transparent 42%),
        radial-gradient(circle at 90% 18%, rgba(31, 181, 185, .09), transparent 38%),
        radial-gradient(circle at 80% 95%, rgba(45, 191, 134, .12), transparent 45%),
        radial-gradient(circle at 20% 90%, rgba(20, 160, 106, .10), transparent 50%);
    background-size: 28px 28px, auto, auto, 320px 320px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    background-repeat: repeat, repeat, repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

/* =======================
   MAIN WRAPPER (خیلی مهم)
======================= */

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

/* =======================
   TEXT
======================= */

h1,
h2,
h3 {
    color: var(--ink);
}

h1 {
    font-size: 20px;
    text-shadow: 0 1px 10px rgba(20, 160, 106, .18);
}

p {
    font-size: 14px;
    margin-top: 10px;
}

/* =======================
   PRODUCT GRID
======================= */

.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin: 20px auto;
    width: 100%;
    align-items: stretch;
}

/* =======================
   PRODUCT CARD
======================= */

.product {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 8px;
    background: linear-gradient(180deg, #ffffff, #f0faf4);
    border: 1px solid var(--line);
    color: var(--text-body);
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 360px;
    box-shadow:
        0 6px 18px rgba(20, 90, 60, .10),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* خط سبز باریک بالای کارت */
.product::before {
    content: "";
    position: absolute;
    top: 0;
    left: 14%;
    right: 14%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--neon), transparent);
    opacity: .6;
    transition: opacity .3s ease;
}

.product:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow:
        0 10px 26px rgba(20, 90, 60, .16),
        0 0 18px rgba(20, 160, 106, .18);
}

.product:hover::before {
    opacity: 1;
}

/* =======================
   IMAGE
======================= */

.product img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    border: 1px solid rgba(20, 160, 106, .15);
}

/* =======================
   SEARCH
======================= */

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line);
    padding: 8px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(20, 90, 60, .10);
}

.search-bar input[type="text"] {
    width: 240px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(20, 160, 106, .3);
    outline: none;
    font-size: 13px;
    background: #ffffff;
    color: var(--ink);
    transition: 0.3s;
}

.search-bar input[type="text"]::placeholder {
    color: #7fa392;
}

.search-bar input[type="text"]:focus {
    border-color: var(--neon);
    box-shadow: var(--glow-soft);
}


.search-bar input[type="submit"] {
    padding: 8px 11px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    color: var(--on-neon);
    background: var(--main-green);
    transition: 0.25s;
}

.search-bar input[type="submit"]:hover {
    background: var(--hover-green);
    transform: scale(1.05);
    box-shadow: var(--glow);
}


/* =======================
   PAGINATION
======================= */

.pagination {
    margin-top: 15px;
}

.pagination a {
    padding: 5px 10px;
    margin: 0 5px;
    background: #ffffff;
    border: 1px solid var(--line);
    color: #1d5c42;
    border-radius: 6px;
    text-decoration: none;
    font-size: 11px;
    transition: .2s;
}

.pagination a:hover {
    border-color: var(--neon);
    color: var(--neon);
}

.pagination a.active {
    background: var(--main-green);
    border-color: transparent;
    color: var(--on-neon);
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(20, 160, 106, .3);
}

/* =======================
   BUTTON LINK
======================= */

.product-link-btn,
.product-link-btn:visited,
.product-link-btn:active {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    background: var(--main-green);
    color: var(--on-neon) !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    transition: 0.3s;
    box-shadow: 0 3px 10px rgba(20, 160, 106, .25);
}

.product-link-btn:hover {
    color: var(--on-neon) !important;
    background: var(--hover-green);
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(20, 160, 106, .4);
}

/* =======================
   USER INFO
======================= */

.user-info {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    color: var(--text-dark);
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(20, 90, 60, .12);
}

/* =======================
   INPUTS
======================= */

input[type="text"],
input[type="password"] {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(20, 160, 106, .3);
    background: #ffffff;
    color: var(--ink);
    margin-bottom: 10px;
    width: 100%;
    transition: border-color .25s, box-shadow .25s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--neon);
    box-shadow: var(--glow-soft);
}

input::placeholder,
textarea::placeholder {
    color: #7fa392;
}

textarea,
select {
    background: #ffffff;
    color: var(--ink);
    border: 1px solid rgba(20, 160, 106, .3);
    border-radius: 6px;
}

/* =======================
   MOBILE INPUT FIX
======================= */

.mobile-input {
    width: 100%;
    max-width: 240px;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 6px;
    text-align: center;
    outline: 2px solid var(--input-outline);
    margin: 0 auto;
    display: block;
}

/* =======================
   BUTTONS
======================= */

.button {
    padding: 8px 16px;
    background: var(--main-green);
    color: var(--on-neon);
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    width: 100%;
    transition: .25s;
}

.button:hover {
    background: var(--hover-green);
    box-shadow: var(--glow);
}

.payment-button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;

    background: linear-gradient(135deg, #2dbf86, #14996a);
    color: var(--on-neon);

    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 14px rgba(20, 160, 106, .3);
}


.payment-button:hover {
    background: linear-gradient(135deg, #4fd9a2, #1fae79);
    transform: scale(1.05);
    box-shadow: 0 8px 22px rgba(20, 160, 106, .45);
}

/* =======================
   MENU
======================= */

.main-menu {
    text-align: center;
}

.main-menu-root,
.sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    direction: rtl;
}

/* آیتم‌های اصلی */
.main-menu-root > li {
    position: relative;
    display: inline-block;
}

/* آیتم‌های زیرمنو */
.sub-menu li {
    position: relative;
    white-space: nowrap;
}

/* لینک‌ها */
.main-menu-root li a,
.sub-menu li a {
    display: block;
    padding: 10px 18px;
    margin: 0;

    background: linear-gradient(135deg, #ffffff, #e8f7ef);
    border: 1px solid var(--line);
    color: #17543c;
    text-decoration: none;

    border-radius: 8px;
    font-weight: bold;
    font-size: 13px;

    min-width: 120px;
    text-align: center;

    transition: 0.25s ease;
}

/* hover لینک */
.main-menu-root li a:hover,
.sub-menu li a:hover {
    background: var(--main-green);
    border-color: transparent;
    color: var(--on-neon);
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(20, 160, 106, .35);
}

/* =======================
   SUBMENU
======================= */

.main-menu-root > li > .sub-menu,
.sub-menu {
    display: none;
    position: absolute;

    top: 0;
    right: 100%;

    min-width: 160px;
    width: max-content;

    padding: 5px 0;
    margin: 0;

    border-radius: 8px;

    background: transparent;
    box-shadow: none;

    z-index: 99999;
}

.main-menu-root li:hover > .sub-menu,
.sub-menu li:hover > .sub-menu {
    display: block;
}

.sub-menu li {
    position: relative;
    white-space: nowrap;
}

.sub-menu li a {
    display: block;
    padding: 10px 16px;

    background: linear-gradient(135deg, #ffffff, #e3f5eb);
    color: #17543c;

    text-decoration: none;
    border-radius: 6px;

    transition: 0.25s ease;
    box-shadow: 0 6px 16px rgba(20, 90, 60, .18);
}

.sub-menu li a:hover {
    background: var(--main-green);
    color: var(--on-neon);
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(20, 160, 106, .35);
}

/* لایه‌بندی برای اینکه زیر محصولات نره */
.main-menu {
    position: relative;
    z-index: 99999;
}

.sub-menu {
    z-index: 99999;
}

.product-container {
    position: relative;
    z-index: 1;
}

/* =======================
   AUTH BOX
======================= */
.auth-box {
    width: 100%;
    max-width: 360px;
    margin: 20px auto;
    background: linear-gradient(160deg, #ffffff, #eaf7f0);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    position: relative;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(20, 90, 60, .14);
}

.auth-form {
    display: none;
    width: 100%;
    margin-top: 10px;
}

.auth-form.active {
    display: block;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.auth-tabs button {
    flex: 1;
    padding: 10px;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f1faf5;
    color: #3f7d62;
    transition: .25s;
}

.auth-tabs button:hover {
    color: var(--neon);
    border-color: var(--line-strong);
}

.auth-tabs button.active-tab {
    background: var(--main-green);
    border-color: transparent;
    color: var(--on-neon);
    font-weight: bold;
}

/* =======================
   DOWNLOAD
======================= */

.free-download-button {
    display: inline-block;
    padding: 8px;
    width: 50%;
}

/* =======================
   ERROR / SUCCESS
======================= */

.error {
    color: #d93a4c;
}

.success {
    color: var(--neon);
}

/* =======================
   FILE NAME
======================= */

.filename p{
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--filename-text);
}


/* =======================
   PRICE FIX
======================= */

.hidden-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--neon);
}

/* =======================
   RESPONSIVE FIX
======================= */

@media (max-width: 768px) {

    .product-container {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .product {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        border-radius: 12px;
    }

    .auth-box {
        max-width: 95%;
    }

    .mobile-input {
        max-width: 80%;
    }
}


/* صفحه محصول تکی */
.single-product {
    display: flex !important;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.single-product .product {
    max-width: 420px;
    width: 100%;
}

.product h2,
.product h2 a {
    color: var(--ink);
    text-decoration: none;
}

@media (min-width: 769px) {

    .top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    .auth-box {
        position: static;
        width: 280px;
        margin: 0;
    }

    .main-menu {
        flex: 1;
        text-align: center;
    }
}

.auth-box {
    position: static;
    margin: 0;
}

.top-bar {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    margin: 15px auto;
}

.top-center {
    display: flex;
    justify-content: center;
}

.top-right {
    display: flex;
    justify-content: flex-end;
}

.search-bar {
    display: flex;
    justify-content: center;
}

.search-bar input[type="text"] {
    width: 220px;
}

.main-menu {
    text-align: right;
}

@media (max-width: 768px) {

    .top-bar {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .top-left,
    .top-center,
    .top-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .search-bar input[type="text"] {
        width: 90%;
        max-width: 300px;
    }

    .auth-box {
        width: 95%;
        max-width: 360px;
    }

    .main-menu {
        text-align: center;
    }
}

@media (max-width: 768px) {

    .main-menu {
        width: 100%;
    }

    .main-menu-root {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 8px;
    }

    .main-menu-root > li {
        display: block;
        position: relative;
    }

    .main-menu-root li a,
    .sub-menu li a {
        width: auto;
        margin: 0;
        font-size: 13px;
        padding: 10px 16px;
    }

    .main-menu-root > li > .sub-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        width: max-content !important;
        min-width: 160px !important;
        max-width: 90vw;
        margin-top: 4px;
        background: transparent;
    }

    .sub-menu .sub-menu {
        position: static !important;
        width: 100% !important;
        min-width: 100% !important;
        padding-right: 10px;
    }

    .main-menu-root .sub-menu.open {
        display: block !important;
    }
}


@media (max-width: 768px) {
    .search-bar {
        width: 95%;
        flex-direction: column;
    }

    .search-bar input[type="text"] {
        width: 100%;
    }

    .search-bar input[type="submit"] {
        width: 100%;
    }
}

.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.p {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0.25;
    background-size: contain;
    background-repeat: no-repeat;
    animation: float 12s linear infinite;
    filter: drop-shadow(0 0 4px rgba(20, 160, 106, .35));
}

.p1 { background-image: url('/uploads/images/bax1.png'); left: 10%; animation-duration: 18s; }
.p2 { background-image: url('/uploads/images/bax2.png'); left: 25%; animation-duration: 14s; }
.p3 { background-image: url('/uploads/images/bax3.png'); left: 50%; animation-duration: 20s; }
.p4 { background-image: url('/uploads/images/bax4.png'); left: 70%; animation-duration: 16s; }
.p5 { background-image: url('/uploads/images/bax5.png'); left: 85%; animation-duration: 22s; }
.p6 { background-image: url('/uploads/images/bax6.png'); left: 85%; animation-duration: 12s; }
.p7 { background-image: url('/uploads/images/bax7.png'); left: 85%; animation-duration: 24s; }


@keyframes float {
    0% {
        transform: translate(0, 110vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.25;
    }

    25% {
        transform: translate(30px, 70vh) rotate(90deg);
    }

    50% {
        transform: translate(-40px, 40vh) rotate(180deg);
    }

    75% {
        transform: translate(25px, 10vh) rotate(270deg);
    }

    100% {
        transform: translate(-20px, -120px) rotate(360deg);
        opacity: 0;
    }
}

/* احترام به کاربرانی که انیمیشن کم می‌خواهند */
@media (prefers-reduced-motion: reduce) {
    .p {
        animation: none;
        opacity: 0;
    }

    * {
        transition-duration: .01ms !important;
    }
}


main {
    position: relative;
    z-index: 2;
}


.user-row{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
}

.user-row p{
    margin:0;
    padding:8px 14px;
    background:rgba(20, 160, 106, .09);
    border:1px solid var(--line);
    color:#17543c;
    border-radius:8px;
    font-weight:bold;
    font-size:14px;
}

.admin-button{
    display:inline-block;
    padding:8px 14px;
    text-decoration:none;
    border-radius:8px;
    color:var(--on-neon);
    font-weight:bold;
    background:var(--main-green);
    transition:.3s;
}

.admin-button:hover{
    background:var(--hover-green);
    transform:translateY(-2px);
    box-shadow:var(--glow);
}

.logout-button{
    display:inline-block;
    padding:8px 14px;
    text-decoration:none;
    border-radius:8px;
    color:#fff;
    font-weight:bold;
    background:linear-gradient(135deg,#f44336,#c62828);
    transition:.3s;
}

.logout-button:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 14px rgba(244, 67, 54, .4);
}


.login-popup-btn{
    padding:10px 18px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    color:var(--on-neon);
    font-weight:bold;
    background:var(--main-green);
    transition:.3s;
}

.login-popup-btn:hover{
    background:var(--hover-green);
    box-shadow:var(--glow);
}

.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(12, 48, 34, .5);
    backdrop-filter:blur(4px);
    z-index:99999;
}

.modal.show{
    display:block;
}

.modal-content{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
}

.close-modal{
    position:absolute;
    top:5px;
    left:10px;
    font-size:28px;
    color:#2f4f41;
    cursor:pointer;
    transition:.2s;
}

.close-modal:hover{
    color:var(--neon);
}

.modal .auth-box{
    margin:0;
    width:350px;
    max-width:95vw;
}


.auth-form button.button{
    background: var(--main-green);
    color: var(--on-neon);
    width: 100%;
    font-weight: bold;
    padding: 10px 16px;
    border-radius: 8px;
    transition: 0.3s;
}

.auth-form button.button:hover{
    background: var(--hover-green);
    transform: scale(1.05);
    box-shadow: var(--glow);
}

.home-link {
    cursor: pointer;
    position: relative;
    display: inline-block;
    color: inherit;
    font-weight: 600;
    transition: all 0.25s ease;
}

.home-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: var(--main-green);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(20, 160, 106, .45);
}

.home-link:hover {
    color: var(--neon);
    transform: translateY(-1px);
}

.home-link:hover::after {
    width: 80%;
}


.show-description-btn{
    width:100%;
    margin:10px 0;
    padding:10px;
    cursor:pointer;
    background:rgba(20, 160, 106, .09);
    color:var(--neon-2);
    border:1px solid var(--line-strong);
    border-radius:8px;
    font-weight:bold;
    transition:.25s;
}

.show-description-btn:hover{
    background:var(--main-green);
    color:var(--on-neon);
    box-shadow:var(--glow);
}

.description-modal-content{
    max-width:800px;
    max-height:80vh;
    overflow-y:auto;
    text-align:right;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:12px;
}

#descriptionText{
    line-height:2;
    white-space:normal;
    color:var(--text-body);
}


.site-title{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    cursor:pointer;
}

.site-logo-left{
    width:100px;
    height:75px;
    object-fit:contain;
    order: 2;
    filter: drop-shadow(0 2px 6px rgba(20, 160, 106, .3));
}

.site-logo{
    width:55px;
    height:55px;
    object-fit:contain;
    order: 1;
    filter: drop-shadow(0 2px 6px rgba(20, 160, 106, .3));
}


.terms-link{
    text-align:center;
    margin:12px 0;
}

.terms-link a{
    color:var(--neon);
    text-decoration:none;
    font-size:14px;
    font-weight:bold;
    cursor:pointer;
}

.terms-link a:hover{
    text-decoration:underline;
}

.terms-modal{
    max-width:700px;
    width:90%;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:12px;
}

.terms-content{
    max-height:60vh;
    overflow-y:auto;
    text-align:right;
    line-height:2;
    padding:10px;
    color:#2f4f41;
}

.terms-modal .close-modal{
    font-size:50px;
    color:#e53935;
    font-weight:bold;
}

#descriptionText img,
.description-modal-content img {
    width: auto;
    max-width: 100%;
    height: auto;
}

.desc-content {
    direction: rtl;
    text-align: right;
}


/* ==========================================================
   جدیدترین محصولات (دکمه «تازه‌ها» + صفحه فهرست)
   ========================================================== */

.latest-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--main-green);
    color: var(--on-neon);
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    box-shadow:
        0 3px 10px rgba(20, 160, 106, .3),
        inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.latest-btn svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.latest-btn:hover {
    background: var(--hover-green);
    transform: scale(1.05);
    box-shadow:
        0 6px 18px rgba(20, 160, 106, .45),
        inset 0 1px 0 rgba(255, 255, 255, .4);
}

.latest-btn:active {
    transform: scale(.97);
}

.latest-btn.is-active {
    box-shadow:
        0 0 0 3px rgba(20, 160, 106, .25),
        0 6px 18px rgba(20, 160, 106, .45);
}

.search-bar form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-bar input[type="text"] {
    margin-bottom: 0;
}

/* ---------- صفحه فهرست ---------- */
.latest-list {
    max-width: 1300px;
    margin: 10px auto 30px;
    padding: 0 15px;
    direction: rtl;
    text-align: right;
}

.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px 22px;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    border: 1px solid var(--line);
    border-right: 4px solid var(--neon);
    box-shadow: 0 6px 18px rgba(20, 90, 60, .10);
}

.latest-head h2 {
    margin: 0;
    font-size: 20px;
    color: var(--ink);
}

.latest-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--muted);
    opacity: 1;
}

.latest-list .latest-filter input {
    width: 280px;
    max-width: 100%;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid rgba(20, 160, 106, .3);
    outline: none;
    border-radius: 50px;
    background: #ffffff;
    color: var(--ink);
    font-size: 13px;
    transition: box-shadow .25s, border-color .25s;
}

.latest-list .latest-filter input:focus {
    border-color: var(--neon);
    box-shadow: 0 0 0 3px rgba(20, 160, 106, .2);
}

.latest-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 10px;
}

.latest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .92);
    color: #17543c;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
    transition: transform .2s ease, box-shadow .2s ease,
                border-color .2s ease, background .2s ease;
}

.latest-item:hover {
    transform: translateY(-2px);
    background: #eefaf3;
    border-color: var(--neon);
    box-shadow: 0 8px 18px rgba(20, 90, 60, .14), 0 0 14px rgba(20, 160, 106, .18);
}

.latest-num {
    flex: 0 0 auto;
    min-width: 36px;
    height: 26px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--main-green);
    color: var(--on-neon);
    font-size: 11px;
    font-weight: bold;
}

.latest-title {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.latest-arrow {
    flex: 0 0 auto;
    font-size: 22px;
    line-height: 1;
    color: var(--neon);
    transition: transform .2s ease;
}

.latest-item:hover .latest-arrow {
    transform: translateX(-4px);
}

.latest-list .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.latest-list .pagination a {
    margin: 0;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: bold;
    transition: .2s;
}

.latest-list .pagination a.active {
    background: var(--main-green);
    color: var(--on-neon);
}

.latest-list .pagination a:hover {
    background: var(--hover-green);
    color: var(--on-neon);
    border-color: transparent;
}

/* ---------- موبایل ---------- */
@media (max-width: 768px) {
    .search-bar form {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        width: 100%;
        gap: 6px;
    }

    .search-bar form input[type="text"] {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: none;
        padding: 9px 10px;
    }

    .search-bar form input[type="submit"] {
        flex: 0 0 auto;
        width: auto;
        padding: 8px 10px;
    }

    .search-bar form .latest-btn {
        flex: 0 0 auto;
        width: auto;
        padding: 8px 10px;
        gap: 4px;
    }

    .latest-grid {
        grid-template-columns: 1fr;
    }

    .latest-head {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        border-right: 1px solid var(--line);
        border-top: 4px solid var(--neon);
    }

    .latest-list .latest-filter input {
        width: 100%;
    }
}




.product-slider {
    position: relative;
    display: block;
    width: 100%;
}

.product-slider .slide { display: none; }
.product-slider .slide.active { display: block; }

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    padding: 0;
}
.slider-btn:hover { background: rgba(0, 0, 0, .8); }
.slider-btn.prev { right: 6px; }
.slider-btn.next { left: 6px; }

.slider-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 2;
}
.slider-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
}
.slider-dots .dot.active { background: #fff; }