/* Project: Armin Besharat Sabz Fardad (ABSF)
   Description: Professional eCommerce Stylesheet for Digital & Home Appliances
   Version: 2.5
*/

/* 1. متغیرها و تنظیمات پایه */
:root {
    --primary-blue: #0d6efd;
    --dark-blue: #003d99;
    --success-green: #198754;
    --danger-red: #dc3545;
    --warning-gold: #ffc107;
    --ice-blue: #0dcaf0;         /* مخصوص کولر */
    --fire-orange: #fd7e14;      /* مخصوص بخاری */
    --dark-grey: #212529;
    --light-grey: #f8f9fa;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.8;
    direction: rtl;
    overflow-x: hidden;
}

/* 2. هدر و ناوبری */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.nav-link {
    font-weight: 500;
    margin: 0 8px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0;
    background-color: var(--primary-blue);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* 3. کارت محصول پایه (Base Card) */
.product-card {
    background: var(--white);
    border-radius: 20px;
    border: none;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* 4. استایل‌های اختصاصی هر دسته (Category Specifics) */

/* الف) دسته دیجیتال (iMac, iPad, Watch) */
.card-digital .img-wrapper {
    background: #f9f9f9;
    padding: 30px;
    text-align: center;
}

.card-digital .battery-badge {
    background: var(--success-green);
    color: white;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
}

/* ب) دسته سرمایشی (Cooler) */
.card-cooler {
    border-top: 5px solid var(--ice-blue);
}

.card-cooler .price-box {
    background: rgba(13, 202, 240, 0.05);
    border-radius: 12px;
    padding: 10px;
}

/* ج) دسته گرمایشی (Heater) */
.card-heater {
    border-top: 5px solid var(--fire-orange);
}

.card-heater .icon-feature {
    color: var(--fire-orange);
}

/* د) لوازم خانگی (Home Appliances) */
.card-home {
    background: linear-gradient(to bottom, #ffffff, #fefefe);
    border: 1px solid #eee;
}

.energy-badge {
    background: #2ecc71;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 5. المان‌های داخلی کارت */
.card-img-container {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.card-img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .card-img-container img {
    transform: scale(1.08);
}

/* 6. دکمه‌ها */
.btn-absf {
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background-color: #1eb956;
    transform: scale(1.05);
    color: white;
}

/* 7. جداول مقایسه قیمت */
.comparison-table {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
}

.comparison-table thead {
    background-color: var(--primary-blue);
    color: white;
}

/* 8. فوتر */
footer {
    background-color: var(--dark-grey);
    color: #cbd5e0;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-title {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background: var(--primary-blue);
    bottom: 0;
    right: 0;
}

/* 9. ریسپانسیو */
@media (max-width: 768px) {
    .card-img-container { height: 180px; }
    .display-4 { font-size: 2rem; }
    .installment-box { padding: 30px; }
}

/* 10. انیمیشن مزایده */
.auction-timer {
    background: var(--danger-red);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

