/* Product popup — Ladi POPUP_PRODUCT clone */
.product-modal {
  position: fixed;
  inset: 0;
  /* Above header/floating (90000050) + hotline (999999) — match Ladi POPUP_PRODUCT */
  z-index: 90000070;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.product-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.product-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.product-modal__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1035px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  transform: translate(-50%, -48%);
  background: transparent;
  transition: transform 0.25s ease;
}

.product-modal.is-open .product-modal__panel {
  transform: translate(-50%, -50%);
}

.mc-popup {
  position: relative;
  display: block;
  width: min(1035px, 100%);
  background: #fff7f9;
  border: 0;
  border-radius: 0 20px 20px 0;
  box-shadow: rgb(0, 0, 0) 15px 15px 20px -20px;
  overflow: hidden;
}

.mc-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b0b0b0;
  cursor: pointer;
}

.mc-popup__close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.mc-popup__close:hover {
  color: #666;
}

.mc-popup__grid {
  display: grid;
  grid-template-columns: 523px 1fr;
  min-height: 523px;
  height: 523px;
}

.mc-popup__media {
  position: relative;
  background: #fff7f9;
  min-height: 523px;
  height: 100%;
  width: 523px;
  max-width: 100%;
  overflow: hidden;
  cursor: default;
}

.mc-popup__media.is-gallery {
  cursor: zoom-in;
}

.mc-popup__slides {
  position: absolute;
  inset: 0;
}

.mc-popup__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.mc-popup__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.mc-popup__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

/* Ladi SHAPE1564 — swipe hint (wobble) */
.mc-popup__swipe {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 3;
  width: 55px;
  height: 50px;
  margin: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.mc-popup__swipe svg {
  display: block;
  width: 55px;
  height: 50px;
  fill: rgba(255, 255, 255, 1);
  animation: mc-popup-wobble 1s 1s infinite both;
}

.mc-popup__dots {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes mc-popup-wobble {
  0% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-25%) rotate(-5deg);
  }
  30% {
    transform: translateX(20%) rotate(3deg);
  }
  45% {
    transform: translateX(-15%) rotate(-3deg);
  }
  60% {
    transform: translateX(10%) rotate(2deg);
  }
  75% {
    transform: translateX(-5%) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Mobile-only swipe caption (Ladi PARAGRAPH under gallery) */
.mc-popup__swipe-label {
  display: none;
  margin: 0;
  padding: 0;
  font-family: Tinos, serif;
  font-size: 13px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  color: #90a4ae;
}

.mc-popup__info {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
  min-height: 523px;
  padding: 45px 48px 40px 54px;
  background: #fff7f9;
  font-family: Tinos, serif;
}

.mc-popup__body {
  flex: 1 1 auto;
  min-height: 0;
}

.mc-popup__footer {
  flex: 0 0 auto;
  width: 370px;
  max-width: 100%;
  margin-top: auto;
  padding-top: 0;
}

.mc-popup__title {
  margin: 0 0 17px;
  font-family: Tinos, serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 26.4px;
  color: #850e35;
}

.mc-popup__price-row {
  position: relative;
  height: 24px;
  margin: 0 0 12.5px;
  font-family: Tinos, serif;
}

.mc-popup__price-label {
  position: absolute;
  top: 4px;
  left: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 19.2px;
  color: #546e7a;
}

.mc-popup__price {
  position: absolute;
  top: 0;
  left: 88px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  color: #850e35;
  white-space: nowrap;
}

.mc-popup__vat {
  position: absolute;
  top: 5px;
  left: 219px;
  margin: 0;
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  line-height: 18px;
  color: #616161;
  white-space: nowrap;
}

.mc-popup__section-label {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 19.2px;
  color: #546e7a;
}

.mc-popup__include {
  margin: 0 0 4.5px;
  font-size: 14px;
  font-weight: 700;
  line-height: 22.4px;
  color: #850e35;
}

.mc-popup__details {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  line-height: 22.4px;
  color: #616161;
}

.mc-popup__details li {
  position: relative;
  padding-left: 0.9em;
}

.mc-popup__details li::before {
  content: "-";
  position: absolute;
  left: 0;
}

.mc-popup__details li + li {
  margin-top: 0;
}

.mc-popup__variant-row {
  display: grid;
  grid-template-columns: 120px 250px;
  align-items: center;
  width: 370px;
  max-width: 100%;
  margin: 0 0 15px;
  column-gap: 0;
}

.mc-popup__variant-label {
  display: block;
  width: 117px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #546e7a;
  white-space: nowrap;
}

.mc-popup__variant {
  display: block;
  box-sizing: border-box;
  width: 250px;
  max-width: 100%;
  height: 25px;
  margin: 0;
  padding: 0 24px 0 5px;
  border: 1px solid #850e35;
  border-radius: 0;
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20width%3D%2232%22%20height%3D%2224%22%20viewBox%3D%220%200%2032%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpolygon%20points%3D%220%2C0%2032%2C0%2016%2C24%22%20style%3D%22fill%3Argb(84%2C84%2C84)%22%3E%3C%2Fpolygon%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 9px 6px;
  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  line-height: 23px;
  color: #545454;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.mc-popup__variant::-ms-expand {
  display: none;
}

.mc-popup__actions {
  display: grid;
  grid-template-columns: 90px 29px 120px 10px 120px;
  align-items: center;
  width: 369px;
  max-width: 100%;
}

.mc-popup__qty {
  display: flex;
  align-items: stretch;
  grid-column: 1;
  box-sizing: border-box;
  width: 90px;
  height: 40px;
  border: 1px solid #850e35;
  background: #fff;
  overflow: hidden;
}

.mc-popup__qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 30px;
  flex: 0 0 30px;
  height: auto;
  align-self: stretch;
  margin: 0;
  padding: 0;
  border: 0;
  background: #850e35;
  color: #fff;
  font-family: "Open Sans", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transform: none;
}

.mc-popup__qty-btn:hover {
  filter: brightness(0.97);
}

.mc-popup__qty-input {
  display: block;
  box-sizing: border-box;
  width: calc(100% - 60px);
  flex: 1 1 auto;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  text-align: center;
  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  line-height: 38px;
  color: #545454;
  -moz-appearance: textfield;
}

.mc-popup__qty-input::-webkit-outer-spin-button,
.mc-popup__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mc-popup__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 120px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.mc-popup__btn:hover {
  filter: brightness(0.96);
}

.mc-popup__btn--cart {
  grid-column: 3;
  border: 1px solid #850e35;
  border-radius: 1px;
  background: #fff;
  color: #850e35;
}

.mc-popup__btn--buy {
  grid-column: 5;
  border: 0;
  background: #850e35;
  color: #fffefd;
}

@media (max-width: 900px) {
  .mc-popup {
    border-radius: 16px;
  }

  .mc-popup__grid {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .mc-popup__media {
    width: 100%;
    min-height: 280px;
    max-height: 320px;
  }

  .mc-popup__info {
    min-height: 0;
    padding: 28px 20px 24px;
  }

  .mc-popup__price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    height: auto;
  }

  .mc-popup__price-label,
  .mc-popup__price,
  .mc-popup__vat {
    position: static;
    top: auto;
    left: auto;
  }

  .mc-popup__footer,
  .mc-popup__variant-row,
  .mc-popup__actions {
    width: 100%;
  }

  .mc-popup__variant-row {
    grid-template-columns: auto 1fr;
    gap: 8px;
  }

  .mc-popup__variant {
    width: 100%;
  }

  .mc-popup__actions {
    grid-template-columns: 90px 1fr 1fr;
    gap: 8px;
  }

  .mc-popup__btn--cart,
  .mc-popup__btn--buy {
    grid-column: auto;
    width: 100%;
  }
}

/* Ladi POPUP_PRODUCT mobile frame — layout only, keep PC colors */
@media (max-width: 767px) {
  .product-modal__panel {
    top: 0;
    left: 0;
    width: 100%;
    max-height: 100%;
    transform: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .product-modal.is-open .product-modal__panel {
    transform: none;
  }

  .mc-popup {
    width: 100%;
    min-height: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .mc-popup__close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    color: #fff;
  }

  .mc-popup__close:hover {
    color: #fff;
  }

  .mc-popup__close svg {
    width: 20px;
    height: 20px;
  }

  .mc-popup__grid {
    display: flex;
    flex-direction: column;
  }

  .mc-popup__media {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    max-height: none;
    height: auto;
  }

  .mc-popup__swipe {
    bottom: 6px;
  }

  .mc-popup__swipe-label {
    display: block;
    flex: 0 0 auto;
    margin: 10px 16px 0;
  }

  .mc-popup__info {
    flex: 0 0 auto;
    padding: 14px 16px 20px;
  }

  .mc-popup__title {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.25;
  }

  .mc-popup__price-row {
    margin: 0 0 12px;
    gap: 4px 10px;
  }

  .mc-popup__price-label {
    font-size: 15px;
    line-height: 1.2;
  }

  .mc-popup__price {
    font-size: 20px;
    line-height: 1.2;
  }

  .mc-popup__vat {
    font-size: 13px;
    line-height: 1.2;
  }

  .mc-popup__section-label {
    margin: 0 0 8px;
    font-size: 15px;
  }

  .mc-popup__include {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.5;
  }

  .mc-popup__details {
    font-size: 13px;
    line-height: 1.55;
  }

  .mc-popup__footer {
    margin-top: 18px;
    padding-top: 4px;
  }

  /* Ladi mobile: label | select  /  qty | Thêm giỏ hàng | Mua ngay */
  .mc-popup__variant-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    width: 100%;
  }

  .mc-popup__variant-label {
    width: auto;
    white-space: nowrap;
  }

  .mc-popup__variant {
    width: 100%;
    min-width: 0;
  }

  .mc-popup__actions {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .mc-popup__qty {
    grid-column: 1;
    grid-row: 1;
  }

  .mc-popup__btn--cart {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }

  .mc-popup__btn--buy {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .mc-popup__actions {
    grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }

  .mc-popup__qty {
    width: 80px;
  }

  .mc-popup__btn {
    font-size: 12px;
  }

  .mc-popup__variant-label {
    font-size: 14px;
  }
}

body.mc-lightbox-open {
  overflow: hidden;
}

/* Ladi #lightbox-screen clone */
.mc-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  width: 100%;
  height: 100%;
  margin: auto;
  background: rgb(127, 127, 127);
  user-select: none;
  touch-action: none;
}

.mc-lightbox.is-open {
  display: block;
}

.mc-lightbox * {
  user-select: none;
}

.mc-lightbox__track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  cursor: default;
}

.mc-lightbox__img {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0 !important;
  max-width: 80vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: scale-down;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  cursor: zoom-in;
  pointer-events: auto;
  -webkit-user-drag: none;
}

.mc-lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  width: 16px;
  height: 16px;
  margin: 10px;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22%23fff%22%3E%3Cpath%20d%3D%22M18.3%205.71a1%201%200%200%200-1.41%200L12%2010.59%207.11%205.7A1%201%200%201%200%205.7%207.11L10.59%2012%205.7%2016.89a1%201%200%201%200%201.41%201.41L12%2013.41l4.89%204.89a1%201%200%200%200%201.41-1.41L13.41%2012l4.89-4.89a1%201%200%200%200%200-1.4z%22%2F%3E%3C%2Fsvg%3E");
  cursor: pointer;
}

.mc-lightbox__nav {
  position: fixed;
  top: 50%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
}

.mc-lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.mc-lightbox__nav--prev {
  left: 20px;
}

.mc-lightbox__nav--next {
  right: 20px;
}

.mc-lightbox.is-single .mc-lightbox__nav {
  display: none;
}
