/* ═══ اختيار عملة العرض — بهوية الموقع ═══
   الزر كبسولة كمبدّل اللغة بجواره، والقائمة كقوائم الهيدر
   (بطاقة بيضاء، إطار ذهبى خفيف، خيار نشط بالتدرّج الذهبى). */
.fx-switch { position: relative; display: inline-flex; }

.fx-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid rgba(212, 160, 23, .45);
    border-radius: 999px;
    background: rgba(255, 255, 255, .6);
    color: #7a6a3a;
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .4px;
    line-height: 1;
    direction: ltr;
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s;
}
.fx-toggle:hover,
.fx-switch.is-open .fx-toggle {
    background: linear-gradient(135deg, #f5c63a 0%, #d4a017 100%);
    border-color: transparent;
    color: #2b2308;
}
.fx-toggle:focus-visible { outline: 2px solid #d4a017; outline-offset: 2px; }
.fx-toggle i { font-size: .62rem; transition: transform .2s; }
.fx-switch.is-open .fx-toggle i { transform: rotate(180deg); }

.fx-menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 1060;
    min-width: 230px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(212, 160, 23, .18);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(10, 10, 10, .14);
    animation: fx-in .16s ease-out;
}
.fx-menu[hidden] { display: none; }
@keyframes fx-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.fx-menu__head {
    padding: 4px 10px 8px;
    font-size: .74rem;
    font-weight: 700;
    color: #a9780a;
    border-bottom: 1px solid rgba(212, 160, 23, .18);
    margin-bottom: 6px;
}
.fx-menu__note {
    padding: 8px 10px 2px;
    margin-top: 6px;
    border-top: 1px solid rgba(212, 160, 23, .18);
    font-size: .72rem;
    color: #8a7d55;
}

.fx-option {
    display: grid;
    grid-template-columns: 3.1rem 1fr auto 1rem;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: .88rem;
    color: #1a1a1a;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.fx-option b { font-weight: 800; letter-spacing: .4px; color: #4a3f1e; }
.fx-option span { font-weight: 600; }
.fx-option em { font-style: normal; color: #a9780a; font-weight: 700; }
.fx-option i { color: #a9780a; visibility: hidden; font-size: .8rem; }
.fx-option:hover,
.fx-option:focus {
    outline: none;
    background: linear-gradient(135deg, rgba(212, 160, 23, .12), rgba(240, 199, 94, .06));
    color: #a9780a;
}
.fx-option[aria-selected="true"] {
    background: linear-gradient(135deg, rgba(245, 198, 58, .28), rgba(212, 160, 23, .16));
}
.fx-option[aria-selected="true"] i { visibility: visible; }

/* القائمة الجانبية للهاتف والتابلت (navbar-expand-lg): أزرار الهيدر
   مكدّسة رأسيًّا، فالقائمة الطافية كانت تقع تحت مبدّل اللغة وأيقونات
   التواصل. هنا تنفتح فى مكانها وتدفع ما تحتها. */
@media (max-width: 991.98px) {
    .fx-switch { flex-direction: column; align-items: stretch; width: 100%; }
    .fx-toggle { align-self: flex-start; padding: 9px 16px; font-size: .85rem; }
    .fx-menu {
        position: static;
        width: 100%;
        min-width: 0;
        margin-top: 10px;
        box-shadow: none;
        border-color: rgba(212, 160, 23, .3);
    }
    .fx-option { padding: 12px 10px; font-size: .95rem; } /* هدف لمسٍ أكبر */
}

/* «يبدأ من» قبل سعر الخط الرئيسى */
.fx-prefix { font-weight: 500; opacity: .8; font-size: .85em; }

/* ═══ عرض سعر خط الإنتاج من الـERP ═══ */
.line-offer {
    background: #fff;
    border: 1px solid rgba(212, 160, 23, .28);
    border-radius: 20px;
    padding: clamp(18px, 3vw, 32px);
    box-shadow: 0 12px 30px rgba(43, 35, 8, .06);
}

.line-offer__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 24px;
    margin-bottom: 18px;
}

.line-offer__head h2 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }

.line-offer__price {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: #a9780a;
}

.line-offer__meta { color: #7a6a3a; font-size: .9rem; margin: 0 0 18px; }

.line-offer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 24px;
}

@media (max-width: 860px) { .line-offer__grid { grid-template-columns: 1fr; } }

.line-offer h3 { font-size: 1.05rem; margin: 0 0 10px; }

.line-offer__items {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2 16rem;
    column-gap: 24px;
}

.line-offer__items li {
    break-inside: avoid;
    display: flex;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(212, 160, 23, .25);
    font-size: .93rem;
}

.line-offer__qty {
    flex: 0 0 auto;
    min-width: 2.4em;
    font-weight: 700;
    color: #a9780a;
    direction: ltr;
}

.line-offer__files { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.line-offer__files a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(212, 160, 23, .35);
    border-radius: 12px;
    color: #4a3f1e;
    text-decoration: none;
    font-weight: 600;
    overflow-wrap: anywhere;
    transition: background .18s;
}

.line-offer__files a:hover { background: rgba(212, 160, 23, .1); }
.line-offer__files i { color: #a9780a; font-size: 1.2rem; }

.line-offer__note { margin: 18px 0 0; color: #7a6a3a; font-size: .85rem; }

/* سعر صغير فى كروت الخطوط والأنواع */
.card-price {
    display: block;
    margin: 6px 0 4px;
    font-weight: 800;
    color: #a9780a;
}

/* ═══ الرسمة الهندسية — معروضة داخل الصفحة ═══ */
.line-drawings { margin-top: 26px; }
.line-drawings h3 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.line-drawings h3 i { color: #a9780a; }

.drawing-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.drawing-tab {
    border: 1px solid rgba(212, 160, 23, .45);
    background: #fff;
    color: #4a3f1e;
    border-radius: 999px;
    padding: 7px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.drawing-tab.is-active { background: linear-gradient(135deg, #f5c63a 0%, #d4a017 100%); color: #2b2308; border-color: transparent; }

.drawing-doc {
    border: 1px solid rgba(212, 160, 23, .3);
    border-radius: 16px;
    overflow: hidden;
    background: #faf7ef;
}
.drawing-doc:fullscreen { overflow: auto; border-radius: 0; background: #faf7ef; }

.drawing-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid rgba(212, 160, 23, .25);
    position: sticky;
    top: 0;
    z-index: 1;
}
.drawing-name { flex: 1; font-weight: 600; font-size: .92rem; color: #4a3f1e; overflow-wrap: anywhere; }
.drawing-toolbar button {
    width: 36px; height: 36px;
    border: 1px solid rgba(212, 160, 23, .4);
    border-radius: 10px;
    background: #fff;
    color: #a9780a;
    cursor: pointer;
}
.drawing-toolbar button:hover { background: rgba(212, 160, 23, .12); }

.drawing-viewer {
    max-height: 80vh;
    overflow: auto;
    padding: 12px;
    direction: ltr; /* الرسمة لا تنعكس فى صفحة عربية */
}
.drawing-doc:fullscreen .drawing-viewer { max-height: none; }
.drawing-pages { display: grid; gap: 12px; justify-items: center; }
.drawing-pages canvas,
.drawing-viewer img {
    display: block;
    max-width: none;
    background: #fff;
    box-shadow: 0 4px 16px rgba(43, 35, 8, .1);
    border-radius: 6px;
}
.drawing-viewer img { width: 100%; height: auto; margin: 0 auto; }
.drawing-loading { padding: 40px 12px; text-align: center; color: #7a6a3a; }
.drawing-toolbar button b { font-size: 1.25rem; line-height: 1; }
