/* ==========================================================================
   صفحات فنی — بانک کدهای خطا، جزئیات کد خطا و پیشنهاد قطعهٔ یدکی
   فضای نام: ecb-* (بانک) | ecd-* (جزئیات) | sp-* (پیشنهاد قطعه)
   ========================================================================== */

/* ==========================================================================
   بانک کدهای خطا
   ========================================================================== */
.ecb-page {
    background: var(--app-bg, #f1f5f9);
    padding-bottom: 2.5rem;
}

.ecb-container {
    width: min(1120px, calc(100% - 1.5rem));
    margin-inline: auto;
}

/* ---------- هدر ---------- */
.ecb-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 1.15rem 1.05rem 1.25rem;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    box-shadow: 0 22px 44px -30px rgba(15, 23, 42, 0.85);
}

.ecb-hero::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    inset-inline-end: -90px;
    top: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
    pointer-events: none;
}

.ecb-hero__eyebrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.ecb-hero__text {
    position: relative;
    min-width: 0;
}

.ecb-hero h1 {
    position: relative;
    margin: 0.55rem 0 0.3rem;
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1.5;
}

.ecb-hero__lead {
    position: relative;
    margin: 0;
    max-width: 46ch;
    font-size: 0.79rem;
    line-height: 1.95;
    color: rgba(255, 255, 255, 0.85);
}

.ecb-hero__search {
    position: relative;
    padding: 0.7rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ecb-hero__search label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
}

.ecb-hero__searchbox {
    display: flex;
    gap: 0.4rem;
}

.ecb-hero__searchbox input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding-inline: 0.85rem;
    border: 0;
    border-radius: 11px;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    direction: ltr;
    text-align: left;
}

.ecb-hero__searchbox input::placeholder {
    font-weight: 500;
    color: #94a3b8;
}

.ecb-hero__searchbox button {
    flex: 0 0 auto;
    height: 44px;
    padding-inline: 1rem;
    border: 0;
    border-radius: 11px;
    background: #0f172a;
    color: #fff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.ecb-hero__searchbox button:hover {
    opacity: 0.88;
}

.ecb-hero__hint {
    margin: 0.4rem 0 0;
    font-size: 0.64rem;
    color: rgba(255, 255, 255, 0.72);
}

/* ---------- فیلترها ---------- */
.ecb-filters {
    margin-top: 1rem;
    padding: 0.95rem 0.9rem 1.05rem;
    border-radius: 18px;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    box-shadow: 0 14px 30px -26px rgba(15, 23, 42, 0.6);
}

.ecb-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.ecb-filters__title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--app-text, #0f172a);
}

.ecb-filters__title .oi {
    color: var(--app-primary, #2563eb);
}

.ecb-clear {
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--app-border-strong, rgba(15, 23, 42, 0.15));
    background: transparent;
    color: var(--app-text-muted, #64748b);
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.ecb-clear:hover {
    color: var(--app-danger, #ef4444);
    border-color: currentColor;
}

.ecb-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

.ecb-step {
    padding: 0.6rem 0.65rem 0.65rem;
    border-radius: 14px;
    background: var(--app-bg, #f1f5f9);
    border: 1px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ecb-step.is-filled {
    border-color: rgba(37, 99, 235, 0.28);
    background: var(--app-primary-light, rgba(37, 99, 235, 0.06));
}

.ecb-step__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.ecb-step__num {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.66rem;
    font-weight: 900;
    color: var(--app-text-muted, #64748b);
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border-strong, rgba(15, 23, 42, 0.15));
}

.ecb-step.is-filled .ecb-step__num {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
}

.ecb-step__label {
    font-size: 0.73rem;
    font-weight: 800;
    color: var(--app-text, #0f172a);
}

.ecb-step__optional {
    margin-inline-start: auto;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--app-text-muted, #64748b);
}

.ecb-select {
    width: 100%;
    height: 42px;
    padding-inline: 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--app-border-strong, rgba(15, 23, 42, 0.15));
    background: var(--app-surface, #fff);
    color: var(--app-text, #0f172a);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.ecb-select:focus {
    outline: none;
    border-color: var(--app-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.ecb-select:disabled {
    background: var(--app-bg, #f1f5f9);
    color: var(--app-text-muted, #64748b);
    cursor: not-allowed;
}

.ecb-step__hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.62rem;
    line-height: 1.7;
    color: var(--app-text-muted, #64748b);
}

.ecb-step__hint--warn {
    color: #b45309;
    font-weight: 700;
}

/* انتخاب سریع برند */
.ecb-brands {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--app-border-strong, rgba(15, 23, 42, 0.12));
}

.ecb-brands__label {
    font-size: 0.63rem;
    font-weight: 800;
    color: var(--app-text-muted, #64748b);
}

.ecb-brandchip {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--app-border-strong, rgba(15, 23, 42, 0.15));
    background: var(--app-surface, #fff);
    color: var(--app-text-secondary, #334155);
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ecb-brandchip:hover {
    border-color: rgba(37, 99, 235, 0.45);
    color: var(--app-primary, #2563eb);
}

.ecb-brandchip.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
}

/* فیلترهای فعال */
.ecb-active {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.7rem;
}

.ecb-active__label {
    font-size: 0.63rem;
    font-weight: 800;
    color: var(--app-text-muted, #64748b);
}

.ecb-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.24rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 800;
    cursor: pointer;
}

.ecb-chip .oi {
    font-size: 0.55rem;
    opacity: 0.7;
}

.ecb-chip--brand {
    color: #4338ca;
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.24);
}

.ecb-chip--device {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.26);
}

.ecb-chip--category {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.3);
}

.ecb-chip--code {
    color: var(--app-text-secondary, #334155);
    background: var(--app-bg, #f1f5f9);
    border-color: var(--app-border-strong, rgba(15, 23, 42, 0.15));
    direction: ltr;
}

.ecb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.ecb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.5rem 1.1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ecb-btn--primary {
    flex: 1 1 auto;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    box-shadow: 0 14px 28px -18px rgba(79, 70, 229, 0.95);
}

.ecb-btn--primary:hover {
    color: #fff;
    box-shadow: 0 18px 34px -18px rgba(79, 70, 229, 1);
}

.ecb-btn--ghost {
    color: var(--app-text-secondary, #334155);
    background: var(--app-surface, #fff);
    border-color: var(--app-border-strong, rgba(15, 23, 42, 0.15));
}

.ecb-btn--ghost:hover {
    color: var(--app-primary, #2563eb);
    border-color: rgba(37, 99, 235, 0.4);
}

/* ---------- بخش‌ها ---------- */
.ecb-section {
    margin-top: 1.35rem;
}

.ecb-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.65rem;
}

.ecb-section__title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.98rem;
    font-weight: 900;
    color: var(--app-text, #0f172a);
}

.ecb-section__title .oi {
    color: var(--app-primary, #2563eb);
}

.ecb-section__sub {
    margin: 0.2rem 0 0;
    font-size: 0.7rem;
    color: var(--app-text-muted, #64748b);
}

.ecb-section__count {
    flex: 0 0 auto;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    color: var(--app-primary, #2563eb);
    background: var(--app-primary-light, rgba(37, 99, 235, 0.1));
}

/* ---------- کارت کد خطا ---------- */
.ecb-code {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 0.28rem 0.6rem;
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    direction: ltr;
    unicode-bidi: isolate;
    color: var(--app-primary, #2563eb);
    background: var(--app-primary-light, rgba(37, 99, 235, 0.1));
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.ecb-rail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.ecb-feat {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.75rem;
    border-radius: 14px;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    color: var(--app-text, #0f172a);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ecb-feat:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.7);
}

.ecb-feat__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ecb-feat__meta {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--app-primary, #2563eb);
}

.ecb-feat__desc {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.7;
    color: var(--app-text-muted, #64748b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* شبکهٔ نتایج */
.ecb-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.ecb-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.8rem 0.85rem;
    border-radius: 16px;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ecb-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 16px 30px -24px rgba(15, 23, 42, 0.8);
}

.ecb-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.ecb-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-width: 0;
}

.ecb-tag {
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    white-space: nowrap;
}

.ecb-tag--brand {
    color: #4338ca;
    background: rgba(79, 70, 229, 0.1);
}

.ecb-tag--device {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
}

.ecb-tag--category {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
}

.ecb-card__title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1.7;
    color: var(--app-text, #0f172a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ecb-card__solution {
    margin: 0;
    padding: 0.45rem 0.55rem;
    border-radius: 9px;
    border-inline-start: 3px solid #10b981;
    background: rgba(16, 185, 129, 0.07);
    font-size: 0.7rem;
    line-height: 1.8;
    color: var(--app-text-secondary, #334155);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ecb-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.1rem;
}

.ecb-card__more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 900;
    color: var(--app-primary, #2563eb);
}

.ecb-card__thumb {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--app-bg, #f1f5f9);
    display: grid;
    place-items: center;
    color: var(--app-text-muted, #64748b);
}

.ecb-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- حالت‌های خالی و بارگذاری ---------- */
.ecb-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2.4rem 1rem;
    text-align: center;
    border-radius: 18px;
    background: var(--app-surface, #fff);
    border: 1px dashed var(--app-border-strong, rgba(15, 23, 42, 0.15));
}

.ecb-state__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 1.3rem;
    color: var(--app-primary, #2563eb);
    background: var(--app-primary-light, rgba(37, 99, 235, 0.1));
}

.ecb-state h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--app-text, #0f172a);
}

.ecb-state p {
    margin: 0;
    max-width: 42ch;
    font-size: 0.75rem;
    line-height: 1.9;
    color: var(--app-text-muted, #64748b);
}

.ecb-skel {
    height: 96px;
    border-radius: 16px;
    background: linear-gradient(90deg, var(--app-surface, #fff) 25%, var(--app-bg, #f1f5f9) 50%, var(--app-surface, #fff) 75%);
    background-size: 200% 100%;
    animation: ecb-shimmer 1.4s infinite;
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
}

@keyframes ecb-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ==========================================================================
   جزئیات کد خطا
   ========================================================================== */
.ecd-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 14px 14px 40px;
}

.ecd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    padding: 8px 0 12px;
    font-size: 0.74rem;
    color: var(--app-text-muted, #64748b);
}

.ecd-bc-link {
    color: var(--app-primary, #2563eb);
    text-decoration: none;
    font-weight: 700;
}

.ecd-bc-link:hover {
    text-decoration: underline;
}

.ecd-bc-sep {
    opacity: 0.5;
}

.ecd-bc-current {
    color: var(--app-text-secondary, #334155);
    font-weight: 800;
}

/* نوار بازگشت بالای صفحه */
.ecd-mobilebar {
    position: static;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.5rem;
    border-radius: 12px;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    box-shadow: 0 10px 24px -22px rgba(15, 23, 42, 0.7);
}

.ecd-mobilebar__back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.55rem;
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--app-primary, #2563eb);
    text-decoration: none;
    background: var(--app-primary-light, rgba(37, 99, 235, 0.1));
}

.ecd-mobilebar__code {
    margin-inline-start: auto;
    padding: 0.24rem 0.55rem;
    border-radius: 8px;
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--app-text-secondary, #334155);
    background: var(--app-bg, #f1f5f9);
    direction: ltr;
    unicode-bidi: isolate;
    overflow-wrap: anywhere;
}

.ecd-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 1.35rem 1.15rem;
    color: #fff;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    box-shadow: 0 22px 44px -32px rgba(15, 23, 42, 0.85);
}

.ecd-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
}

.ecd-badge {
    padding: 0.22rem 0.6rem;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 800;
}

.ecd-badge--brand {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

.ecd-badge--device {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.ecd-hero__code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(1.5rem, 7vw, 2.6rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1.25;
    margin-bottom: 0.4rem;
    direction: ltr;
    unicode-bidi: isolate;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ecd-hero__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.7;
    opacity: 0.94;
    margin: 0;
}

.ecd-hero__lead {
    font-size: 0.83rem;
    line-height: 1.95;
    margin: 0.5rem 0 0;
    opacity: 0.85;
}

.ecd-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.ecd-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.4rem 0.75rem;
    border-radius: 11px;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border-strong, rgba(15, 23, 42, 0.15));
    color: var(--app-text-secondary, #334155);
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ecd-action:hover,
.ecd-action.is-saved {
    color: var(--app-primary, #2563eb);
    border-color: rgba(37, 99, 235, 0.4);
    background: var(--app-primary-light, rgba(37, 99, 235, 0.08));
}

.ecd-action-toast {
    font-size: 0.72rem;
    font-weight: 800;
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 9px;
}

.ecd-action-link {
    margin-inline-start: auto;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--app-primary, #2563eb);
    text-decoration: none;
}

.ecd-action-link:hover {
    text-decoration: underline;
}

.ecd-image-section {
    margin-bottom: 1rem;
    border-radius: 14px;
    overflow: hidden;
    background: var(--app-bg, #f1f5f9);
    display: flex;
    justify-content: center;
}

.ecd-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.ecd-section {
    background: var(--app-surface, #fff);
    border-radius: 16px;
    padding: 0.95rem;
    margin-bottom: 0.8rem;
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    box-shadow: 0 12px 26px -26px rgba(15, 23, 42, 0.7);
}

.ecd-section__header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.6rem;
}

.ecd-section__icon {
    font-size: 1rem;
    color: var(--app-primary, #2563eb);
}

.ecd-section__title {
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--app-text, #0f172a);
    margin: 0;
}

.ecd-section__content {
    line-height: 1.95;
    color: var(--app-text-secondary, #334155);
    font-size: 0.84rem;
}

.ecd-solution-text {
    line-height: 1.95;
    color: var(--app-text, #0f172a);
    font-size: 0.85rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.07);
    border-inline-start: 4px solid #10b981;
}

.ecd-steps {
    margin: 0;
    padding: 2px 1.2rem 2px 0;
    line-height: 1.95;
}

.ecd-steps li {
    margin-bottom: 0.45rem;
    padding-inline-start: 2px;
}

.ecd-steps li:last-child {
    margin-bottom: 0;
}

.ecd-steps li::marker {
    color: #16a34a;
    font-weight: 900;
}

.ecd-safety-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    line-height: 1.9;
    color: var(--app-text-secondary, #334155);
    font-size: 0.82rem;
}

.ecd-safety-list li {
    position: relative;
    padding: 0.55rem 2rem 0.55rem 0.7rem;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.ecd-safety-list li::before {
    content: "\26A0";
    position: absolute;
    inset-inline-start: 0.65rem;
    top: 0.5rem;
    color: #d97706;
    font-size: 0.9rem;
}

.ecd-section--notes .ecd-section__content {
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: rgba(234, 179, 8, 0.08);
    border-inline-start: 4px solid #eab308;
}

.ecd-notes-source {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.ecd-source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.65rem;
    border-radius: 9px;
    background: var(--app-surface, #fff);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
}

.ecd-source-link:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.ecd-model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ecd-model-tag {
    padding: 0.3rem 0.65rem;
    border-radius: 9px;
    font-size: 0.72rem;
    background: var(--app-bg, #f1f5f9);
    color: var(--app-text-secondary, #334155);
    font-weight: 700;
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
}

.ecd-docs-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ecd-doc-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 11px;
    background: var(--app-bg, #f1f5f9);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    text-decoration: none;
    color: var(--app-text, #0f172a);
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 0.15s ease;
}

.ecd-doc-item:hover {
    background: var(--app-primary-light, rgba(37, 99, 235, 0.08));
    border-color: rgba(37, 99, 235, 0.3);
}

.ecd-doc-arrow {
    margin-inline-start: auto;
    color: var(--app-text-muted, #64748b);
    font-size: 0.68rem;
}

.ecd-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

.ecd-related-card {
    padding: 0.6rem 0.7rem;
    border-radius: 11px;
    background: var(--app-bg, #f1f5f9);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    text-decoration: none;
    transition: all 0.15s ease;
}

.ecd-related-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
}

.ecd-related-code {
    font-family: ui-monospace, monospace;
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--app-primary, #2563eb);
    margin-bottom: 0.15rem;
    direction: ltr;
    unicode-bidi: isolate;
    overflow-wrap: anywhere;
}

.ecd-related-desc {
    font-size: 0.7rem;
    color: var(--app-text-muted, #64748b);
    line-height: 1.7;
}

.ecd-related-all {
    display: inline-flex;
    margin-top: 0.6rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--app-primary, #2563eb);
    text-decoration: none;
}

.ecd-related-all:hover {
    text-decoration: underline;
}

.ecd-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.1rem;
}

.ecd-btn {
    flex: 1 1 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 46px;
    padding: 0.6rem 0.9rem;
    border-radius: 13px;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.ecd-btn--primary {
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    color: #fff;
    box-shadow: 0 14px 28px -18px rgba(79, 70, 229, 0.95);
}

.ecd-btn--secondary {
    background: var(--app-surface, #fff);
    color: var(--app-text-secondary, #334155);
    border-color: var(--app-border-strong, rgba(15, 23, 42, 0.15));
}

.ecd-btn--secondary:hover {
    color: var(--app-primary, #2563eb);
    border-color: rgba(37, 99, 235, 0.4);
}

.ecd-notfound {
    text-align: center;
    padding: 3rem 1rem;
}

.ecd-notfound span {
    font-size: 2.6rem;
    color: var(--app-text-muted, #64748b);
    display: block;
    margin-bottom: 0.7rem;
}

.ecd-notfound h2 {
    font-weight: 900;
    color: var(--app-text, #0f172a);
    font-size: 1.05rem;
}

.ecd-notfound p {
    color: var(--app-text-muted, #64748b);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.ecd-notfound .ecd-btn {
    display: inline-flex;
    flex: none;
}

.ecd-skeleton {
    border-radius: 12px;
    margin-bottom: 0.7rem;
    background: linear-gradient(90deg, var(--app-surface, #fff) 25%, var(--app-bg, #f1f5f9) 50%, var(--app-surface, #fff) 75%);
    background-size: 200% 100%;
    animation: ecd-shimmer 1.4s infinite;
}

.ecd-skeleton--h1 { height: 40px; width: 60%; }
.ecd-skeleton--h2 { height: 22px; width: 80%; }
.ecd-skeleton--block { height: 110px; }
.ecd-skeleton-wrap { padding: 0.5rem; }

@keyframes ecd-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.ecd-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.ecd-video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.ecd-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ecd-faq {
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    border-radius: 11px;
    background: var(--app-bg, #f1f5f9);
    overflow: hidden;
}

.ecd-faq[open] {
    background: var(--app-surface, #fff);
    border-color: rgba(37, 99, 235, 0.3);
}

.ecd-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.8rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--app-text, #0f172a);
}

.ecd-faq__question::-webkit-details-marker {
    display: none;
}

.ecd-faq__chevron {
    color: var(--app-text-muted, #64748b);
    font-size: 0.62rem;
    transition: transform 0.2s ease;
}

.ecd-faq[open] .ecd-faq__chevron {
    transform: rotate(180deg);
    color: var(--app-primary, #2563eb);
}

.ecd-faq__answer {
    padding: 0 0.8rem 0.7rem;
    color: var(--app-text-secondary, #334155);
    font-size: 0.78rem;
    line-height: 1.95;
    white-space: pre-line;
}

/* ==========================================================================
   پیشنهاد قطعهٔ یدکی (کد خطا و سنسور)
   ========================================================================== */
.sp-suggest {
    padding: 0.95rem;
    border-radius: 16px;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    box-shadow: 0 12px 26px -26px rgba(15, 23, 42, 0.7);
    margin-bottom: 0.8rem;
}

.sp-suggest__head {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.sp-suggest__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #10b981);
    box-shadow: 0 12px 22px -16px rgba(16, 185, 129, 0.9);
}

.sp-suggest__text {
    min-width: 0;
}

.sp-suggest__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--app-text, #0f172a);
}

.sp-suggest__sub {
    margin: 0.2rem 0 0;
    font-size: 0.7rem;
    line-height: 1.85;
    color: var(--app-text-muted, #64748b);
}

.sp-suggest__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

.sp-card {
    display: flex;
    gap: 0.6rem;
    padding: 0.55rem;
    border-radius: 13px;
    background: var(--app-bg, #f1f5f9);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    transition: border-color 0.15s ease, box-shadow 0.2s ease;
}

.sp-card:hover {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 12px 24px -22px rgba(15, 23, 42, 0.8);
}

.sp-card.is-out {
    opacity: 0.78;
}

.sp-card__media {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--app-surface, #fff);
    display: grid;
    place-items: center;
    color: var(--app-text-muted, #64748b);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
}

.sp-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sp-card__body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sp-card__reason {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.14rem 0.45rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 800;
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.24);
}

.sp-card__reason .oi {
    font-size: 0.55rem;
}

.sp-card__name {
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.6;
    color: var(--app-text, #0f172a);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-card__name:hover {
    color: var(--app-primary, #2563eb);
}

.sp-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.sp-card__now {
    font-size: 0.82rem;
    font-weight: 900;
    color: #0f766e;
}

.sp-card__now small {
    font-size: 0.62rem;
    font-weight: 700;
    opacity: 0.85;
}

.sp-card__old {
    font-size: 0.66rem;
    color: var(--app-text-muted, #64748b);
}

.sp-card__foot {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

.sp-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 34px;
    padding: 0.3rem 0.7rem;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #0f766e, #10b981);
    color: #fff;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.sp-card__btn:hover:not(:disabled) {
    opacity: 0.9;
}

.sp-card__btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.sp-card__out {
    padding: 0.28rem 0.6rem;
    border-radius: 9px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.24);
}

.sp-card__more {
    margin-inline-start: auto;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--app-primary, #2563eb);
    text-decoration: none;
}

.sp-card__more:hover {
    text-decoration: underline;
}

.sp-suggest__all {
    display: block;
    margin-top: 0.6rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--app-primary, #2563eb);
    text-decoration: none;
}

.sp-suggest__all:hover {
    text-decoration: underline;
}

/* ==========================================================================
   دسکتاپ
   ========================================================================== */
@media (min-width: 768px) {
    .ecb-container {
        width: min(1120px, calc(100% - 2.5rem));
    }

    .ecb-hero {
        grid-template-columns: 1.15fr 0.85fr;
        align-items: center;
        gap: 1.5rem;
        margin-top: 1.25rem;
        padding: 1.7rem 1.6rem;
        border-radius: 24px;
    }

    .ecb-hero h1 {
        font-size: 1.6rem;
    }

    .ecb-hero__lead {
        font-size: 0.85rem;
    }

    .ecb-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .ecb-filters {
        padding: 1.15rem 1.2rem 1.25rem;
        border-radius: 20px;
    }

    .ecb-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ecb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }

    .ecd-page {
        padding: 22px 20px 56px;
    }

    .ecd-hero {
        padding: 1.7rem 1.5rem;
    }

    .ecd-section {
        padding: 1.15rem 1.2rem;
    }

    .ecd-mobilebar {
        display: none;
    }

    .sp-suggest {
        padding: 1.15rem 1.2rem;
    }

    .sp-suggest__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .ecb-steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ecb-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ecb-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sp-suggest__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==========================================================================
   موبایل
   ========================================================================== */
@media (max-width: 767.98px) {
    /* جلوگیری از زوم خودکار iOS هنگام فوکوس روی فیلدها */
    .ecb-select,
    .ecb-hero__searchbox input {
        font-size: 16px;
    }

    .ecb-rail {
        display: flex;
        gap: 0.55rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin-inline: -0.75rem;
        padding: 0 0.75rem 0.35rem;
        scrollbar-width: none;
    }

    .ecb-rail::-webkit-scrollbar {
        display: none;
    }

    .ecb-rail > * {
        flex: 0 0 84%;
        scroll-snap-align: start;
    }
}

@media (max-width: 575.98px) {
    .ecb-hero__searchbox button {
        padding-inline: 0.75rem;
        font-size: 0.74rem;
    }

    .ecd-actions {
        gap: 0.35rem;
    }

    .ecd-action {
        flex: 1 1 auto;
        justify-content: center;
        padding-inline: 0.55rem;
    }

    .ecd-action-link {
        flex: 1 1 100%;
        margin-inline-start: 0;
        text-align: center;
    }
}

/* ==========================================================================
   دارک مود
   ========================================================================== */
[data-theme="dark"] .ecb-hero,
[data-theme="dark"] .ecd-hero {
    box-shadow: 0 26px 50px -34px rgba(0, 0, 0, 0.95);
}

[data-theme="dark"] .ecb-hero__searchbox input {
    background: rgba(255, 255, 255, 0.94);
}

[data-theme="dark"] .ecb-hero__searchbox button {
    background: #020617;
}

[data-theme="dark"] .ecb-step {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .ecb-step.is-filled {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(96, 165, 250, 0.32);
}

[data-theme="dark"] .ecb-select {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .ecb-select option {
    background: #1e293b;
    color: #e2e8f0;
}

[data-theme="dark"] .ecb-brandchip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
}

[data-theme="dark"] .ecb-brandchip.is-active {
    color: #fff;
}

[data-theme="dark"] .ecb-chip--brand {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(129, 140, 248, 0.35);
}

[data-theme="dark"] .ecb-chip--device {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(52, 211, 153, 0.32);
}

[data-theme="dark"] .ecb-chip--category {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(251, 191, 36, 0.32);
}

[data-theme="dark"] .ecb-chip--code {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .ecb-tag--brand {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .ecb-tag--device {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.18);
}

[data-theme="dark"] .ecb-tag--category {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.18);
}

[data-theme="dark"] .ecb-code {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .ecb-card__solution {
    color: #cbd5e1;
    background: rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .ecb-skel {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
}

[data-theme="dark"] .ecd-mobilebar {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .ecd-action {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
}

[data-theme="dark"] .ecd-action:hover,
[data-theme="dark"] .ecd-action.is-saved {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.4);
}

[data-theme="dark"] .ecd-safety-list li {
    color: #e2e8f0;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.32);
}

[data-theme="dark"] .ecd-source-link {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.32);
}

[data-theme="dark"] .ecd-faq {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .ecd-faq[open] {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(96, 165, 250, 0.32);
}

[data-theme="dark"] .ecd-related-card,
[data-theme="dark"] .ecd-doc-item,
[data-theme="dark"] .ecd-model-tag {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .ecd-btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
}

[data-theme="dark"] .ecd-skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
}

[data-theme="dark"] .sp-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .sp-card__media {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .sp-card__reason {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(52, 211, 153, 0.3);
}

[data-theme="dark"] .sp-card__now {
    color: #5eead4;
}

[data-theme="dark"] .sp-card__out {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(248, 113, 113, 0.3);
}

/* ==========================================================================
   جزئیات سنسور (سنسور یاب)
   ========================================================================== */
.sd-page {
    width: min(900px, calc(100% - 1.5rem));
    margin-inline: auto;
    padding: 0.9rem 0 2.5rem;
}

.sd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0;
    margin-bottom: 0.6rem;
    font-size: 0.76rem;
    line-height: 1.8;
    color: var(--app-text-muted, #94a3b8);
}

.sd-bc-link {
    color: var(--app-primary, #2563eb);
    text-decoration: none;
    font-weight: 700;
}

.sd-bc-link:hover {
    text-decoration: underline;
}

.sd-bc-sep {
    opacity: 0.5;
}

.sd-bc-current {
    color: var(--app-text-secondary, #334155);
    font-weight: 800;
}

/* ---------- هدر سبز (خوانا در موبایل) ---------- */
.sd-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 0.7rem;
    padding: 1.3rem 1.1rem 1.35rem;
    margin-bottom: 1rem;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(140deg, #065f46 0%, #047857 55%, #0f766e 100%);
    box-shadow: 0 20px 40px -30px rgba(6, 95, 70, 0.9);
}

.sd-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -80px;
    top: -100px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 65%);
    pointer-events: none;
}

.sd-hero__badge {
    position: relative;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.26rem 0.62rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.8;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    overflow-wrap: anywhere;
}

.sd-hero__title {
    position: relative;
    margin: 0;
    font-size: clamp(1.02rem, 4.3vw, 1.4rem);
    font-weight: 900;
    line-height: 1.95;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-wrap: pretty;
}

.sd-hero__meta {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sd-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    padding: 0.24rem 0.6rem;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.75;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    overflow-wrap: anywhere;
}

.sd-hero__chip-label {
    font-size: 0.62rem;
    font-weight: 800;
    opacity: 0.75;
}

/* ---------- بخش‌ها ---------- */
.sd-section {
    padding: 1.05rem 1rem;
    margin-bottom: 0.9rem;
    border-radius: 16px;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.sd-section__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.sd-section__icon {
    font-size: 1.05rem;
    color: #059669;
}

.sd-section__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--app-text, #1e293b);
}

.sd-specs {
    display: flex;
    flex-direction: column;
}

.sd-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--app-border, rgba(15, 23, 42, 0.08));
}

.sd-spec-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sd-spec-label {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--app-text-muted, #94a3b8);
}

.sd-spec-value {
    flex: 1 1 auto;
    text-align: end;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.8;
    color: var(--app-text, #1e293b);
    overflow-wrap: anywhere;
}

.sd-notes-text {
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.95;
    color: var(--app-text-secondary, #475569);
    background: rgba(234, 179, 8, 0.09);
    border-inline-end: 4px solid #eab308;
    overflow-wrap: anywhere;
}

.sd-guide-intro {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
    line-height: 2;
    color: var(--app-text-secondary, #334155);
}

.sd-subtitle {
    margin: 1.1rem 0 0.5rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--app-text, #1e293b);
}

.sd-list {
    margin: 0;
    padding-inline-start: 1.2rem;
    font-size: 0.86rem;
    line-height: 2;
    color: var(--app-text-secondary, #475569);
}

.sd-list li {
    margin-bottom: 0.35rem;
}

.sd-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sd-related-link {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--app-border, #e2e8f0);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.sd-related-link strong {
    display: block;
    font-size: 0.86rem;
    line-height: 1.8;
    color: var(--app-text, #1e293b);
    overflow-wrap: anywhere;
}

.sd-related-link small {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--app-text-muted, #64748b);
    overflow-wrap: anywhere;
}

.sd-related-link:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.sd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sd-chip {
    padding: 0.24rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--app-text-secondary, #475569);
    background: var(--app-bg, #f1f5f9);
    overflow-wrap: anywhere;
}

/* ---------- گالری ---------- */
.sd-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.6rem;
}

.sd-gallery__item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background: var(--app-bg, #f1f5f9);
    cursor: pointer;
    transition: transform 0.2s;
}

.sd-gallery__item:hover {
    transform: scale(1.03);
}

.sd-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- CTA ---------- */
.sd-cta {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.4rem;
}

.sd-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: box-shadow 0.2s, background 0.2s;
}

.sd-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #059669, #10b981);
}

.sd-btn--primary:hover {
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
}

.sd-btn--secondary {
    color: var(--app-text-secondary, #475569);
    background: var(--app-bg, #f1f5f9);
    border: 1px solid var(--app-border, #e2e8f0);
}

/* ---------- حالت‌های خالی و بارگذاری ---------- */
.sd-notfound {
    padding: 3rem 1.25rem;
    text-align: center;
}

.sd-notfound span {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 3rem;
    color: var(--app-text-muted, #cbd5e1);
}

.sd-notfound h2 {
    font-weight: 800;
    color: var(--app-text-secondary, #475569);
}

.sd-notfound p {
    margin-bottom: 1.25rem;
    color: var(--app-text-muted, #94a3b8);
}

.sd-skeleton-wrap {
    padding: 1rem 0;
}

.sd-skel {
    margin-bottom: 0.75rem;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--app-bg, #f1f5f9) 25%, var(--app-border, #e2e8f0) 50%, var(--app-bg, #f1f5f9) 75%);
    background-size: 200% 100%;
    animation: sd-shimmer 1.5s infinite;
}

.sd-skel--h1 { height: 40px; width: 55%; }
.sd-skel--h2 { height: 24px; width: 72%; }
.sd-skel--img { height: 200px; }
.sd-skel--block { height: 100px; }

@keyframes sd-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---------- مودال تصویر ---------- */
.sd-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.85);
}

.sd-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
}

.sd-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    object-fit: contain;
}

.sd-modal-close {
    position: absolute;
    top: -12px;
    inset-inline-end: -12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    color: #1e293b;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
    .sd-hero {
        padding: 1.1rem 0.95rem 1.2rem;
        border-radius: 18px;
    }

    .sd-hero__title {
        font-size: 1.02rem;
        line-height: 2;
    }

    .sd-section {
        padding: 0.95rem 0.85rem;
    }

    .sd-cta {
        flex-direction: column;
    }
}

@media (min-width: 768px) {
    .sd-page {
        padding: 1.4rem 0 3.5rem;
    }

    .sd-hero {
        padding: 1.8rem 1.7rem;
        gap: 0.8rem;
    }

    .sd-hero__title {
        font-size: 1.5rem;
        line-height: 1.85;
    }

    .sd-section {
        padding: 1.3rem 1.35rem;
        margin-bottom: 1rem;
    }
}

/* ==========================================================================
   چاپ و کاهش حرکت
   ========================================================================== */
@media print {
    .ecd-mobilebar,
    .ecd-actions,
    .ecd-cta,
    .sp-suggest {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ecb-feat,
    .ecb-card,
    .ecb-skel,
    .ecd-skeleton,
    .sp-card,
    .ecd-action,
    .ecd-faq__chevron {
        transition: none !important;
        animation: none !important;
    }
}
