/**
 * Products Carousel Styles - Modern Product Display
 * 
 * Clean, modern design for product showcase carousel
 * 
 * @package ProduktVerleih
 * @since 1.0.0
 */

/* ========================================
   Carousel Wrapper
   ======================================== */
.pv-products-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 0;
}

/* ========================================
   Carousel Header (Title + Navigation)
   ======================================== */
.pv-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.pv-carousel-title {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.pv-carousel-nav-buttons {
    display: flex;
    gap: 0.75rem;
}

/* ========================================
   Navigation Buttons (Top Right) - Minimalistic
   ======================================== */
.pv-carousel-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
    border-radius: 9999px;
    box-shadow: none !important;
}

.pv-carousel-btn:hover:not(:disabled) {
    color: #1e293b;
    transform: scale(1.1);
}

.pv-carousel-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.pv-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pv-carousel-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* ========================================
   Carousel Container
   ======================================== */
.pv-products-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.pv-products-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 2rem;
}

/* ========================================
   Product Item
   ======================================== */
.pv-product-item {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Multiple slides per view - adjusted for 2rem gap */
.pv-products-carousel-wrapper[data-slides="2"] .pv-product-item {
    width: calc(50% - 1rem);
}

.pv-products-carousel-wrapper[data-slides="3"] .pv-product-item {
    width: calc(33.333% - 1.333rem);
}

.pv-products-carousel-wrapper[data-slides="4"] .pv-product-item {
    width: calc(25% - 1.5rem);
}

/* ========================================
   Product Card - Modern Clean Design
   ======================================== */
.pv-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    /* Removed shadows as requested */
    box-shadow: none !important;
    border: none;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pv-product-card:hover {
    /* Removed hover shadow as requested */
    box-shadow: none !important;
    /* transform: translateY(-4px); Keeping movement or removing? User said "ich brauche keine shadows auch beim hover nicht". Usually movement without shadow looks weird, so I'll limit it. */
    transform: none;
}

/* ========================================
   Product Image
   ======================================== */
.pv-product-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    /* 4:3 aspect ratio */
    background: #f8f9fa;
    overflow: hidden;
}

.pv-product-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.pv-product-image-placeholder svg {
    width: 50%;
    height: 50%;
}

/* ========================================
   Product Info
   ======================================== */
.pv-product-info {
    padding: 1.5rem 0rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.pv-product-name {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.pv-product-name a {
    color: inherit;
    text-decoration: none !important;
    /* No underline */
    transition: none;
    /* No color transition */
}

/* No color change on hover */
.pv-product-name a:hover {
    color: inherit;
    text-decoration: none !important;
}

/* Matching .shop-product-shortdesc styles */
.pv-product-description {
    margin: 0;
    /* font-size: 0.875rem; -> changed to match shop-product-shortdesc 0.95em approx 0.95rem */
    font-size: 0.95em;
    color: #000;
    /* was #64748b */
    line-height: 1.6;
    flex: 1;
    margin-bottom: 0.8rem;
    min-height: 3em;
}

/* Matching .shop-product-price styles */
.pv-product-price {
    font-size: 1.1em;
    /* was 1.25rem */
    font-weight: bold;
    /* was 700, same */
    color: #000;
    /* was #1e293b */
    margin: 0.5rem 0;
    /* shop has min-height 24px, margin handled by parent flex gap */
    min-height: 24px;
    display: flex;
    align-items: center;
}

/* ========================================
   Product Button
   ======================================== */
/* Requested: Black background, white text, no underline */
.pv-product-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--produkt-discount-badge-bg, #e3e8e3);
    color: var(--produkt-discount-badge-text, var(--produkt-text-color));
    text-decoration: none !important;
    border-radius: 10px;
    font-weight: 900;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    justify-content: center;
}

.pv-product-btn:hover {
    background: #333333;
    /* Slightly lighter black for hover feedback */
    /* transform: translateY(-2px); */
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); */
    color: #ffffff;
}

.pv-product-btn:active {
    transform: translateY(0);
}

.pv-product-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    stroke: #ffffff;
    /* Ensure icon is white */
}

.pv-product-btn:hover svg {
    transform: translateX(3px);
}

/* ========================================
   Pagination Dots
   ======================================== */
.pv-carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
}

.pv-carousel-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
}

.pv-carousel-dot:hover,
.pv-carousel-dot:focus,
.pv-carousel-dot:active {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    transform: none !important;
}

/* Visual dot element */
.pv-dot-visual {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.pv-carousel-dot:hover .pv-dot-visual {
    background: #94a3b8;
    transform: scale(1.15);
}

.pv-carousel-dot.active .pv-dot-visual {
    background: #000000;
    width: 28px;
    border-radius: 5px;
}

/* ========================================
   Empty State
   ======================================== */
.pv-products-carousel-empty {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8fafc;
    border-radius: 12px;
    color: #64748b;
    font-size: 1rem;
    border: 2px dashed #cbd5e0;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .pv-products-carousel-wrapper[data-slides="4"] .pv-product-item {
        width: calc(33.333% - 1.333rem);
    }

    .pv-carousel-title {
        /* font-size removed */
    }
}

@media (max-width: 768px) {

    .pv-products-carousel-wrapper[data-slides="3"] .pv-product-item,
    .pv-products-carousel-wrapper[data-slides="4"] .pv-product-item {
        width: calc(50% - 1rem);
    }

    .pv-product-info {
        padding: 1.25rem 0rem;
    }

    .pv-carousel-title {
        /* font-size removed */
    }

    .pv-carousel-btn {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 640px) {
    .pv-products-carousel-wrapper {
        /* margin removed as per user request */
    }

    .pv-carousel-header {
        margin-bottom: 2rem;
    }

    /* Default: 1 product per slide on mobile (when mobile="1" or not specified) */
    .pv-products-carousel-wrapper[data-mobile="1"] .pv-product-item,
    .pv-products-carousel-wrapper:not([data-mobile]) .pv-product-item {
        width: 100%;
    }

    /* 2 products per slide on mobile (when mobile="2") */
    .pv-products-carousel-wrapper[data-mobile="2"] .pv-product-item {
        width: calc(50% - 1rem);
    }

    /* 3 products per slide on mobile (when mobile="3") */
    .pv-products-carousel-wrapper[data-mobile="3"] .pv-product-item {
        width: calc(33.333% - 1.333rem);
    }

    /* 4 products per slide on mobile (when mobile="4") */
    .pv-products-carousel-wrapper[data-mobile="4"] .pv-product-item {
        width: calc(25% - 1.5rem);
    }

    .pv-product-info {
        padding: 1rem 0rem;
    }

    .pv-carousel-title {
        /* font-size removed */
    }

    .pv-carousel-btn {
        width: 40px;
        height: 40px;
    }

    .pv-carousel-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {

    .pv-carousel-nav-buttons,
    .pv-carousel-pagination {
        display: none;
    }

    .pv-products-carousel-track {
        flex-wrap: wrap;
    }

    .pv-product-item {
        page-break-inside: avoid;
    }
}