:root {
    --font-farsi: 'Vazirmatn', sans-serif;
    --font-eng: 'Roboto Mono', monospace;
    --accent: #CCFF00;
    --bg-card: #151515;
    --bg-main: #1A1C20;
    --text: #F2F2F5;
    --border: 1px solid #363A43;
    --accent-rgb: 163, 255, 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.03);
}

html::-webkit-scrollbar, body::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover { background: #d9ff33; }

span, button, a, input, .cat-name, .section-title, .cat-btn {
    font-family: var(--font-farsi);
}

[lang="en"], .en, .number { font-family: var(--font-eng); }

body {
    background: var(--bg-main);
    color: var(--text);
    font-family: var(--font-farsi);
    direction: rtl;
    line-height: 1.6;
    font-feature-settings: "tnum";
    overflow-x: hidden;
}

/* ==================== HEADER ==================== */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -1px;
    cursor: pointer;
    white-space: nowrap;
}

.logo-part1 { color: #fff; margin-right: 4px; }
.logo-part2 { color: var(--accent); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    flex-grow: 1;
    justify-content: center;
    margin: 0 10px;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover { color: var(--accent); }

.nav-icons {
    display: flex;
    align-items: center;
    gap: 18px;
}

.icon-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 24px;
}

.icon-link:hover { color: var(--accent); transform: scale(1.1); }

.dropdown-wrapper { position: relative; }

.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(28, 28, 30, 0.92);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 32px 0 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: none;
    z-index: 999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.dropdown-wrapper:hover .dropdown-menu,
.dropdown-menu:hover,
.dropdown-wrapper:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

.dropdown-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.dropdown-column { min-width: 0; }

.dropdown-productGroup-title {
    color: #CCFF00;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-column ul { list-style: none; padding: 0; margin: 0; }
.dropdown-column ul li { margin-bottom: 4px; }

.dropdown-column ul li a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.25s ease;
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
}

.dropdown-column ul li a:hover {
    color: #fff;
    padding-right: 8px;
    border-bottom-color: rgba(204, 255, 0, 0.15);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(204, 255, 0, 0.03), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
    order: 3;
}

.icon-wrapper {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.glass-tooltip {
    position: absolute;
    top: 150%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 10px;
    color: white;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.icon-wrapper:hover .glass-tooltip {
    opacity: 1;
    visibility: visible;
    top: 130%;
}

/* ==================== CART PAGE ==================== */
.cart-page {
    padding-top: 100px;
    background: #020617;
    min-height: 100vh;
}

.cart-container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 0 5% 60px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 12px;
}

.cart-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.back-to-shop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.back-to-shop:hover {
    color: #CCFF00;
    border-color: rgba(204, 255, 0, 0.2);
    background: rgba(204, 255, 0, 0.05);
    transform: translateX(-4px);
}

.back-to-shop span { font-size: 1.1rem; }

.cart-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
}

.cart-items-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px;
    min-height: 200px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty .empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
    opacity: 0.3;
}

.cart-empty h3 { color: #fff; font-size: 1.3rem; margin-bottom: 8px; }
.cart-empty p { color: rgba(255, 255, 255, 0.3); margin-bottom: 20px; }

.empty-btn {
    display: inline-block;
    padding: 12px 32px;
    background: rgba(204, 255, 0, 0.08);
    border: 1px solid rgba(204, 255, 0, 0.15);
    border-radius: 999px;
    color: #CCFF00;
    text-decoration: none;
    transition: all 0.3s ease;
}

.empty-btn:hover {
    background: rgba(204, 255, 0, 0.15);
    transform: scale(1.02);
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    align-items: center;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-image {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-info { flex: 1; }

.cart-item-name {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
}

.cart-item-meta {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.cart-item-price {
    color: #CCFF00;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 4px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-qty-control {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-qty-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.cart-qty-number {
    min-width: 30px;
    text-align: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px;
}

.cart-remove-btn:hover {
    color: #FF6B6B;
    transform: scale(1.1);
}

.cart-summary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
}

.summary-row.total {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.summary-row.total span:last-child { color: #CCFF00; }

.summary-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
    margin: 8px 0;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: #CCFF00;
    border: none;
    border-radius: 999px;
    color: #0c0c0c;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.checkout-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(204, 255, 0, 0.2);
}

.checkout-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.clear-cart-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.clear-cart-btn:hover {
    border-color: #FF6B6B;
    color: #FF6B6B;
}

.cart-badge {
    display: none;
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF6B6B;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.cart-link { position: relative; }

/* ==================== FOOTER ==================== */
.footer {
    position: relative;
    z-index: 10;
    background: #0c0c0c;
    color: #fff;
    padding: 40px 20px;
    border-top: 3px solid #ccff00;
    direction: rtl;
}

.footer-inner { max-width: 1200px; margin: 60px auto; }

.footer-about-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #2a2a2a;
}

.footer-about-text {
    max-height: 60px;
    overflow: hidden;
    transition: max-height 0.5s ease;
    line-height: 2;
    font-size: 15px;
    color: #e6e6e6;
}

.footer-about-text.open { max-height: 500px; }

.footer-links-section {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-column { flex: 1; min-width: 220px; }
.footer-column h3 { font-size: 16px; color: #ccff00; margin-bottom: 15px; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 10px; color: #ddd; }
.footer-column a { color: #ddd; text-decoration: none; transition: 0.3s; }
.footer-column a:hover { color: #ccff00; }

.newsletter-form { display: flex; flex-direction: column; gap: 10px; }

.newsletter-form input {
    padding: 10px 12px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #1a1a1a;
    color: #fff;
    outline: none;
}

.newsletter-form button {
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: #ccff00;
    color: #0c0c0c;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.newsletter-form button:hover { opacity: 0.9; }

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #222;
    font-size: 0.8rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {

    .main-header { position: fixed; top: 0; height: 56px; }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        font-size: 1.5rem;
        z-index: 1001;
    }

    .menu-toggle.active {
        color: var(--accent);
        transform: rotate(90deg);
    }

    .nav-container { gap: 10px; padding: 0 14px; }
    .nav-icons { margin-right: auto; margin-left: 0; gap: 12px; }
    .logo-container { flex-grow: 0; font-size: 1.2rem; }
    .icon-link { font-size: 20px; }

    .nav-links {
        display: flex;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        overflow-anchor: none;
        overscroll-behavior: contain;
        background: rgba(15, 15, 18, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 20px 16px 40px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        pointer-events: none;
        list-style: none;
        scrollbar-width: thin;
        scrollbar-color: var(--accent) transparent;
    }

    .nav-links::-webkit-scrollbar { width: 5px; }
    .nav-links::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        flex-shrink: 0;
    }

    .nav-links > li:last-child { border-bottom: none; }

    .nav-links > li > a {
        display: block;
        width: 100%;
        padding: 14px 4px;
        font-size: 0.95rem;
        text-align: right;
        color: rgba(255, 255, 255, 0.85);
        font-family: var(--font-farsi);
        text-decoration: none;
    }

    .dropdown-trigger {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }

    .dropdown-trigger .arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.65rem;
        transition: all 0.3s ease;
        margin-right: 8px;
        line-height: 1;
    }

    .dropdown-wrapper.open .dropdown-trigger .arrow {
        transform: rotate(180deg);
        background: rgba(204, 255, 0, 0.15);
        color: var(--accent);
    }

    .dropdown-menu {
        position: static;
        display: none;
        background: transparent;
        border: none;
        padding: 0;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .dropdown-wrapper.open .dropdown-menu { display: block; }
    .dropdown-menu::before { display: none; }

    .dropdown-inner { padding: 8px 0 12px; }
    .dropdown-columns { display: flex; flex-direction: column; gap: 8px; }

    .dropdown-column {
        padding: 12px;
        background: rgba(255, 255, 255, 0.025);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 12px;
    }

    .dropdown-productGroup-title {
        color: var(--accent);
        font-size: 0.75rem;
        font-weight: 700;
        margin: 0 0 8px;
        padding: 0;
        border: none;
    }

    .dropdown-column ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .dropdown-column ul li { margin: 0; }

    .dropdown-column ul li a {
        display: block;
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.75rem;
        padding: 8px 4px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 7px;
        text-align: center;
        border: none;
    }

    .dropdown-column ul li a:hover {
        background: rgba(204, 255, 0, 0.12);
        color: var(--accent);
    }

    /* ===== FOOTER موبایل ===== */
    .footer { padding: 30px 16px; }
    .footer-inner { margin: 30px auto; }

    .footer-about-text {
        font-size: 13px;
        line-height: 1.85;
        max-height: none !important;
        overflow: visible !important;
    }

    .footer-links-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px 12px;
    }

    .footer-column { min-width: 0; }
    .footer-column h3 { font-size: 13px; margin-bottom: 10px; }
    .footer-column ul li { font-size: 12px; margin-bottom: 7px; }

    .footer-column:nth-child(3) {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-column:nth-child(3) .newsletter-form {
        max-width: 320px;
        margin: 0 auto;
    }

    .newsletter-form input,
    .newsletter-form button {
        padding: 9px 11px;
        font-size: 0.82rem;
    }

    .footer-bottom {
        margin-top: 30px;
        padding-top: 16px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .cart-content {
        grid-template-columns: 1fr;
    }
    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 12px;
        padding: 12px 0;
    }
    .cart-item-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
    }
    .cart-item-image { width: 60px; height: 60px; }
    .cart-summary { position: static; }
    .cart-title { font-size: 1.6rem; }
}

@media (max-width: 576px) {
    .cart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .back-to-shop {
        font-size: 0.85rem;
        padding: 6px 14px;
    }
}

@media (max-width: 480px) {
    .cart-item {
        grid-template-columns: 50px 1fr;
        gap: 10px;
    }
    .cart-item-image { width: 50px; height: 50px; }
    .cart-item-name { font-size: 0.9rem; }
    .cart-item-price { font-size: 0.85rem; }

    .footer { padding: 20px 12px; }
    .footer-inner { margin: 20px auto; }

    .footer-about-text {
        font-size: 12px;
        max-height: none !important;
        overflow: visible !important;
    }

    .footer-column h3 { font-size: 12px; }
    .footer-column ul li { font-size: 11px; }
    .footer-bottom { margin-top: 24px; padding-top: 14px; font-size: 0.7rem; }
}