/* ═══════════════════════════════════════════════════════
   SBC Quick View — Modal + Button Styles
   ═══════════════════════════════════════════════════════ */

/* ─── QUICK VIEW BUTTON (Ürün kartı üzerinde) ─── */
.sbc-qv-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--sbc-font, 'DM Sans', sans-serif);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.2s ease;
    z-index: 5;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sbc-qv-btn svg {
    flex-shrink: 0;
}

/* Ürün kartı hover'ında göster */
.sbc-product-card:hover .sbc-qv-btn,
li.product:hover .sbc-qv-btn,
.sbc-card:hover .sbc-qv-btn {
    opacity: 1;
}

.sbc-qv-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Thumbnail container */
li.product .sbc-product-card__img,
.sbc-card__img {
    position: relative;
    /* overflow:visible yapılamaz (resim taşar), buton overflow içinde kalmalı */
}

/* ─── MODAL OVERLAY ─── */
.sbc-qv-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: sbc-qv-fadeIn 0.2s ease;
}

@keyframes sbc-qv-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ─── MODAL BOX ─── */
.sbc-qv-modal {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    animation: sbc-qv-slideUp 0.3s ease;
}

@keyframes sbc-qv-slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── CLOSE BUTTON ─── */
.sbc-qv-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.sbc-qv-close:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: rotate(90deg);
}

/* ─── MODAL BODY ─── */
.sbc-qv-body {
    overflow-y: auto;
    max-height: 90vh;
}

/* ─── LOADING STATE ─── */
.sbc-qv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 40px;
    color: #666;
    font-size: 15px;
}

.sbc-qv-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #333;
    border-radius: 50%;
    animation: sbc-qv-spin 0.7s linear infinite;
}

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

/* ─── PRODUCT CONTENT ─── */
.sbc-qv-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

/* ─── IMAGE GALLERY (Left) ─── */
.sbc-qv-gallery {
    position: relative;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
}

.sbc-qv-gallery__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 350px;
}

.sbc-qv-gallery__main img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
}

.sbc-qv-gallery__thumbs {
    display: flex;
    gap: 8px;
    padding: 0 24px 20px;
    overflow-x: auto;
}

.sbc-qv-gallery__thumb {
    flex: 0 0 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    background: #fff;
}

.sbc-qv-gallery__thumb.is-active {
    border-color: #333;
}

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

.sbc-qv-sale-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #e53e3e;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
}

/* ─── PRODUCT INFO (Right) ─── */
.sbc-qv-info {
    padding: 32px 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.sbc-qv-info__cats {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 500;
}

.sbc-qv-info__title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
    margin: 0;
}

.sbc-qv-info__price {
    font-size: 24px;
    font-weight: 700;
    color: #111;
}

.sbc-qv-info__price del {
    font-size: 16px;
    color: #999;
    font-weight: 400;
    margin-right: 8px;
}

.sbc-qv-info__price ins {
    text-decoration: none;
    color: #e53e3e;
}

.sbc-qv-info__desc {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    max-height: 80px;
    overflow: hidden;
}

.sbc-qv-info__sku {
    font-size: 12px;
    color: #999;
}

.sbc-qv-info__stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.sbc-qv-info__stock--instock {
    color: #38a169;
}

.sbc-qv-info__stock--outofstock {
    color: #e53e3e;
}

.sbc-qv-info__stock::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* ─── VARIATIONS ─── */
.sbc-qv-variations {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sbc-qv-var-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sbc-qv-var-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.sbc-qv-var-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: auto;
}

.sbc-qv-var-group select:focus {
    outline: none;
    border-color: #333;
}

/* ─── ADD TO CART ─── */
.sbc-qv-cart {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: auto;
}

.sbc-qv-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.sbc-qv-qty button {
    width: 38px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.sbc-qv-qty button:hover {
    background: #eee;
}

.sbc-qv-qty input {
    width: 44px;
    height: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #333;
    -moz-appearance: textfield;
}

.sbc-qv-qty input::-webkit-inner-spin-button,
.sbc-qv-qty input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sbc-qv-add-btn {
    flex: 1;
    padding: 12px 24px;
    background: #111;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sbc-qv-add-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sbc-qv-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sbc-qv-add-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.sbc-qv-add-btn.is-added {
    background: #38a169;
}

/* ─── VIEW FULL LINK ─── */
.sbc-qv-full-link {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-decoration: underline;
    transition: color 0.2s;
}

.sbc-qv-full-link:hover {
    color: #111;
}

/* ─── ADDED TO CART TOAST ─── */
.sbc-qv-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 10px;
    font-size: 14px;
    color: #276749;
    font-weight: 500;
    animation: sbc-qv-fadeIn 0.3s ease;
}

.sbc-qv-toast a {
    color: #276749;
    text-decoration: underline;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sbc-qv-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .sbc-qv-modal {
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        animation: sbc-qv-slideUpMobile 0.3s ease;
    }

    @keyframes sbc-qv-slideUpMobile {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .sbc-qv-product {
        grid-template-columns: 1fr;
    }

    .sbc-qv-gallery__main {
        min-height: 250px;
        padding: 16px;
    }

    .sbc-qv-gallery__main img {
        max-height: 280px;
    }

    .sbc-qv-info {
        padding: 20px 20px 24px;
        gap: 12px;
    }

    .sbc-qv-info__title {
        font-size: 18px;
    }

    .sbc-qv-info__price {
        font-size: 20px;
    }

    /* Mobilde buton her zaman görünsün */
    .sbc-qv-btn {
        opacity: 1;
        transform: translateX(-50%);
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .sbc-qv-gallery__main {
        min-height: 200px;
    }

    .sbc-qv-cart {
        flex-direction: column;
    }

    .sbc-qv-qty {
        align-self: flex-start;
    }
}
