/* MOROSOUQ — final Arabic product page */
.yc-single-product.container {
  width: 94%;
  max-width: 1680px !important;
  padding: 0;
  margin: 24px auto 48px;
}

@media (min-width: 768px) {
  .yc-single-product {
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
  }

  /* RTL keeps the image on the right. */
  .yc-single-product .product-images,
  .yc-single-product .product-details {
    width: auto;
    min-width: 0;
  }

  .yc-single-product .product-images {
    flex: 0 1 36%;
    max-width: 36%;
  }

  .yc-single-product .product-details {
    flex: 1 1 64%;
    max-width: 64%;
  }

  .yc-single-product .product-images #img-zoomer-box {
    /* Desktop: keep the main product image frame perfectly square.
       The 36% image column width is unchanged; only the excessive height is reduced. */
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
  }

  .yc-single-product .product-images .main-image {
    object-fit: contain;
  }

  .yc-single-product .product-details {
    gap: 24px;
  }
}

.yc-single-product .product-details .product-name {
  width: 100%;
  margin: 0;
  padding: 18px 24px;
  color: #16191b;
  background: #ffffff;
  border: 2px solid #16191b;
  border-radius: 14px;
  font-size: clamp(24px, 2vw, 36px);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.yc-single-product .product-price-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 14px;
  width: 100%;
  text-align: center;
}

.yc-single-product .product-price {
  display: inline-block;
  width: auto;
  margin: 0;
  color: #16803c;
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 800;
  text-align: center;
}

.yc-single-product .product-price-container .compare-container {
  display: flex !important;
  align-items: center;
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.yc-single-product .product-price-container .compare-price {
  margin: 0;
  color: #C62828 !important;
  font-size: clamp(17px, 1.6vw, 24px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.yc-single-product .product-price-container .compare-price del {
  color: #C62828 !important;
  text-decoration-color: #C62828 !important;
  text-decoration-thickness: 2px;
}

.yc-single-product #express-checkout-form {
  width: 100%;
  padding: 28px;
  background: #ffffff !important;
  border: 2px solid #16191b !important;
  border-radius: 16px;
  box-shadow: none;
}

.yc-single-product #express-checkout-form .express-checkout-fields {
  background: #ffffff !important;
}

.yc-single-product .express-checkout-title {
  grid-column: 1 / -1;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.yc-single-product .express-checkout-field input,
.yc-single-product .express-checkout-field textarea,
.yc-single-product .express-checkout-field select,
.yc-single-product .express-checkout-field .phone-fieldset {
  box-sizing: border-box;
  min-height: 68px;
  background: #ffffff !important;
  border: 1px solid #16191b !important;
  color: #16191b !important;
  line-height: 1.65 !important;
  overflow: visible !important;
}

.yc-single-product .express-checkout-field input,
.yc-single-product .express-checkout-field textarea,
.yc-single-product .express-checkout-field select {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

.yc-single-product .express-checkout-field input::placeholder,
.yc-single-product .express-checkout-field textarea::placeholder,
.yc-single-product .express-checkout-field .phone-number::placeholder {
  color: #4b5563 !important;
  opacity: 1 !important;
}

@media (min-width: 768px) {
  .yc-single-product .express-checkout-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yc-single-product .express-checkout-field:nth-of-type(n + 4),
  .yc-single-product .express-checkout-button {
    grid-column: 1 / -1;
  }
}

.yc-single-product .express-checkout-button {
  min-height: 68px;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  line-height: 1.6 !important;
  font-weight: 700;
}

.yc-single-product .express-checkout-button span {
  display: inline-block;
  line-height: 1.6 !important;
  padding-bottom: 2px;
}

.morosouq-sticky-order-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 16px;
  pointer-events: none;
}

.morosouq-sticky-order {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(620px, 100%);
  min-height: 64px;
  padding: 14px 28px;
  color: #ffffff;
  background: #16191b;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  font-family: var(--yc-font-family);
  font-size: 20px;
  font-weight: 700;
  transform: none;
  pointer-events: auto;
  cursor: pointer;
}

.morosouq-sticky-order span {
  color: #ffffff;
  font-weight: 700;
}

.morosouq-sticky-order ion-icon {
  color: #ffffff;
  font-size: 28px;
}

body {
  padding-bottom: 100px;
}

/* Desktop: no floating bottom order bar. */
@media (min-width: 768px) {
  .morosouq-sticky-order-wrap {
    display: none !important;
  }

  body {
    padding-bottom: 0;
  }
}

@media (max-width: 767px) {
  .yc-single-product.container {
    width: calc(100% - 24px);
    margin: 16px auto 32px;
  }

  .yc-single-product .product-images {
    width: 100%;
    margin: 0;
  }

  .yc-single-product .product-details .product-name {
    padding: 13px 8px 15px;
    border-radius: 12px;
    font-size: clamp(14px, 4.15vw, 18px);
    line-height: 1.6;
    white-space: nowrap;
  }

  .yc-single-product .product-price {
    font-size: 30px;
  }

  .yc-single-product .product-price-container {
    gap: 10px;
  }

  .yc-single-product .product-price-container .compare-price {
    font-size: 16px;
  }

  .yc-single-product #express-checkout-form {
    padding: 16px;
    border-radius: 12px;
  }

  .yc-single-product .express-checkout-title {
    font-size: 17px;
  }

  .yc-single-product .express-checkout-field input,
  .yc-single-product .express-checkout-field textarea,
  .yc-single-product .express-checkout-field select,
  .yc-single-product .express-checkout-field .phone-fieldset {
    min-height: 60px;
  }

  .morosouq-sticky-order-wrap {
    bottom: 10px;
    padding: 0 22px;
  }

  .morosouq-sticky-order {
    width: min(560px, 100%);
    min-height: 52px;
    padding: 10px 22px;
    font-size: 16px;
  }

  .morosouq-sticky-order ion-icon {
    font-size: 25px;
  }

  body {
    padding-bottom: 120px;
  }
}

/* Product-page spacing: keep the recommendation heading close to the
   description without changing the reusable product cards. */
section[class^="product_customization-"] + .yc-featured-products {
  padding-top: 16px !important;
}

@media (max-width: 767px) {
  .yc-single-product.container {
    margin-bottom: 8px;
  }

  section[class^="product_customization-"] + .yc-featured-products {
    padding-top: 12px !important;
  }
}

/* MOROSOUQ — Arabic checkout text vertical clipping fix
   YouCan's global main.css forces inputs/selects to height + line-height: 38px !important.
   These product-form overrides restore enough vertical room for Arabic glyphs/descenders. */
.yc-single-product #express-checkout-form .express-checkout-field input:not([type="hidden"]),
.yc-single-product #express-checkout-form .express-checkout-field select {
  height: 68px !important;
  min-height: 68px !important;
  max-height: none !important;
  line-height: 1.8 !important;
  padding-top: 14px !important;
  padding-bottom: 18px !important;
  overflow: visible !important;
  vertical-align: middle;
}

.yc-single-product #express-checkout-form .express-checkout-field textarea {
  height: auto !important;
  min-height: 90px !important;
  line-height: 1.8 !important;
  padding-top: 14px !important;
  padding-bottom: 18px !important;
  overflow: visible !important;
}

.yc-single-product #express-checkout-form .phone-fieldset {
  position: relative;
  height: 68px !important;
  min-height: 68px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: visible !important;
  align-items: stretch;
}

/* Draw the phone field outline above its inner inputs so all four sides remain visible. */
.yc-single-product #express-checkout-form .phone-fieldset::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  box-sizing: border-box;
  border: 1px solid #16191b;
  border-radius: inherit;
  pointer-events: none;
}

.yc-single-product #express-checkout-form .phone-fieldset .phone-countries-wrapper,
.yc-single-product #express-checkout-form .phone-fieldset .phone-number {
  height: 100% !important;
  min-height: 0 !important;
  line-height: 1.8 !important;
  padding-top: 14px !important;
  padding-bottom: 18px !important;
  overflow: visible !important;
}

.yc-single-product #express-checkout-form input::placeholder,
.yc-single-product #express-checkout-form textarea::placeholder {
  line-height: 1.8 !important;
  overflow: visible !important;
}

@media (max-width: 767px) {
  .yc-single-product #express-checkout-form .express-checkout-field input:not([type="hidden"]),
  .yc-single-product #express-checkout-form .express-checkout-field select,
  .yc-single-product #express-checkout-form .phone-fieldset {
    height: 60px !important;
    min-height: 60px !important;
  }

  .yc-single-product #express-checkout-form .express-checkout-field input:not([type="hidden"]),
  .yc-single-product #express-checkout-form .express-checkout-field select,
  .yc-single-product #express-checkout-form .phone-fieldset .phone-countries-wrapper,
  .yc-single-product #express-checkout-form .phone-fieldset .phone-number {
    padding-top: 11px !important;
    padding-bottom: 15px !important;
    line-height: 1.8 !important;
  }
}

/* MOROSOUQ — checkout grey accents -> logo gold
   Use a flat tone sampled from the MOROSOUQ logo while keeping typed customer text dark. */
:root {
  --morosouq-logo-gold: #C5945E;
}

/* Placeholder text: name, phone and address. */
.yc-single-product #express-checkout-form input::placeholder,
.yc-single-product #express-checkout-form textarea::placeholder,
.yc-single-product #express-checkout-form .phone-number::placeholder {
  color: var(--morosouq-logo-gold) !important;
  opacity: 1 !important;
}

/* Phone prefix (+212) and its dropdown arrow. */
.yc-single-product #express-checkout-form .phone-fieldset .phone-countries-wrapper,
.yc-single-product #express-checkout-form .phone-fieldset .phone-code,
.yc-single-product #express-checkout-form .phone-fieldset .phone-code::after {
  color: var(--morosouq-logo-gold) !important;
}

/* Order button loading spinner: replace the grey ring with the same logo tone. */
.yc-single-product #express-checkout-form .express-checkout-button .spinner,
.yc-single-product #express-checkout-form .spinner {
  border-color: color-mix(in srgb, var(--morosouq-logo-gold) 38%, transparent) !important;
  border-right-color: var(--morosouq-logo-gold) !important;
}
