/**
 * Carousel Block Styles
 */

.apb-carousel-block {
    margin: 30px 0;
    position: relative;
}

.apb-carousel-container {
    margin: 0 -10px;
}

.apb-carousel-slide {
    padding: 0 10px;
    outline: none;
}

.apb-carousel-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Card Styles */
.apb-card-style-default .apb-carousel-product-card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.apb-card-style-bordered .apb-carousel-product-card {
    border: 2px solid #e5e7eb;
}

.apb-card-style-elevated .apb-carousel-product-card {
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.apb-carousel-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

/* Image */
.apb-carousel-image {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background: #f3f4f6;
    overflow: hidden;
}

.apb-carousel-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.apb-carousel-image:hover img {
    transform: scale(1.1);
}

/* Content */
.apb-carousel-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.apb-carousel-title {
    margin: 0 0 10px;
    font-size: 1.1em;
    line-height: 1.4;
}

.apb-carousel-title a {
    color: #111827;
    text-decoration: none;
}

.apb-carousel-title a:hover {
    color: var(--apb-primary-color, #FF9900);
}

.apb-carousel-rating {
    margin: 10px 0;
    font-size: 0.9em;
}

.apb-carousel-price {
    margin: 15px 0;
    font-size: 1.1em;
}

.apb-carousel-price .apb-original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.9em;
    display: block;
    margin-bottom: 5px;
}

.apb-carousel-price .apb-current-price {
    color: var(--apb-accent-color, #B12704);
    font-weight: bold;
    font-size: 1.3em;
    display: block;
}

.apb-carousel-button {
    margin-top: auto;
    padding-top: 15px;
}

.apb-carousel-btn {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.apb-carousel-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Button Sizes */
.apb-carousel-btn.apb-btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.apb-carousel-btn.apb-btn-medium {
    padding: 12px 24px;
    font-size: 1em;
}

.apb-carousel-btn.apb-btn-large {
    padding: 16px 32px;
    font-size: 1.1em;
}

/* Button Styles */
.apb-carousel-btn.apb-btn-solid {
    /* Styles applied inline via PHP */
}

.apb-carousel-btn.apb-btn-outline {
    /* Styles applied inline via PHP */
    background-color: transparent !important;
}

.apb-carousel-btn.apb-btn-outline:hover {
    background-color: currentColor !important;
    color: #fff !important;
}

.apb-carousel-btn.apb-btn-gradient {
    /* Styles applied inline via PHP */
    position: relative;
    overflow: hidden;
}

.apb-carousel-btn.apb-btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.apb-carousel-btn.apb-btn-gradient:hover::before {
    left: 100%;
}

/* Slick Carousel Customization */
.apb-carousel-container .slick-arrow {
    width: 40px;
    height: 40px;
    z-index: 10;
}

.apb-carousel-container .slick-arrow:before {
    font-size: 40px;
    opacity: 0.75;
}

.apb-carousel-container .slick-arrow:hover:before {
    opacity: 1;
}

.apb-carousel-container .slick-prev {
    left: -50px;
}

.apb-carousel-container .slick-next {
    right: -50px;
}

.apb-carousel-container .slick-dots {
    bottom: -40px;
}

.apb-carousel-container .slick-dots li button:before {
    font-size: 12px;
    color: var(--apb-primary-color, #FF9900);
}

.apb-carousel-container .slick-dots li.slick-active button:before {
    color: var(--apb-primary-color, #FF9900);
    opacity: 1;
}

/* Editor Placeholder */
.apb-carousel-editor {
    padding: 20px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background: #f7fafc;
}

.apb-carousel-editor h3 {
    margin-top: 0;
    color: #2d3748;
}

/* Responsive */
@media (max-width: 1024px) {
    .apb-carousel-container .slick-prev {
        left: -30px;
    }

    .apb-carousel-container .slick-next {
        right: -30px;
    }
}

@media (max-width: 768px) {
    .apb-carousel-container .slick-prev {
        left: 10px;
    }

    .apb-carousel-container .slick-next {
        right: 10px;
    }

    .apb-carousel-container .slick-arrow {
        width: 30px;
        height: 30px;
    }

    .apb-carousel-container .slick-arrow:before {
        font-size: 30px;
    }

    .apb-carousel-content {
        padding: 15px;
    }

    .apb-carousel-title {
        font-size: 1em;
    }
}

/* Loading State */
.apb-carousel-container.slick-slider {
    opacity: 1;
    transition: opacity 0.3s;
}

.apb-carousel-container:not(.slick-initialized) {
    opacity: 0;
}
