/* Frontend Styles for Auto Related Products Slider */

/* Cart Recommendations Section */
.arp-cart-recommendations {
    margin: 30px 0 40px;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
}

.arp-cart-recommendations h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333;
}

/* Checkout Recommendations Section */
.arp-checkout-recommendations {
    margin: 30px 0 20px;
    padding: 25px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    clear: both;
}

.arp-checkout-recommendations h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding: 0;
    color: #333;
    text-align: center;
}

/* Slider Container */
.arp-slider-container {
    position: relative;
    padding: 0 50px;
}

/* Product Card */
.arp-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.arp-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #ccc;
    transform: translateY(-2px);
}

/* Product Image */
.arp-product-image {
    display: block;
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
}

.arp-product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.arp-product-card:hover .arp-product-image img {
    transform: scale(1.05);
}

/* Product Info */
.arp-product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.arp-product-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 6px 0;
    line-height: 1.3;
    flex: 1;
}

.arp-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.arp-product-title a:hover {
    color: #000;
}

/* Rating */
.arp-product-rating {
    margin-bottom: 6px;
    font-size: 11px;
}

.arp-product-rating .star-rating {
    font-size: 11px;
}

/* Price */
.arp-product-price {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

.arp-product-price del {
    opacity: 0.5;
    font-weight: 400;
    margin-right: 5px;
}

.arp-product-price ins {
    text-decoration: none;
    color: #e74c3c;
}

/* Swiper Customization */
.arp-products-slider {
    padding-bottom: 50px;
}

.arp-products-slider .swiper-slide {
    height: auto;
}

/* Navigation Buttons */
.arp-slider-container .swiper-button-next,
.arp-slider-container .swiper-button-prev {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    color: #333;
    transition: all 0.3s;
}

.arp-slider-container .swiper-button-next:after,
.arp-slider-container .swiper-button-prev:after {
    font-size: 16px;
    font-weight: 700;
}

.arp-slider-container .swiper-button-next:hover,
.arp-slider-container .swiper-button-prev:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

.arp-slider-container .swiper-button-next {
    right: 0;
}

.arp-slider-container .swiper-button-prev {
    left: 0;
}

/* Pagination */
.arp-slider-container .swiper-pagination {
    bottom: 15px;
}

.arp-slider-container .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    opacity: 1;
    transition: all 0.3s;
}

.arp-slider-container .swiper-pagination-bullet-active {
    background: #333;
    width: 30px;
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .arp-slider-container {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .arp-cart-recommendations h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .arp-slider-container {
        padding: 0 35px;
    }
    
    .arp-slider-container .swiper-button-next,
    .arp-slider-container .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .arp-slider-container .swiper-button-next:after,
    .arp-slider-container .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .arp-product-title {
        font-size: 13px;
    }
    
    .arp-product-price {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .arp-slider-container {
        padding: 0 30px;
    }
    
    .arp-slider-container .swiper-button-next,
    .arp-slider-container .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .arp-slider-container .swiper-button-next:after,
    .arp-slider-container .swiper-button-prev:after {
        font-size: 12px;
    }
    
    .arp-product-info {
        padding: 12px;
    }
}

/* Loading State */
.arp-slider-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.arp-slider-container.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Page Sliders */
.arp-product-recommendations {
    margin: 40px 0;
}

.arp-product-recommendations h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333;
}

/* Specific slider types */
.arp-related h2 {
    color: #2c3e50;
}

.arp-upsell h2 {
    color: #27ae60;
}

.arp-crosssell h2 {
    color: #e67e22;
}

/* Out of Stock Badge */
.arp-product-card .outofstock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    z-index: 2;
}

/* Sale Badge */
.arp-product-card .onsale {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    z-index: 2;
}

/* Ensure compatibility with common themes */
.woocommerce .arp-cart-recommendations,
.woocommerce-page .arp-cart-recommendations {
    max-width: 100%;
}

h3, .entry-content h3, .entry-content h3 a {
    font-size:16px!important;
}
