/**
 * 2023-2025 PrestaChamps
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaChamps <info@prestachamps.com>
 * @copyright 2023-2025 PrestaChamps
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */

#pch-reassurance {
    background-color: white;
    position: relative;
}

/* Common item styles */
.pch-reassurance-item {
    display: flex;
    align-items: center;
    padding: 4px;
}

.pch-reassurance-item img {
    max-width: 50px;
    max-height: 50px;
    margin-right: 10px;
    margin-left: 0;
}

.pch-reassurance-default-image {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a7a7a;
}

.pch-reassurance-item-content {
    display: flex;
    flex-direction: column;
}

.pch-reassurance-item-title {
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.pch-reassurance-item-description {
    font-size: 0.7em;
}

/* Desktop Layout (≥1024px) */
@media (min-width: 1024px) {
    .pch-desktop-layout {
        display: flex;
        justify-content: space-between;
        max-width: 1200px;
        margin: auto;
    }
    
    .pch-desktop-layout .pch-reassurance-item {
        flex: 1 1 auto;
    }
    
    .pch-carousel-layout {
        display: none;
    }

    /* MZS - Added for Cart changes */
    #cart .cart-footer-info .pch-reassurance-item {
        flex-direction: column;
        align-items: center;
    }

    #cart .cart-footer-info .pch-reassurance-item img {
        margin-right: 0;
        border-radius: 8px;
        border: 1px solid #414042;
        margin-bottom: 6px;
        max-width: 68px;
        max-height: 68px;
    }

    #cart .cart-footer-info .pch-reassurance-item-content {
        text-align: center;
    }

    #cart .cart-footer-info .pch-desktop-layout {
        max-width: unset;
        margin: 0;
    }
}

/* Carousel Layout (≤1023px) */
@media (max-width: 1023px) {
    .pch-desktop-layout {
        display: none;
    }
    
    .pch-carousel-layout {
        display: block;
        position: relative;
    }
    
    .pch-carousel-wrapper {
        overflow: hidden;
        position: relative;
        min-height: 58px;
    }
    
    .pch-carousel-track {
        display: flex;
        transition: transform 0.6s ease;
        will-change: transform;
        position: relative;
    }
    
    .pch-carousel-item {
        flex-shrink: 0;
        padding: 0 8px;
        box-sizing: border-box;
        transition: opacity 1s ease;
    }
    
    /* Mobile fade mode - single item display */
    .pch-carousel-track.fade-mode {
        display: block;
    }
    
    .pch-carousel-track.fade-mode .pch-carousel-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        display: none;
        padding: 0 16px;
    }
    
    .pch-carousel-track.fade-mode .pch-carousel-item.active {
        opacity: 1;
        display: block;
    }
    
    .pch-carousel-track.fade-mode .pch-carousel-item.fade-in {
        display: block;
        opacity: 0;
        animation: fadeIn 0.4s ease forwards;
    }
    
    .pch-carousel-track.fade-mode .pch-carousel-item.fade-out {
        display: block;
        opacity: 1;
        animation: fadeOut 0.4s ease forwards;
    }
    
    /* 4 items per view (1023px - 768px) - scroll mode */
    .pch-carousel-item {
        flex: 0 0 25%;
    }
    
    /* Navigation buttons */
    .pch-carousel-nav {
        display: none !important;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 100%;
        display: flex;
        justify-content: space-between;
        pointer-events: none;
        z-index: 2;
        padding: 0 12px;
    }
    
    .pch-carousel-prev,
    .pch-carousel-next {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #ddd;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        pointer-events: auto;
        transition: all 0.2s ease;
        color: #333;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .pch-carousel-prev:hover,
    .pch-carousel-next:hover {
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transform: scale(1.05);
    }
    
    .pch-carousel-prev:disabled,
    .pch-carousel-next:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }
}

/* 3 items per view (767px - 576px) */
@media (max-width: 767px) {
    .pch-carousel-item {
        flex: 0 0 33.333%;
    }
}

/* 2 items per view (575px - 480px) */
@media (max-width: 575px) {
    .pch-carousel-item {
        flex: 0 0 50%;
    }
    
    .pch-reassurance-item {
        flex-direction: row;
        text-align: center;
        justify-content: center;
        gap: 24px;
    }
    
    .pch-reassurance-item img,
    .pch-reassurance-default-image {
        margin: 0;
    }
}

/* 1 item per view (≤479px) */
@media (max-width: 479px) {
    .pch-carousel-item {
        flex: 0 0 100%;
    }
}

/* Fade animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Touch/swipe support */
.pch-carousel-track {
    touch-action: pan-y;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Smooth scrolling for better performance */
.pch-carousel-track.dragging {
    transition: none;
}

/* Fade mode specific touch handling */
.pch-carousel-track.fade-mode {
    touch-action: pan-y;
}
