/**
 * Cardshop Elementor Products (Carousel) - Structural Styles Only
 *
 * IMPORTANT: This file contains ONLY structural CSS required for functionality.
 * Visual styling (colors, borders, padding, fonts, etc.) should be done through
 * Elementor's style controls in the widget panel.
 *
 * These styles handle:
 * 1. Image swap functionality (featured ↔ gallery image)
 * 2. Carousel layout structure
 * 3. Basic positioning for interactive elements
 *
 */

/* PRODUCT CARD STRUCTURE */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* PRODUCT TITLE */
.product-title {
    margin: 0;
    line-height: 1.2;
}

.product-title a {
    transition: color 0.3s ease;
    text-decoration: none;
    display: block;
}

/* IMAGE SWAP - hover/tap to show gallery image */
.product-image-wrapper {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: block;
    width: 100%;
}

.product-images-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-images-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease-in-out;
}

.product-images-container img.first-image {
    opacity: 1;
}

.product-images-container img.hover-image {
    opacity: 0;
}

.product-image-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

/* DESKTOP HOVER */
@media (hover: hover) and (pointer: fine) {
    .product-image-wrapper.has-hover:hover img.first-image {
        opacity: 0;
    }
    .product-image-wrapper.has-hover:hover img.hover-image {
        opacity: 1;
    }
}

/* MOBILE TAP */
.product-image-wrapper.has-hover.mobile-active img.first-image {
    opacity: 0;
}
.product-image-wrapper.has-hover.mobile-active img.hover-image {
    opacity: 1;
}

/* PRODUCT BADGES */
.product-badge-wrapper {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    z-index: 5;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.product-badge {
    pointer-events: auto;
}

/* CAROUSEL LAYOUT */

.cardshop-product-carousel {
    position: relative;
    width: 100%;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-container {
    --carousel-item-gap: 20px;
    --slides-to-show: 4;

    position: relative;
    overflow: visible;
    display: flex;
    will-change: transform;
    width: 100%;
    touch-action: pan-y;
    user-select: none;
}

.carousel-item {
    position: relative;
    flex: 0 0 calc(100% / var(--slides-to-show));
    width: calc(100% / var(--slides-to-show));
    box-sizing: border-box;
    padding: 0 10px;
    min-width: 0;
}

/* Carousel item product card styling */
.carousel-item.product-card {
    display: flex;
    flex-direction: column;
    margin: 0 10px;
    padding: 0;
    width: 100%;
    height: auto;
}

.carousel-item .product-image-wrapper {
    flex-shrink: 0;
}

.carousel-item .product-images-container {
    height: 300px;
}


/* NAVIGATION BUTTONS */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: none !important;
    color: #333;
    border: none;
    width: auto;
    height: auto;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    transition: color 0.3s ease;
    padding: 8px;
    touch-action: manipulation;
    user-select: none;
}

.carousel-button:hover {
    background: none !important;
    color: #000;
}

.carousel-button:focus-visible {
    background: none !important;
    outline: 2px solid #333;
    outline-offset: 2px;
}

.carousel-button-prev {
    left: 10px;
}

.carousel-button-next {
    right: 10px;
}

@media (max-width: 767px) {
    .carousel-button {
        font-size: 24px;
        padding: 10px;
    }
}

