: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;
}
.enamad-logo {
    margin-top: 6rem;
    display: block;
    float: left;
    background: #fff;
    padding: 0.4rem;
    border-radius: 0.5rem;
    line-height: 0;
}
.enamad-logo img {
    max-width: 120px;
    height: auto;
    display: block;
}
.companies-column {
    order: 0;
}
.companies-column::after {
    content: "";
    display: table;
    clear: both;
}
.companies-showcase {
    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; }
}

/* بازخورد فوری و قابل پیش‌بینی برای تعامل‌های لمسی */
button, .nav-link, .add-to-cart, .view-product-btn, .bottom-nav-link {
    -webkit-tap-highlight-color: transparent;
}

button:active:not(:disabled), .nav-link:active, .add-to-cart:active,
.view-product-btn:active, .bottom-nav-link:active {
    transform: scale(0.97);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    left: 0;
    z-index: 1100;
    display: none;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.search-suggestions.is-visible {
    display: block;
}

.search-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.9rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--card-border);
}

.search-suggestion:last-child {
    border-bottom: 0;
}

.search-suggestion:hover, .search-suggestion:focus-visible {
    background: rgba(96, 165, 250, 0.12);
    outline: none;
}

.search-suggestion small {
    color: var(--text-muted);
    white-space: nowrap;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-primary);
}

.inline-action {
    margin-inline-start: 0.5rem;
    padding: 0.2rem 0.55rem;
    color: var(--primary-light);
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 0.35rem;
    cursor: pointer;
    font-family: inherit;
}

.gateway-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.gateway-card {
    width: min(100%, 30rem);
    max-width: 30rem;
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.gateway-card h1 {
    margin: 1rem 0 0.75rem;
    color: var(--text-primary);
    font-size: 1.35rem;
}

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

.gateway-spinner {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto;
    border: 3px solid var(--card-border);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: gateway-spin 0.8s linear infinite;
}

.gateway-action, .gateway-back {
    display: block;
    margin-top: 1.2rem;
    padding: 0.7rem 1rem;
    border-radius: 0.6rem;
    text-decoration: none;
}

.gateway-action {
    color: white;
    background: var(--primary);
}

.gateway-back {
    color: var(--text-secondary);
}

@keyframes gateway-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    button:active:not(:disabled), .nav-link:active, .add-to-cart:active,
    .view-product-btn:active, .bottom-nav-link:active {
        transform: none;
    }
}
@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-column {
        order: -1;
    }
    .companies-showcase {
        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;
    }
}

/* ===== Badge & Toast Notification Styles ===== */
.profile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    position: absolute;
    top: -4px;
    left: -6px;
    box-shadow: 0 0 0 2px var(--bg-primary), 0 2px 5px rgba(239, 68, 68, 0.6);
    animation: badge-pulse 2s infinite;
}

#profile-badge-desktop {
    position: absolute;
    top: -2px;
    left: -12px;
}

@keyframes badge-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.order-toast {
    position: fixed;
    bottom: 80px;
    right: 50%;
    transform: translateX(50%) translateY(120px);
    opacity: 0;
    visibility: hidden;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.2);
    border-radius: 1rem;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    z-index: 9999;
    max-width: 90vw;
    width: 420px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 769px) {
    .order-toast {
        bottom: 25px;
        right: 25px;
        transform: translateY(120px);
    }
    .order-toast.active {
        transform: translateY(0) !important;
    }
}

.order-toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(0);
}

.order-toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.order-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-toast-text {
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.order-toast-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.order-toast-action:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* ===== Pulse Glow Animation for Profile Navigation ===== */
.profile-nav-item.pulse-glow {
    animation: nav-pulse-glow 1.5s ease-in-out 3;
}

@keyframes nav-pulse-glow {
    0% { color: var(--text-secondary); text-shadow: none; }
    50% { color: #3b82f6; text-shadow: 0 0 12px rgba(59, 130, 246, 0.9), 0 0 20px rgba(59, 130, 246, 0.6); transform: scale(1.08); }
    100% { color: var(--text-secondary); text-shadow: none; }
}

.pending-orders-card {
    border: 2px solid var(--primary-light) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25) !important;
    position: relative;
}

.pulse-primary-btn {
    animation: btn-attention-glow 2s infinite ease-in-out;
}

@keyframes btn-attention-glow {
    0% { box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3), inset 0 0 0 rgba(255, 255, 255, 0); }
    50% { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.8), inset 0 0 12px rgba(255, 255, 255, 0.3); }
    100% { box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3), inset 0 0 0 rgba(255, 255, 255, 0); }
}

/* ===== Out of Stock UI Styles ===== */
.out-of-stock-card {
    opacity: 0.65;
    filter: grayscale(40%);
}

.oos-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: #ffffff;
    padding: 0.25rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
    z-index: 1;
}

.out-of-stock-box {
    border-color: var(--card-border) !important;
    background: linear-gradient(135deg, var(--bg-secondary), var(--card-bg)) !important;
}

/* ===== SEO: Visually hidden but accessible to screen readers & search engines ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Breadcrumb Navigation ===== */
.breadcrumb-nav {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary, #1e1e2e);
    border-bottom: 1px solid var(--card-border, rgba(255,255,255,0.08));
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    direction: rtl;
}

.breadcrumb-item a {
    color: var(--primary-light, #60a5fa);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--accent-light, #38bdf8);
    text-decoration: underline;
}

.breadcrumb-item[aria-current="page"] {
    color: var(--text-primary, #e2e8f0);
    font-weight: 500;
}

.breadcrumb-item[aria-hidden="true"] {
    opacity: 0.4;
    font-size: 1rem;
}


/* ===== Button Loading Spinner ===== */
.btn-loading {
    pointer-events: none !important;
    opacity: 0.8 !important;
}

.spinner-border {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: middle;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}
