/* assets/css/style.css */

/* =========================================
   تعریف فونت وزیرمتن (Vazirmatn) - لوکال
   ========================================= */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   استایل‌های پایه و سراسری
   ========================================= */
body, h1, h2, h3, h4, h5, h6, p, a, span, button, input, select, textarea, label, li, td, th {
    font-family: 'Vazirmatn', sans-serif !important;
}

body {
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.8;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* اسکرول بار سفارشی */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #39C878; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2ea863; }


/* =========================================
   Toast Notification Styles
   ========================================= */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 320px;
    max-width: 450px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    border-right: 4px solid;
    overflow: hidden;
    position: relative;
}

.toast.success {
    border-right-color: #10b981;
}

.toast.error {
    border-right-color: #ef4444;
}

.toast.warning {
    border-right-color: #f59e0b;
}

.toast.info {
    border-right-color: #3b82f6;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
    color: #1f2937;
}

.toast.success .toast-title {
    color: #10b981;
}

.toast.error .toast-title {
    color: #ef4444;
}

.toast.warning .toast-title {
    color: #f59e0b;
}

.toast.info .toast-title {
    color: #3b82f6;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    animation: progress 3s linear forwards;
}

.toast.success .toast-progress {
    color: #10b981;
}

.toast.error .toast-progress {
    color: #ef4444;
}

.toast.warning .toast-progress {
    color: #f59e0b;
}

.toast.info .toast-progress {
    color: #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* Homepage Styles */
.hero-slider .carousel-inner {
    max-height: 400px;
}

.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.1);
}

#countdown-timer > div {
    min-width: 80px;
}

.brands-section .card {
    background: #f8f9fa;
}

.brands-section .card:hover {
    background: #e9ecef;
}

.promo-banner {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}    

/* =========================================
   Slider Responsive Styles
   ========================================= */

/* تنظیم ارتفاع پیش‌فرض برای دسکتاپ */
.hero-section .carousel-item {
    height: 500px; /* ارتفاع مناسب برای دسکتاپ */
}

.hero-section .carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover; /* جلوگیری از کشیده شدن عکس */
    object-position: center;
}

/* تنظیمات کپشن (متن روی اسلایدر) */
.hero-section .carousel-caption {
    bottom: 20%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4); /* پس‌زمینه نیمه‌شفاف برای خوانایی بهتر */
    backdrop-filter: blur(5px);
    border-radius: 12px;
}

/* =========================================
   Mobile Responsive Adjustments
   ========================================= */
@media (max-width: 992px) {
    .hero-section .carousel-item {
        height: 400px; /* تبلت */
    }
}

@media (max-width: 768px) {
    .hero-section .carousel-item {
        height: 280px; /* موبایل */
    }
    
    .hero-section .carousel-caption {
        bottom: 10%;
        padding: 15px;
        width: 90%;
        left: 5% !important;
        right: 5% !important;
    }
    
    .hero-section .carousel-caption h2 {
        font-size: 1.2rem !important; /* کوچک کردن تیتر در موبایل */
        margin-bottom: 10px !important;
    }
    
    .hero-section .carousel-caption p {
        font-size: 0.85rem !important;
        display: none; /* مخفی کردن توضیحات طولانی در موبایل برای شلوغ نشدن */
    }
    
    .hero-section .carousel-caption .btn {
        padding: 8px 20px !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .hero-section .carousel-item {
        height: 220px; /* موبایل‌های خیلی کوچک */
    }
}