@import url("/static/vendor/pczone/font-fallback.css?v=20260620-precise");
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.top-bar {
    background-color: #000;
    color: #fff;
    padding: 10px 0;
    font-size: 12px;
    border-bottom: 2px solid #ff0000;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a, .user-links a {
    color: #fff;
    margin-left: 20px;
    transition: color 0.45s ease;
}

.top-links a:hover, .user-links a:hover {
    color: #ff0000;
}

.main-header {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    color: #ff0000;
    text-decoration: none;
    margin-left: 30px;
    letter-spacing: 1px;
    transition: color 0.45s ease;
}

.logo:hover {
    color: #cc0000;
}

.search-box {
    flex: 1;
    max-width: 500px;
}

.search-box form {
    display: flex;
    border: 2px solid #ff0000;
    border-radius: 5px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background-color: #ff0000;
    color: #fff;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.45s ease;
}

.search-box button:hover {
    background-color: #cc0000;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cart-btn {
    display: flex;
    align-items: center;
    color: #333;
    position: relative;
    font-weight: 500;
}

.cart-count {
    background-color: #ff0000;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    position: absolute;
    top: -8px;
    left: -15px;
}

.login-btn {
    background-color: #ff0000;
    color: #fff;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.45s ease;
}

.login-btn:hover {
    background-color: #cc0000;
}

.main-menu {
    background-color: #1a1a1a;
    border-bottom: 3px solid #ff0000;
    position: sticky;
    top: 82px;
    z-index: 999;
}

.main-menu .container {
    display: flex;
    align-items: center;
}

.category-menu {
    background-color: #ff0000;
    padding: 15px 25px;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.45s ease;
}

.category-menu:hover {
    background-color: #cc0000;
}

.menu-items {
    display: flex;
    margin-right: 20px;
}

.menu-items > li {
    position: relative;
}

.menu-items > li > a {
    color: #fff;
    padding: 15px 18px;
    display: block;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.45s ease;
}

.menu-items > li > a:hover {
    background-color: #ff0000;
}

.submenu {
    position: absolute;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 220px;
    display: none;
    z-index: 100;
    top: 100%;
    right: 0;
    border-radius: 0 0 5px 5px;
    overflow: hidden;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu li a {
    color: #333 !important;
    padding: 12px 15px !important;
    display: block;
    border-bottom: 1px solid #eee;
    font-size: 13px !important;
    transition: all 0.45s ease;
}

.submenu li a:hover {
    background-color: #f5f5f5;
    color: #ff0000 !important;
    padding-right: 20px !important;
}

.slider-section {
    margin: 25px 0;
}

.slider-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
}

.main-slider {
    background: linear-gradient(135deg, #1a1a1a, #ff0000);
    height: 400px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.main-slider h1 {
    font-size: 36px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.main-slider p {
    font-size: 18px;
    opacity: 0.95;
}

.slider-banners {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slider-banner {
    background: linear-gradient(135deg, #333, #000);
    height: 192px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.45s ease;
}

.slider-banner:hover {
    transform: scale(1.02);
}

/* بقیه استایل‌هات همون‌طور که بود باقی مونده؛ فقط کامنت‌های تیترگونه حذف شده */

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .slider-container {
        grid-template-columns: 1fr;
    }

    .main-slider {
        height: 300px;
    }

    .slider-banners {
        flex-direction: row;
    }

    .slider-banner {
        flex: 1;
        height: 150px;
    }

    .features-box {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-item {
        border-left: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }

    .feature-item:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-menu .container {
        flex-wrap: wrap;
    }

    .category-menu {
        width: 100%;
        justify-content: center;
    }

    .menu-items {
        margin: 10px 0;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }

    .slider-banners {
        flex-direction: column;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brands {
        gap: 15px;
    }

    .brand-item {
        font-size: 14px;
    }

    .mid-banner h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

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

    .features-box {
        grid-template-columns: 1fr;
    }

    .feature-item {
        border-bottom: 1px solid #eee;
    }

    .feature-item:last-child {
        border-bottom: none;
    }

    .top-links a, .user-links a {
        margin: 0 10px;
    }

    .menu-items > li > a {
        padding: 12px 10px;
        font-size: 12px;
    }
}

/* SEARCH_TEXT_VISIBILITY_PATCH (non-destructive) */

.search-box input,
.search-box input[type="text"],
.search-box input[type="search"] {
    color: #111 !important;
    background: #fff !important;
    caret-color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    font-family: 'Vazirmatn', 'IRANYekanX', 'IRANSansX', 'IRANSans', Tahoma, system-ui, -apple-system, sans-serif !important;
}
.search-box input::placeholder,
#pageSearchInput::placeholder {
    color: #9ca3af !important;
    opacity: 1;
}
body, button, input, select, textarea {
    font-family: 'Vazirmatn', 'IRANYekanX', 'IRANSansX', 'IRANSans', Tahoma, system-ui, -apple-system, sans-serif;
}


/* ============================================================
   RESPONSIVE FIX PATCH — رفع اسکرول افقی و ریسپانسیو کامل
   ============================================================ */

/* جلوگیری از اسکرول افقی در همه دستگاه‌ها */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* هدر ریسپانسیو */
@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 15px;
    }
    .logo {
        font-size: 22px;
        margin-left: 0;
    }
    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
        flex: 0 0 100%;
    }
    .header-actions {
        order: 2;
        gap: 15px;
    }
    /* منو موبایل */
    .main-menu .container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }
    .menu-items {
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow-x: auto;
        margin-right: 0;
        padding-bottom: 2px;
    }
    .menu-items > li > a {
        padding: 14px 12px;
        font-size: 13px;
    }
    .category-menu {
        padding: 14px 16px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    /* اسلایدر */
    .slider-container {
        grid-template-columns: 1fr;
    }
    .main-slider {
        height: 220px;
    }
    .main-slider h1 { font-size: 22px; }
    .main-slider p  { font-size: 14px; }
    .slider-banners {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 4px;
    }
    .slider-banner {
        min-width: 160px;
        height: 110px;
        font-size: 14px;
        flex-shrink: 0;
    }
    /* گرید محصولات */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    /* فوتر */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    .product-card .product-info {
        padding: 8px;
    }
    .product-card .product-name {
        font-size: 12px;
    }
    .product-card .product-price {
        font-size: 13px;
    }
    .main-slider {
        height: 180px;
    }
    .main-slider h1 { font-size: 18px; }
    /* تاپ‌بار */
    .top-bar {
        display: none; /* در موبایل خیلی کوچک مخفی شود */
    }
}

/* کارت محصول ریسپانسیو */
.product-card {
    min-width: 0;
    overflow: hidden;
}
.product-card img {
    max-width: 100%;
    height: auto;
}

/* جدول‌ها در موبایل */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

/* فرم‌های لاگین و ثبت‌نام */
@media (max-width: 480px) {
    .otp-box {
        width: 38px !important;
        height: 44px !important;
        font-size: 16px !important;
    }
}

/* Cart Drawer — overlay روی موبایل درست کار کنه */
@media (max-width: 480px) {
    .cart-drawer-panel {
        width: 100vw !important;
    }
}


/* === PCZONE CDN-independent desktop menu fallback ===
   Keeps category hover menus working even when Tailwind CDN is unavailable. */
@media (min-width: 769px) {
    #main-menu .md\:hidden,
    #main-menu #menuToggle,
    #main-menu .pcz-mobile-menu-toggle {
        display: none !important;
    }
    #main-menu .menu-items,
    #main-menu #menuItems {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
        white-space: normal !important;
    }
    #main-menu .has-submenu {
        position: relative !important;
    }
    #main-menu .has-submenu > .submenu {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        min-width: 220px !important;
        z-index: 9999 !important;
        background: #fff !important;
        border-radius: 0 0 12px 12px !important;
        overflow: hidden !important;
        box-shadow: 0 18px 38px rgba(15,23,42,.18) !important;
        border: 1px solid #e5e7eb !important;
    }
    #main-menu .has-submenu:hover > .submenu,
    #main-menu .has-submenu:focus-within > .submenu {
        display: block !important;
    }
    #main-menu .submenu li,
    #main-menu .submenu a {
        display: block !important;
        width: 100% !important;
    }
    #main-menu .submenu a {
        color: #374151 !important;
        background: #fff !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }
    #main-menu .submenu a:hover {
        color: #ff0000 !important;
        background: #f9fafb !important;
        padding-right: 22px !important;
    }
}

@media (max-width: 768px) {
    #main-menu #menuToggle {
        display: flex !important;
    }
}
