/**
 * Category Carousel CSS
 * Matches existing theme styling for Slick carousels
 */

/* Category Carousel Section */
.category-carousel-section {
    padding: 40px 0;
    margin-top: 40px;
}

.category-carousel-header {
    text-align: center;
    margin-bottom: 30px;
}

.category-carousel-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    padding: 0;
}

/* Slick Carousel Overrides for Category Carousel */
.category-carousel-section .slick-products-carousel {
    position: relative;
    margin: 0 -10px;
}

.category-carousel-section .slick-slide {
    padding: 0 10px;
    box-sizing: border-box;
}

.category-carousel-section .slick-list {
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.category-carousel-section .slick-track {
    display: flex;
    align-items: stretch;
}

/* Arrow Styling to Match Theme */
.category-carousel-section .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    line-height: 1;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-carousel-section .slick-arrow:hover {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #000;
}

.category-carousel-section .slick-arrow:disabled,
.category-carousel-section .slick-arrow.slick-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.category-carousel-section .slick-prev {
    left: -20px;
}

.category-carousel-section .slick-next {
    right: -20px;
}

.category-carousel-section .slick-arrow span {
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
}

/* Product Miniature Adjustments */
.category-carousel-section .js-product-miniature-wrapper {
    height: 100%;
}

.category-carousel-section .product-miniature {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-carousel-section .product-description {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure consistent card heights */
.category-carousel-section .thumbnail-container {
    position: relative;
}

.category-carousel-section .product-thumbnail {
    display: block;
    position: relative;
    overflow: hidden;
}

.category-carousel-section .product-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.category-carousel-section .product-thumbnail:hover img {
    transform: scale(1.05);
}

/* Product Flags */
.category-carousel-section .product-flags {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-carousel-section .product-flag {
    display: inline-block;
    padding: 4px 8px;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 3px;
}

.category-carousel-section .product-flag.discount {
    background-color: #ff6b6b;
}

.category-carousel-section .flag-discount-value {
    font-weight: 700;
}

/* Functional Buttons */
.category-carousel-section .product-functional-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-carousel-section .product-miniature:hover .product-functional-buttons {
    opacity: 1;
}

.category-carousel-section .product-functional-buttons-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-carousel-section .product-functional-buttons-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-carousel-section .product-functional-buttons-links a:hover {
    background-color: #fff;
    color: #000;
    transform: scale(1.1);
}

.category-carousel-section .product-functional-buttons-links i {
    font-size: 16px;
}

/* Product Availability Badge */
.category-carousel-section .product-availability {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 5;
}

.category-carousel-section .badge {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
}

.category-carousel-section .product-available {
    background-color: #28a745;
    color: #fff;
}

/* Product Title */
.category-carousel-section .product-title {
    font-size: 14px;
    font-weight: 500;
    margin: 10px 0 5px 0;
    line-height: 1.4;
}

.category-carousel-section .product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-carousel-section .product-title a:hover {
    color: #007bff;
}

/* Product Reference */
.category-carousel-section .product-reference {
    font-size: 12px;
    margin-bottom: 8px;
}

/* Product Variants */
.category-carousel-section .products-variants {
    margin: 8px 0;
}

.category-carousel-section .variant-links {
    display: flex;
    gap: 5px;
    align-items: center;
}

.category-carousel-section .variant-links .color {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-carousel-section .variant-links .color:hover {
    border-color: #333;
    transform: scale(1.1);
}

/* Price Display */
.category-carousel-section .product-price-and-shipping {
    margin: 10px 0;
}

.category-carousel-section .product-price {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.category-carousel-section .regular-price {
    font-size: 14px;
    text-decoration: line-through;
    color: #999;
    margin-left: 8px;
}

.category-carousel-section .discount-percentage-display {
    font-size: 12px;
    color: #ff6b6b;
    font-weight: 600;
    margin: 5px 0;
}

/* Add to Cart Section */
.category-carousel-section .product-add-cart {
    margin-top: auto;
    padding-top: 10px;
}

.category-carousel-section .input-group-add-cart {
    display: flex;
    gap: 5px;
}

.category-carousel-section .input-qty {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.category-carousel-section .btn-product-list {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-carousel-section .btn-product-list:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.category-carousel-section .btn-product-list:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-carousel-section .btn-product-list img {
    width: 20px;
    height: 20px;
}

.category-carousel-section .spinner-icon {
    display: none;
}

.category-carousel-section .btn-product-list:disabled .spinner-icon {
    display: inline-block;
}

button.slick-prev.slick-arrow {
    font-size: 0;
}

button.slick-next.slick-arrow {
    font-size: 0;
}

/* Responsive Adjustments */
@media (max-width: 1199px) {
    .category-carousel-section .slick-arrow {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

@media (max-width: 991px) {
    .category-carousel-section {
        padding: 30px 0;
    }

    .category-carousel-title {
        font-size: 20px;
    }

    .category-carousel-section .slick-prev {
        left: -15px;
    }

    .category-carousel-section .slick-next {
        right: -15px;
    }
}

@media (max-width: 767px) {
    .category-carousel-section {
        padding: 20px 0;
    }

    .category-carousel-title {
        font-size: 18px;
    }

    .category-carousel-section .slick-arrow {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .category-carousel-section .slick-prev {
        left: -10px;
    }

    .category-carousel-section .slick-next {
        right: -10px;
    }

    .category-carousel-section .product-functional-buttons {
        opacity: 1;
    }
}

@media (max-width: 575px) {
    .category-carousel-section .slick-arrow {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .category-carousel-section .slick-prev {
        left: 0;
    }

    .category-carousel-section .slick-next {
        right: 0;
    }

    .category-carousel-section .product-price {
        font-size: 16px;
    }

    .category-carousel-section .btn-product-list {
        font-size: 12px;
        padding: 6px 10px;
    }
}