/* ============================================
   Quick View - Zoom Button & Modal
   ============================================ */

/* Zoom button on product card thumbnail */
.quick-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    outline: none;
}

.item-product-cat .thumb:hover .quick-view-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.quick-view-btn:hover {
    background: var(--accent-color, #e4144d);
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.15) !important;
}

/* ============================================
   Quick View Modal Overlay
   ============================================ */
.qv-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qv-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.qv-modal {
    background: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qv-overlay.active .qv-modal {
    transform: scale(1);
}

/* Close button */
.qv-close {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.qv-close:hover {
    background: var(--accent-color, #e4144d);
}

/* ============================================
   Image Section (Left)
   ============================================ */
.qv-image-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    min-width: 0;
}

/* Main Image Area — padding yok; görsel dış konteyneri tamamen doldurur */
.qv-main-image-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    min-height: 320px;
    overflow: hidden;
    background: #111;
}

.qv-zoom-stage {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    cursor: crosshair;
}

.qv-zoom-stage.is-zooming .qv-main-image {
    transition: transform 0.08s ease-out;
}

.qv-main-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: opacity 0.25s ease;
    transform-origin: center center;
    will-change: transform;
}

/* Navigation Arrows */
.qv-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.7;
}

.qv-nav-arrow:hover {
    background: var(--accent-color, #e4144d);
    opacity: 1;
}

.qv-nav-prev {
    left: 10px;
}

.qv-nav-next {
    right: 10px;
}

.qv-nav-arrow.hidden {
    display: none;
}

/* Thumbnails Strip */
.qv-thumbnails {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    overflow-x: auto;
    background: #eee;
    justify-content: center;
}

.qv-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.6;
}

.qv-thumb.active {
    border-color: var(--accent-color, #e4144d);
    opacity: 1;
}

.qv-thumb:hover {
    opacity: 1;
}

.qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   Info Section (Right)
   ============================================ */
.qv-info-section {
    width: 320px;
    padding: 16px 14px 16px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
}

.qv-product-name {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin: 0 0 15px;
    line-height: 1.3;
}

.qv-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color, #e4144d);
    margin-bottom: 5px;
}

.qv-old-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 15px;
}

.qv-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.qv-detail-link {
    display: inline-block;
    padding: 12px 25px;
    background: var(--accent-color, #e4144d);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: background 0.2s;
}

.qv-detail-link:hover {
    background: var(--btn-hover-color, #333);
    color: #fff;
    text-decoration: none;
}

/* ============================================
   Quick View right panel (independent sizing)
   Keep only required parts from product detail fragment:
   title + price + size/color/qty/cart + fast shipping badge
   ============================================ */
#qvInfo .p-review,
#qvInfo .p-short-des,
#qvInfo .product-guarantees,
#qvInfo .social-share,
#qvInfo .share-buttons,
#qvInfo .qv-detail-link {
    display: none !important;
}

/* Right panel layout fix: product detail fragment may include Bootstrap columns.
   Force full-width single column in quick-view to avoid narrow squeezed text. */
#qvInfo .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
#qvInfo [class*="col-"] {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#qvInfo .product-detail-info {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

#qvInfo .product-title,
#qvInfo .p-title h1 {
    font-size: 20px !important;
    line-height: 1.3 !important;
    margin: 0 0 10px !important;
    padding-left: 0 !important;
}

#qvInfo .p-price .price-label {
    font-size: 12px !important;
}

#qvInfo .p-price {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#qvInfo .p-options {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

#qvInfo .p-price .product-price {
    gap: 8px !important;
}

#qvInfo .p-price .current-price {
    font-size: 32px !important;
    font-weight: var(--price-font-weight, 700) !important;
    font-style: var(--price-font-style, normal) !important;
    font-family: var(--price-font, 'Roboto'), sans-serif !important;
    color: var(--discount-color, #e4144d) !important;
    line-height: 1 !important;
}

#qvInfo .p-price del {
    color: #bbb !important;
    font-size: 18px !important;
    font-weight: var(--old-price-font-weight, 400) !important;
    font-style: var(--old-price-font-style, normal) !important;
    font-family: var(--price-font, 'Roboto'), sans-serif !important;
}

#qvInfo .p-price .discount-badge {
    display: inline-block !important;
    background: var(--discount-color, #e4144d) !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: var(--price-font-weight, 700) !important;
    font-style: var(--price-font-style, normal) !important;
    font-family: var(--price-font, 'Roboto'), sans-serif !important;
    padding: 4px 10px !important;
    letter-spacing: 0.3px !important;
}

#qvInfo .selection-label {
    font-size: 11px !important;
}

#qvInfo .size-cube {
    width: 40px !important;
    height: 40px !important;
    font-size: 13px !important;
}

#qvInfo .color-cube {
    width: 34px !important;
    height: 34px !important;
}

#qvInfo .p-quantity-wrapper {
    display: flex !important;
    align-items: flex-end !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

#qvInfo .p-quantity label {
    font-size: 11px !important;
}

#qvInfo .qty-control .qty-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
}

#qvInfo .qty-control .qty {
    width: 42px !important;
    height: auto !important;
    font-size: 13px !important;
    border: none !important;
    background: transparent !important;
}

#qvInfo .btn-cart1 button[name="form_add_to_cart"] {
    border: 0 !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 11px 16px !important;
    background: var(--cart-btn-color) !important;
    color: var(--cart-btn-text-color, #fff) !important;
    font-weight: var(--cart-btn-font-weight, 700) !important;
    font-style: var(--cart-btn-font-style, normal) !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: background 0.2s, transform 0.1s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}
#qvInfo .p-quantity {
    flex: 0 0 auto !important;
}
#qvInfo .btn-cart1 {
    flex: 1 1 auto !important;
    margin-left: 0 !important;
    min-width: 0 !important;
}
#qvInfo .qty-control {
    width: auto !important;
    min-width: 100px !important;
}
#qvInfo .qty-control .qty-btn {
    width: 28px !important;
}
#qvInfo .p-quantity-wrapper {
    width: 100% !important;
}
#qvInfo .btn-cart1 button[name="form_add_to_cart"] {
    width: 100% !important;
    min-width: 0 !important;
}
#qvInfo .btn-cart1 button[name="form_add_to_cart"]:hover {
    background: var(--btn-hover-color) !important;
}
#qvInfo .btn-cart1 button[name="form_add_to_cart"]:active {
    transform: scale(0.98) !important;
}
#qvInfo .btn-cart1 button[name="form_add_to_cart"]:disabled {
    background: var(--out-of-stock-bg, #999) !important;
    color: var(--out-of-stock-text, #fff) !important;
    cursor: not-allowed !important;
}

#qvInfo .fast-shipping-badge {
    margin-top: 10px !important;
    padding: 10px 12px !important;
}

/* Loading spinner */
.qv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.qv-loading i {
    font-size: 40px;
    color: #999;
    animation: qv-spin 1s linear infinite;
}

@keyframes qv-spin {
    to { transform: rotate(360deg); }
}

/* Photo counter */
.qv-photo-counter {
    position: absolute;
    bottom: 10px;
    right: 15px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .qv-modal {
        flex-direction: column;
        width: min(96vw, 560px);
        max-height: 94vh;
        border-radius: 10px;
    }

    .qv-info-section {
        width: 100%;
        padding: 12px 12px 14px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .qv-main-image-wrapper {
        min-height: 190px;
    }

    /* Mobile: hide thumbnails to free vertical space */
    .qv-thumbnails {
        display: none !important;
    }

    #qvInfo .product-title,
    #qvInfo .p-title h1,
    .qv-product-name {
        font-size: 17px;
        line-height: 1.25 !important;
        margin-bottom: 8px !important;
    }

    #qvInfo .p-price .current-price,
    .qv-price {
        font-size: 24px !important;
    }
    #qvInfo .p-price del {
        font-size: 14px !important;
    }
    #qvInfo .p-price .discount-badge {
        font-size: 13px !important;
        padding: 3px 8px !important;
    }

    .qv-thumb {
        width: 46px;
        height: 46px;
    }

    .qv-nav-arrow {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    #qvInfo .selection-label {
        font-size: 10px !important;
        margin-bottom: 4px !important;
    }
    /* Beden + Renk same row on mobile */
    #qvInfo .p-options > .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 1px !important;
        align-items: flex-start !important;
    }
    #qvInfo .p-options > .row > [class*="col-"] {
        min-width: 0 !important;
        margin-bottom: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }
    #qvInfo .p-options > .row > [class*="col-"]:first-child {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
    }
    #qvInfo .p-options > .row > [class*="col-"]:last-child {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: none !important;
    }
    #qvInfo .p-options > .row > [class*="col-"]:only-child {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    #qvInfo .size-selector,
    #qvInfo .color-selector {
        display: flex !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 1px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-content: flex-start !important;
        align-content: flex-start !important;
    }
    #qvInfo .selection-label {
        display: block !important;
        width: 100% !important;
        white-space: nowrap !important;
    }
    #qvInfo .size-selector { flex: 0 0 auto !important; }
    #qvInfo .color-selector { flex: 1 1 auto !important; }
    #qvInfo .size-selector > *,
    #qvInfo .color-selector > * {
        flex: 0 0 auto !important;
    }
    #qvInfo .size-cube {
        flex: 0 0 auto !important;
        width: 34px !important;
        height: 34px !important;
        font-size: 12px !important;
    }
    #qvInfo .color-cube {
        flex: 0 0 auto !important;
        width: 30px !important;
        height: 30px !important;
    }

    /* Quantity + cart on next row */
    #qvInfo .p-quantity-wrapper {
        gap: 8px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        margin-top: 10px !important;
    }
    #qvInfo .p-quantity label {
        font-size: 10px !important;
        margin-bottom: 4px !important;
    }
    #qvInfo .qty-control {
        min-width: 90px !important;
        height: 34px !important;
        padding: 2px !important;
        border-radius: 999px !important;
        background: #f3f4f6 !important;
        border: 1px solid #e5e7eb !important;
    }
    #qvInfo .qty-control .qty-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        font-size: 15px !important;
        border-radius: 50% !important;
    }
    #qvInfo .qty-control .qty {
        width: 34px !important;
        height: auto !important;
        font-size: 12px !important;
        border: none !important;
        background: transparent !important;
    }
    #qvInfo .btn-cart1 {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    #qvInfo .btn-cart1 button[name="form_add_to_cart"] {
        height: 36px !important;
        min-height: 36px !important;
        width: 100% !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        letter-spacing: .2px !important;
        gap: 6px !important;
    }
    #qvInfo .fast-shipping-badge {
        margin-top: 8px !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
    #qvInfo .fast-shipping-badge .shipping-text strong,
    #qvInfo .fast-shipping-badge .shipping-text span {
        font-size: 11px !important;
    }
}
