/* NSMAT NAQIAH | Nomo theme | v1.0
   Paste the entire file into Zid's CSS editor, without <style> tags.
   Based on storefront markup inspected on 2026-11-17.
   Preview on desktop and mobile before publishing.
*/

:root {
  --nq-blue: #075985;
  --nq-dark: #103b5c;
  --nq-light: #f1f9fd;
  --nq-line: #dceaf2;
}

/* Header: retain the theme's mobile menu and logo positioning. */
header:has(> nav.theme-container) {
  background: #fff !important;
  border-bottom-color: var(--nq-line) !important;
  box-shadow: 0 3px 18px rgb(16 59 92 / 5%);
}
header nav > div > a[aria-label="الرئيسية"] img {
  height: 48px;
  max-height: 48px;
  width: auto;
  object-fit: contain;
}
header nav > div > ul a {
  color: var(--nq-dark);
  font-weight: 600;
}
header nav > div > ul a:hover {
  color: var(--nq-blue);
  text-underline-offset: 7px;
}

/* Hero: retain the whole artwork, including its embedded text. */
#main .section-hero { background: var(--nq-light); }
@media (min-width: 768px) {
  header nav > div > a[aria-label="الرئيسية"] img {
    height: 74px;
    max-height: 74px;
  }
  #main .section-hero[data-variant="compact"] {
    min-height: clamp(380px, 46.667vw, 650px) !important;
  }
}

/* Purchase controls: preserve their existing functionality. */
#main :is(.section-hero .btn, [data-add-to-cart],
  [data-add-to-cart-form], [data-buy-now-form],
  [data-sticky-cta-add-to-cart]) {
  background: var(--nq-blue) !important;
  border: 1px solid var(--nq-blue) !important;
  color: #fff !important;
  border-radius: 12px;
  min-height: 48px;
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  transition: background-color .18s ease, box-shadow .18s ease;
}
#main :is(.section-hero .btn, [data-add-to-cart],
  [data-add-to-cart-form], [data-buy-now-form],
  [data-sticky-cta-add-to-cart]):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--nq-dark) !important;
  border-color: var(--nq-dark) !important;
  box-shadow: 0 5px 14px rgb(7 89 133 / 15%);
}
#main :is([data-add-to-cart], [data-add-to-cart-form],
  [data-buy-now-form]):is(:disabled, [aria-disabled="true"]) {
  opacity: .55;
  cursor: not-allowed;
}

/* Product sections and grids: respond to the number of products. */
#main .section-products { padding-block: 40px; }
#main .section-products h2 {
  color: var(--nq-dark);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.5;
}
#main [data-grid-root][data-grid="grid"] {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)) !important;
  gap: 24px !important;
  width: 100%;
  margin-inline: auto;
}
#main [data-grid-root][data-grid="grid"]:has(> [data-product-card]:only-child) {
  max-width: 380px;
}
#main [data-grid-root][data-grid="grid"]:has(> [data-product-card]:nth-child(2):last-child) {
  max-width: 760px;
}
#main [data-grid-root][data-grid="grid"]:has(> [data-product-card]:nth-child(3):last-child) {
  max-width: 1140px;
}
#main [data-product-card] {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--nq-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 18px rgb(16 59 92 / 4%);
}
#main [data-grid-root][data-grid="grid"] [data-product-card] > a:first-child {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--nq-light);
}
#main [data-grid-root][data-grid="grid"] [data-product-card] > a:first-child > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#main [data-product-card] h3 {
  color: var(--nq-dark);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
#main [data-product-card] p:has(> .riyal-svg) {
  color: var(--nq-blue);
  font-size: 19px;
  font-weight: 700;
}
#main [class~="bg-[#6f42c1]"] {
  background-color: var(--nq-blue) !important;
  border-color: var(--nq-blue) !important;
  color: #fff;
  white-space: normal;
  line-height: 1.6;
}
#main [data-product-card] > a:first-child > div.absolute {
  max-width: calc(100% - 24px);
}

/* Product details. */
#product-main-section h1 {
  color: var(--nq-dark);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.7;
}
#features-details {
  line-height: 1.9;
  overflow-wrap: anywhere;
}
#product-form .qty-input {
  border-color: var(--nq-line);
  border-radius: 12px;
}

/* Footer: improve spacing and phone-number direction. */
#footer {
  background: var(--nq-light) !important;
  border-top: 1px solid var(--nq-line);
  padding-block: 40px;
}
#footer p { line-height: 1.9; }
#footer h3 { color: var(--nq-dark); font-weight: 700; }
#footer a { color: var(--nq-dark); }
#footer a:is([href^="tel:"], [href^="mailto:"]) {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  overflow-wrap: anywhere;
}

/* Keyboard navigation. */
:is(#main, #footer) :is(a, button, input, select):focus-visible,
header nav :is(a, button, input):focus-visible {
  outline: 3px solid #0e7490;
  outline-offset: 4px;
}

/* Mobile: keep product titles and offer details readable. */
@media (max-width: 767px) {
  #main .section-products { padding-block: 28px; }
  #main [data-grid-root][data-grid="grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  #main [data-grid-root][data-grid="grid"]:has(> [data-product-card]:only-child) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #main [data-product-card] { padding: 10px; border-radius: 14px; }
  #main [data-product-card] h3 { font-size: 13px; }
  #main [data-product-card] p:has(> .riyal-svg) { font-size: 17px; }
  #main [data-product-card] [data-add-to-cart] { padding-inline: 8px; }
  #main [data-product-card] > a:first-child > div.absolute {
    top: 6px;
    inset-inline-start: 6px;
    max-width: calc(100% - 12px);
  }
  #main [data-product-card] [class~="bg-[#6f42c1]"] {
    font-size: 10px;
    padding: 3px 6px;
  }
  #footer { padding-block: 28px; }
}
@media (max-width: 359px) {
  #main [data-grid-root][data-grid="grid"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #main :is(.section-hero .btn, [data-add-to-cart],
    [data-add-to-cart-form], [data-buy-now-form],
    [data-sticky-cta-add-to-cart]) { transition: none; }
}