/* Al Mayan WordPress Rev42 — consolidated display fixes, no plugin required.
   Keep WordPress product data, catalog layout, hero animations and theme controls intact. */

/* Product catalogue: remove the washed-out "floating white on white" impression. */
.products-page .product-card{
  background:#f8faf6 !important;
  border:1px solid #c4d5c7 !important;
  box-shadow:0 10px 27px rgba(8,44,25,.12) !important;
  border-radius:20px;
  isolation:isolate;
}
.products-page .product-card:hover,
.products-page .product-card:focus-within{
  border-color:#649f7b !important;
  box-shadow:0 15px 35px rgba(8,48,27,.18) !important;
}
.products-page .product-card__media{
  background:radial-gradient(circle at 50% 37%,#fff 18%,#f0f4ee 100%) !important;
  border-bottom:1px solid #d9e6dc !important;
}
.products-page .product-card__body{
  background:#f8faf6 !important;
}
.products-page .product-card__desc,
.products-page .product-card__title{color:#193d2b !important;}
.products-page .product-card__cat{color:#2b6246 !important;}
.products-page .product-card__more{
  color:#19583d !important;
  background:#e5eee5 !important;
  border-color:#cadecd !important;
}
.products-page .product-card__more:hover,
.products-page .product-card:hover .product-card__more{
  color:#fff !important;
  background:#286d4a !important;
  border-color:#286d4a !important;
}
/* In Night mode the image stage stays light for natural white product packaging,
   while the card text keeps strong dark-on-ivory contrast (not pale-on-pale). */
html[data-theme="dark"] .products-page .product-card{
  background:#f1f6ee !important;
  border-color:#a8c5ae !important;
  box-shadow:0 15px 38px rgba(0,0,0,.29) !important;
}
html[data-theme="dark"] .products-page .product-card__body{background:#f1f6ee !important;color:#173c2a !important;}
html[data-theme="dark"] .products-page .product-card__media{
  background:radial-gradient(circle at 50% 35%,#fff 22%,#e5ede5 100%) !important;
  border-bottom:1px solid #c5dbc9 !important;
}
html[data-theme="dark"] .products-page .product-card :is(.product-card__desc,.product-card__title,.product-card__name,.product-card__subtitle,.product-card__pack,.product-card__meta){color:#244935 !important;opacity:1 !important;}
html[data-theme="dark"] .products-page .product-card .product-card__more{background:#dfeae0 !important;color:#145538 !important;border-color:#b3cdb9 !important;}
html[data-theme="dark"] .products-page .product-card .product-card__more:hover,
html[data-theme="dark"] .products-page .product-card:hover .product-card__more{background:#216e48 !important;color:#fff !important;}

/* The original basket dialog has a fixed light surface, while newer night CSS
   recoloured only its text. Give the complete dialog a coherent night palette. */
html[data-theme="dark"] dialog.request-basket{
  background:#192c23 !important;
  color:#f5f6ed !important;
  border:1px solid #5e8069 !important;
  box-shadow:0 28px 95px rgba(0,0,0,.60) !important;
  color-scheme:dark;
}
html[data-theme="dark"] .request-basket :is(.basket-head h2,.basket-row h3,.basket-form label,.basket-field,.basket-notice,.basket-empty,.basket-row-body,.basket-form,.basket-browse){
  color:#eef4e9 !important;
  opacity:1 !important;
}
html[data-theme="dark"] .request-basket .basket-head h2,
html[data-theme="dark"] .request-basket .basket-row h3{font-weight:800 !important;}
html[data-theme="dark"] .request-basket .basket-row{
  background:#233a2e !important;
  color:#f4f6eb !important;
  border-color:#658973 !important;
}
html[data-theme="dark"] .request-basket .basket-row>img{
  background:#f4f8f2;
  padding:4px;
  border-radius:9px;
}
html[data-theme="dark"] .request-basket :is(.basket-field input,.basket-field select,.basket-form input,.basket-form textarea){
  background:#f7faf6 !important;
  color:#173d2c !important;
  border:1px solid #86a791 !important;
  color-scheme:light;
}
html[data-theme="dark"] .request-basket :is(input,textarea)::placeholder{color:#5d7163 !important;opacity:1;}
html[data-theme="dark"] .request-basket :is(.basket-field input,.basket-field select,.basket-form input,.basket-form textarea):focus-visible{
  border-color:#76c49c !important;
  outline:3px solid rgba(138,227,174,.42) !important;
  outline-offset:1px;
}
html[data-theme="dark"] .request-basket .basket-close{
  background:#355843 !important;
  color:#fff !important;
  border:1px solid #719d7d !important;
}
html[data-theme="dark"] .request-basket .basket-remove{color:#ffb4a7 !important;}
html[data-theme="dark"] .request-basket .basket-send{
  background:#2a865a !important;
  color:white !important;
  border:1px solid #6ab78c !important;
}
html[data-theme="dark"] .request-basket .basket-send:hover{background:#329e6a !important;}
html[data-theme="dark"] .request-basket .basket-browse{color:#bce9cf !important;}

/* Default day basket: carefully improve text hierarchy without changing colours. */
html:not([data-theme="dark"]) .request-basket .basket-head h2,
html:not([data-theme="dark"]) .request-basket .basket-row h3 {color:#183b2a !important;}
html:not([data-theme="dark"]) .request-basket .basket-send {background:#246c49;color:#fff;}

/* High contrast in the native product modal and all editable order fields. */
html[data-theme="dark"] #productModal .m16-modal-info :is(.m16-order-row input,.m16-order-row select,.m16-order-note textarea){
  background:#f8faf5 !important;
  color:#193a2b !important;
  border-color:#83a08c !important;
}
html[data-theme="dark"] #productModal .m16-modal-info :is(.m16-order-row label,.m16-order-note,.m16-modal-kicker,.m16-fact span:first-child){color:#dfebdf !important;}
html[data-theme="dark"] #productModal .m16-modal-info :is(.m16-fact strong,#m16ModalTitle){color:#f7f8ef !important;}
html[data-theme="dark"] #productModal .m16-modal-info :is(input,textarea)::placeholder{color:#526c59 !important;opacity:1;}

/* Consistent labels/controls on white cards and the dark contact/footer surfaces. */
html[data-theme="dark"] :is(.contact-form,.mayan-directory__card,.product-modal.pm-premium .modal-content) :is(label,h2,h3,h4,.form-label){opacity:1;}
html[data-theme="dark"] .footer :is(.footer-links a,.footer-brand p,.footer-bottom,.footer-links li,.footer-links span){color:#e7f2e9 !important;opacity:1 !important;}
html[data-theme="dark"] .footer :is(h6,.rev15-company-wordmark strong){color:#fff !important;}

@media(max-width:600px){
 .request-basket{max-height:calc(100dvh - 44px) !important;}
 .products-page .product-card{border-radius:16px;}
}
