/* افزودن سریع به سبد از کارت محصول */
.product-card .price-frame {
    cursor: pointer;
}

html.qa-lock,
html.qa-lock body {
    overflow: hidden;
}

.qa-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(17, 17, 17, 0);
    transition: background 0.2s ease;
    direction: rtl;
}

.qa-overlay[hidden] {
    display: none;
}

.qa-overlay.is-open {
    background: rgba(17, 17, 17, 0.45);
}

.qa-sheet {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.22s ease;
}

.qa-overlay.is-open .qa-sheet {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .qa-overlay {
        align-items: center;
    }
    .qa-sheet {
        border-radius: 16px;
        transform: translateY(16px);
        opacity: 0;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }
    .qa-overlay.is-open .qa-sheet {
        opacity: 1;
    }
}

.qa-close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #333;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.qa-loading,
.qa-error-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    font-size: 14px;
    color: #555;
}

.qa-error-box {
    color: #b42318;
}

.qa-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #eadcc3;
    border-top-color: #c9a962;
    border-radius: 50%;
    animation: qa-spin 0.7s linear infinite;
}

@keyframes qa-spin {
    to { transform: rotate(360deg); }
}

.qa-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-left: 36px;
    margin-bottom: 14px;
}

.qa-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #f3f3f3;
    flex-shrink: 0;
}

.qa-head-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qa-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.5;
}

.qa-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.qa-price {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a1a;
}

.qa-toman {
    font-size: 11px;
    color: #555;
}

.qa-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.qa-oos {
    font-size: 13px;
    font-weight: 700;
    color: #b42318;
}

.qa-group {
    margin-bottom: 14px;
}

.qa-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.qa-label b {
    color: #1a1a1a;
}

.qa-guide {
    margin-right: auto;
    font-size: 12px;
    color: #8a6d2c;
    text-decoration: underline;
}

.qa-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qa-opt {
    min-width: 44px;
    height: 38px;
    padding: 0 12px;
    border: 1.5px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.qa-opt:hover:not(:disabled) {
    border-color: #c9a962;
}

.qa-opt.is-active {
    border-color: #c9a962;
    background: #f5e6d3;
}

.qa-opt.is-oos {
    color: #bbb;
    background: #fafafa;
    text-decoration: line-through;
    cursor: not-allowed;
}

.qa-error {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fef3f2;
    color: #b42318;
    font-size: 13px;
}

.qa-actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.qa-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e2e2;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.qa-qty button {
    width: 36px;
    height: 44px;
    border: none;
    background: #fff;
    font-size: 18px;
    cursor: pointer;
    color: #1a1a1a;
}

.qa-qty button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.qa-qty span {
    min-width: 26px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

.qa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
}

.qa-btn-primary {
    background: #1a1a1a;
    color: #fff;
}

.qa-btn-primary:disabled {
    background: #d4d4d4;
    color: #fff;
    cursor: not-allowed;
}

.qa-btn-outline {
    background: #fff;
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.qa-add {
    flex: 1;
}

.qa-more {
    display: block;
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: #666;
    text-decoration: underline;
}

.qa-done {
    text-align: center;
    padding: 8px 0 4px;
}

.qa-done-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #e8f5ee;
    color: #1f8a4c;
    font-size: 26px;
    line-height: 52px;
    font-weight: 700;
}

.qa-done-title {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.qa-done-name {
    font-size: 13px;
    color: #444;
    margin-bottom: 8px;
}

.qa-done-msg {
    font-size: 12px;
    color: #8a6d2c;
    background: #fbf5ea;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 14px;
}

.qa-done-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
