/* Mehregan smart commerce modules */
.mg-commerce-urgency {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: -0.65rem 0 1.25rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: var(--mg-radius-sm, 8px);
    background: rgba(245, 158, 11, 0.08);
    color: #9a5800;
    font-size: 0.84rem;
    font-weight: 700;
}

.mg-commerce-urgency-pulse {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--mg-warning, #f59e0b);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45);
    animation: mg-commerce-pulse 1.8s infinite;
}

@keyframes mg-commerce-pulse {
    70% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.mg-add-to-cart-form > .mg-commerce-buy-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 170px;
    min-height: 48px;
    gap: 0.5rem;
    border: 1px solid rgba(var(--mg-primary-rgb, 37, 99, 235), 0.32);
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.07);
    color: var(--mg-primary, #2563eb);
}

.mg-add-to-cart-form > .mg-commerce-buy-now:hover:not(:disabled) {
    border-color: var(--mg-primary, #2563eb);
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.13);
    transform: translateY(-1px);
}

.mg-commerce-buy-now:disabled,
.mg-commerce-buy-now.is-loading {
    cursor: wait;
    opacity: 0.62;
}

.mg-commerce-action-message {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border-radius: var(--mg-radius-sm, 8px);
    font-size: 0.82rem;
}

.mg-commerce-action-message.is-error {
    background: rgba(239, 68, 68, 0.08);
    color: var(--mg-error, #ef4444);
}

.mg-commerce-action-message.is-success {
    background: rgba(16, 185, 129, 0.09);
    color: #047857;
}

.mg-price-history {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.75rem 0 1rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--mg-border, #e2e8f0);
    border-radius: var(--mg-radius-sm, 8px);
    background: var(--mg-surface, #f8fafc);
}

.mg-price-history-copy {
    display: flex;
    min-width: 170px;
    flex-direction: column;
    gap: 0.25rem;
}

.mg-price-history-copy > span {
    color: var(--mg-text-muted, #64748b);
    font-size: 0.76rem;
}

.mg-price-history-copy > strong {
    color: var(--mg-text, #0f172a);
    font-size: 0.95rem;
}

.mg-price-history-copy .woocommerce-Price-currencySymbol,
.mg-price-history-copy small {
    color: var(--mg-text-muted, #64748b);
    font-size: 0.72rem;
    font-weight: 500;
}

.mg-price-history-chart {
    width: min(44%, 190px);
    height: 48px;
    overflow: visible;
}

.mg-price-chart-axis {
    stroke: var(--mg-border, #e2e8f0);
    stroke-width: 1;
}

.mg-price-chart-line {
    fill: none;
    stroke: var(--mg-primary, #2563eb);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.mg-order-tracking {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border: 1px solid var(--mg-border, #e2e8f0);
    border-radius: var(--mg-radius, 12px);
    background: var(--mg-bg, #fff);
}

.mg-order-tracking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mg-order-tracking-head h3 {
    margin: 0;
    color: var(--mg-text, #0f172a);
    font-size: 1rem;
}

.mg-order-tracking-head > span {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.08);
    color: var(--mg-primary, #2563eb);
    font-size: 0.75rem;
    font-weight: 700;
}

.mg-order-tracking-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.mg-order-tracking-steps::before {
    position: absolute;
    z-index: 0;
    top: 17px;
    right: 10%;
    left: 10%;
    height: 2px;
    background: var(--mg-border, #e2e8f0);
    content: '';
}

.mg-order-tracking-steps li {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.55rem;
    color: var(--mg-text-muted, #64748b);
    text-align: center;
}

.mg-order-track-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 2px solid var(--mg-border, #e2e8f0);
    border-radius: 50%;
    background: var(--mg-bg, #fff);
    color: var(--mg-text-muted, #64748b);
    font-size: 0.9rem;
}

.mg-order-tracking-steps li.is-done .mg-order-track-icon,
.mg-order-tracking-steps li.is-current .mg-order-track-icon {
    border-color: var(--mg-primary, #2563eb);
    background: var(--mg-primary, #2563eb);
    color: #fff;
}

.mg-order-tracking-steps li.is-current .mg-order-track-icon {
    box-shadow: 0 0 0 5px rgba(var(--mg-primary-rgb, 37, 99, 235), 0.12);
}

.mg-order-tracking-steps li strong {
    font-size: 0.76rem;
}

.mg-order-tracking-code {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--mg-radius-sm, 8px);
    background: var(--mg-surface, #f8fafc);
    color: var(--mg-text-muted, #64748b);
    font-size: 0.82rem;
}

.mg-order-tracking-code strong {
    direction: ltr;
    color: var(--mg-text, #0f172a);
}

.mg-order-tracking-code a {
    margin-right: auto;
    color: var(--mg-primary, #2563eb);
    font-weight: 700;
}

.mg-order-tracking--stopped {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
    color: var(--mg-error, #ef4444);
}

.mg-loyalty-toggle {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 1rem;
    padding: 0.9rem;
    border: 1px solid var(--mg-border, #e2e8f0);
    border-radius: var(--mg-radius, 12px);
    background: var(--mg-bg, #fff);
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.05);
}

.mg-loyalty-toggle-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--mg-primary, #2563eb);
    border-radius: var(--mg-radius-sm, 8px);
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.1);
}

.mg-loyalty-toggle-icon svg {
    width: 23px;
    height: 23px;
}

.mg-loyalty-toggle-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.3rem;
}

.mg-loyalty-toggle strong {
    color: var(--mg-text, #0f172a);
    font-size: 0.9rem;
    line-height: 1.6;
}

.mg-loyalty-toggle-copy > span {
    color: var(--mg-text-muted, #64748b);
    font-size: 0.76rem;
    line-height: 1.8;
}

.mg-loyalty-toggle-btn {
    min-width: 132px;
    min-height: 40px;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--mg-primary, #2563eb);
    border-radius: var(--mg-radius-sm, 8px);
    background: var(--mg-primary, #2563eb);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.mg-loyalty-toggle-btn:hover {
    color: #fff;
    transform: translateY(-1px);
}

.mg-loyalty-toggle-btn.is-loading {
    cursor: wait;
    opacity: 0.7;
}

.mg-loyalty-toggle.is-applied {
    border-color: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.35);
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.035);
}

.mg-loyalty-toggle.is-applied .mg-loyalty-toggle-btn {
    background: transparent;
    color: var(--mg-primary, #2563eb);
}

.mg-loyalty-toggle.is-applied .mg-loyalty-toggle-btn:hover {
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.08);
    color: var(--mg-primary, #2563eb);
}

.mg-loyalty-toggle.is-empty {
    box-shadow: none;
}

.mg-loyalty-toggle.is-empty .mg-loyalty-toggle-icon {
    color: var(--mg-text-muted, #64748b);
    background: var(--mg-surface, #f8fafc);
}

.mg-loyalty-toggle-status {
    padding: 0.42rem 0.7rem;
    color: var(--mg-text-muted, #64748b);
    border-radius: 999px;
    background: var(--mg-surface, #f8fafc);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.mg-loyalty-account {
    color: var(--mg-text, #0f172a);
}

.mg-loyalty-account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.mg-loyalty-account-header h2,
.mg-loyalty-account-header p,
.mg-loyalty-section-heading h3,
.mg-loyalty-section-heading p {
    margin: 0;
}

.mg-loyalty-account-header h2 {
    margin-top: 0.2rem;
    color: var(--mg-text, #0f172a);
    font-size: 1.25rem;
}

.mg-loyalty-account-header p,
.mg-loyalty-section-heading p {
    margin-top: 0.35rem;
    color: var(--mg-text-muted, #64748b);
    font-size: 0.78rem;
    line-height: 1.8;
}

.mg-loyalty-account-eyebrow {
    color: var(--mg-primary, #2563eb);
    font-size: 0.72rem;
    font-weight: 700;
}

.mg-loyalty-account-icon {
    display: grid;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    place-items: center;
    color: var(--mg-primary, #2563eb);
    border-radius: var(--mg-radius, 12px);
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.1);
}

.mg-loyalty-account-icon svg {
    width: 27px;
    height: 27px;
}

.mg-loyalty-summary {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
    align-items: stretch;
    overflow: hidden;
    margin-bottom: 1.75rem;
    border: 1px solid var(--mg-border, #e2e8f0);
    border-radius: var(--mg-radius, 12px);
    background: var(--mg-bg, #fff);
}

.mg-loyalty-summary > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 98px;
    padding: 1rem 1.1rem;
}

.mg-loyalty-summary > div + div {
    border-right: 1px solid var(--mg-border, #e2e8f0);
}

.mg-loyalty-summary span {
    margin-bottom: 0.35rem;
    color: var(--mg-text-muted, #64748b);
    font-size: 0.72rem;
}

.mg-loyalty-summary strong {
    color: var(--mg-text, #0f172a);
    font-size: 0.88rem;
    line-height: 1.8;
}

.mg-loyalty-summary-primary {
    color: #fff;
    background: var(--mg-primary, #2563eb);
}

.mg-loyalty-summary .mg-loyalty-summary-primary span,
.mg-loyalty-summary .mg-loyalty-summary-primary strong,
.mg-loyalty-summary .mg-loyalty-summary-primary small {
    color: #fff;
}

.mg-loyalty-summary-primary strong {
    font-size: 1.8rem;
    line-height: 1.2;
}

.mg-loyalty-summary-primary small {
    margin-top: 0.15rem;
    font-size: 0.68rem;
    opacity: 0.85;
}

.mg-loyalty-section-heading {
    margin-bottom: 0.75rem;
}

.mg-loyalty-section-heading h3 {
    color: var(--mg-text, #0f172a);
    font-size: 1rem;
}

.mg-loyalty-ledger {
    overflow: hidden;
    border: 1px solid var(--mg-border, #e2e8f0);
    border-radius: var(--mg-radius, 12px);
}

.mg-loyalty-ledger-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--mg-bg, #fff);
}

.mg-loyalty-ledger-row + .mg-loyalty-ledger-row {
    border-top: 1px solid var(--mg-border, #e2e8f0);
}

.mg-loyalty-ledger-sign {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
}

.mg-loyalty-ledger-sign.is-credit {
    color: var(--mg-success, #10b981);
    background: rgba(16, 185, 129, 0.1);
}

.mg-loyalty-ledger-sign.is-debit {
    color: var(--mg-error, #ef4444);
    background: rgba(239, 68, 68, 0.1);
}

.mg-loyalty-ledger-copy,
.mg-loyalty-ledger-amount {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.15rem;
}

.mg-loyalty-ledger-copy strong {
    overflow: hidden;
    color: var(--mg-text, #0f172a);
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mg-loyalty-ledger-copy small,
.mg-loyalty-ledger-amount small {
    color: var(--mg-text-muted, #64748b);
    font-size: 0.68rem;
}

.mg-loyalty-ledger-copy small {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.mg-loyalty-ledger-copy a {
    color: var(--mg-primary, #2563eb);
    text-decoration: none;
}

.mg-loyalty-ledger-amount {
    align-items: end;
    text-align: left;
}

.mg-loyalty-ledger-amount strong {
    font-size: 0.86rem;
}

.mg-loyalty-ledger .is-credit { color: var(--mg-success, #10b981); }
.mg-loyalty-ledger .is-debit { color: var(--mg-error, #ef4444); }

.mg-loyalty-empty {
    display: grid;
    min-height: 180px;
    padding: 1.25rem;
    place-items: center;
    align-content: center;
    text-align: center;
    border: 1px dashed var(--mg-border, #e2e8f0);
    border-radius: var(--mg-radius, 12px);
    background: var(--mg-surface, #f8fafc);
}

.mg-loyalty-empty > span {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 0.65rem;
    place-items: center;
    color: var(--mg-text-muted, #64748b);
    border-radius: 50%;
    background: var(--mg-bg, #fff);
    font-weight: 700;
}

.mg-loyalty-empty strong {
    color: var(--mg-text, #0f172a);
    font-size: 0.88rem;
}

.mg-loyalty-empty p {
    margin: 0.3rem 0 0;
    color: var(--mg-text-muted, #64748b);
    font-size: 0.74rem;
}

.mg-address-map-card {
    width: 100%;
    margin: 1rem 0 1.35rem;
    padding: 1rem;
    box-sizing: border-box;
    border: 1px solid var(--mg-border, #e2e8f0);
    border-radius: var(--mg-radius, 12px);
    background: var(--mg-bg, #fff);
}

.mg-address-map-controls {
    min-width: 0;
}

.mg-address-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.mg-address-mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.mg-address-mode-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.mg-address-mode-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.mg-address-mode-option > span {
    position: relative;
    display: flex;
    min-height: 66px;
    justify-content: center;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.7rem 0.85rem 0.7rem 2.35rem;
    box-sizing: border-box;
    border: 1px solid var(--mg-border, #e2e8f0);
    border-radius: var(--mg-radius-sm, 8px);
    background: var(--mg-bg, #fff);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.mg-address-mode-option > input:checked + span {
    border-color: var(--mg-primary, #2563eb);
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.06);
    box-shadow: inset 0 0 0 1px var(--mg-primary, #2563eb);
}

.mg-address-mode-option > span::after {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--mg-border, #e2e8f0);
    border-radius: 50%;
    background: var(--mg-bg, #fff);
    content: '';
    transform: translateY(-50%);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mg-address-mode-option > input:checked + span::after {
    border-color: var(--mg-primary, #2563eb);
    box-shadow: inset 0 0 0 5px var(--mg-primary, #2563eb);
}

.mg-address-mode-option > input:focus-visible + span {
    outline: 2px solid var(--mg-primary, #2563eb);
    outline-offset: 2px;
}

.mg-address-mode-option strong {
    color: var(--mg-text, #0f172a);
    font-size: 0.82rem;
}

.mg-address-mode-option small {
    color: var(--mg-text-muted, #64748b);
    font-size: 0.7rem;
    line-height: 1.6;
}

.mg-address-mode-option.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.mg-address-map-panel[hidden] {
    display: none !important;
}

.mg-address-map-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.mg-address-map-tools > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.15rem;
}

.mg-address-map-tools > div > strong {
    color: var(--mg-text, #0f172a);
    font-size: 0.82rem;
}

.mg-address-map-tools > span,
.mg-address-map-tools > div > span {
    color: var(--mg-text-muted, #64748b);
    font-size: 0.74rem;
}

.mg-address-map-head > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mg-address-map-head strong {
    color: var(--mg-text, #0f172a);
    font-size: 0.9rem;
}

.mg-address-map-head span,
.mg-address-map-status {
    color: var(--mg-text-muted, #64748b);
    font-size: 0.74rem;
}

.mg-address-selection-summary {
    margin-top: 0.85rem;
    padding: 0.85rem;
    border: 1px solid var(--mg-border, #e2e8f0);
    border-radius: var(--mg-radius-sm, 8px);
    background: var(--mg-surface, #f8fafc);
}

.mg-address-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.mg-address-summary-head > span {
    color: var(--mg-text-muted, #64748b);
    font-size: 0.72rem;
}

.mg-address-summary-head > strong {
    color: var(--mg-primary, #2563eb);
    font-size: 0.74rem;
}

.mg-address-selection-summary > p {
    margin: 0;
    color: var(--mg-text, #0f172a);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.9;
}

.mg-address-selection-summary.is-empty > p {
    color: var(--mg-text-muted, #64748b);
    font-weight: 500;
}

.mg-address-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.mg-address-summary-meta > span {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--mg-bg, #fff);
    color: var(--mg-text-muted, #64748b);
    font-size: 0.68rem;
}

.wc-block-checkout .wc-block-checkout__shipping-fields.mg-address-map-card--block {
    width: auto;
    margin: 0;
}

.wc-block-checkout .mg-address-map-card--block > .wc-block-components-checkout-step__heading-container {
    margin-bottom: 0.75rem;
}

.wc-block-checkout .mg-address-map-card--block .mg-address-mode-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.15rem;
}

.wc-block-checkout .mg-address-map-card--block .mg-address-mode-option > span {
    min-height: 64px;
    background: var(--mg-surface, #f8fafc);
}

.wc-block-checkout .mg-address-map-card--block .mg-address-mode-option > input:checked + span {
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.07);
}

.wc-block-checkout .mg-address-map-card--block .mg-address-map-content {
    min-width: 0;
}

.wc-block-checkout .mg-address-map-card--block .mg-address-map-panel {
    margin-top: 0.35rem;
    padding: 0.85rem;
    border: 1px solid rgba(var(--mg-primary-rgb, 37, 99, 235), 0.16);
    border-radius: var(--mg-radius, 12px);
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.035);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);
}

.wc-block-checkout .mg-address-map-card--block .mg-address-selection-summary {
    position: relative;
    margin-top: 0.75rem;
    padding-right: 2.8rem;
    border-color: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.18);
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.055);
}

.wc-block-checkout .mg-address-map-card--block .mg-address-selection-summary::before {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.12);
    color: var(--mg-primary, #2563eb);
    content: '\2713';
    font-size: 0.78rem;
    font-weight: 800;
}

.wc-block-checkout .mg-address-map-card--block .mg-address-selection-summary.is-empty::before {
    content: '\2022';
}

.wc-block-checkout .mg-address-map-card--block.is-mode-saved .wc-block-components-address-address-wrapper {
    display: none !important;
}

.wc-block-checkout .mg-address-map-card--block.is-mode-saved .mg-address-selection-summary {
    margin-top: 0;
}

.wc-block-checkout .mg-address-map-card--block.is-mode-map .wc-block-components-address-address-wrapper {
    display: block !important;
}

.wc-block-checkout .mg-address-map-card--block.is-mode-map .mg-address-map-content {
    margin-top: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mg-border, #e2e8f0);
}

@media (min-width: 1100px) {
    .wc-block-checkout .mg-address-map-card--block.is-mode-map > .wc-block-components-checkout-step__content {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
        grid-auto-rows: min-content;
        align-items: start;
        align-content: start;
        gap: 1rem;
    }

    .wc-block-checkout .mg-address-map-card--block.is-mode-map > .wc-block-components-checkout-step__content > :not(.mg-address-map-content) {
        grid-column: 1;
        min-width: 0;
    }

    .wc-block-checkout .mg-address-map-card--block.is-mode-map > .wc-block-components-checkout-step__content > .wc-block-components-address-address-wrapper {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
    }

    .wc-block-checkout .mg-address-map-card--block.is-mode-map > .wc-block-components-checkout-step__content > .mg-address-map-content {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        align-self: start;
        margin: 0;
        padding: 0;
        border-top: 0;
    }

    .wc-block-checkout .mg-address-map-card--block .mg-address-map-panel {
        margin-top: 0;
    }

    .wc-block-checkout .mg-address-map-card--block .mg-address-map-canvas {
        height: 360px;
    }

    body.mg-classic-checkout-shipping-only form.checkout .woocommerce-billing-fields {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
        align-items: start;
        gap: 1rem;
    }

    body.mg-classic-checkout-shipping-only form.checkout .woocommerce-billing-fields > h3 {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    body.mg-classic-checkout-shipping-only form.checkout .woocommerce-billing-fields > .woocommerce-billing-fields__field-wrapper {
        grid-column: 1;
        min-width: 0;
    }

    body.mg-classic-checkout-shipping-only form.checkout .woocommerce-billing-fields > .mg-address-map-card {
        grid-column: 2;
        min-width: 0;
        align-self: start;
        margin: 0;
    }
}

/* A map card must never become a third child/column of the checkout layout. */
.wc-block-checkout.wp-block-woocommerce-checkout .wc-block-components-sidebar-layout > .mg-address-map-card {
    display: none !important;
}

body.mg-checkout-shipping-only .wc-block-checkout__use-address-for-billing,
body.mg-checkout-shipping-only .wp-block-woocommerce-checkout-billing-address-block,
body.mg-checkout-shipping-only .wc-block-checkout__billing-fields,
body.mg-checkout-shipping-only #billing-fields {
    display: none !important;
}

body.mg-classic-checkout-shipping-only #ship-to-different-address,
body.mg-classic-checkout-shipping-only .shipping_address {
    display: none !important;
}

.mg-address-locate {
    min-height: 38px;
    flex: 0 0 auto;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(var(--mg-primary-rgb, 37, 99, 235), 0.25);
    border-radius: var(--mg-radius-sm, 8px);
    background: #fff;
    color: var(--mg-primary, #2563eb);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.mg-address-locate:hover,
.mg-address-locate:focus-visible {
    border-color: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.5);
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.065);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.09);
}

.mg-address-map-canvas {
    z-index: 1;
    width: 100%;
    height: 310px;
    overflow: hidden;
    border: 1px solid rgba(var(--mg-primary-rgb, 37, 99, 235), 0.14);
    border-radius: var(--mg-radius-sm, 8px);
    background: #eef2f6;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.075);
    isolation: isolate;
}

.mg-address-map-status {
    display: flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.65rem 0.15rem 0;
    line-height: 1.65;
}

.mg-address-map-status.is-success { color: #047857; }
.mg-address-map-status.is-warning { color: #a16207; }
.mg-address-map-status.is-error { color: var(--mg-error, #ef4444); }

[data-mg-address-map] .leaflet-container {
    direction: ltr;
    font-family: inherit;
}

[data-mg-address-map] .leaflet-control-zoom {
    overflow: hidden;
    border: 0;
    border-radius: var(--mg-radius-sm, 8px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

[data-mg-address-map] .leaflet-bar a,
[data-mg-address-map] .leaflet-bar a:hover {
    width: 32px;
    height: 32px;
    border-bottom-color: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.12);
    line-height: 32px;
}

[data-mg-address-map] .leaflet-bar a {
    background: rgba(255, 255, 255, 0.96);
    color: var(--mg-text, #0f172a);
}

[data-mg-address-map] .leaflet-bar a:hover,
[data-mg-address-map] .leaflet-bar a:focus {
    background: rgba(var(--mg-primary-rgb, 37, 99, 235), 0.08);
    color: var(--mg-primary, #2563eb);
}

[data-mg-address-map] .leaflet-control-attribution {
    padding: 2px 5px;
    border-radius: 6px 0 0 0;
    background: rgba(255, 255, 255, 0.9);
    color: var(--mg-text-muted, #64748b);
    font-size: 0.62rem;
}

.mg-map-pin-wrap {
    border: 0;
    background: transparent;
}

.mg-map-pin {
    position: relative;
    display: block;
    width: 28px;
    height: 28px;
    border: 4px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: var(--mg-primary, #2563eb);
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.28);
    transform: rotate(-45deg);
}

.mg-map-pin::after {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    content: '';
}

@media (max-width: 767px) {
    .mg-add-to-cart-form > .mg-commerce-buy-now {
        width: 100%;
        min-width: 0;
    }

    .mg-price-history {
        align-items: stretch;
        flex-direction: column;
    }

    .mg-price-history-chart {
        width: 100%;
    }

    .mg-order-tracking {
        padding: 1rem;
    }

    .mg-order-tracking-steps {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .mg-order-tracking-steps::before {
        top: 18px;
        right: 17px;
        bottom: 18px;
        left: auto;
        width: 2px;
        height: auto;
    }

    .mg-order-tracking-steps li {
        min-height: 54px;
        align-items: center;
        flex-direction: row;
        text-align: right;
    }

    .mg-order-track-icon {
        flex: 0 0 36px;
    }

    .mg-order-tracking-code,
    .mg-address-map-head,
    .mg-address-map-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .mg-loyalty-toggle {
        grid-template-columns: 40px minmax(0, 1fr);
        align-items: center;
        gap: 0.75rem;
        padding: 0.8rem;
    }

    .mg-loyalty-toggle-icon {
        width: 40px;
        height: 40px;
    }

    .mg-loyalty-toggle-btn,
    .mg-loyalty-toggle-status {
        grid-column: 1 / -1;
    }

    .mg-loyalty-toggle-status {
        text-align: center;
    }

    .mg-address-mode-selector {
        grid-template-columns: 1fr;
    }

    .mg-order-tracking-code a {
        margin-right: 0;
    }

    .mg-loyalty-toggle-btn,
    .mg-address-locate {
        width: 100%;
    }

    .mg-loyalty-account-header {
        align-items: flex-start;
    }

    .mg-loyalty-account-icon {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .mg-loyalty-summary {
        grid-template-columns: 1fr;
    }

    .mg-loyalty-summary > div {
        min-height: 82px;
    }

    .mg-loyalty-summary > div + div {
        border-top: 1px solid var(--mg-border, #e2e8f0);
        border-right: 0;
    }

    .mg-loyalty-ledger-row {
        grid-template-columns: 32px minmax(0, 1fr);
        padding: 0.8rem;
    }

    .mg-loyalty-ledger-sign {
        width: 32px;
        height: 32px;
    }

    .mg-loyalty-ledger-amount {
        grid-column: 2;
        align-items: start;
        flex-direction: row;
        justify-content: space-between;
        text-align: right;
    }

    .mg-address-map-canvas {
        height: 250px;
    }

    .wc-block-checkout .wc-block-checkout__shipping-fields.mg-address-map-card--block {
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }

    .wc-block-checkout .mg-address-map-card--block .mg-address-mode-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .wc-block-checkout .mg-address-map-card--block .mg-address-mode-option > span {
        min-height: 74px;
        padding: 0.65rem 0.7rem 0.65rem 1.9rem;
    }

    .wc-block-checkout .mg-address-map-card--block .mg-address-mode-option > span::after {
        left: 0.6rem;
        width: 16px;
        height: 16px;
    }

    .wc-block-checkout .mg-address-map-card--block .mg-address-map-panel {
        padding: 0.65rem;
    }

    .wc-block-checkout .mg-address-map-card--block .mg-address-selection-summary {
        padding-right: 2.65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mg-commerce-urgency-pulse { animation: none; }
}

/* زمان‌بندی ارسال */
.mg-checkout-form-section.mg-delivery {
    margin-top: 1.5rem;
}

.mg-delivery.has-error {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mg-error, #ef4444) 40%, transparent), var(--mg-shadow);
}

.mg-delivery-days {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
    scrollbar-width: thin;
}

.mg-delivery-day {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 92px;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--mg-border);
    border-radius: var(--mg-radius, 12px);
    background: var(--mg-bg);
    color: var(--mg-text);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.mg-delivery-day strong {
    font-size: 0.95rem;
}

.mg-delivery-day span {
    font-size: 0.8rem;
    color: var(--mg-text-muted, #64748b);
}

.mg-delivery-day:hover {
    border-color: var(--mg-primary);
}

.mg-delivery-day.is-active {
    border-color: var(--mg-primary);
    background: var(--mg-primary);
    color: #fff;
}

.mg-delivery-day.is-active span {
    color: rgba(255, 255, 255, 0.85);
}

.mg-delivery-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.6rem;
}

.mg-delivery-slots[hidden] {
    display: none;
}

.mg-delivery--block {
    margin: 0 0 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--mg-border);
    box-shadow: none;
}

.mg-delivery-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 56px;
    padding: 0.6rem;
    border: 1.5px solid var(--mg-border);
    border-radius: var(--mg-radius, 12px);
    background: var(--mg-surface, #f8fafc);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.mg-delivery-slot input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mg-delivery-slot-time {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--mg-text);
}

.mg-delivery-slot-note {
    font-size: 0.75rem;
    color: var(--mg-text-muted, #64748b);
}

.mg-delivery-slot:hover {
    border-color: var(--mg-primary);
}

.mg-delivery-slot:has(input:checked) {
    border-color: var(--mg-primary);
    background: rgba(var(--mg-primary-rgb, 59, 130, 246), 0.08);
    box-shadow: inset 0 0 0 1px var(--mg-primary);
}

.mg-delivery-slot:has(input:focus-visible) {
    outline: 2px solid var(--mg-primary);
    outline-offset: 2px;
}

.mg-delivery-slot.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
    background: transparent;
}

.mg-delivery-slot.is-disabled .mg-delivery-slot-time {
    text-decoration: line-through;
}

.mg-delivery-empty {
    margin: 0;
    color: var(--mg-text-muted, #64748b);
}

.mg-delivery-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.9rem 1.1rem;
    border-radius: var(--mg-radius, 12px);
    background: rgba(var(--mg-primary-rgb, 59, 130, 246), 0.07);
    color: var(--mg-text);
}

.mg-delivery-summary svg {
    color: var(--mg-primary);
}

@media (max-width: 575px) {
    .mg-delivery-slots {
        grid-template-columns: 1fr 1fr;
    }

    .mg-delivery-day {
        min-width: 82px;
        padding: 0.6rem 0.7rem;
    }
}

/* ── پک خرید ── */
.mg-bundle {
    container-type: inline-size;
    margin: 1.75rem 0 0.5rem;
    padding: 1.25rem;
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius-lg);
    background: var(--mg-bg);
}

.mg-bundle-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.mg-bundle-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--mg-text);
}

.mg-bundle-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--mg-radius-full);
    background: rgba(var(--mg-primary-rgb), 0.1);
    color: var(--mg-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.mg-bundle-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 1.25rem;
    align-items: center;
}

.mg-bundle-items {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    min-width: 0;
}

.mg-bundle-plus {
    align-self: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mg-surface);
    color: var(--mg-text-muted);
    font-weight: 700;
}

.mg-bundle-item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius);
    background: var(--mg-bg);
    transition: var(--mg-transition);
}

.mg-bundle-item.is-main {
    background: var(--mg-surface);
}

.mg-bundle-item.is-off {
    opacity: 0.55;
}

.mg-bundle-check-wrap {
    position: absolute;
    top: 0.5rem;
    inset-inline-start: 0.5rem;
    z-index: 2;
    cursor: pointer;
}

.mg-bundle-check-wrap input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.mg-bundle-check {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 2px solid var(--mg-border);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--mg-transition);
}

.mg-bundle-item.is-main .mg-bundle-check {
    position: absolute;
    top: 0.5rem;
    inset-inline-start: 0.5rem;
    z-index: 2;
}

.mg-bundle-check-wrap input:checked + .mg-bundle-check,
.mg-bundle-check.is-fixed {
    background: var(--mg-primary);
    border-color: var(--mg-primary);
}

.mg-bundle-check-wrap input:checked + .mg-bundle-check::after,
.mg-bundle-check.is-fixed::after {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.mg-bundle-check-wrap input:focus-visible + .mg-bundle-check {
    outline: 2px solid var(--mg-primary);
    outline-offset: 2px;
}

.mg-bundle-check.is-fixed {
    opacity: 0.55;
}

.mg-bundle-thumb {
    display: block;
    aspect-ratio: 1;
    border-radius: calc(var(--mg-radius) - 2px);
    background: #f6f6f6;
    overflow: hidden;
}

.mg-bundle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.mg-bundle-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.mg-bundle-tag {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--mg-primary);
}

.mg-bundle-name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--mg-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

a.mg-bundle-name:hover {
    color: var(--mg-primary);
}

.mg-bundle-qty {
    font-size: 0.72rem;
    color: var(--mg-text-muted);
}

.mg-bundle-variation {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--mg-border);
    border-radius: 8px;
    background: var(--mg-bg);
    font: inherit;
    font-size: 0.78rem;
    color: var(--mg-text);
}

.mg-bundle-variation.is-invalid {
    border-color: #ef4444;
}

.mg-bundle-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.4rem;
    margin-top: auto;
    font-size: 0.85rem;
}

.mg-bundle-price small {
    font-size: 0.72rem;
    color: var(--mg-text-muted);
}

.mg-bundle-price ins,
.mg-bundle-price del,
.mg-bundle-total del,
.mg-bundle-total strong,
.mg-bundle-save {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
}

.mg-bundle-price ins {
    font-weight: 800;
    color: var(--mg-text);
}

.mg-bundle-price del,
.mg-bundle-total del {
    color: var(--mg-text-muted);
    font-size: 0.75rem;
}

.mg-bundle-price del .mg-bundle-amount,
.mg-bundle-total del .mg-bundle-amount {
    text-decoration: line-through;
}

.mg-bundle .mg-toman-icon {
    height: 1.9em;
}

.mg-bundle-price del .mg-toman-icon,
.mg-bundle-total del .mg-toman-icon {
    height: 1.5em;
}

.mg-bundle-summary {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: var(--mg-radius);
    background: var(--mg-surface);
}

.mg-bundle-total {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mg-bundle-total-label {
    font-size: 0.8rem;
    color: var(--mg-text-muted);
}

.mg-bundle-total strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--mg-text);
}

.mg-bundle-total strong small {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--mg-text-muted);
}

.mg-bundle-save {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--mg-success, #16a34a);
}

.mg-bundle-total [hidden] {
    display: none;
}

.mg-bundle-add {
    width: 100%;
}

.mg-bundle-add.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.mg-bundle-note {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--mg-text-muted);
}

.mg-bundle-note:empty {
    display: none;
}

/* فهرستی، یا هر جا جای پک باریک است (ستون اطلاعات محصول، گوشی) */
.mg-bundle--list .mg-bundle-body {
    grid-template-columns: 1fr;
}

.mg-bundle--list .mg-bundle-items {
    flex-direction: column;
}

.mg-bundle--list .mg-bundle-plus {
    display: none;
}

.mg-bundle--list .mg-bundle-item {
    flex-direction: row;
    align-items: center;
    padding-inline-start: 2.6rem;
}

.mg-bundle--list .mg-bundle-check-wrap,
.mg-bundle--list .mg-bundle-item.is-main .mg-bundle-check {
    top: 50%;
    transform: translateY(-50%);
    inset-inline-start: 0.75rem;
}

.mg-bundle--list .mg-bundle-thumb {
    flex: 0 0 64px;
    width: 64px;
}

.mg-bundle--list .mg-bundle-price {
    margin-top: 0;
}

@container (max-width: 760px) {
    .mg-bundle-body {
        grid-template-columns: 1fr;
    }
}

@container (max-width: 560px) {
    .mg-bundle-items {
        flex-direction: column;
    }

    .mg-bundle-plus {
        display: none;
    }

    .mg-bundle-item {
        flex-direction: row;
        align-items: center;
        padding-inline-start: 2.6rem;
    }

    .mg-bundle-check-wrap,
    .mg-bundle-item.is-main .mg-bundle-check {
        top: 50%;
        transform: translateY(-50%);
        inset-inline-start: 0.75rem;
    }

    .mg-bundle-thumb {
        flex: 0 0 64px;
        width: 64px;
    }

    .mg-bundle-price {
        margin-top: 0;
    }
}

@media (max-width: 640px) {
    .mg-bundle {
        padding: 1rem;
    }
}

/* ── خبرم کن ── */
.mg-alert-btn {
    width: 100%;
    margin-top: 0.75rem;
    gap: 0.5rem;
}

.mg-alert-btn[hidden] {
    display: none;
}

.mg-alert-btn--variation {
    background: rgba(var(--mg-primary-rgb), 0.08);
    color: var(--mg-primary);
    border: 1px dashed rgba(var(--mg-primary-rgb), 0.45);
}

.mg-alert-btn--variation:hover {
    background: rgba(var(--mg-primary-rgb), 0.14);
}

.mg-alert-btn.is-done,
.mg-alert-price-link.is-done {
    opacity: 0.7;
}

.mg-out-of-stock-notice .mg-alert-btn {
    margin-top: 0.85rem;
}

.mg-alert-price-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.35rem 0 0.5rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius-full);
    background: var(--mg-bg);
    color: var(--mg-text-muted);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--mg-transition);
}

.mg-alert-price-link:hover {
    color: var(--mg-primary);
    border-color: var(--mg-primary);
}

.mg-alert-price-link svg {
    width: 15px;
    height: 15px;
}

html.mg-alert-open {
    overflow: hidden;
}

.mg-alert-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mg-alert-modal[hidden] {
    display: none;
}

.mg-alert-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.mg-alert-dialog {
    position: relative;
    width: min(100%, 400px);
    padding: 1.75rem 1.5rem 1.25rem;
    border-radius: var(--mg-radius-xl, 20px);
    background: var(--mg-bg);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    text-align: center;
}

.mg-alert-x {
    position: absolute;
    top: 0.6rem;
    inset-inline-end: 0.75rem;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--mg-surface);
    color: var(--mg-text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.mg-alert-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--mg-primary-rgb), 0.1);
    color: var(--mg-primary);
}

.mg-alert-icon svg {
    width: 26px;
    height: 26px;
}

.mg-alert-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--mg-text);
}

.mg-alert-lead,
.mg-alert-login {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--mg-text-muted);
}

.mg-alert-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: start;
}

.mg-alert-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.mg-alert-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mg-text);
}

.mg-alert-field input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--mg-border);
    border-radius: 12px;
    background: var(--mg-bg);
    font: inherit;
    font-size: 0.95rem;
    text-align: left;
}

.mg-alert-field input:focus {
    border-color: var(--mg-primary);
    outline: none;
}

.mg-alert-push {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--mg-text);
    cursor: pointer;
}

.mg-alert-push[hidden] {
    display: none;
}

.mg-alert-push input {
    width: 18px;
    height: 18px;
    accent-color: var(--mg-primary);
}

.mg-alert-msg {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.7;
}

.mg-alert-msg:empty {
    display: none;
}

.mg-alert-msg.is-error {
    color: #dc2626;
}

.mg-alert-msg.is-ok {
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
}

.mg-alert-submit {
    width: 100%;
}

.mg-alert-foot {
    margin: 0;
    font-size: 0.72rem;
    color: var(--mg-text-muted);
    text-align: center;
}

/* حساب کاربری: اطلاع‌رسانی‌های من */
.mg-account-alerts h3 {
    margin: 0 0 0.35rem;
}

.mg-account-alerts-lead,
.mg-account-alerts-empty {
    color: var(--mg-text-muted);
    font-size: 0.88rem;
}

.mg-account-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.mg-account-alert {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem;
    border: 1px solid var(--mg-border);
    border-radius: var(--mg-radius);
    background: var(--mg-bg);
}

.mg-account-alert-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #f6f6f6;
    overflow: hidden;
}

.mg-account-alert-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.mg-account-alert-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mg-account-alert-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--mg-text);
    text-decoration: none;
}

.mg-account-alert-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.75rem;
    color: var(--mg-text-muted);
}

.mg-account-alert-type {
    color: var(--mg-primary);
    font-weight: 700;
}

.mg-account-alert--sent .mg-account-alert-status {
    color: #15803d;
}

.mg-account-alert--pending .mg-account-alert-status {
    color: #b45309;
}

.mg-account-alert-cancel button {
    min-height: 36px;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--mg-border);
    background: var(--mg-bg);
    color: var(--mg-text);
}
