/**
 * Single Product - Related & Up-Sells Styles
 *
 * @package Alotoshak
 * @version 1.0.0
 */

/* ============================================
 * 1. بخش کلی
 * ============================================ */
.alotoshak-related-products,
.alotoshak-upsells {
    margin: 60px 0 40px;
    padding: 40px 30px;
    background: var(--alo-light-gray);
    border-radius: var(--alo-radius-lg);
}

/* ============================================
 * 2. عنوان
 * ============================================ */
.alotoshak-related-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--alo-dark);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.alotoshak-related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, var(--alo-primary), #00d2ff);
    border-radius: 3px;
}

/* ============================================
 * 3. گرید
 * ============================================ */
.alotoshak-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* ============================================
 * 4. آیتم
 * ============================================ */
.alotoshak-related-item {
    animation: aloFadeIn 0.6s ease forwards;
    opacity: 0;
}

.alotoshak-related-item:nth-child(1) { animation-delay: 0.1s; }
.alotoshak-related-item:nth-child(2) { animation-delay: 0.2s; }
.alotoshak-related-item:nth-child(3) { animation-delay: 0.3s; }
.alotoshak-related-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes aloFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alotoshak-related-box {
    background: #ffffff;
    border-radius: var(--alo-radius);
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: var(--alo-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.alotoshak-related-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ============================================
 * 5. تصویر
 * ============================================ */
.alotoshak-related-image {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f5f5f5;
    padding-top: 100%;
}

.alotoshak-related-image img {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.alotoshak-related-box:hover .alotoshak-related-image img {
    transform: scale(1.05);
}

/* ============================================
 * 6. برچسب تخفیف
 * ============================================ */
.alotoshak-related-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--alo-danger), #e74c3c);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
    animation: aloPulse 2s infinite;
}

/* ============================================
 * 7. محتوا
 * ============================================ */
.alotoshak-related-content {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.alotoshak-related-product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 46px;
}

.alotoshak-related-product-title a {
    color: var(--alo-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.alotoshak-related-product-title a:hover {
    color: var(--alo-primary);
}

/* ============================================
 * 8. قیمت
 * ============================================ */
.alotoshak-related-price {
    margin: 8px 0 14px;
    font-size: 16px;
    direction: ltr;
    text-align: right;
}

.alotoshak-related-price-regular {
    color: #adb5bd;
    text-decoration: line-through;
    font-size: 14px;
    margin-left: 8px;
}

.alotoshak-related-price-sale {
    color: var(--alo-success);
    font-weight: 700;
    font-size: 18px;
}

.alotoshak-related-price-normal {
    color: var(--alo-dark);
    font-weight: 700;
    font-size: 18px;
}

.alotoshak-related-price-contact {
    color: var(--alo-primary);
    font-weight: 600;
    font-size: 15px;
}

/* ============================================
 * 9. دکمه
 * ============================================ */
.alotoshak-related-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--alo-primary), var(--alo-primary-dark));
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: var(--alo-transition);
    margin-top: auto;
    cursor: pointer;
}

.alotoshak-related-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.35);
    background: linear-gradient(135deg, #0069d9, #004085);
}

/* ============================================
 * 10. واکنش‌گرا
 * ============================================ */
@media (max-width: 1024px) {
    .alotoshak-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .alotoshak-related-products,
    .alotoshak-upsells {
        padding: 30px 20px;
    }
}

@media (max-width: 640px) {
    .alotoshak-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .alotoshak-related-products,
    .alotoshak-upsells {
        padding: 20px 12px;
        margin: 30px 0 20px;
    }

    .alotoshak-related-title {
        font-size: 20px;
    }

    .alotoshak-related-product-title {
        font-size: 13px;
        height: 38px;
    }

    .alotoshak-related-price {
        font-size: 14px;
    }

    .alotoshak-related-price-sale,
    .alotoshak-related-price-normal {
        font-size: 15px;
    }

    .alotoshak-related-btn {
        padding: 6px 16px;
        font-size: 12px;
    }

    .alotoshak-related-content {
        padding: 12px 12px 16px;
    }
}

@media (max-width: 400px) {
    .alotoshak-related-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin: 0 auto;
    }
}
