/* ============================================================
   variant-modal.css — Site genelinde paylaşılan varyant seçim
   modalı (ana sayfa + ürünler sayfası + kategori sayfaları)
   ============================================================ */

html.lvn-modal-open {
    overflow: hidden;
}

.lvn-variant-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 15, 12, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lvn-variant-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lvn-variant-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 9999;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
}

.lvn-variant-modal.active {
    transform: translateY(0);
    visibility: visible;
}

.lvn-variant-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    border-radius: 20px 20px 0 0;
}

.lvn-variant-modal-header h3 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #333;
    margin: 0;
}

.lvn-variant-modal-close {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: 0.2s;
}

.lvn-variant-modal-close:hover {
    background: #eee;
    color: #333;
}

.lvn-variant-modal-body {
    padding: 20px;
}

/* ── Büyük ürün görseli ─────────────────────────────────── */
.lvn-variant-modal-hero {
    display: block;
    position: relative;
    width: 100%;
    height: 230px;
    background: #f7f5f2;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    cursor: zoom-in;
}

.lvn-variant-modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.4s ease;
}

.lvn-variant-modal-hero:hover img {
    transform: scale(1.05);
}

.lvn-variant-modal-hero .lvn-hero-zoom-hint {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #8c1a35;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.lvn-variant-modal-product-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.lvn-variant-modal-product-info .name {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    line-height: 1.4;
}

.lvn-variant-modal-product-info .price {
    font-size: 18px;
    font-weight: 700;
    color: #8c1a35;
}

.lvn-variant-group {
    margin-bottom: 20px;
}

.lvn-variant-group-title {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.lvn-variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lvn-variant-opt {
    padding: 9px 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    background: #fff;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.lvn-variant-opt:hover {
    border-color: #8c1a35;
    color: #8c1a35;
}

.lvn-variant-opt.selected {
    background: #8c1a35;
    color: #fff;
    border-color: #8c1a35;
}

.lvn-variant-opt.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.lvn-variant-color-opt {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    padding: 0;
    position: relative;
    border: 2px solid #e2e2e2;
}

.lvn-variant-color-opt.selected {
    border-color: #8c1a35;
    box-shadow: 0 0 0 2px rgba(140, 26, 53, 0.25);
}

.lvn-variant-modal-footer {
    padding: 14px 20px 20px;
    border-top: 1px solid #f0f0f0;
    position: sticky;
    bottom: 0;
    background: #fff;
}

.lvn-variant-add-btn {
    width: 100%;
    padding: 15px;
    background: #8c1a35;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lvn-variant-add-btn:hover {
    background: #6a1327;
}

.lvn-variant-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.lvn-variant-modal-loading,
.lvn-variant-modal-error {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.lvn-variant-modal-loading i {
    font-size: 26px;
    color: #8c1a35;
}

.lvn-variant-modal-loading p,
.lvn-variant-modal-error p {
    margin-top: 12px;
    font-size: 13px;
}

/* Masaüstünde ortalanmış kart olarak göster */
@media (min-width: 992px) {
    .lvn-variant-modal {
        bottom: auto;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -46%) scale(0.96);
        max-width: 460px;
        width: 90%;
        border-radius: 14px;
        max-height: 85vh;
        opacity: 0;
    }

    .lvn-variant-modal-header,
    .lvn-variant-modal-footer {
        border-radius: 14px 14px 0 0;
    }

    .lvn-variant-modal-footer {
        border-radius: 0 0 14px 14px;
    }

    .lvn-variant-modal.active {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* ── Basit görsel görüntüleyici (lightbox) ──────────────── */
.lvn-img-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 6, 0.9);
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 30px;
}

.lvn-img-viewer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lvn-img-viewer-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.lvn-img-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.lvn-img-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
