/**
 * Amazon Affiliate Carousel - Frontend Styles v1.5.0
 * WITH PRICE DISPLAY
 */

/* Carousel Wrapper */
.aac-carousel-wrapper {
    max-width: 100%;
    margin: 40px auto;
    padding: 0 15px;
}

/* Disclosure Text */
.aac-disclosure {
    text-align: center;
    font-size: 12px;
    color: #666;
    font-style: italic;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.aac-disclosure-above {
    margin-bottom: 20px;
}

.aac-disclosure-below {
    margin-top: 20px;
}

/* Swiper Customization */
.aac-swiper {
    padding: 20px 50px 40px 50px !important;
}

/* Product Card */
.aac-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;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.aac-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Product Image */
.aac-product-image-link {
    display: block;
    background: #fff;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.aac-product-image {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.aac-product-image-link:hover .aac-product-image {
    transform: scale(1.05);
}

.aac-no-image {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.aac-no-image .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #ccc;
}

/* Product Info Section */
.aac-product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Product Title */
.aac-product-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 15px 0;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aac-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.aac-product-title a:hover {
    color: #FF9900;
}

/* Rating Stars */
.aac-rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.aac-star {
    color: #FFA41C;
    font-size: 18px;
    margin-right: 2px;
}

.aac-star-empty {
    color: #ddd;
}

.aac-star-half {
    background: linear-gradient(90deg, #FFA41C 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aac-rating-value {
    font-weight: 600;
    color: #333;
    margin-left: 8px;
}

.aac-review-count {
    color: #007185;
    margin-left: 5px;
    font-size: 13px;
    text-decoration: none;
}

.aac-review-count:hover {
    color: #C7511F;
    text-decoration: underline;
}

/* Badges */
.aac-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.aac-prime-badge {
    display: inline-block;
}

.aac-prime-badge svg {
    vertical-align: middle;
}

/* PRICE SECTION (NEW in v1.5.0) */
.aac-price-section {
    background: #f0f8ff;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

.aac-price {
    font-size: 28px;
    font-weight: 700;
    color: #B12704;
    line-height: 1;
    margin-bottom: 5px;
}

.aac-price-timestamp {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

/* Features List (Desktop Only) */
.aac-features {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    font-size: 13px;
    color: #555;
    flex: 1;
}

.aac-features li {
    padding: 5px 0 5px 20px;
    position: relative;
    line-height: 1.4;
}

.aac-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #46b450;
    font-weight: bold;
}

/* CTA Button */
.aac-product-cta {
    padding: 0 20px 20px 20px;
    margin-top: auto;
}

.aac-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #FF9900;
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 2px solid #FF9900;
}

.aac-button:hover {
    background: #FA8900;
    border-color: #FA8900;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* Swiper Navigation Buttons */
.aac-swiper .swiper-button-prev,
.aac-swiper .swiper-button-next {
    color: #FF9900;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.aac-swiper .swiper-button-prev:after,
.aac-swiper .swiper-button-next:after {
    font-size: 20px;
    font-weight: bold;
}

.aac-swiper .swiper-button-prev:hover,
.aac-swiper .swiper-button-next:hover {
    background: #FF9900;
    color: #fff;
    transform: scale(1.1);
}

.aac-swiper .swiper-button-prev {
    left: 0;
}

.aac-swiper .swiper-button-next {
    right: 0;
}

/* Swiper Pagination */
.aac-swiper .swiper-pagination {
    bottom: 0 !important;
}

.aac-swiper .swiper-pagination-bullet {
    background: #ddd;
    opacity: 1;
    transition: all 0.3s ease;
}

.aac-swiper .swiper-pagination-bullet-active {
    background: #FF9900;
    width: 24px;
    border-radius: 5px;
}

/* Mobile Styles - Minimal Cards */
@media screen and (max-width: 640px) {
    .aac-carousel-wrapper {
        margin: 20px auto;
        padding: 0 10px;
    }
    
    .aac-swiper {
        padding: 20px 40px 35px 40px !important;
    }
    
    .aac-product-card {
        border-radius: 6px;
    }
    
    .aac-product-image-link {
        padding: 15px;
    }
    
    .aac-product-image {
        max-height: 180px;
    }
    
    .aac-product-info {
        padding: 15px;
    }
    
    .aac-product-title {
        font-size: 14px;
        min-height: auto;
        margin-bottom: 10px;
    }
    
    .aac-rating {
        font-size: 12px;
    }
    
    .aac-star {
        font-size: 16px;
    }
    
    /* Price on mobile */
    .aac-price {
        font-size: 24px;
    }
    
    .aac-price-section {
        padding: 12px;
        margin: 12px 0;
    }
    
    /* Hide features on mobile */
    .aac-features {
        display: none;
    }
    
    .aac-product-cta {
        padding: 0 15px 15px 15px;
    }
    
    .aac-button {
        padding: 10px 15px;
        font-size: 13px;
        border-radius: 15px;
    }
    
    .aac-swiper .swiper-button-prev,
    .aac-swiper .swiper-button-next {
        width: 30px;
        height: 30px;
    }
    
    .aac-swiper .swiper-button-prev:after,
    .aac-swiper .swiper-button-next:after {
        font-size: 16px;
    }
}

/* Tablet Styles */
@media screen and (min-width: 641px) and (max-width: 1023px) {
    .aac-product-image {
        max-height: 200px;
    }
    
    .aac-features {
        display: none;
    }
    
    .aac-product-title {
        font-size: 15px;
    }
    
    .aac-price {
        font-size: 26px;
    }
}

/* Desktop Styles - Detailed Cards */
@media screen and (min-width: 1024px) {
    .aac-carousel-wrapper {
        max-width: 1400px;
    }
    
    .aac-product-card {
        border-radius: 10px;
    }
}

/* Loading State */
.aac-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.aac-loading:before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF9900;
    border-radius: 50%;
    animation: aac-spin 1s linear infinite;
}

@keyframes aac-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RTL Support */
[dir="rtl"] .aac-features li {
    padding-left: 0;
    padding-right: 20px;
}

[dir="rtl"] .aac-features li:before {
    left: auto;
    right: 0;
}

/* Print Styles */
@media print {
    .aac-swiper .swiper-button-prev,
    .aac-swiper .swiper-button-next,
    .aac-swiper .swiper-pagination {
        display: none !important;
    }
    
    .aac-price-timestamp {
        display: none;
    }
}