/* =========================================================
   UI 01R — QUICK VIEW QUANTITY / LAYOUT FIX
   Dedicated classes intentionally avoid legacy .input-qty/.input-number.
   ========================================================= */

.ds10-quickview .modal-dialog {
    width: min(1040px, calc(100vw - 48px));
    max-width: 1040px;
    margin: 4vh auto;
}

.ds10-quickview .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.ds10-quickview .modal-body {
    padding: 28px;
}

.ds10-quickview .row {
    display: grid;
    grid-template-columns: minmax(360px, .92fr) minmax(0, 1.08fr);
    margin: 0;
}

.ds10-quickview .row > [class*="col-"] {
    width: auto;
    max-width: none;
    flex: none;
}

.ds10-quickview .modal-image {
    width: 100%;
    min-height: 520px;
    aspect-ratio: 4 / 5;
    background: #ede7de;
}

.ds10-quickview .modal-image img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.ds10-quickview .col-md-7 {
    min-width: 0;
    padding: 54px 50px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ds10-quickview .item-name {
    max-width: 520px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(38px, 4vw, 54px);
    line-height: 1.02;
    font-weight: 400;
    letter-spacing: -.04em;
}

.ds10-quickview .item-price {
    margin-top: 18px;
}

.ds10-quickview .item-short-description {
    max-width: 560px;
    margin-top: 26px;
}

.ds10-quickview .item-options {
    margin-top: 30px;
}

/* Isolated working buy row */
.ds12-qv-form {
    display: grid;
    grid-template-columns: 108px minmax(180px, 220px);
    gap: 12px;
    align-items: stretch;
}

.ds12-qv-qty {
    height: 50px;
    display: grid;
    grid-template-columns: 34px 40px 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9d2c9;
    background: #fff;
}

.ds12-qv-minus,
.ds12-qv-plus {
    width: 34px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #171717;
    display: grid;
    place-items: center;
    font-family: Arial, sans-serif;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
}

.ds12-qv-minus:hover,
.ds12-qv-plus:hover {
    background: #f4f0ea;
}

.ds12-qv-number {
    width: 40px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #171717 !important;
    background: #fff;
    font-family: Inter, Arial, sans-serif;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1;
    opacity: 1 !important;
    visibility: visible !important;
}

.ds12-qv-add {
    min-width: 0;
    height: 50px;
    padding: 0 24px;
    border: 0;
    background: #171717;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
}

.ds12-qv-add:hover {
    background: #8e703a;
}

.ds12-qv-add:disabled {
    opacity: .62;
    cursor: wait;
}

/* Close icon stays clear and reachable */
.ds10-quickview .close {
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border: 1px solid #e1dad1 !important;
    border-radius: 50%;
    background: rgba(255,255,255,.96) !important;
    color: #171717 !important;
    font-size: 27px !important;
    line-height: 1 !important;
}

@media (max-width: 820px) {
    .ds10-quickview .modal-dialog {
        width: min(700px, calc(100vw - 28px));
        margin: 14px auto;
    }

    .ds10-quickview .row {
        grid-template-columns: 1fr;
    }

    .ds10-quickview .modal-image,
    .ds10-quickview .modal-image img {
        min-height: 420px;
    }

    .ds10-quickview .modal-image {
        aspect-ratio: 5 / 4;
    }

    .ds10-quickview .col-md-7 {
        padding: 34px 26px 28px;
    }

    .ds10-quickview .item-name {
        font-size: 38px;
    }
}

@media (max-width: 520px) {
    .ds10-quickview .modal-dialog {
        width: calc(100vw - 18px);
        margin: 9px auto;
    }

    .ds10-quickview .modal-body {
        padding: 9px;
    }

    .ds10-quickview .modal-image,
    .ds10-quickview .modal-image img {
        min-height: 330px;
    }

    .ds10-quickview .col-md-7 {
        padding: 26px 12px 18px;
    }

    .ds10-quickview .item-name {
        padding-right: 34px;
        font-size: 32px;
    }

    .ds10-quickview .item-short-description {
        margin-top: 18px;
        font-size: 12px;
    }

    .ds10-quickview .item-options {
        margin-top: 22px;
    }

    .ds12-qv-form {
        grid-template-columns: 102px minmax(0, 1fr);
        gap: 8px;
    }

    .ds12-qv-qty {
        grid-template-columns: 31px 38px 31px;
    }

    .ds12-qv-minus,
    .ds12-qv-plus {
        width: 31px;
    }

    .ds12-qv-number {
        width: 38px;
    }

    .ds12-qv-add {
        padding: 0 12px;
        font-size: 8px;
        letter-spacing: .09em;
    }
}
