/* Scoped presentation: all existing archive swatches and product pages remain intact. */
.nmq-trigger {
  position: relative !important; z-index: 20 !important; isolation: isolate;
  display: flex !important; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 46px; margin: 14px 0 0 !important; padding: 10px 12px;
  border: 1px solid #171717; border-radius: 9px; background: #171717;
  color: #fff !important; font-size: 14px; font-weight: 700; line-height: 1.5;
  text-align: center; text-decoration: none !important; letter-spacing: 0;
  box-sizing: border-box; cursor: pointer; touch-action: manipulation;
  transition: background .18s, transform .18s;
}
.nmq-trigger:hover { background: #333; transform: translateY(-1px); }
.nmq-trigger:focus-visible { outline: 3px solid #be905b; outline-offset: 3px; }
.nmq-card .quick-view { display: none !important; }
.nmq-open { overflow: hidden !important; }
#nmq-modal, #nmq-modal * { box-sizing: border-box; }
#nmq-modal [hidden], #nmq-modal[hidden] { display: none !important; }
#nmq-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 28px; color: #191919; text-align: right; }
#nmq-modal .nmq-backdrop { position: absolute; inset: 0; background: rgba(15,18,19,.65); backdrop-filter: blur(4px); }
#nmq-modal .nmq-panel { position: relative; width: min(1040px,100%); max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 28px 90px #0004; display: flex; flex-direction: column; animation: nmq-in .2s ease-out; }
#nmq-modal button, #nmq-modal input, #nmq-modal select { font-family: inherit; letter-spacing: 0; }
#nmq-modal button { cursor: pointer; touch-action: manipulation; }
#nmq-modal .nmq-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; padding: 12px 24px; border-bottom: 1px solid #ededeb; min-height: 62px; background: #fff; }
#nmq-modal #nmq-heading { font-size: 19px; font-weight: 800; }
#nmq-modal #nmq-heading span { font-size: 12px; font-weight: 400; color: #777; margin-inline-start: 8px; }
#nmq-modal .nmq-close { margin: 0; padding: 0; border: 0; border-radius: 50%; background: #f3f3f1; color: #222; width: 40px; height: 40px; min-height: 40px; line-height: 1; font-size: 28px; flex-shrink: 0; }
#nmq-modal .nmq-purchase-bar { display: none; }
#nmq-modal [aria-busy="true"] .nmq-cart-form { pointer-events: none; }
#nmq-modal .nmq-content { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#nmq-modal .nmq-product { display: grid; grid-template-columns: 1.08fr 1fr; direction: ltr; }
#nmq-modal .nmq-product > * { direction: rtl; min-width: 0; }
#nmq-modal .nmq-media { background: #f6f5f2; padding: 18px; align-self: start; }
#nmq-modal .nmq-gallery { display: flex; direction: rtl; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 12px; }
#nmq-modal .nmq-gallery::-webkit-scrollbar { display: none; }
#nmq-modal .nmq-slide { all: unset; display: flex; align-items: center; justify-content: center; box-sizing: border-box; flex: 0 0 100%; min-width: 100%; aspect-ratio: 4/5; overflow: hidden; scroll-snap-align: start; cursor: zoom-in; }
#nmq-modal .nmq-slide img { display: block; width: 100%; height: 100%; object-fit: contain; max-height: 65vh; }
#nmq-modal .nmq-gallery-nav { display: flex; justify-content: center; align-items: center; gap: 24px; margin: 12px 0 0; }
#nmq-modal .nmq-gallery-nav button { width: 40px; min-height: 40px; padding: 0; margin: 0; background: #fff; border: 1px solid #e5e3dd; border-radius: 50%; color: #222; line-height: 1; font-size: 20px; }
#nmq-modal .nmq-counter { font-size: 12px; direction: ltr; font-variant-numeric: tabular-nums; }
#nmq-modal .nmq-image-hint { margin: 10px 0 0; text-align: center; color: #70706b; font-size: 11px; }
#nmq-modal .nmq-info { padding: 28px; }
#nmq-modal .nmq-brand { font-size: 13px; font-weight: 600; color: #8a6642; margin-bottom: 7px; }
#nmq-modal #nmq-product-title { font-size: 23px; line-height: 1.5; margin: 0 0 12px; color: #181818; }
#nmq-modal .nmq-price { font-size: 23px; font-weight: 800; margin-bottom: 24px; }
#nmq-modal .nmq-price del { font-size: 15px; font-weight: 400; color: #858585; margin-inline-end: 10px; }
#nmq-modal .nmq-price ins { background: none; text-decoration: none; }
#nmq-modal .nmq-price .amount { color: inherit; }
#nmq-modal .nmq-cart-form form { margin: 0; }
#nmq-modal table.variations { border: 0; margin: 0 0 20px; }
#nmq-modal table.variations tr { display: block; margin-bottom: 16px; }
#nmq-modal table.variations th, #nmq-modal table.variations td { display: block; border: 0; padding: 0; width: 100%; text-align: right; }
#nmq-modal table.variations label { display: block; color: #252525; font-size: 14px; font-weight: 700; padding-bottom: 9px; }
#nmq-modal .sp-smart-hidden-select { display: block !important; }
#nmq-modal .nmq-native-select { display: none !important; }
#nmq-modal .sp-smart-swatches-container, #nmq-modal .ux-swatches { display: none !important; }
#nmq-modal .nmq-options { display: flex; flex-wrap: wrap; gap: 8px; }
#nmq-modal .nmq-option { margin: 0; min-height: 45px; padding: 10px 14px; font-size: 13px; font-weight: 500; line-height: 1.4; border: 1px solid #dcdcd8; border-radius: 8px; background: #fff; color: #333; box-shadow: none; text-transform: none; }
#nmq-modal .nmq-option[aria-pressed="true"] { background: #191919; color: #fff; border-color: #191919; }
#nmq-modal .nmq-option:disabled { opacity: .38; text-decoration: line-through; cursor: not-allowed; }
#nmq-modal .reset_variations { position: static !important; float: none !important; font-size: 12px; display: inline-block; margin: 9px 0 0; }
#nmq-modal .woocommerce-variation-price { display: none; }
#nmq-modal .woocommerce-variation-availability { font-size: 13px; }
#nmq-modal .woocommerce-variation-add-to-cart, #nmq-modal form.cart:not(.variations_form) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0; }
#nmq-modal .quantity { display: inline-flex; flex-shrink: 0; margin: 0 !important; }
#nmq-modal .quantity input { height: 48px; margin: 0; border: 1px solid #dededb; border-radius: 0; box-shadow: none; }
#nmq-modal .quantity .qty { width: 46px; color: #222; }
#nmq-modal .quantity .button { width: 28px; background: #f5f5f3; color: #222; padding: 0; }
#nmq-modal .single_add_to_cart_button { flex: 1; min-width: 150px; min-height: 48px; margin: 0 !important; padding: 12px 18px; border: 0; border-radius: 9px; background: #171717 !important; color: #fff !important; font-size: 15px; line-height: 1.5; font-weight: 700; }
#nmq-modal .single_add_to_cart_button.disabled, #nmq-modal .single_add_to_cart_button:disabled { opacity: .45; }
#nmq-modal .nmq-feedback:empty { display: none; }
#nmq-modal .nmq-feedback { background: #edf6ef; border-radius: 9px; color: #28663d; padding: 12px; font-size: 14px; margin: 12px 0; }
#nmq-modal .nmq-feedback.nmq-error { background: #fff1ec; color: #a33e24; }
#nmq-modal .nmq-success-actions { display: flex; gap: 10px; align-items: center; margin: 12px 0 20px; }
#nmq-modal .nmq-success-actions > * { flex: 1; text-align: center; padding: 11px; min-height: 44px; font-size: 13px; background: #fff; color: #222; border: 1px solid #ddd; border-radius: 8px; margin: 0; line-height: 1.5; }
#nmq-modal .nmq-details { border-top: 1px solid #eee; margin-top: 20px; padding: 14px 0; font-size: 14px; }
#nmq-modal .nmq-details summary { cursor: pointer; font-weight: 600; min-height: 32px; }
#nmq-modal .nmq-details div { padding-top: 10px; line-height: 1.9; }
#nmq-modal .nmq-full-link { display: inline-block; margin-top: 10px; color: #777; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; padding: 8px 0; }
#nmq-modal .nmq-loading, #nmq-modal .nmq-load-error { min-height: 320px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; padding: 32px; text-align: center; }
#nmq-modal .nmq-loading span { width: 30px; height: 30px; border: 2px solid #ddd; border-top-color: #222; border-radius: 50%; animation: nmq-spin .7s linear infinite; }
#nmq-modal .nmq-load-error a { color: #222; text-decoration: underline; }
#nmq-modal :focus-visible { outline: 3px solid #be905b; outline-offset: 3px; }
#nmq-modal .nmq-zoom .nmq-info { display: none; }
#nmq-modal .nmq-zoom .nmq-purchase-bar { display: none; }
#nmq-modal .nmq-zoom .nmq-product { display: block; }
#nmq-modal .nmq-zoom .nmq-slide { aspect-ratio: auto; height: 70vh; cursor: zoom-out; }
#nmq-modal .nmq-zoom .nmq-slide img { max-height: 70vh; }
@keyframes nmq-spin { to { transform: rotate(360deg); } }
@keyframes nmq-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 699px) {
  .nmq-trigger { font-size: 13px; min-height: 44px; margin-top: 10px !important; border-radius: 7px; }
  #nmq-modal { padding: 0; align-items: flex-end; }
  #nmq-modal .nmq-panel { width: 100%; max-height: 96vh; max-height: 96dvh; border-radius: 19px 19px 0 0; }
  #nmq-modal .nmq-header { min-height: 58px; padding: 9px 16px; }
  #nmq-modal .nmq-product { display: block; }
  #nmq-modal .nmq-media { padding: 12px 14px; }
  #nmq-modal .nmq-slide { aspect-ratio: auto; height: 35vh; height: 35dvh; min-height: 220px; }
  #nmq-modal .nmq-slide img { max-height: 100%; }
  #nmq-modal .nmq-gallery-nav { margin-top: 8px; }
  #nmq-modal .nmq-image-hint { margin-top: 6px; }
  #nmq-modal .nmq-info { padding: 20px 18px calc(22px + env(safe-area-inset-bottom,0px)); }
  #nmq-modal #nmq-product-title { font-size: 20px; margin-bottom: 8px; }
  #nmq-modal .nmq-price { font-size: 22px; margin-bottom: 20px; }
  #nmq-modal .nmq-option { flex-grow: 1; padding: 10px 12px; }
  #nmq-modal .nmq-cart-form .single_add_to_cart_button { display: none; }
  #nmq-modal .woocommerce-variation-add-to-cart::before, #nmq-modal form.cart:not(.variations_form)::before { content: 'الكمية'; font-size: 13px; font-weight: 600; margin-inline-end: auto; }
  #nmq-modal .nmq-purchase-bar { display: flex; align-items: center; gap: 16px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom,0px)); background: #fff; border-top: 1px solid #e9e9e5; flex-shrink: 0; box-shadow: 0 -5px 20px #00000005; }
  #nmq-modal .nmq-bar-price { min-width: 90px; font-size: 18px; font-weight: 700; }
  #nmq-modal .nmq-bar-price del { display: block; font-size: 11px; color: #888; font-weight: 400; }
  #nmq-modal .nmq-bar-price ins { background: none; text-decoration: none; }
  #nmq-modal .nmq-purchase-bar button { flex: 1; min-height: 48px; margin: 0; border: 0; border-radius: 9px; background: #171717; color: #fff; font-size: 14px; }
  #nmq-modal .nmq-purchase-bar button:disabled { opacity: .45; }
  #nmq-modal .nmq-zoom .nmq-purchase-bar { display: none; }
  #nmq-modal .nmq-zoom .nmq-slide { height: 68vh; height: 68dvh; }
}
@media (prefers-reduced-motion: reduce) {
  #nmq-modal *, .nmq-trigger { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
