/* Shared inset collection dialog across public pages. */
@media (max-width: 760px) {
    .collection-modal .product-mini-thumb {
        width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 10px;
    }
    .collection-modal .product-mini-thumb img { width: 100%; height: 100%; object-fit: contain; }
    .collection-modal-card .product-mini-body {
        display: flex; flex-direction: column; align-items: stretch; gap: 7px;
        min-width: 0; min-height: 0; padding: 10px 8px 8px;
    }
    .collection-modal-card .product-mini-body strong {
        display: block; width: 100%; font-size: .76rem; white-space: nowrap;
        text-overflow: ellipsis; overflow: hidden; line-height: 1.6;
    }
    .collection-modal-card .product-mini-description {
        font-size: .68rem; line-height: 1.65; -webkit-line-clamp: 2; min-height: 3.3em; margin: 0;
    }
    .collection-modal-card .quote-add-form { width: 100%; margin-top: auto; }
    .collection-modal-card .quote-add-button {
        display: flex; align-items: center; justify-content: center; gap: 6px;
        width: 100%; min-height: 42px; height: auto; padding: 6px;
        border-radius: 9px; font-family: inherit; font-weight: 700; font-size: .68rem; line-height: 1.4; box-shadow: none;
    }
    .collection-modal-card .quote-add-button::after { content: 'أضف للطلب'; font-size: .68rem; }
    .collection-modal-card .quote-add-button.is-added::after { content: 'إزالة من الطلب'; }
    .collection-modal {
        z-index: 1200; align-items: center; padding: 24px 16px; background: #211a3680;
    }
    .collection-modal-panel {
        display: flex; flex-direction: column; width: min(100%, 600px); height: auto;
        max-height: min(86dvh, calc(100dvh - 48px)); border-radius: 22px;
    }
    .collection-modal-head { flex: none; padding: 12px 14px; gap: 10px; }
    .collection-modal-head h2 {
        text-align: right; font-size: 1rem; line-height: 1.5;
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    }
    .collection-modal-close,
    .collection-modal-back { min-width: 44px; height: 44px; border-radius: 12px; background: #f3f0fa; }
    .collection-modal-body-shell {
        flex: 1; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain;
        padding: 12px 12px calc(18px + env(safe-area-inset-bottom)); background: #f7f7fb;
    }
    .collection-modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
    .collection-modal-card { min-width: 0; padding: 5px; border: 1px solid #e8e5f1; border-radius: 14px; box-shadow: none; }
    .collection-modal-card .product-mini-media { padding: 0; }
    .collection-modal-detail-card { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 10px; box-shadow: none; }
    .collection-modal-detail-media { width: min(100%, 300px); justify-self: center; box-shadow: none; }
    .collection-modal-detail-copy { min-width: 0; padding: 0; }
    .collection-modal-detail-copy h3 { font-size: 1.05rem; }
    .collection-modal-detail-actions { grid-template-columns: 1fr; }
}
