/* زيد للتاج الصناعي - إضافات تنسيقية للنسخة المتكاملة */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

html { -webkit-text-size-adjust: 100%; }

/* إخفاء أسهم حقول الأرقام في السلة */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

#cart-items { overscroll-behavior: contain; }

/* حركة ظهور الرسالة السريعة */
#cart-toast { transition: opacity .3s ease; }

/* القائمة الجانبية وسلة المشتريات: في صفحات fr/en اللوحة ملتصقة بـ left-0،
   فيجب أن يكون اختفاؤها نحو اليسار (سالب) لا نحو اليمين (موجب) كما في الصفحات
   العربية (right-0). بدون هذا التصحيح تنزلق اللوحة إلى وسط الشاشة بدل الاختفاء. */
html[dir="ltr"] #mobile-drawer.translate-x-full,
html[dir="ltr"] #cart-drawer.translate-x-full {
  --tw-translate-x: -100%;
}

/* ظهور سلس لتفاصيل الموديل عند فتحها */
@keyframes zaidFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.js-details:not(.hidden) { animation: zaidFadeIn .2s ease-out; }

/* أزرار فرز الموديلات: مؤشر يد واضح */
[data-model-filters] button { cursor: pointer; }

/* 2026 interface refinement: textile-inspired, clearer and more conversion-focused. */
:root { --zaid-ink: #0b2545; --zaid-canvas: #fff8f3; --zaid-thread: #d5a84b; --zaid-line: rgba(11,37,69,.10); }
html { scroll-behavior: smooth; }
body { background: var(--zaid-canvas); }
:focus-visible { outline: 3px solid rgba(213,168,75,.9); outline-offset: 3px; }
header { border-bottom: 1px solid var(--zaid-line); }
main > div > section { scroll-margin-top: 5.5rem; }
main img { transition: transform .35s cubic-bezier(.23,1,.32,1), filter .35s ease; }
main article:hover img { transform: scale(1.025); filter: saturate(1.04); }
button, a { -webkit-tap-highlight-color: transparent; }
button:active, a:active { transform: scale(.985); }

.zaid-process-section { width: 100%; padding: 2.25rem 1rem; background: linear-gradient(135deg, #f5ece3 0%, #fff8f3 52%, #f0e7dc 100%); border-top: 1px solid var(--zaid-line); border-bottom: 1px solid var(--zaid-line); }
.zaid-section-inner { width: 100%; max-width: 72rem; margin: 0 auto; }
.zaid-section-kicker { display: inline-flex; align-items: center; gap: .4rem; color: #856c10; font-size: .78rem; font-weight: 800; margin-bottom: .5rem; }
.zaid-section-kicker .material-symbols-outlined { font-size: 1.1rem; }
.zaid-process-section h2 { color: var(--zaid-ink); font-family: Noto Serif, serif; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.35; margin: 0; }
.zaid-section-lead { color: #5d6673; max-width: 42rem; margin: .55rem 0 1.15rem; line-height: 1.75; font-size: .95rem; }
.zaid-process-grid { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.zaid-process-card { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; background: rgba(255,255,255,.82); border: 1px solid var(--zaid-line); border-radius: 1rem; box-shadow: 0 8px 24px rgba(11,37,69,.06); }
.zaid-process-card > .material-symbols-outlined { flex: 0 0 auto; color: #856c10; background: #f9df6c; border-radius: .75rem; padding: .55rem; font-size: 1.35rem; }
.zaid-process-card strong { display: block; color: var(--zaid-ink); font-size: .95rem; margin: .1rem 0 .25rem; }
.zaid-process-card p { color: #68717d; font-size: .8rem; line-height: 1.6; margin: 0; }
.zaid-inline-cta { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; margin-top: 1.1rem; min-height: 2.9rem; padding: .7rem 1rem; color: white; background: var(--zaid-ink); border-radius: .75rem; font-weight: 800; box-shadow: 0 8px 18px rgba(11,37,69,.15); }
.zaid-inline-cta:hover { background: #153b68; }

/* Make the floating WhatsApp action more discoverable without covering content. */
a[aria-label="تواصل عبر واتساب"] { box-shadow: 0 10px 24px rgba(37,211,102,.28); }
@media (min-width: 640px) { .zaid-process-grid { grid-template-columns: repeat(3, 1fr); } .zaid-process-section { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }


/* Modern UI layer: restrained motion, depth and responsive polish. */
body { opacity: 1; transition: opacity .16s ease; }
body.is-leaving { opacity: 0; }
header { transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease, transform .25s ease; }
header.is-scrolled { background: rgba(255,248,243,.82) !important; box-shadow: 0 10px 30px rgba(11,37,69,.10) !important; border-color: rgba(11,37,69,.16); }
.hero-section { isolation: isolate; background-image: radial-gradient(circle at 8% 20%, rgba(249,223,108,.18), transparent 30%), radial-gradient(circle at 92% 86%, rgba(255,255,255,.12), transparent 28%); }
.hero-section::after { content: ''; position: absolute; inset: auto -12% -44% auto; width: 22rem; height: 22rem; border: 1px solid rgba(249,223,108,.18); border-radius: 50%; box-shadow: 0 0 0 1.5rem rgba(249,223,108,.04), 0 0 0 3rem rgba(249,223,108,.025); pointer-events: none; }
.hero-section > div { animation: heroEnter .65s cubic-bezier(.23,1,.32,1) both; }
@keyframes heroEnter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.ui-reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s cubic-bezier(.23,1,.32,1) var(--reveal-delay, 0ms), transform .55s cubic-bezier(.23,1,.32,1) var(--reveal-delay, 0ms); }
.ui-reveal.is-visible { opacity: 1; transform: translateY(0); }
main article { transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .35s cubic-bezier(.23,1,.32,1), box-shadow .35s ease, border-color .35s ease; border: 1px solid transparent; }
main article:hover { box-shadow: 0 18px 42px rgba(11,37,69,.12); border-color: rgba(213,168,75,.28); }
main article button, main article a, .zaid-inline-cta, header a, nav a { transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s cubic-bezier(.23,1,.32,1); }
main article button:hover, .zaid-inline-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(11,37,69,.15); }
main article img { will-change: transform; }
main section:not(.hero-section) h2 { text-wrap: balance; }
input, select, textarea { border: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
input:focus, select:focus, textarea:focus { border-color: rgba(213,168,75,.9) !important; box-shadow: 0 0 0 4px rgba(213,168,75,.16); }
#cart-drawer, #mobile-drawer { transition-duration: .28s; transition-timing-function: cubic-bezier(.23,1,.32,1); }
@media (max-width: 639px) {
  .hero-section { border-radius: 0 0 1.25rem 1.25rem; }
  .hero-section h1 { text-wrap: balance; }
  .zaid-process-card { border-radius: .9rem; }
  main article:hover { transform: none; box-shadow: 0 10px 26px rgba(11,37,69,.09); }
}
@media (prefers-reduced-motion: reduce) {
  body, header, main article, .ui-reveal, .hero-section > div { animation: none !important; transition: none !important; }
}


/* Desktop refinement for catalogue and quote flow. */
@media (min-width: 1024px) {
  .page-models main > div { max-width: 78rem; margin-inline: auto; padding-inline: 2rem; gap: 2.25rem; }
  .page-models main > div > section:first-child { padding: 2.3rem 2.4rem 1.8rem; border-radius: 1.35rem; background: linear-gradient(120deg, #f5ece3, #fff8f3 58%, #f8f0e7); border: 1px solid rgba(11,37,69,.08); box-shadow: 0 14px 40px rgba(11,37,69,.06); }
  .page-models main > div > section:first-child h1 { max-width: 35rem; font-size: 2.7rem; line-height: 1.2; }
  .page-models main > div > section:first-child > p { max-width: 43rem; font-size: 1rem; }
  .page-models [data-model-filters] { position: sticky; top: 5.2rem; z-index: 20; padding: .45rem; background: rgba(255,248,243,.86); backdrop-filter: blur(14px); border: 1px solid rgba(11,37,69,.08); border-radius: .9rem; box-shadow: 0 8px 22px rgba(11,37,69,.08); }
  .page-models [data-model-filters] button { min-height: 2.5rem; padding-inline: 1rem; border-radius: .7rem; }
  .page-models main > div > .grid { gap: 1.25rem; }
  .page-models [data-model-card] { border-radius: 1.1rem; background: rgba(255,255,255,.9); box-shadow: 0 10px 28px rgba(11,37,69,.07); }
  .page-models [data-model-card] > div:first-child { aspect-ratio: 5 / 4; }
  .page-models [data-model-card] > div:first-child img { transition: transform .5s cubic-bezier(.23,1,.32,1); }
  .page-models [data-model-card]:hover > div:first-child img { transform: scale(1.045); }
  .page-models [data-model-card] h2 { font-size: 1.35rem; line-height: 1.45; }
  .page-models [data-model-card] .js-details { border-top: 1px solid rgba(11,37,69,.08); padding-top: 1rem; }
  .page-models [data-model-card] [data-add] { min-height: 3.1rem; font-size: .95rem; }
  .page-models main > div > section:nth-last-of-type(2) { max-width: 66rem; margin-inline: auto; border-radius: 1.25rem; }
  .page-models footer { border-radius: 1.25rem 1.25rem 0 0; }

  .page-order main > div { max-width: 78rem; margin-inline: auto; padding-inline: 2rem; gap: 1.5rem; }
  .page-order main > div > form { max-width: none; display: grid; grid-template-columns: minmax(18rem, .82fr) minmax(30rem, 1.18fr); align-items: start; gap: 1.25rem 2rem; padding: 2rem; border: 1px solid rgba(11,37,69,.09); border-radius: 1.35rem; box-shadow: 0 18px 48px rgba(11,37,69,.09); background: rgba(255,255,255,.88); }
  .page-order #cart-summary { grid-column: 1; grid-row: 1 / span 20; position: sticky; top: 5.4rem; background: linear-gradient(150deg, #f5ece3, #fff8f3); border: 1px solid rgba(213,168,75,.28); box-shadow: 0 12px 30px rgba(11,37,69,.07); padding: 1.25rem; }
  .page-order #quote-form > :not(#cart-summary) { grid-column: 2; }
  .page-order #quote-form > div:nth-child(2) { padding-bottom: .8rem; border-bottom: 1px solid rgba(11,37,69,.1); }
  .page-order #quote-form > div:nth-child(n+3) { padding: .4rem 0; }
  .page-order #quote-form input, .page-order #quote-form select, .page-order #quote-form textarea { min-height: 3.1rem; border-radius: .8rem; }
  .page-order #quote-form textarea { min-height: 7.5rem; }
  .page-order #quote-form button[type="submit"] { min-height: 3.35rem; font-size: 1rem; box-shadow: 0 10px 20px rgba(11,37,69,.14); }
  .page-order main > div > div:first-child { padding: 1.5rem 2rem; border-radius: 1.15rem; background: var(--zaid-ink); box-shadow: 0 14px 32px rgba(11,37,69,.16); }
  .page-order main > div > div:first-child h2 { font-size: 1.85rem; }
  .page-order footer { border-radius: 1.25rem 1.25rem 0 0; }
}
@media (min-width: 1280px) {
  .page-models main > div, .page-order main > div { padding-inline: 0; }
  .page-models main > div > .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-order main > div > form { grid-template-columns: minmax(22rem, .9fr) minmax(38rem, 1.1fr); }
}


/* Fix: keep the desktop order summary aligned as a stable sidebar. */
@media (min-width: 1024px) {
  .page-order #quote-form { align-items: start; overflow: visible; }
  .page-order #cart-summary {
    grid-row: 1 / -1;
    align-self: start;
    height: max-content;
    max-height: calc(100vh - 7.25rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    position: -webkit-sticky;
    position: sticky;
    top: 5.75rem;
    z-index: 5;
  }
}


/* Gallery and logo upload polish. */
.zaid-gallery { width: 100%; padding: 2.25rem 1rem; background: #0b2545; color: white; }
.zaid-gallery h2 { color: white; font-family: Noto Serif, serif; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.35; margin: 0; }
.zaid-gallery .zaid-section-lead { color: #c7d1df; }
.zaid-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-top: 1rem; }
.zaid-gallery-item { position: relative; min-height: 10rem; overflow: hidden; padding: 0; border: 1px solid rgba(255,255,255,.15); border-radius: 1rem; background: #102f55; cursor: zoom-in; text-align: right; }
.zaid-gallery-item img { width: 100%; height: 100%; min-height: 10rem; object-fit: cover; opacity: .88; transition: transform .45s cubic-bezier(.23,1,.32,1), opacity .3s ease; }
.zaid-gallery-item:hover img { transform: scale(1.06); opacity: 1; }
.zaid-gallery-item span { position: absolute; right: .65rem; bottom: .55rem; padding: .3rem .55rem; border-radius: .55rem; background: rgba(11,37,69,.78); color: white; font-size: .72rem; font-weight: 800; }
.zaid-gallery-wide { grid-column: span 2; }
.zaid-lightbox { width: min(92vw, 900px); max-width: 900px; padding: .65rem; border: 0; border-radius: 1rem; background: #0b2545; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.zaid-lightbox::backdrop { background: rgba(4,13,26,.78); backdrop-filter: blur(5px); }
.zaid-lightbox img { display: block; max-height: 82vh; width: 100%; object-fit: contain; border-radius: .65rem; }
.zaid-lightbox-close { position: absolute; top: .7rem; left: .7rem; z-index: 2; width: 2.4rem; height: 2.4rem; border-radius: 50%; color: white; background: rgba(11,37,69,.78); font-size: 1.6rem; line-height: 1; }
.zaid-upload-preview { display: flex; align-items: center; gap: .65rem; margin-top: .65rem; padding: .55rem; border: 1px dashed rgba(11,37,69,.2); border-radius: .75rem; background: rgba(255,255,255,.72); color: #0b2545; font-size: .78rem; }
.zaid-upload-preview img { width: 3.25rem; height: 3.25rem; object-fit: cover; border-radius: .5rem; }
@media (min-width: 1024px) { .zaid-gallery { padding: 2.5rem 2rem; border-radius: 1.25rem; } .zaid-gallery-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 1rem; } .zaid-gallery-wide { grid-column: span 1; grid-row: span 2; } .zaid-gallery-item, .zaid-gallery-item img { min-height: 12rem; } }
@media (max-width: 639px) { .zaid-upload-preview { font-size: .72rem; } }


/* Final desktop cart fix: the summary occupies only its own grid row. */
@media (min-width: 1024px) {
  .page-order #quote-form {
    display: grid;
    grid-template-columns: minmax(18rem, .82fr) minmax(30rem, 1.18fr);
    align-items: start;
    overflow: visible;
  }
  .page-order #quote-form > #cart-summary {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 5.75rem !important;
    height: max-content !important;
    max-height: calc(100vh - 7.25rem) !important;
    overflow-y: auto;
  }
  .page-order #quote-form > :not(#cart-summary) {
    grid-column: 2 !important;
  }
}
@media (min-width: 1280px) {
  .page-order #quote-form {
    grid-template-columns: minmax(22rem, .9fr) minmax(38rem, 1.1fr);
  }
}


/* Override: keep the order summary in place; it must not follow page scrolling. */
@media (min-width: 1024px) {
  .page-order #quote-form > #cart-summary {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
    align-self: start !important;
  }
}


/* Structural fix: separate the order summary from the form fields. */
@media (min-width: 1024px) {
  .page-order #quote-form {
    display: grid !important;
    grid-template-columns: minmax(18rem, .82fr) minmax(30rem, 1.18fr) !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
    column-gap: 2rem !important;
    row-gap: 0 !important;
  }
  .page-order #quote-form > #cart-summary {
    grid-column: 1 !important;
    grid-row: 1 !important;
    position: static !important;
    height: max-content !important;
    max-height: none !important;
    overflow: visible !important;
    align-self: start !important;
  }
  .page-order #quote-form > .order-form-fields {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    min-width: 0 !important;
  }
  .page-order #quote-form > .order-form-fields > * {
    grid-column: auto !important;
    width: 100% !important;
  }
  .page-order #quote-form > .order-form-fields > div:nth-child(1) {
    padding-bottom: .8rem;
    border-bottom: 1px solid rgba(11,37,69,.1);
  }
  .page-order #quote-form > .order-form-fields > div:nth-child(n+2) {
    padding: 0 !important;
  }
}
@media (min-width: 1280px) {
  .page-order #quote-form { grid-template-columns: minmax(22rem, .9fr) minmax(38rem, 1.1fr) !important; }
}


/* Visual correction: remove the legacy narrow container from the desktop order page. */
@media (min-width: 1024px) {
  .page-order main > div {
    width: min(100% - 4rem, 78rem) !important;
    max-width: 78rem !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }
  .page-order main > div > div:first-child {
    width: 100% !important;
    max-width: none !important;
  }
  .page-order main > div > form#quote-form {
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 2rem !important;
    padding: 2rem !important;
    overflow: visible !important;
  }
  .page-order #quote-form > #cart-summary {
    order: 1 !important;
    flex: 0 0 min(31%, 22rem) !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .page-order #quote-form > .order-form-fields {
    order: 2 !important;
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }
  .page-order #quote-form > .order-form-fields > * {
    width: 100% !important;
    min-width: 0 !important;
    grid-column: auto !important;
  }
  .page-order #quote-form > .order-form-fields > div:nth-child(1) {
    padding-bottom: .8rem !important;
    border-bottom: 1px solid rgba(11,37,69,.1) !important;
  }
}
@media (min-width: 1280px) {
  .page-order #quote-form > #cart-summary { flex-basis: 23rem !important; }
}
@media (max-width: 1023px) {
  .page-order #quote-form > .order-form-fields { display: flex; flex-direction: column; gap: 1rem; }
}


/* Cart summary product previews. */
.cart-summary-item { min-height: 4.75rem; border: 1px solid rgba(11,37,69,.07); }
.cart-summary-image { border: 1px solid rgba(11,37,69,.08); }
@media (min-width: 1024px) { .cart-summary-item { align-items: flex-start; } .cart-summary-image { width: 4.25rem; height: 4.25rem; } }

.gallery-disclaimer { display:flex; align-items:center; gap:.4rem; margin:1rem 0 0; color:#c7d1df; font-size:.76rem; line-height:1.7; }
.gallery-disclaimer .material-symbols-outlined { font-size:1rem; color:#f9df6c; }


/* Gallery random suggestions action. */
.zaid-random-gallery { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.7rem; margin: .25rem 0 .25rem; padding: .6rem .9rem; border: 1px solid rgba(249,223,108,.45); border-radius: .7rem; color: #fff; background: rgba(255,255,255,.10); font-size: .8rem; font-weight: 800; transition: background-color .2s ease, transform .2s ease; }
.zaid-random-gallery:hover { background: rgba(249,223,108,.2); transform: translateY(-1px); }
.zaid-random-gallery .material-symbols-outlined { color: #f9df6c; font-size: 1.1rem; }
.gallery-shuffled .zaid-gallery-item { animation: galleryShuffle .38s cubic-bezier(.23,1,.32,1) var(--random-delay, 0ms) both; }
@keyframes galleryShuffle { from { opacity: .35; transform: scale(.97) translateY(5px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@media (prefers-reduced-motion: reduce) { .gallery-shuffled .zaid-gallery-item { animation: none; } }

.cloudinary-upload-box { min-height: 7rem; border: 1px dashed rgba(42,38,32,.28); border-radius: .75rem; background: var(--surface-container-low, #f7f0e7); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.3rem; padding:1rem; text-align:center; cursor:pointer; transition:background-color .2s ease, border-color .2s ease, transform .2s ease; }
.cloudinary-upload-box:hover { background: var(--surface-container, #efe5d8); border-color: rgba(42,38,32,.5); transform: translateY(-1px); }
.cloudinary-upload-box small { color: var(--on-surface-variant, #736d65); font-size:.72rem; }
