@font-face {
    font-family: 'IranYekan';
    src: url('../frontend/fonts/IranYekan.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* پالت رنگی اصلی */
    --primary-color: #0a2b4c; /* سرمه‌ای عمیق */
    --secondary-color: #f7c02b; /* طلایی/زرد */
    --accent-color: #f26c3d; /* نارنجی (از پالت تصویر) */

    /* رنگ‌های پس‌زمینه */
    --bg-dark: #0a2b4c;
    --bg-light: #fdfaf6; /* کرم خیلی روشن (جایگزین سفید) */

    /* رنگ‌های متن */
    --text-dark: #0a2b4c;
    --text-light: #ffffff;
    --text-accent: #f7c02b;
}

body {
    font-family: "IranYekan", sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/*
 * =========================================
 * انیمیشن‌ها (برای جذابیت بیشتر)
 * =========================================
 */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.7s ease-out forwards;
}

/*
 * =========================================
 * هدر و فوتر (بر اساس تم جدید)
 * =========================================
 */

.navbar-custom {
    background-color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link,
.navbar-custom .btn-icon {
    color: var(--secondary-color) !important;
    font-weight: 500;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--text-light) !important;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    /* --- اصلاح شد: ریسپانسیو --- */
    font-size: calc(1.2rem + 0.2vw); /* پایه 1.2rem، رشد بسیار کم */
}

/* دکمه‌های هدر */
.btn-outline-gold {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}
.btn-outline-gold:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}
.btn-gold {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 700;
}
.btn-gold:hover {
    background-color: #e0ac1a;
    color: var(--primary-color);
}

/* فوتر (Footer) - سبک و جمع‌وجور */
.main-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1.5rem 0;
    margin-top: 3rem;
}
.main-footer .footer-logo {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.main-footer .footer-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-bottom: 0;
}
.main-footer h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}
.main-footer ul {
    margin-bottom: 0;
}
.main-footer ul li {
    margin-bottom: 0.25rem;
}
.main-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.8rem;
}
.main-footer a:hover {
    color: var(--secondary-color);
}
.footer-bottom {
    border-top: 1px solid #2c4a6c;
    padding-top: 0.75rem;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.6);
}
.footer-bottom p {
    font-size: 0.75rem;
    margin-bottom: 0;
}

/*
 * =========================================
 * استایل‌های سفارشی صفحه اصلی
 * =========================================
 */

/* عنوان‌های بخش‌ها */
.section-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.section-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* بخش Hero */
.hero-section {
    position: relative;
    padding: 8rem 0;
    color: white;
    overflow: hidden;
}
.hero-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    opacity: 0.7;
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    object-fit: cover;
}
.hero-content h1 {
    font-weight: 700;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    /* --- اصلاح شد: ریسپانسیو با calc --- */
    font-size: calc(2.1rem + 1vw); /* پایه 2.1rem، رشد کم */
}

/* کارت محصول */
.product-card {
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.product-card img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.product-card .card-body {
    text-align: center;
}
.product-card .card-title {
    font-weight: 500;
    color: var(--text-dark);
    /* --- اصلاح شد: ریسپانسیو --- */
    font-size: calc(0.9rem + 0.2vw); /* پایه 0.9rem، رشد خیلی کم */
}
.product-card .card-price {
    font-weight: 700;
    color: var(--primary-color);
    /* --- اصلاح شد: ریسپانسیو --- */
    font-size: calc(0.95rem + 0.2vw);
}

/* بخش ویژگی‌ها (چرا ما؟) */
.feature-box {
    text-align: center;
    padding: 2.5rem 2rem;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.feature-box .icon {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: calc(1.8rem + 0.3vw);
    background: linear-gradient(135deg, var(--primary-color), #1a3a5c);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.feature-box .icon i {
    color: var(--secondary-color);
    font-size: 1.8rem;
}
.feature-box h3 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: calc(1rem + 0.1vw);
}
.feature-box p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 0;
    font-size: calc(0.9rem + 0.1vw);
}

/* استایل‌های رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .feature-box {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
        min-height: auto;
    }
    
    .feature-box .icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .feature-box .icon i {
        font-size: 1.5rem;
    }
    
    .feature-box h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-box p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* فاصله بین کارت‌ها در موبایل */
    .row > .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* عنوان بخش در موبایل */
    .container.py-5 .text-center h2 {
        font-size: 1.5rem;
    }
    
    .container.py-5 .text-center p {
        font-size: 0.9rem;
    }
    
    /* تنظیمات فوتر برای موبایل */
    .main-footer {
        padding: 1rem 0;
    }
    .main-footer .col-lg-4,
    .main-footer .col-lg-2,
    .main-footer .col-lg-3 {
        margin-bottom: 1rem;
    }
    
    /* تنظیمات دسته‌بندی برای موبایل */
    .category-section {
        padding: 2rem 0;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .section-subtitle {
        font-size: 0.8rem;
    }
    .category-circle-image {
        width: 60px;
        height: 60px;
        margin-bottom: 0.4rem;
    }
    .category-circle-title {
        font-size: 0.7rem;
        min-height: 2.2rem;
        line-height: 1.2;
        align-items: center;
    }
    
    /* تنظیمات برای 5 دسته‌بندی - چیدمان منظم */
    .category-section .row {
        justify-content: center !important;
    }
    .category-section .col-lg-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    @media (max-width: 576px) {
        .category-section .col-4 {
            flex: 0 0 33.333%;
            max-width: 33.333%;
        }
    }
}
/*
 * =========================================
 * استایل جدید دسته‌بندی (دایره‌ای) - فشرده و کوچک
 * =========================================
 */
.category-section .row {
    justify-content: center;
}

.category-circle-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 0.25rem;
    margin: 0;
    height: 100%;
}

.category-circle-item a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    height: 100%;
}

.category-circle-image {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 0.5rem;
    display: block;
}

.category-circle-item a:hover .category-circle-image {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(10, 43, 76, 0.15);
}

.category-circle-title {
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s ease;
    font-size: 0.8rem;
    text-align: center;
    margin: 0;
    line-height: 1.3;
    min-height: 2.6rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    width: 100%;
    word-break: break-word;
}

.category-circle-item a:hover .category-circle-title {
    color: var(--secondary-color);
}

/* بخش CTA (Call to Action) */
.cta-section {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 4rem 0;
    border-radius: 15px;
}

/* خط جدا کننده زرد تم سایت */
.yellow-separator {
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--secondary-color) 20%, 
        var(--secondary-color) 80%, 
        transparent 100%);
    margin: 2rem 0;
    border-radius: 2px;
    position: relative;
}

.yellow-separator::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(247, 192, 43, 0.3) 50%, 
        transparent 100%);
}

.yellow-separator::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(247, 192, 43, 0.3) 50%, 
        transparent 100%);
}
.cta-section h2 {
    color: var(--secondary-color);
    font-weight: 700;
    /* --- اصلاح شد: ریسپانسیو --- */
    font-size: calc(1rem + 0.5vw);
}

/*
 * =========================================
 * استایل‌های صفحه جزئیات محصول (حرفه‌ای)
 * =========================================
 */
.product-show-section {
    padding: 3rem 0;
}

/* ستون گالری */
.product-gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.product-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.product-gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: border-color 0.3s ease;
    background-color: #fff;
}

.product-gallery-thumb:hover {
    border-color: #ddd;
}

.product-gallery-thumb.active {
    border-color: var(--secondary-color);
}

/* ستون اطلاعات */
.product-details .product-title {
    font-weight: 700;
    color: var(--primary-color);
    /* --- اصلاح شد: ریسپانسیو --- */
    font-size: calc(1.4rem + 0.3vw); /* پایه 1.6rem، رشد متوسط */
}

.product-details .product-price {
    font-weight: 700;
    color: var(--secondary-color);
    margin: 1rem 0;
    /* --- اصلاح شد: ریسپانسیو --- */
    font-size: calc(1.4rem + 0.5vw);
}

/* متادیتا (موجودی، وزن و...) */
.product-meta-item {
    font-size: 1rem; /* سایز ثابت استاندارد */
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}
.product-meta-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}
.stock-status.in-stock {
    color: #198754;
    font-weight: 700;
}
.stock-status.out-of-stock {
    color: #dc3545;
    font-weight: 700;
}

/* بخش توضیحات */
.product-description-tabs {
    margin-top: 3rem;
}
.product-description-tabs .nav-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1rem; /* سایز ثابت استاندارد */
}
.product-description-tabs .nav-link.active {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.tab-content {
    line-height: 1.9;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 10px 10px;
}
