/* =============================================
   DR Categories - استایل بخش دسته‌بندی
   مسیر: wp-content/themes/your-child-theme/dr-categories.css
   ============================================= */

/* سکشن اصلی */
.DR-cats-section {
    direction: rtl;
    font-family: 'yekan', sans-serif;
    background: #ffffff;
    padding: 56px 0;
}

@media (min-width: 640px) {
    .DR-cats-section {
        padding: 80px 0;
    }
}

/* کانتینر */
.DR-cats-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 640px) {
    .DR-cats-container {
        padding: 0 24px;
    }
}

/* هدر بخش */
.DR-cats-header {
    text-align: center;
    margin-bottom: 40px;
}

@media (min-width: 640px) {
    .DR-cats-header {
        margin-bottom: 56px;
    }
}

.DR-cats-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1e293b;
    letter-spacing: -0.025em;
    margin: 0 0 8px 0;
}

@media (min-width: 640px) {
    .DR-cats-title {
        font-size: 1.875rem;
    }
}

.DR-cats-subtitle {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 300;
    margin: 0;
}

.DR-cats-divider {
    width: 48px;
    height: 4px;
    background: #3b82f6;
    border-radius: 9999px;
    margin: 16px auto 0;
}

/* گرید */
.DR-cats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .DR-cats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

/* کارت دسته‌بندی */
.DR-cat-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    text-decoration: none;
    display: block;
    cursor: pointer;
    /* حالت اولیه انیمیشن */
    opacity: 0;
    transform: translateY(30px);
}

.DR-cat-card.DR-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 640px) {
    .DR-cat-card {
        border-radius: 24px;
    }
}

.DR-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(148, 163, 184, 0.25);
}

.DR-cat-card.DR-visible:hover {
    transform: translateY(-4px);
}

/* تصویر پس‌زمینه */
.DR-cat-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.DR-cat-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.08;
    transition: all 0.5s ease;
}

.DR-cat-card:hover .DR-cat-bg img {
    opacity: 0.15;
    transform: scale(1.1);
}

/* محتوای کارت */
.DR-cat-content {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 640px) {
    .DR-cat-content {
        padding: 24px;
    }
}

/* آیکون */
.DR-cat-icon {
    font-size: 1.875rem;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
    line-height: 1;
}

@media (min-width: 640px) {
    .DR-cat-icon {
        font-size: 2.25rem;
    }
}

.DR-cat-card:hover .DR-cat-icon {
    transform: scale(1.1);
}

/* اسم دسته */
.DR-cat-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
    margin: 0;
}

@media (min-width: 640px) {
    .DR-cat-name {
        font-size: 14px;
    }
}

/* تعداد محصول */
.DR-cat-count {
    font-size: 11px;
    color: #94a3b8;
    margin: 4px 0 0 0;
    font-weight: 300;
}

/* دکمه فلش */
.DR-cat-arrow {
    margin-top: 12px;
    width: 28px;
    height: 28px;
    background: #f8fafc;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.DR-cat-arrow svg {
    color: #94a3b8;
    transition: color 0.3s ease;
    transform: rotate(180deg);
}

.DR-cat-card:hover .DR-cat-arrow {
    background: #3b82f6;
}

.DR-cat-card:hover .DR-cat-arrow svg {
    color: #ffffff;
    stroke: #ffffff;
}
