/**
 * Modern Minimal Related Products Styles
 * Novoshop Theme - Chic & Responsive Design
 */

/* ========================================
   Related Products Section Container
======================================== */
.related-products-modern {
    margin: 80px 0 0;
    padding: 80px 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.related-products-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb 50%, transparent);
}

.related-products-container {
    max-width: 1620px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Remove old header styles - now using slider-header */

/* ========================================
   Slider Wrapper (Same structure as novoshop-product-slider)
======================================== */
.related-products-modern .novoshop-product-slider-wrapper {
    position: relative;
    margin: 0;
    padding: 0;
}

.related-products-modern .slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.related-products-modern .slider-nav-arrows {
    display: flex;
    gap: 10px;
    order: 2;
}

.related-products-modern .slider-nav-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
}

.related-products-modern .slider-nav-btn:hover {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

.related-products-modern .slider-nav-btn:active {
    transform: scale(0.95);
}

.related-products-modern .slider-nav-btn i {
    font-size: 18px;
}

.related-products-modern .novoshop-product-slider-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
    order: 1;
    flex: 1;
}

/* Slick Slider Styles */
.related-products-modern .novoshop-product-slider {
    margin: 0;
    padding: 0;
}

.related-products-modern .novoshop-product-slider .novoshop-slide {
    padding: 0 10px;
    box-sizing: border-box;
}

/* Slick Slider spacing */
.related-products-modern .novoshop-product-slider.slick-slider {
    margin: 0 -10px;
}

.related-products-modern .novoshop-product-slider .slick-list {
    padding: 0;
}

.related-products-modern .novoshop-product-slider .slick-track {
    display: flex;
    align-items: stretch;
}

.related-products-modern .novoshop-product-slider .novoshop-slide .product-card,
.related-products-modern .novoshop-product-slider .novoshop-slide li.product {
    margin: 0;
    width: 100%;
    height: 100%;
}

/* Product Cards in Related Section */
.related-products-modern .product-card,
.related-products-modern li.product {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-products-modern .product-card:hover,
.related-products-modern li.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

/* Product Image Wrapper */
.related-products-modern .product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.related-products-modern .product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-products-modern .product-card:hover .product-image-wrapper img,
.related-products-modern li.product:hover .product-image-wrapper img {
    transform: scale(1.08);
}

/* Product Details */
.related-products-modern .product-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* Product Category */
.related-products-modern .product-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.related-products-modern .product-category a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-products-modern .product-category a:hover {
    color: #1a1a1a;
}

/* Product Title */
.related-products-modern .product-title,
.related-products-modern .woocommerce-loop-product__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    min-height: 48px;
}

.related-products-modern .product-title a,
.related-products-modern .woocommerce-loop-product__title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-products-modern .product-title a:hover,
.related-products-modern .woocommerce-loop-product__title a:hover {
    color: #666;
}

/* Product Rating */
.related-products-modern .star-rating {
    font-size: 13px;
    color: #ffc107;
    margin: 4px 0;
}

.related-products-modern .star-rating::before {
    color: #ffc107;
}

/* Product Price */
.related-products-modern .price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 8px 0;
}

.related-products-modern .price del {
    font-size: 14px;
    color: #999;
    font-weight: 400;
    margin-left: 8px;
    opacity: 0.7;
}

.related-products-modern .price ins {
    text-decoration: none;
    color: #ff6b6b;
}

/* Product Footer */
.related-products-modern .product-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

/* Add to Cart Button */
.related-products-modern .add_to_cart_button,
.related-products-modern .button,
.related-products-modern .product_type_simple {
    width: 100%;
    padding: 14px 20px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

.related-products-modern .add_to_cart_button:hover,
.related-products-modern .button:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.related-products-modern .added_to_cart {
    background: #4CAF50;
}

.related-products-modern .added_to_cart:hover {
    background: #45a049;
}

/* Sale Badge */
.related-products-modern .onsale {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation buttons are now in slider-header */

/* Quick Actions */
.related-products-modern .product-quick-actions {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.related-products-modern .product-card:hover .product-quick-actions,
.related-products-modern li.product:hover .product-quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.related-products-modern .quick-action {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.related-products-modern .quick-action:hover {
    background: #1a1a1a;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.related-products-modern .quick-action svg {
    width: 18px;
    height: 18px;
    stroke: #666;
    transition: stroke 0.3s ease;
}

.related-products-modern .quick-action:hover svg {
    stroke: #ffffff;
}

.related-products-modern .quick-action.wishlist-btn.active {
    background: #ff6b6b;
}

.related-products-modern .quick-action.wishlist-btn.active svg {
    stroke: #ffffff;
    fill: #ffffff;
}

/* ========================================
   Responsive Design
======================================== */

/* Slider Header Responsive */
@media (max-width: 1199px) {
    .related-products-modern .slider-header {
        margin-bottom: 25px;
    }
    
    .related-products-modern .novoshop-product-slider-title {
        font-size: 28px;
    }
    
    .related-products-modern .slider-nav-btn {
        width: 44px;
        height: 44px;
    }
    
    .related-products-modern .slider-nav-btn i {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .related-products-modern .slider-header {
        margin-bottom: 20px;
    }
    
    .related-products-modern .novoshop-product-slider-title {
        font-size: 24px;
    }
    
    .related-products-modern .slider-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .related-products-modern .slider-nav-btn i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .related-products-modern .slider-header {
        margin-bottom: 18px;
        flex-wrap: wrap;
    }
    
    .related-products-modern .novoshop-product-slider-title {
        font-size: 22px;
        width: 100%;
        margin-bottom: 15px;
        order: 1;
    }
    
    .related-products-modern .slider-nav-arrows {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .related-products-modern .slider-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .related-products-modern .slider-nav-btn i {
        font-size: 12px;
    }
}

/* Tablet Large (992px - 1199px) */
@media (max-width: 1199px) {
    .related-products-modern {
        padding: 60px 0;
    }
    
    .related-products-container {
        padding: 0 20px;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .related-products-modern {
        padding: 50px 0;
        margin-top: 60px;
    }
    
    .related-products-container {
        padding: 0 16px;
    }
    
    .related-products-modern .product-details {
        padding: 20px;
    }
    
    .related-products-modern .product-title,
    .related-products-modern .woocommerce-loop-product__title {
        font-size: 15px;
        min-height: 44px;
    }
    
    .related-products-modern .price {
        font-size: 17px;
    }
}

/* Mobile Large (600px - 767px) */
@media (max-width: 767px) {
    .related-products-modern {
        padding: 40px 0;
        margin-top: 50px;
    }
    
    .related-products-container {
        padding: 0 15px;
    }
    
    .related-products-modern .product-details {
        padding: 18px;
        gap: 10px;
    }
    
    .related-products-modern .product-title,
    .related-products-modern .woocommerce-loop-product__title {
        font-size: 14px;
        min-height: 40px;
    }
    
    .related-products-modern .price {
        font-size: 16px;
    }
    
    .related-products-modern .add_to_cart_button,
    .related-products-modern .button {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .related-products-modern .product-quick-actions {
        opacity: 1;
        transform: translateX(0);
    }
    
    .related-products-modern .quick-action {
        width: 38px;
        height: 38px;
    }
    
    .related-products-modern .quick-action svg {
        width: 16px;
        height: 16px;
    }
}

/* Mobile Small (480px - 599px) */
@media (max-width: 599px) {
    .related-products-modern {
        padding: 35px 0;
    }
    
    .related-products-container {
        padding: 0 12px;
    }
    
    .related-products-title {
        font-size: 22px;
    }
    
    
    .related-products-modern .product-details {
        padding: 16px;
    }
    
    .related-products-modern .product-title,
    .related-products-modern .woocommerce-loop-product__title {
        font-size: 13px;
        min-height: 38px;
    }
    
    .related-products-modern .product-category {
        font-size: 10px;
    }
    
    .related-products-modern .price {
        font-size: 15px;
    }
    
    .related-products-modern .add_to_cart_button,
    .related-products-modern .button {
        padding: 11px 14px;
        font-size: 12px;
    }
    
    .related-products-modern .onsale {
        top: 12px;
        right: 12px;
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .related-products-modern .product-quick-actions {
        top: 12px;
        left: 12px;
        gap: 6px;
    }
    
    .related-products-modern .quick-action {
        width: 36px;
        height: 36px;
    }
}

/* Mobile Extra Small (320px - 479px) */
@media (max-width: 479px) {
    .related-products-modern {
        padding: 30px 0;
        margin-top: 40px;
    }
    
    .related-products-title {
        font-size: 20px;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .related-products-modern .product-details {
        padding: 14px;
        gap: 8px;
    }
    
    .related-products-modern .product-title,
    .related-products-modern .woocommerce-loop-product__title {
        font-size: 12px;
        min-height: 36px;
        line-height: 1.4;
    }
    
    .related-products-modern .price {
        font-size: 14px;
    }
    
    .related-products-modern .add_to_cart_button,
    .related-products-modern .button {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .related-products-modern .quick-action {
        width: 34px;
        height: 34px;
    }
    
    .related-products-modern .quick-action svg {
        width: 14px;
        height: 14px;
    }
}

/* ========================================
   Animation & Transitions
======================================== */
.related-products-modern .product-card,
.related-products-modern li.product {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.related-products-modern .product-card:nth-child(1),
.related-products-modern li.product:nth-child(1) {
    animation-delay: 0.05s;
}

.related-products-modern .product-card:nth-child(2),
.related-products-modern li.product:nth-child(2) {
    animation-delay: 0.1s;
}

.related-products-modern .product-card:nth-child(3),
.related-products-modern li.product:nth-child(3) {
    animation-delay: 0.15s;
}

.related-products-modern .product-card:nth-child(4),
.related-products-modern li.product:nth-child(4) {
    animation-delay: 0.2s;
}

.related-products-modern .product-card:nth-child(5),
.related-products-modern li.product:nth-child(5) {
    animation-delay: 0.25s;
}

.related-products-modern .product-card:nth-child(6),
.related-products-modern li.product:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RTL Support
======================================== */
html[dir="rtl"] .related-products-modern .product-quick-actions {
    left: auto;
    right: 16px;
}

html[dir="rtl"] .related-products-modern .onsale {
    right: auto;
    left: 16px;
}

html[dir="rtl"] .related-products-modern .price del {
    margin-left: 0;
    margin-right: 8px;
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .related-products-modern .product-quick-actions,
    .related-products-modern .add_to_cart_button,
    .related-products-modern .button {
        display: none;
    }
}
