* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--main-background);
}

.grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 0 20px;
}

.product-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 280px !important;
    min-width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.product-card:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-card img:hover {
    cursor: pointer;
}

.product-name {
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.product-price {
    color: red;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.action-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    width: 100%;
}

.quantity-input,
.btn-louer {
    flex: 1;
    height: 50px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFD500;
    border: 2px solid #FFD500;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.quantity-input {
    padding: 0;
}

.quantity-input button,
.quantity-input .quantity-display {
    flex: 1;
    height: 100%;
    border: none;
    background-color: #FFD500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.btn-symbol {
    transition: transform 0.2s ease;
    display: inline-block;
}

.quantity-input button:hover .btn-symbol {
    transform: scale(1.4);
}

.quantity-input button:hover .btn-symbol:active {
    transform: scale(0.96);
}

.btn-louer:hover {
    background-color: var(--add-to-cart-hover);
}

.quantity-display {
    cursor: default;
}

.btn-louer {
    background-color: var(--primary-yellow);
    border: none;
    padding: 0 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.5s ease;
    width: 100%;
    color: black;
}

.product-images-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    height: 180px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.product-images-carousel img {
    flex: 0 0 100%;
    scroll-snap-align: start;
    object-fit: contain;
    height: 100%;
    border-radius: 10px;
    background: #ffffff;
}

.product-images-carousel::-webkit-scrollbar {
    display: none;
}
.product-images-carousel {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.carousel-indicators .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #999;
    transition: background-color 0.2s;
}

.carousel-indicators .dot.active {
    background-color: #555;
}

.product-badge {
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.cart-emoji {
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 1024px) {
    .product-card {
        width: 280px !important;
        min-width: 280px;
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .product-card {
        width: calc(50% - 20px) !important;
        min-width: 240px;
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .product-card {
        width: 100% !important;
        min-width: unset;
        max-width: 400px;
    }
}

/*trash badge*/
/* Badge poubelle (en haut à gauche) */
.product-trashBadge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    border: 1px solid rgba(0,0,0,.06);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .18s ease, opacity .18s ease;
    opacity: 0;
    z-index: 2;
}
.product-trashBadge.show { display: flex; opacity: 1; }
.product-trashBadge:hover { transform: translateY(-1px) scale(1.03); }
.product-trashBadge:active { transform: scale(0.97); }

/* SVG */
.product-trashBadge svg {
    width: 18px; height: 18px; color: #e6494d;
    stroke: currentColor; stroke-width: 1.6; fill: none;
    overflow: visible;
    transform-box: fill-box;
}

/* Anim couvercle */
.product-trashBadge .trash-lid {
    transform-origin: 12px 6px;
    transition: transform 0.6s ease;
}

.product-trashBadge.opening .trash-lid {
    transform: rotate(-15deg) translateY(-3px);
}

@keyframes trash-wiggle {
    0% { transform: rotate(0); }
    25% { transform: rotate(-8deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(8deg); }
    100% { transform: rotate(0); }
}
.product-trashBadge.opening { animation: trash-wiggle .28s ease; }
