.site-modal .modal-content {
    border: 0;
    border-radius: 6px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, .18);
    overflow: hidden;
    color: var(--b2c-ink, #171a1f);
}
.site-modal .modal-dialog { max-width: 420px; }

.sm-head {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px 52px 0 18px;
}
.sm-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}
.sm-close {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--b2c-steel, #6b7280);
    font-size: 1rem;
    z-index: 2;
}
.sm-close:hover { background: var(--b2c-surface-muted, #f6f7f9); color: var(--b2c-ink, #171a1f); }

.sm-body {
    padding: 12px 18px 16px;
    font-size: .875rem;
    line-height: 1.5;
}
.sm-text { margin: 0; }
.sm-note {
    margin: 10px 0 0;
    font-size: .8rem;
    color: var(--b2c-steel, #6b7280);
}

.sm-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 18px;
    border-top: 1px solid var(--b2c-line, #e6e8ec);
    background: var(--b2c-surface-muted, #f6f7f9);
}
.sm-foot--center { justify-content: center; }

.sm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--b2c-line, #e6e8ec);
    border-radius: 4px;
    background: var(--b2c-surface, #fff);
    color: var(--b2c-ink, #171a1f);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.sm-btn:hover { border-color: color-mix(in srgb, var(--b2c-ink, #171a1f) 30%, var(--b2c-line, #e6e8ec)); color: var(--b2c-ink, #171a1f); }
.sm-btn:disabled { opacity: .6; pointer-events: none; }
.sm-btn--primary { background: var(--b2c-primary, #1d4ed8); border-color: var(--b2c-primary, #1d4ed8); color: #fff; }
.sm-btn--primary:hover { background: var(--b2c-primary-dark, #1739ab); border-color: var(--b2c-primary-dark, #1739ab); color: #fff; }
.sm-btn--danger { background: var(--b2c-danger, #c0272d); border-color: var(--b2c-danger, #c0272d); color: #fff; }
.sm-btn--danger:hover { background: color-mix(in srgb, var(--b2c-danger, #c0272d), black 15%); border-color: color-mix(in srgb, var(--b2c-danger, #c0272d), black 15%); color: #fff; }
.sm-btn--ghost { border-color: transparent; background: transparent; color: var(--b2c-steel, #6b7280); }
.sm-btn--ghost:hover { border-color: transparent; color: var(--b2c-ink, #171a1f); }
.sm-btn--block { width: 100%; }
.sm-btn .spinner-border { width: 14px; height: 14px; border-width: 2px; }

.sm-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--b2c-line, #e6e8ec);
    border-radius: 4px;
}
.sm-product[hidden] { display: none; }
.sm-product-img {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    object-fit: contain;
    border-radius: 3px;
    background: var(--b2c-surface-muted, #f6f7f9);
}
.sm-product-img[hidden] { display: none; }
.sm-product-info { min-width: 0; }
.sm-product-name {
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sm-product-meta { margin-top: 2px; font-size: .78rem; color: var(--b2c-steel, #6b7280); }
.sm-product-price { margin-top: 3px; font-size: .85rem; font-weight: 700; color: var(--product-price-color, var(--b2c-primary, #1d4ed8)); }
.sm-product-price:empty, .sm-product-meta:empty { display: none; }

.sm-label { display: block; margin: 12px 0 5px; font-size: .8rem; font-weight: 600; }
.sm-label small { font-weight: 400; color: var(--b2c-steel, #6b7280); }
.site-modal .form-control { min-height: 40px; border-radius: 4px; font-size: .875rem; }
.sm-check { display: flex; gap: 8px; margin-top: 12px; font-size: .78rem; line-height: 1.45; color: var(--b2c-ink-soft, #4b5160); }
.sm-check .form-check-input { flex: 0 0 auto; margin: 2px 0 0; }

.sm-done { padding: 26px 22px 22px; text-align: center; }
.sm-done[hidden] { display: none; }
.sm-done-icon { font-size: 30px; color: var(--b2c-success, #15803d); }
.sm-done-title { margin: 10px 0 4px; font-weight: 600; font-size: .95rem; }
.sm-done-text { margin: 0; font-size: .82rem; color: var(--b2c-steel, #6b7280); }
.sm-done-text b { color: var(--b2c-ink, #171a1f); }

@media (max-width: 575.98px) {
    .site-modal .modal-dialog { margin: .75rem; }
    .sm-foot { padding: 12px 14px; }
    .sm-foot .sm-btn:not(.sm-btn--ghost) { flex: 1 1 auto; }
}

.announce-modal .modal-dialog { max-width: 600px; }
.announce-card { display: flex; min-height: 260px; }
.announce-media {
    flex: 0 0 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--b2c-surface-muted, #f6f7f9);
}
.announce-media img { display: block; width: 100%; height: 100%; max-height: 420px; object-fit: contain; }
.announce-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; padding: 26px 22px 18px; }
.announce-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: var(--b2c-primary, #1d4ed8); text-transform: uppercase; }
.announce-title { margin: 6px 40px 8px 0; font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.announce-text { margin: 0; font-size: .85rem; line-height: 1.55; color: var(--b2c-steel, #6b7280); white-space: pre-line; }
.announce-actions { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.announce-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.announce-dismiss { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: .78rem; color: var(--b2c-steel, #6b7280); cursor: pointer; }
.announce-dismiss .form-check-input { margin: 0; }
.announce-pager { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--b2c-steel, #6b7280); }
.announce-pager[hidden] { display: none; }
.announce-pager button {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--b2c-line, #e6e8ec);
    border-radius: 4px;
    background: var(--b2c-surface, #fff);
    color: var(--b2c-ink, #171a1f);
    font-size: .7rem;
}
.announce-slide[hidden] { display: none; }
.announce-grip { display: none; }

@media (max-width: 767.98px) {
    .announce-modal .modal-dialog {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: none;
        margin: 0;
        min-height: 0;
        align-items: flex-end;
        transform: translateY(100%);
        transition: transform .22s ease-out;
    }
    .announce-modal.show .modal-dialog { transform: none; }
    .announce-modal .modal-content { border-radius: 10px 10px 0 0; max-height: 88vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
    .announce-grip { display: block; width: 38px; height: 4px; margin: 8px auto 4px; border-radius: 2px; background: var(--b2c-line, #d1d5db); }
    .announce-card { flex-direction: column; min-height: 0; }
    .announce-media { flex: 0 0 auto; margin: 4px 12px 0; border-radius: 4px; overflow: hidden; }
    .announce-media img { max-height: 42vh; }
    .announce-content { padding: 14px 16px 16px; }
    .announce-title { font-size: 1.05rem; margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .announce-modal .modal-dialog { transition: none; }
}
.sm-foot[hidden] { display: none; }
.site-modal--wide .modal-dialog { max-width: 520px; }
.site-modal textarea.form-control { min-height: 0; resize: vertical; }
