#globalCustomModel .row {
    margin-left: calc(var(--bs-gutter-x) * -0.5) !important;
    margin-right: calc(var(--bs-gutter-x) * -0.5) !important;
}

#globalCustomModel .row > * {
    padding-left: calc(var(--bs-gutter-x) * 0.5) !important;
    padding-right: calc(var(--bs-gutter-x) * 0.5) !important;
}

/* =========================
   BUTTON
========================= */
.btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    background-color: var(--theme-color);
    color: #ffffff;
    gap: 0;
    overflow: hidden;
    white-space: nowrap;

    width: 36px;
    height: 36px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s,
    gap 0.4s;

    position: absolute;
    bottom: 125px;
    right: 10px;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-label .label-text {
    max-width: 0;
    opacity: 0;
    display: inline-block;
    transition: opacity 0.3s ease, max-width 0.6s ease;
}

.btn-label:hover,
.btn-label.is-expanded {
    width: 155px;
    padding: 10px 18px;
    gap: 8px;
}

.btn-label:hover .label-text,
.btn-label.is-expanded .label-text {
    max-width: 120px;
    opacity: 1;
}

.btn-label img {
    filter: brightness(0) invert(1);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.btn-label:hover,
.btn-label:focus {
    color: #fff;
    outline: none;
    text-decoration: none;
}

.positon-bottom {
    position: absolute;
    bottom: 125px;
    right: 10px;
    z-index: 999;
}

/* =========================
   MODAL OVERLAY
========================= */
.CustomModel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.CustomModel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================
   MODAL BOX
========================= */
.CustomModel-box {
    background: #fff;
    width: 92%;
    max-width: 1200px;
    max-height: 85vh;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    animation: modalFade .25s ease;
    padding: 25px;
    box-shadow: 0 0 30px 10px rgb(from var(--theme-color) r g b / 0.4);
}

/* =========================
   CustomModel HEADER
========================= */
.CustomModel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.CustomModel-header h3 {
    margin: 0;
    font-size: 18px;
}

#globalCustomModelTitle {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 30px;
}

/* =========================
   CLOSE BUTTON
========================= */
.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

/* =========================
   CustomModel BODY
========================= */
.CustomModel-body {
    display: flex;
    padding: 20px;
    max-height: 70vh; /* modal yüksekliği */
    overflow: hidden;
    justify-content: center;
}

/* Modal container */
.custom-modal-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Sol taraf: sticky single product */
.custom-modal-left {
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;

    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal-right {
    overflow-y: auto;
    height: 100%;
    overflow-x: hidden;
}

.single-product-card img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    object-fit: cover;
    max-height: 400px;
}

.single-product-card h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* Sağ taraf: ürün grid */
.col-12.col-md-8 .row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

/*ürün kartları */

.custom-modal-right {
    .product-price-inner {
        display: block !important;
    }

    .product-card {
        padding: 12px 10px !important;
        font-size: 12px;

        .product-variant-color-chart {
            width: 40px !important;
        }

        .btn-add svg {
            width: 14px;
            height: 14px;
        }
    }
}

.new_modal_grid_system {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(220px,2fr));
    gap: 16px;
}

@media (max-width: 992.98px) {

    .close-btn.js-CustomModel-close {
        margin: 0;
        width: auto !important;
    }
}

@media (max-width: 767.98px) {
    .custom-modal-left {
        display: none;
    }

    .CustomModel-body {
        padding: 20px 0;
    }

    .CustomModel-header {
        padding: 0 0 16px;
    }

    .new_modal_grid_system {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}

@media (max-width: 497.98px) {
    .CustomModel-box{
        padding: 14px;
    }
    .custom-modal-right {
        .product-card {
            .btn-add {
                gap: 3px;
            }
        }
    }

    .new_modal_grid_system {
        gap: 5px;
    }
}

/* =========================
   CustomModel ANIMATION
========================= */
@keyframes modalFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 992px) {
    .positon-bottom {
        bottom: 30px;
    }
}
