/* =========================================
 *  1. تنظیمات پایه و تایپوگرافی (Base & Typography)
 *  ========================================= */
body {
    font-family: 'Vazirmatn', "Segoe UI", Tahoma, sans-serif;
    min-height: 100vh;
    background-color: #f4f5f7 !important; /* رنگ پس‌زمینه فروشگاهی */
}

.card {
    border: none;
}

footer {
    font-size: 0.9rem;
}

.object-fit-cover {
    object-fit: cover;
}

/* افکت هاور روی لینک‌ها */
.hover-primary {
    transition: color 0.2s ease;
}
.hover-primary:hover {
    color: #0d6efd !important;
}

/* =========================================
 *  2. هدر و نویگیشن (Header & Navbar)
 *  ========================================= */
.sticky-top {
    z-index: 1020;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.dropdown-menu {
    border-radius: 12px;
    padding: 0.5rem;
}
.dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}
.dropdown-item:hover {
    background-color: #f0f4ff;
    color: #0d6efd;
}

/* نوار جستجو */
.form-control:focus {
    box-shadow: none;
    border-color: #0d6efd;
    background-color: #fff !important;
}

/* بج سبد خرید (نسخه نهایی و یکپارچه) */
.cart-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 0.65rem;
    padding: 0.25em 0.5em;
    border: 2px solid #fff;
}

/* =========================================
 *  3. صفحه اصلی (Homepage - Technolife Style)
 *  ========================================= */
.hero-slide {
    min-height: 350px;
    border-radius: 16px;
}

@media (max-width: 768px) {
    .hero-slide { min-height: 250px; }
    .hero-slide h1 { font-size: 1.8rem; }
}

/* دسته‌بندی‌های صفحه اصلی */
.category-card {
    transition: all 0.2s ease;
    border-radius: 12px;
    background-color: #fff;
}
.category-card:hover {
    background-color: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* تب‌های محصولات */
#productTabs .nav-link {
color: #6c757d;
border-radius: 30px;
padding: 8px 24px;
margin: 0 4px;
transition: all 0.3s;
}
#productTabs .nav-link.active {
background-color: #0d6efd;
color: white;
box-shadow: 0 4px 10px rgba(13,110,253,0.3);
}

/* بنرهای تبلیغاتی میانی */
.promo-banner {
    transition: transform 0.3s ease;
}
.promo-banner:hover {
    transform: scale(1.02);
}

/* برندها */
.brand-card {
    border-radius: 12px;
    transition: all 0.2s ease;
}
.brand-card:hover {
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* =========================================
 *  4. کارت محصول (Product Cards)
 *  ========================================= */
.product-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.product-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    transform: translateY(-5px);
}
.product-img {
    transition: transform 0.3s ease;
}
.product-card:hover .product-img {
    transform: scale(1.05);
}

/* =========================================
 *  5. ستاره‌ها و علاقه‌مندی‌ها (Reviews & Wishlist)
 *  ========================================= */
/* ستاره‌های رادیویی */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
    font-size: 1.8rem;
}
.star-rating .star-label input { display: none; }
.star-rating .star-label span {
    color: #dee2e6;
    cursor: pointer;
    transition: color 0.15s;
}
.star-rating .star-label input:checked ~ span,
.star-rating .star-label:hover span,
.star-rating .star-label:hover ~ .star-label span {
    color: #ffc107;
}

/* قلب wishlist */
.wishlist-btn .heart { font-size: 1.1rem; line-height: 1; }
.wishlist-btn:hover .heart { transform: scale(1.15); transition: transform 0.15s; }

/* =========================================
 *  6. داشبورد مدیریت (Dashboard)
 *  ========================================= */
.kpi-card {
    transition: transform 0.15s, box-shadow 0.15s;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}
/* کارت‌های انتخاب آدرس در Checkout */
.address-card {
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.address-card:hover {
    border-color: #0d6efd !important;
    background-color: #f0f4ff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13,110,253,0.1);
}

/* ================= فروش ویژه ================= */
.special-hero {
    background: linear-gradient(135deg, #e52d27 0%, #b31217 100%);
    box-shadow: 0 10px 30px rgba(229, 45, 39, 0.3);
}

.countdown-box {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.countdown-box span {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}
.countdown-box small {
    font-size: 0.65rem;
    opacity: 0.85;
}

/* برچسب "فروش ویژه" روی کارت محصول */
.product-card .featured-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    background: linear-gradient(135deg, #e52d27, #b31217);
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ================= نوار پیشرفت سفارش ================= */
.order-progress {
    padding: 20px 10px;
    background: #f8f9fa;
    border-radius: 12px;
}

.progress-track {
    position: relative;
    padding-top: 20px;
}

.progress-line {
    position: absolute;
    top: 35px;
    right: 10%;
    height: 4px;
    background: linear-gradient(90deg, #0d6efd, #10b981);
    border-radius: 2px;
    max-width: 80%;
    transition: width 0.4s ease;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.progress-step .step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #e5e7eb;
    transition: all 0.3s;
}

.progress-step.active .step-icon {
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 1px #0d6efd, 0 4px 10px rgba(13, 110, 253, 0.3);
}

.progress-step span {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 600;
    text-align: center;
}

.progress-step.active span {
    color: #0d6efd;
}

@media (max-width: 576px) {
    .progress-step span { font-size: 0.65rem; }
    .progress-step .step-icon { width: 36px; height: 36px; font-size: 1rem; }
    .progress-line { top: 27px; }
}
/* ================= استایل‌های فوتر ================= */
.footer-links li a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}
.footer-links li a:hover {
    color: #0d6efd;
    padding-right: 5px; /* افکت حرکت به سمت راست در حالت راست‌چین */
}

.footer-legal-links li a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.footer-legal-links li a:hover {
    color: #0d6efd;
}

.social-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.social-btn:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white !important;
}

/* خط جداکننده بالای بخش کپی‌رایت */
footer hr {
    border-color: #e9ecef;
    opacity: 1;
}
/* ================= کارت محصول ================= */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
}
.product-img {
    transition: transform 0.3s ease;
}
.product-card:hover .product-img {
    transform: scale(1.05);
}
.object-fit-contain {
    object-fit: contain;
}
.fs-7 {
    font-size: 0.75rem;
}
/* ================= لوگو برندها ================= */
.brand-card {
    border-radius: 12px;
    transition: all 0.25s ease;
    overflow: hidden;
}

.brand-card:hover {
    background-color: #f8f9fa;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-3px);
}

/* کادر ثابت لوگو */
.brand-logo-wrapper {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

/* خود تصویر لوگو — اندازه متعادل */
.brand-logo {
    max-width: 70px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(40%);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.brand-card:hover .brand-logo {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Fallback: برند بدون لوگو */
.brand-logo-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.brand-card:hover .brand-logo-fallback {
    transform: scale(1.1) rotate(-5deg);
}

/* ریسپانسیو */
@media (max-width: 576px) {
    .brand-logo-wrapper {
        height: 60px;
        padding: 6px;
    }
    .brand-logo {
        max-width: 55px;
        max-height: 40px;
    }
    .brand-logo-fallback {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }
}

/* ================= استایل دکمه‌های تنوع محصول ================= */
/* حالت انتخاب نشده */
.variant-radio + .btn-outline-primary {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-color: transparent !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* حالت انتخاب شده (وقتی کاربر کلیک می‌کند) */
.variant-radio:checked + .btn-outline-primary {
    color: #ffffff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

/* افکت هاور */
.variant-radio + .btn-outline-primary:hover {
    background-color: #e7f1ff !important;
    color: #0d6efd !important;
}
