/* ============================= */
/* Product Card & Image Styles   */
/* ============================= */
.qv-product-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    height: 100%;
}

@media (min-width: 640px) {
    .qv-product-card {
        max-width: 280px;
    }
}

.qv-product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Image Container */
.qv-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #f8fafc;
}

.qv-product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.qv-img-hover {
    opacity: 0;
    transform: scale(1.1);
}

.qv-product-card:hover .qv-img-default {
    opacity: 0;
}

.qv-product-card:hover .qv-img-hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Hover Action Buttons (Vertical) */
.qv-hover-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 20;
}

.qv-product-card:hover .qv-hover-actions {
    opacity: 1;
    transform: translateX(0);
}

.qv-action-btn {
    background: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4b5563;
}

.qv-action-btn:hover {
    background: #0d9488;
    color: #ffffff;
}

/* Ribbon Badge for Discount / Not Sale */
.qv-product-badge {
    position: absolute;
    top: 12px;
    left: -12px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    transform: rotate(-15deg);
    z-index: 30;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Card Content */
.qv-product-card .qv-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.qv-product-card .qv-product-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qv-product-card .qv-rating-container {
    margin-bottom: 0.5rem;
    gap: 0.25rem;
}

.qv-product-card .qv-price-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-weight: 700;
}

.qv-carousel-item .qv-cart-footer {
    margin-top: auto;
    padding: 0;
    background: none;
    flex-shrink: 0;
}

.qv-carousel-item .qv-cart-footer button {
    width: 100%;
    background: #14b8a6;
    color: white;
    padding: 0.5rem 0;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.qv-carousel-item .qv-cart-footer button:hover {
    background: #0d9488;
}

/* ============================= */
/* Carousel Core Styles           */
/* ============================= */
.qv-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.qv-carousel-track {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qv-carousel-item {
    flex: 0 0 50%;
    padding: 0 6px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    min-width: 122px;
}

/* Responsive breakpoints */
@media (min-width: 640px) {
    .qv-carousel-item {
        flex: 0 0 50%;
        padding: 0 8px;
    }
}

@media (min-width: 768px) {
    .qv-carousel-item {
        flex: 0 0 33.3333%;
        padding: 0 8px;
    }
}

@media (min-width: 1024px) {
    .qv-carousel-item {
        flex: 0 0 25%;
        padding: 0 8px;
    }
}

/* Carousel Navigation Buttons */
.qv-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    z-index: 10;
}

.qv-carousel-btn:hover {
    background: #0d9488;
    color: white;
    border-color: #0d9488;
}

.qv-carousel-prev { left: 10px; }
.qv-carousel-next { right: 10px; }

/* Hide Scrollbar Smoothly */
.qv-carousel-wrapper::-webkit-scrollbar { display: none; }
.qv-carousel-wrapper { -ms-overflow-style: none; scrollbar-width: none; }


/* Quick View & Zoom */
#qv-quickview-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#qv-quickview-modal.qv-open {
    display: flex;
    opacity: 1;
}

.qv-container {
    background: white;
    border-radius: 16px;
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
}

@media (min-width: 1024px) {
    .qv-container {
        flex-direction: row;
    }
}

.qv-left {
    width: 100%;
    height: 50%;
    padding: 1.5rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

@media (min-width: 1024px) {
    .qv-left {
        width: 50%;
        height: 100%;
        padding: 2rem;
        background: #f9fafb;
    }
}

.qv-main-display {
    position: relative;
    width: 100%;
    height: 100%;
    flex-grow: 1;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
}

.qv-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.2s;
}

/* Zoom Components */
.qv-zoom-lens {
    position: absolute;
    border: 2px solid #0d9488;
    width: 150px;
    height: 150px;
    background: rgba(13, 148, 136, 0.15);
    cursor: crosshair;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    border-radius: 8px;
    transition: opacity 0.2s;
}

.qv-zoom-result {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 20px;
    width: 450px;
    height: 450px;
    background-color: white;
    border: 4px solid white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    background-repeat: no-repeat;
    border-radius: 12px;
    transition: opacity 0.2s;
}

@media (max-width: 1023px) {
    .qv-zoom-result,
    .qv-zoom-lens {
        display: none !important;
    }

    .qv-main-display {
        cursor: default;
    }
}

/* Thumbs & Nav */
.qv-thumbs-container {
    position: relative;
    height: 80px;
    flex-shrink: 0;
    margin-top: 10px;
}

.qv-thumbs-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
}

.qv-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    opacity: 1;
    transition: all 0.2s;
}

.qv-thumb.qv-active {
    border-color: #0d9488;
    opacity: 1;
    transform: scale(0.95);
}

.qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qv-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    color: #333;
    border: none;
    transition: hover 0.2s;
}

.qv-nav-btn:hover {
    background: #0d9488;
    color: white;
}

.qv-prev {
    left: 10px;
}

.qv-next {
    right: 10px;
}

/* Right Side */
.qv-right {
    width: 100%;
    height: 50%;
    padding: 1.5rem;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .qv-right {
        width: 50%;
        height: 100%;
        padding: 2.5rem;
        border-left: 1px solid #f3f4f6;
    }
}

.qv-badge-sale {
    background: #fee2e2;
    color: #ef4444;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.qv-badge-stock {
    background: #d1fae5;
    color: #059669;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.qv-right::-webkit-scrollbar {
    width: 6px;
}

.qv-right::-webkit-scrollbar-track {
    background: transparent;
}

.qv-right::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
