/* ریست و تنظیمات پایه */
.ek-products * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* متغیرهای رنگی برند */
.ek-products {
    --ek-primary: #FFD700;
    --ek-primary-dark: #FFA500;
    --ek-secondary: #8B6F00;
    --ek-accent: #FFE55C;
    --ek-text-dark: #333333;
    --ek-text-light: #666666;
    --ek-bg-light: #FFF9E6;
    --ek-white: #FFFFFF;
    --ek-shadow: rgba(0, 0, 0, 0.1);
}

/* کانتینر اصلی */
.ek-products {
    font-family: 'Vazir', 'IRANSans', 'Tahoma', sans-serif;
    background-color: var(--ek-bg-light);
    padding: 40px 20px;
    min-height: 100vh;
}

/* عنوان بخش */
.ek-section-title {
    text-align: center;
    margin-bottom: 50px;
}

.ek-section-title h2 {
    font-size: 36px;
    color: var(--ek-secondary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    padding: 0 30px;
}

.ek-section-title h2::before,
.ek-section-title h2::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 2px;
    background: linear-gradient(to left, transparent, var(--ek-primary));
}

.ek-section-title h2::before {
    right: 100%;
    margin-right: 10px;
}

.ek-section-title h2::after {
    left: 100%;
    margin-left: 10px;
    background: linear-gradient(to right, transparent, var(--ek-primary));
}

.ek-section-subtitle {
    color: var(--ek-text-light);
    font-size: 16px;
}

/* گرید محصولات */
.ek-products-grid {
    display: grid;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.ek-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ek-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ek-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ek-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* کارت محصول */
.ek-product-card {
    background: var(--ek-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--ek-shadow);
    transition: all 0.3s ease;
    position: relative;
}

.ek-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

/* برچسب تخفیف */
.ek-discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--ek-primary-dark);
    color: var(--ek-white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* تصویر محصول */
.ek-product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ek-bg-light), var(--ek-white));
}

.ek-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ek-product-card:hover .ek-product-image img {
    transform: scale(1.1);
}

/* آیکون های سریع */
.ek-quick-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ek-product-card:hover .ek-quick-actions {
    opacity: 1;
}

.ek-quick-action-btn {
    width: 40px;
    height: 40px;
    background: var(--ek-white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--ek-shadow);
    text-decoration: none;
}

.ek-quick-action-btn:hover {
    background: var(--ek-primary);
    transform: scale(1.1);
}

/* محتوای کارت */
.ek-product-content {
    padding: 20px;
}

.ek-product-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.4;
}

.ek-product-title a {
    color: var(--ek-text-dark);
    text-decoration: none;
}

.ek-product-title a:hover {
    color: var(--ek-secondary);
}

.ek-product-description {
    font-size: 14px;
    color: var(--ek-text-light);
    margin-bottom: 15px;
    line-height: 1.6;
    height: 40px;
    overflow: hidden;
}

/* رتبه بندی */
.ek-product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.ek-star {
    color: #ddd;
    font-size: 16px;
}

.ek-star.filled {
    color: var(--ek-primary);
}

.ek-rating-count {
    font-size: 12px;
    color: var(--ek-text-light);
    margin-right: 5px;
}

/* قیمت */
.ek-product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ek-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.ek-price-current {
    font-size: 22px;
    font-weight: bold;
    color: var(--ek-secondary);
}

.ek-price-old {
    font-size: 16px;
    color: var(--ek-text-light);
    text-decoration: line-through;
}

.ek-price-unit {
    font-size: 14px;
    color: var(--ek-text-light);
}

/* دکمه خرید */
.ek-add-to-cart {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--ek-primary), var(--ek-primary-dark));
    color: var(--ek-secondary) !important;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
}

.ek-add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.ek-add-to-cart:hover::before {
    left: 100%;
}

.ek-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.ek-add-to-cart.added {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

/* آیکون‌ها */
.ek-icon {
    width: 20px;
    height: 20px;
    fill: var(--ek-secondary);
}

.ek-quick-action-btn:hover .ek-icon {
    fill: var(--ek-white);
}

/* رسپانسیو - تبلت */
@media (max-width: 768px) {
    .ek-products {
        padding: 30px 15px;
    }
    
    .ek-section-title h2 {
        font-size: 28px;
    }
    
    .ek-columns-3,
    .ek-columns-4,
    .ek-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ek-products-grid {
        gap: 20px;
    }
    
    .ek-product-image {
        height: 200px;
    }
}

/* رسپانسیو - موبایل */
@media (max-width: 480px) {
    .ek-products {
        padding: 20px 10px;
    }
    
    .ek-section-title h2 {
        font-size: 24px;
        padding: 0 20px;
    }
    
    .ek-section-title h2::before,
    .ek-section-title h2::after {
        width: 30px;
    }
    
    .ek-columns-2,
    .ek-columns-3,
    .ek-columns-4,
    .ek-columns-5 {
        grid-template-columns: 1fr;
    }
    
    .ek-products-grid {
        gap: 15px;
    }
    
    .ek-product-content {
        padding: 15px;
    }
    
    .ek-product-title {
        font-size: 16px;
    }
    
    .ek-price-current {
        font-size: 20px;
    }
    
    .ek-add-to-cart {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* انیمیشن ورود */
@keyframes ek-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ek-product-card {
    animation: ek-fadeInUp 0.6s ease-out;
}

.ek-product-card:nth-child(1) { animation-delay: 0.1s; }
.ek-product-card:nth-child(2) { animation-delay: 0.2s; }
.ek-product-card:nth-child(3) { animation-delay: 0.3s; }
.ek-product-card:nth-child(4) { animation-delay: 0.4s; }
.ek-product-card:nth-child(5) { animation-delay: 0.5s; }
.ek-product-card:nth-child(6) { animation-delay: 0.6s; }
.ek-product-card:nth-child(7) { animation-delay: 0.7s; }
.ek-product-card:nth-child(8) { animation-delay: 0.8s; }

/* عدم نمایش محصولات */
.ek-no-products {
    text-align: center;
    padding: 50px 20px;
    font-size: 18px;
    color: var(--ek-text-light);
}
