/* ===================== Product Carousel ===================== */
.prodcar-carousel-section {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.prodcar-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.prodcar-carousel-title {
    font-size: 28px;
    font-weight: 700;
    color: #222;
}

.prodcar-carousel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prodcar-carousel-seeall {
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #222;
    padding: 6px 14px;
    border-radius: 8px;
    color: #222;
    transition: 0.3s;
}

.prodcar-carousel-seeall:hover {
    background: #222;
    color: #fff;
}

.prodcar-carousel-arrow {
    font-size: 22px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    transition: 0.3s;
    user-select: none;
}

.prodcar-carousel-arrow:hover {
    background: #222;
    color: #fff;
}

/* ===================== Track ===================== */
.prodcar-carousel-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.prodcar-carousel-container::-webkit-scrollbar {
    display: none;
}

.prodcar-carousel-track {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    will-change: transform;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
}

/* ===================== Cards ===================== */
.prodcar-card {
    flex: 0 0 25%;
    background: #fff;
    border-radius: 14px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    scroll-snap-align: start;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.prodcar-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

/* ===================== Image Wrapper ===================== */
.prodcar-img-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    width: 100%;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.prodcar-img-wrapper img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -ms-user-drag: none;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Default image visible */
.prodcar-img-wrapper .main-img {
    opacity: 1;
    z-index: 1;
}

/* Hover image hidden initially */
.prodcar-img-wrapper .hover-img {
    opacity: 0;
    z-index: 2;
}

/* On hover: fade main out, fade hover in */
.prodcar-card:hover .prodcar-img-wrapper .main-img {
    opacity: 0;
    transform: scale(1.05);
}

.prodcar-card:hover .prodcar-img-wrapper .hover-img {
    opacity: 1;
    transform: scale(1.05);
}

/* ===================== Info ===================== */
.prodcar-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.prodcar-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.prodcar-price {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prodcar-price-original {
    text-decoration: line-through;
    color: #888;
    font-size: 14px;
}

.prodcar-price-discount {
    color: #e53935;
    font-weight: 700;
}

/* ===================== Meta Info ===================== */
.prodcar-meta {
    font-size: 14px;
    display: flex;
    gap: 10px;
    color: #666;
}

/* ===================== Button ===================== */
.prodcar-btn-add-cart {
    margin-top: auto;
    padding: 10px 12px;
    font-size: 14px;
    border: none;
    background: #e53935;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.prodcar-btn-add-cart:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

/* ===================== Responsive ===================== */
@media (max-width: 1200px) {
    .prodcar-card {
        flex: 0 0 33.333%;
        min-height: 400px;
    }
}

@media (max-width: 900px) {
    .prodcar-card {
        flex: 0 0 50%;
        min-height: 360px;
    }

    .prodcar-carousel-title {
        font-size: 24px;
    }

    .prodcar-carousel-seeall,
    .prodcar-carousel-arrow {
        display: none;
    }
}

@media (max-width: 600px) {
    .prodcar-card {
        flex: 0 0 80%;
        min-height: 320px;
    }

    .prodcar-title {
        font-size: 16px;
    }

    .prodcar-price {
        font-size: 15px;
    }
}

.toast-message {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #333;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-message.success {
    background: #28a745;
}

.toast-message.error {
    background: #dc3545;
}
