/* MANSOKO — French LTR product page and COD order modal */
.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;
  }

  /* LTR keeps the image on the left and the information 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;
}

.mansoko-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;
}

.mansoko-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;
}

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

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

body {
  padding-bottom: 100px;
}

/* Desktop: no floating bottom order bar. */
@media (min-width: 768px) {
  .mansoko-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;
  }

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

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

  .mansoko-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;
  }
}

/* Keep the checkout inputs comfortably readable on desktop and mobile. */
.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;
  }
}

/* MANSOKO neutral accent. */
:root {
  --mansoko-accent: #151718;
}

/* 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: #6b7280 !important;
  opacity: 1 !important;
}

/* Phone prefix (+225) 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(--mansoko-accent) !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(--mansoko-accent) 38%, transparent) !important;
  border-right-color: var(--mansoko-accent) !important;
}

.mansoko-order-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 14px 22px;
  color: #fff;
  background: #151718;
  border: 0;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.mansoko-order-launch span,
.mansoko-order-launch ion-icon {
  color: #fff;
}

.mansoko-order-launch ion-icon {
  font-size: 24px;
}

.mansoko-order-modal[aria-hidden="true"] {
  display: none;
}

.mansoko-order-modal[aria-hidden="false"] {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.mansoko-order-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, .66);
  border: 0;
  cursor: pointer;
}

.mansoko-order-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  padding: 22px;
  overflow-y: auto;
  color: #151718;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.mansoko-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.mansoko-order-header h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.25;
}

.mansoko-order-close {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  color: #151718;
  background: #f3f4f6;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.mansoko-order-close ion-icon {
  font-size: 26px;
}

.mansoko-order-summary {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}

.mansoko-order-summary img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.mansoko-order-summary div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mansoko-order-summary strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mansoko-order-summary span {
  color: #16803c;
  font-size: 20px;
  font-weight: 800;
}

.mansoko-order-dialog #express-checkout-form {
  margin: 0;
  padding: 20px;
}

body.mansoko-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .mansoko-order-launch {
    display: none;
  }

  .mansoko-order-modal[aria-hidden="false"] {
    align-items: end;
    padding: 0;
  }

  .mansoko-order-dialog {
    width: 100%;
    max-height: 92vh;
    padding: 16px 12px 20px;
    border-radius: 18px 18px 0 0;
  }

  .mansoko-order-header {
    padding: 0 4px 12px;
  }

  .mansoko-order-summary {
    grid-template-columns: 60px 1fr;
    padding: 12px 4px;
  }

  .mansoko-order-summary img {
    width: 60px;
    height: 60px;
  }

  .mansoko-order-dialog #express-checkout-form {
    padding: 14px;
  }
}
