
.qc-page {
    --qc-dark: #0a4f55;
    --qc-deep: #04353b;
    --qc-green: #1b8f84;
    --qc-light: #d4f0ea;
    --qc-border: #c3ddd8;

    padding: 55px 0 100px;
    background: #fff;
    direction: rtl;
    min-height: 60vh;
}

.qc-wrapper {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.qc-head {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 28px;
}

.qc-head-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 11px 18px;
    border-radius: 10px;
    background: var(--qc-deep);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
}

.qc-head-title i {
    font-size: 18px;
}

.qc-head-title b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border-radius: 50%;
    background: var(--qc-light);
    color: var(--qc-dark);
    font-size: 12px;
    font-weight: 800;
}

.qc-alert {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.qc-alert ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.qc-alert-success {
    border: 1px solid #b9e3d9;
    background: #eefaf6;
    color: var(--qc-dark);
}

.qc-alert-error {
    border: 1px solid #f1d5d5;
    background: #fff8f8;
    color: #a63e3e;
}

.qc-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qc-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 190px 34px;
    align-items: center;
    gap: 16px;
    min-height: 82px;
    padding: 13px 16px;
    border: 1px solid var(--qc-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(4, 53, 59, .045);
    transition: border-color .25s ease, box-shadow .25s ease;
}

.qc-item:hover {
    border-color: var(--qc-green);
    box-shadow: 0 5px 16px rgba(4, 53, 59, .09);
}

.qc-item-icon {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        #34b69e,
        #087078,
        #04353b
    );
    background-size: 200% 200%;
    box-shadow: 0 3px 10px rgba(4, 53, 59, .16);
    animation: qc-icon-bg 5s ease-in-out infinite;
}

.qc-item-icon img {
    position: relative;
    z-index: 1;
    display: block;
    width: 85%;
    height: 85%;
    object-fit: contain;
}

.qc-item-name {
    min-width: 0;
    color: var(--qc-deep);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.7;
    text-align: right;
    overflow-wrap: anywhere;
}

.qc-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid var(--qc-border);
    border-radius: 11px;
    background: var(--qc-light);
}

.qc-step {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid var(--qc-dark);
    border-radius: 8px;
    background: #fff;
    color: var(--qc-dark);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.qc-step:hover {
    background: var(--qc-dark);
    color: #fff;
}

.qc-stepper-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

.qc-amount-input {
    width: 75px;
    padding: 3px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--qc-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    -moz-appearance: textfield;
}

.qc-amount-input::-webkit-outer-spin-button,
.qc-amount-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.qc-stepper-value span {
    color: var(--qc-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.qc-remove-form {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.qc-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #829596;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.qc-remove:hover {
    background: #fff0ef;
    color: #c0392b;
}

.qc-add-more {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 25px;
    color: var(--qc-deep);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: color .2s ease;
}

.qc-add-more i {
    font-size: 18px;
}

.qc-add-more:hover {
    color: var(--qc-green);
}

.qc-total {
    margin-top: 32px;
    padding: 20px 16px;
    border-radius: 13px;
    background: linear-gradient(120deg, #087078, #04353b);
    color: #fff;
    font-size: 23px;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 5px 15px rgba(4, 53, 59, .12);
}

.qc-clear-form {
    margin: 17px 0 0;
    text-align: center;
}

.qc-clear {
    padding: 5px 10px;
    border: 0;
    background: transparent;
    color: #829596;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    transition: color .2s ease;
}

.qc-clear:hover {
    color: #c0392b;
}

.qc-empty {
    padding: 65px 20px;
    border: 1px dashed var(--qc-border);
    border-radius: 14px;
    background: #fbfefd;
    color: var(--qc-dark);
    text-align: center;
}

.qc-empty i {
    font-size: 52px;
    color: var(--qc-green);
}

.qc-empty h4 {
    margin: 17px 0 8px;
    font-size: 19px;
    font-weight: 800;
}

.qc-empty p {
    margin: 0 0 22px;
    color: #6c8083;
    font-size: 14px;
}

.qc-empty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 25px;
    border-radius: 10px;
    background: var(--qc-dark);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s ease;
}

.qc-empty-btn:hover {
    background: var(--qc-green);
    color: #fff;
}

@keyframes qc-icon-bg {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@media (max-width: 767px) {
    .qc-page {
        padding: 38px 0 75px;
    }

    .qc-wrapper {
        max-width: 100%;
    }

    .qc-item {
        grid-template-columns: 52px minmax(0, 1fr) 32px;
        gap: 12px;
        padding: 12px;
    }

    .qc-item-icon {
        width: 52px;
        height: 52px;
    }

    .qc-item-name {
        font-size: 14px;
    }

    .qc-remove-form {
        grid-column: 3;
        grid-row: 1;
    }

    .qc-stepper {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .qc-stepper-value {
        flex: 1;
    }

    .qc-amount-input {
        width: 90px;
    }

    .qc-total {
        margin-top: 25px;
        padding: 17px 12px;
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .qc-head-title {
        font-size: 15px;
    }

    .qc-item {
        gap: 9px;
        padding: 10px;
    }

    .qc-item-name {
        font-size: 13px;
    }

    .qc-amount-input {
        width: 70px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .qc-item-icon {
        animation: none;
    }
}
