/* Related Products Section */
.related-products-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: 2rem;
    overflow: hidden;
}

.section-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #fff8f5 0%, #fff 100%);
    border-bottom: 1px solid #f0f0f0;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.title-icon {
    font-size: 2rem;
}

.section-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Related Products Container */
.related-products-container {
    position: relative;
    padding: 2rem;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

/* Related Product Card */
.related-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.product-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Product Image */
.product-image-container {
    position: relative;
    overflow: hidden;
}

.related-product-card .product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .product-image {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(238, 77, 45, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-product-card:hover .product-overlay {
    opacity: 1;
}

.view-product {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.2s ease;
}

.view-product:hover {
    background: white;
    color: #ee4d2d;
}

/* Product Info */
.related-product-card .product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-product-card .product-name {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 2.8rem;
}

/* Product Pricing */
.product-pricing {
    margin-bottom: 1rem;
}

.related-product-card .current-price {
    color: #ee4d2d;
    font-weight: 700;
    font-size: 1.2rem;
}

.related-product-card .original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Product Stats */
.related-product-card .product-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.related-product-card .product-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.rating-stars .star.filled {
    color: #ffa500;
}

.rating-number {
    font-weight: 600;
    color: #333;
}

.related-product-card .sold-count {
    font-size: 0.8rem;
}

.shop-name {
    color: #666;
    font-size: 0.85rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    justify-content: center;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.add-to-cart {
    color: #ee4d2d;
    border-color: #ee4d2d;
}

.add-to-cart:hover {
    background: #ee4d2d;
    color: white;
}

.add-to-wishlist {
    color: #dc3545;
    border-color: #dc3545;
    flex: none;
    width: 44px;
    padding: 0.8rem 0.5rem;
}

.add-to-wishlist:hover {
    background: #dc3545;
    color: white;
}

.add-to-wishlist.active {
    background: #dc3545;
    color: white;
}

/* Navigation */
.related-products-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.nav-btn {
    width: 50px;
    height: 50px;
    background: rgba(238, 77, 45, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.3);
}

.nav-btn:hover:not(:disabled) {
    background: #ee4d2d;
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* View All */
.view-all-container {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: white;
    border: 2px solid #ee4d2d;
    color: #ee4d2d;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #ee4d2d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 77, 45, 0.3);
}

.arrow {
    transition: transform 0.2s ease;
}

.view-all-btn:hover .arrow {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .related-product-card .product-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .related-products-container {
        padding: 1.5rem;
    }

    .section-header {
        padding: 1.5rem 1rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .related-product-card .product-image {
        height: 160px;
    }

    .related-product-card .product-info {
        padding: 1rem;
    }

    .product-actions {
        padding: 0.8rem 1rem;
    }

    .action-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .related-product-card .product-image {
        height: 200px;
    }

    .section-title {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .view-all-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.related-products-grid.loading {
    opacity: 0.7;
    pointer-events: none;
}

.related-products-grid.loading .related-product-card {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Smooth Scrolling */
.related-products-grid {
    scroll-behavior: smooth;
}

/* Focus States */
.related-product-card:focus-within {
    outline: 2px solid #ee4d2d;
    outline-offset: 2px;
}

.action-btn:focus {
    outline: 2px solid #ee4d2d;
    outline-offset: 2px;
}