:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --secondary: #ef4444;
    --accent: #10b981;
    --accent-light: #34d399;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --card-bg: #1e293b;
    --card-border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    --radius: 1rem;
    --font: "Vazirmatn", sans-serif;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/Vazirmatn[wght].woff2') format('woff2');
    font-style: normal;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font);
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    direction: rtl;
}
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(9px);
    border-bottom: 1px solid var(--card-border);
    transition: 0.3s;
}
.main-header.scrolled {
    background: rgba(15, 23, 42, 0.761);
    box-shadow: var(--shadow);
}
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.site-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-light);
    white-space: nowrap;
}
.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}
.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid var(--card-border);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text-primary);
    transition: 0.3s;
    font: var(--font);
    font-size: 13px;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.search-input::placeholder {
    color: var(--text-muted);
}
.search-icon {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    fill: var(--text-muted);
}
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: 0.3s;
}
.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: 0.3s;
}
.nav-link:hover {
    color: var(--primary-light);
}
.nav-link:hover::after {
    width: 100%;
}
.hero-section {
    padding: 2rem 0;
}
.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}
.hero-image {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
}
.products-section {
    padding: 3rem 0;
    background: var(--card-bg);
    margin: 0;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    background-image: url(/static/img/bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.section-container {
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 1rem;
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    position: relative;
}
.section-title::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-light),
        var(--accent-light)
    );
    border-radius: 2px;
}
.company-section {
    margin-bottom: -1rem;
}

.space {
    margin-bottom: 6rem;
}

.company-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-light);
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 3rem;
    padding: 1rem;
    background: linear-gradient(
        135deg,
        rgba(30, 41, 59, 0.9),
        rgba(51, 65, 85, 0.9)
    );
    border-radius: var(--radius);
    border-right: 4px solid var(--primary-light);
    border: 1px solid var(--card-border);
}
.products-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 3rem;
}
.products-slider {
    display: flex;
    gap: 2rem 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: auto;
    scrollbar-color: rgb(19, 19, 19);
    padding: 1rem 0;
}
.products-slider::-webkit-scrollbar {
    height: 6px;
}
.products-slider::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}
.products-slider::-webkit-scrollbar-thumb {
    background: rgb(97, 109, 137);
    border-radius: 3px;
}
.product-card {
    flex: 0 0 250px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid var(--card-border);
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-light);
}
.product-image-container {
    height: 170px;
    overflow: hidden;
    background: var(--bg-secondary);
}
.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}
.product-card:hover .product-image {
    will-change: transform;
}
.product-info {
    padding: 1.5rem 1rem;
    text-align: center;
}
.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.view-product-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: 0.3s;
}
.view-product-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    box-shadow: var(--shadow);
    color: var(--text-secondary);
}
.slider-nav-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: #fff;
}
.slider-nav-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}
.slider-nav-btn.prev {
    right: 0.5rem;
}
.slider-nav-btn.next {
    left: 0.5rem;
}
.site-footer {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: var(--text-primary);
    padding: 3rem 0 1rem;
}
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 2rem;
}
.company-info {
    order: -1;
    flex: 1;
    max-width: 500px;
}
.company-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    text-align: right;
}
.contact-details {
    margin-bottom: 1.5rem;
}
.company-address,
.company-phone {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}
.phone-link {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 500;
}
.footer-links {
    display: flex;
    gap: 1.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transition: 0.3s;
}
.footer-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.social-links {
    display: flex;
    gap: 1.8rem;
}
.social-link {
    transition: 0.3s;
}
.social-link:hover {
    transform: scale(1.1);
}
.social-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
}
.companies-showcase {
    order: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
}
.company-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: 0.3s;
    height: 3.5rem;
}
.company-card:hover {
    background: rgba(255, 255, 255, 0.15);
}
.company-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.battery-indicator {
    width: 40px;
    height: 25px;
}
.battery-shell {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}
.battery-fill {
    width: var(--fill-level, 60%);
    height: 100%;
    background: linear-gradient(90deg, var(--accent-light), var(--accent));
    transition: 0.5s;
}
.battery-cap {
    position: absolute;
    left: -6px;
    top: 25%;
    width: 4px;
    height: 50%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 2px 2px 0;
}
.company-name {
    font-size: 0.9rem;
    font-weight: 500;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}
.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
@media (max-width: 1024px) {
    .header-container {
        flex-wrap: wrap;
    }
    .search-container {
        order: 3;
        flex-basis: 100%;
        margin-top: 1rem;
    }
}
@media (max-width: 768px) {
    .site-logo { font-size: 1.5rem; }
    .nav-list { gap: 1.8rem; flex-wrap: wrap;}
    .section-title { font-size: 2rem;}
    .company-title {font-size: 1.5rem;}
    .product-card { flex: 0 0 250px;}
    .slider-nav-btn { width: 2rem; height: 2rem; }
    .footer-content { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        gap: 1.8rem;
    }
    .hero-container,
    .section-container {
        padding: 0 0.4rem;
    }
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }
    .company-title {
        font-size: 1.2rem;
        padding: 0.7rem;
    }
    .products-slider-wrapper {
        padding: 0;
    }
    .product-card {
        flex: 0 0 170px;
    }
    .product-name {
        font-size: 0.95rem;
        min-height: 2rem;
    }
    .product-price {
        font-size: 0.9rem !important;
    }
    .view-product-btn {
        padding: 0.4rem 1.2rem;
        font-size: 0.85rem;
    }
    .product-info {
        padding: 0.8rem 0.5rem;
    }
    .product-image-container {
        height: 130px;
    }
    .slider-nav-btn.prev {
        right: -0.2rem;
    }
    .slider-nav-btn.next {
        left: -0.2rem;
    }
    .slider-nav-btn {
        width: 1.8rem;
        height: 1.8rem;
    }
    .slider-nav-btn svg {
        width: 1rem;
        height: 1rem;
    }
    .footer-links {
        justify-content: center;
        gap: 0.8rem;
    }
    .company-card {
        height: 2.8rem;
        padding: 0.6rem 0.8rem;
    }
    .company-name {
        font-size: 0.75rem;
    }
    .battery-indicator {
        width: 30px;
        height: 20px;
    }
    .footer-content {
        gap: 1.5rem;
    }
    .company-info {
        max-width: 100%;
    }
    .company-title {
        font-size: 1.2rem;
    }
}

.about-hero {
    background: linear-gradient(135deg, var(--card-bg), var(--bg-tertiary));
    border-radius: var(--radius);
    margin: 2rem auto;
    padding: 4rem 2rem;
    max-width: 1060px;
    width: 90%;
    text-align: center;
    border: 1px solid var(--card-border);
}

.about-hero h1 {
    color: var(--primary-light);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-hero h3 {
    color: var(--accent-light);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.about-hero p {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.why-us-section {
    text-align: center;
    margin: 3rem 0;
}

.why-us-section h2 {
    color: var(--secondary);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 1.8rem;
    width: 100%;
    max-width: 220px;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    transition: 0.3s;
    color: var(--text-primary);
    font-weight: 500;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

.address-card {
    background: linear-gradient(135deg, var(--card-bg), var(--bg-tertiary));
    border-radius: var(--radius);
    margin: 2rem auto;
    padding: 3rem 2rem;
    max-width: 1060px;
    width: 90%;
    text-align: center;
    border: 1px solid var(--card-border);
}

.address-card h2 {
    color: var(--primary-light);
    margin-bottom: 1.5rem;
}

.address-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.contact-section {
    text-align: center;
    margin: 3rem auto;
    padding: 3rem 2rem;
}

.contact-section h2 {
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.contact-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.emergency-btn {
    background: linear-gradient(135deg, var(--secondary), #dc2626);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font);
}

.emergency-btn:hover {
    will-change: transform;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .about-hero {
        padding: 2rem 1rem;
    }
    .about-hero h1 {
        font-size: 1.8rem;
    }
    .feature-card {
        max-width: 180px;
        padding: 1.2rem;
    }
}
@media (max-width: 768px) {
    .products-slider {
        gap: 1.5rem;
        padding: 0.5rem 0.25rem;
    }

    .product-card {
        margin: 0 0.25rem;
    }
}

@media (max-width: 480px) {
    .products-slider {
        gap: 1rem;
    }

    .product-card {
        flex: 0 0 75vw;
        margin: 0 0.5rem;
    }
}

.custom-product-slider {
    gap: 2rem !important;
}

.related-products-slider {
    display: flex;
    gap: 2rem 1.5rem !important;
}

.related-products-slider .item {
    margin-bottom: 1rem !important;
}

@media (max-width: 768px) {
    .custom-product-slider {
        gap: 1.2rem !important;
    }
}

.search-container button[type="submit"] {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--text-muted);
}
.search-container button[type="submit"]:hover {
    color: var(--primary-light);
    background: rgba(96, 165, 250, 0.08);
}
.search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.25rem;
    border-radius: 999px;
    background:
        linear-gradient(45deg, transparent 43%, var(--text-secondary) 44%, var(--text-secondary) 56%, transparent 57%),
        linear-gradient(-45deg, transparent 43%, var(--text-secondary) 44%, var(--text-secondary) 56%, transparent 57%),
        rgba(148, 163, 184, 0.18);
    cursor: pointer;
}
.search-input::-webkit-search-cancel-button:hover {
    background:
        linear-gradient(45deg, transparent 43%, #fff 44%, #fff 56%, transparent 57%),
        linear-gradient(-45deg, transparent 43%, #fff 44%, #fff 56%, transparent 57%),
        var(--primary);
}

@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }
    .site-logo {
        text-align: center;
    }
    .search-container {
        order: 2;
        margin-top: 0;
        max-width: none;
    }
    .nav-link {
        font-size: 0.74rem;
        padding-inline: 0.35rem;
    }
    .slider-nav-btn {
        display: none;
    }
    .company-card {
        height: auto;
        padding: 0.75rem;
    }
}

/* ===== منوی ناوبری پایین (موبایل) ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(9px);
    border-top: 1px solid var(--card-border);
    padding: 0.5rem 0.75rem;
    height: 65px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.bottom-nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    height: 100%;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    transition: 0.2s;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    position: relative;
}

.bottom-nav-link .bottom-nav-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 2;
    transition: 0.2s;
}

.bottom-nav-link .bottom-nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    margin-top: 2px;
    line-height: 1;
}

.bottom-nav-link.active {
    color: var(--primary-light);
}

.bottom-nav-link.active::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary-light);
    border-radius: 1px;
}

.bottom-nav-link:hover {
    color: var(--primary-light);
}

/* نمایش در موبایل و مخفی‌کردن منوی بالایی */
@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }

    .main-header .main-navigation {
        display: none;
    }

    body {
        padding-bottom: 75px;
    }
}

/* مخفی‌سازی منوی پایین در دسکتاپ */
@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }

    .main-header .main-navigation {
        display: block;
    }

    body {
        padding-bottom: 0;
    }
}

/* حذف هایلایت آبی در موبایل */
* {
    -webkit-tap-highlight-color: transparent !important;
}


/* ===== کاهش ارتفاع هدر در موبایل ===== */
@media (max-width: 768px) {
    .main-header .header-container {
        padding: 0.9rem 0.8rem !important;
        gap: 0.3rem !important;
    }

    .site-logo {
        font-size: 1.2rem !important;
        margin: 0 !important;
    }

    .search-container {
        max-width: 60% !important;
        margin-top: 0 !important;
        flex: 1;
    }

    .search-input {
        padding: 0.35rem 2.5rem 0.35rem 0.8rem !important;
        font-size: 0.75rem !important;
        border-radius: 0.6rem !important;
        height: 2.5rem !important;
    }

    .search-container button[type="submit"] {
        width: 2rem !important;
        height: 2rem !important;
    }

    .search-icon {
        width: 1rem !important;
        height: 1rem !important;
    }
}

@media (max-width: 480px) {
    .main-header .header-container {
        padding: 0.8rem 0.5rem !important;
        gap: 0.6rem !important;
    }

    .search-input {
        font-size: 0.7rem !important;
        padding: 0.25rem 2rem 0.25rem 0.6rem !important;
    }

    .search-container {
        max-width: 100% !important;
    }
    .search-container button[type="submit"] {
        width: 1.8rem !important;
        height: 1.8rem !important;
    }

    .search-icon {
        width: 0.9rem !important;
        height: 0.9rem !important;
    }
}

/* ===== بهبود فوتر در موبایل ===== */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: stretch;
        gap: 2rem;
    }

    .company-info {
        order: 0;
        max-width: 100%;
        text-align: center;
    }

    .companies-showcase {
        order: -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        justify-items: center;
    }

    .company-card {
        width: 100%;
        height: auto;
        padding: 0.6rem 0.8rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .company-link {
        justify-content: center;
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .battery-indicator {
        width: 30px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .companies-showcase {
        grid-template-columns: 2fr 2fr;
        gap: 0.5rem;
    }

    .company-card {
        padding: 0.4rem 0.5rem;
    }

    .company-link {
        font-size: 0.7rem;
        gap: 0.3rem;
    }

    .battery-indicator {
        width: 25px;
        height: 16px;
    }
}
