
/* کلاس پویا بر اساس زبان انتخاب‌شده */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: "Vazir", "Tahoma", sans-serif;
}

body.ltr {
    direction: ltr;
    text-align: left;
    font-family: "Tahoma", sans-serif;
}

/* جهت متن برای عناصر خاص */
.card-body,
.list-group-item {
    direction: inherit;
    text-align: inherit;
}

/* عناصر عمومی */
.logo {
    height: 50px;
    width: auto;
    vertical-align: middle;
}

.card {
    height: 100%;
    padding-top: 1rem;
}

.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.card-body {
    display: flex;
    flex-direction: column;
}

.card-body .mt-auto {
    margin-top: auto;
}

body {
    font-size: 16px;
    color: #333;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

/* هدر */
header {
    background-color: #003366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
}

header img.logo {
    height: 50px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

header nav a:hover {
    color: #FF6600;
}

/* محتوا */
main {
    padding: 40px 30px;
    min-height: 70vh;
}

/* دسته بندی */
@media (min-width: 768px) {
    .col-md-custom {
        flex: 0 0 20%; /* تقریبا وسط col-md-2 و col-md-3 */
        max-width: 20%;
    }
}

/* هدر اصلی */
.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #003366;
    color: white;
    gap: 15px;
}

.search-form {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    margin: 0 15px;
}

.header-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: #FF6600;
}

.currency-form select,
.language-form select {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: white;
    font-size: 14px;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 767px) {
    .site-header {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }
    
    .search-form {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
    }
    
    .input-group {
        width: 100%;
    }
    
    .header-nav {
        order: 2;
        width: 100%;
        justify-content: center;
        gap: 10px;
        flex-direction: column;
    }
    
    .nav-menu {
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .currency-form,
    .language-form {
        margin: 5px 0;
        text-align: center;
    }
    
    .currency-form select,
    .language-form select {
        width: 100%;
        max-width: 150px;
    }
}

/* برای تبلت */
@media (min-width: 768px) and (max-width: 991px) {
    .site-header {
        padding: 10px 20px;
        gap: 12px;
    }
    
    .nav-menu {
        gap: 12px;
    }
    
    .search-form {
        margin: 0 12px;
        max-width: 350px;
    }
}

/* برای دسکتاپ */
@media (min-width: 992px) {
    .site-header {
        padding: 15px 30px;
        gap: 20px;
    }
}

/* محصولات در موبایل */
@media (max-width: 767px) {
    .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        max-width: 100% !important;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    .card {
        margin: 0 auto 15px !important;
        width: 100% !important;
    }
    
    .card-img-top {
        height: 180px !important;
    }
    
    .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
}

/* فوتر */
footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 14px;
}
