@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap");

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body#m2-buy-page {
  min-height: 100vh;
  background: #f3e2d4;
}

#m2-single-home {
  --m2-ink: #3a2218;
  --m2-teal: #9a3d3a;
  --m2-sky: #e8b7a4;
  --m2-mist: #f3e2d4;
  --m2-foam: #fbf4ec;
  --m2-deep: #6b2c28;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  color: var(--m2-ink);
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 80% 10%, rgba(232, 183, 164, 0.55), transparent 60%),
    linear-gradient(165deg, #f0cfc0 0%, var(--m2-mist) 42%, var(--m2-foam) 100%);
  overflow: hidden;
}

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

.m2-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.m2-modal[hidden] {
  display: none;
}

.m2-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 40, 46, 0.55);
}

.m2-modal-panel {
  position: relative;
  width: min(100%, 28rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fbf4ec;
  color: #3a2218;
  padding: 1.6rem 1.4rem 1.4rem;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  animation: m2-fade 0.28s ease both;
}

.m2-modal-x {
  position: absolute;
  top: 0.5rem;
  left: 0.6rem;
  border: 0;
  background: transparent;
  color: #3a2218;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.m2-modal-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
}

.m2-modal-panel label {
  display: block;
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.m2-modal-panel input,
.m2-modal-panel select,
.m2-modal-panel textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid #d4b09a;
  background: #fff;
  color: #3a2218;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

.m2-totals {
  margin: 0.4rem 0 1rem;
  font-size: 0.95rem;
  color: #6a4336;
}

.m2-totals p {
  margin: 0.25rem 0;
}

.m2-totals-all {
  font-weight: 700;
  color: #6b2c28;
}

.m2-modal-panel .m2-cart {
  width: 100%;
  min-width: 0;
}

.m2-modal-panel .m2-msg {
  color: #9c2f2f;
  margin: 0 0 0.8rem;
}

.m2-thanks {
  text-align: center;
  padding: 1.4rem 0.4rem 0.6rem;
}

.m2-thanks h2 {
  font-size: 2rem;
}

.m2-thanks p {
  margin: 0;
  line-height: 1.8;
  color: #6a4336;
}

#m2-single-home .m2-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100vh;
  align-items: stretch;
}

#m2-single-home .m2-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.55) 0%, transparent 62%),
    linear-gradient(180deg, rgba(107, 44, 40, 0.06), transparent 40%);
}

#m2-single-home .m2-visual img {
  width: min(92%, 720px);
  height: auto;
  max-height: 86vh;
  object-fit: contain;
  animation: m2-rise 0.9s ease both;
}

#m2-single-home .m2-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 5vw 4.5rem 6vw;
  max-width: 36rem;
}

#m2-single-home .m2-name {
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  animation: m2-fade 0.7s ease 0.15s both;
}

#m2-single-home .m2-lead {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #6a4336;
  animation: m2-fade 0.7s ease 0.25s both;
}

#m2-single-home .m2-price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 1.4rem;
  animation: m2-fade 0.7s ease 0.32s both;
}

#m2-single-home .m2-price-now {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--m2-deep);
}

#m2-single-home .m2-price-was {
  font-size: 1rem;
  color: #8a6a5a;
  text-decoration: line-through;
}

#m2-single-home .m2-desc {
  margin: 0 0 1.8rem;
  font-size: 0.98rem;
  line-height: 1.8;
  color: #6a4336;
  animation: m2-fade 0.7s ease 0.38s both;
}

#m2-single-home .m2-desc p {
  margin: 0 0 0.6rem;
}

#m2-single-home .m2-buy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  animation: m2-fade 0.7s ease 0.45s both;
}

#m2-single-home .m2-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#m2-single-home .m2-qty label {
  margin-left: 0.55rem;
  font-size: 0.9rem;
  font-weight: 500;
}

#m2-single-home .m2-qty-btn,
#m2-single-home .m2-qty input {
  height: 2.6rem;
  border: 1px solid #d4b09a;
  background: #fff;
  color: var(--m2-ink);
  font-family: inherit;
  font-size: 1rem;
}

#m2-single-home .m2-qty-btn {
  width: 2.6rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

#m2-single-home .m2-qty-btn:hover {
  background: var(--m2-mist);
}

#m2-single-home .m2-qty-btn:active {
  transform: scale(0.94);
}

#m2-single-home .m2-qty input {
  width: 3.4rem;
  text-align: center;
  border-radius: 0;
}

#m2-single-home .m2-cart {
  min-width: 14rem;
  padding: 0.95rem 1.6rem;
  border: 0;
  background: var(--m2-teal);
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.18s ease;
}

#m2-single-home .m2-cart:hover {
  background: var(--m2-deep);
  transform: translateY(-2px);
}

#m2-single-home .m2-cart:active {
  transform: translateY(0);
}

#m2-single-home .m2-cart:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

#m2-single-home .m2-stock {
  margin: 0;
  font-size: 0.85rem;
  color: #6a4336;
}

#m2-single-home .m2-msg {
  margin: 0;
  font-size: 0.9rem;
  color: var(--m2-deep);
}

@keyframes m2-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes m2-fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  #m2-single-home .m2-stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  #m2-single-home .m2-visual {
    min-height: 52vh;
    padding: 1.5rem 0 0;
  }

  #m2-single-home .m2-visual img {
    width: min(88%, 420px);
    max-height: 52vh;
  }

  #m2-single-home .m2-copy {
    padding: 1.6rem 1.25rem 3rem;
    max-width: none;
  }

  #m2-single-home .m2-cart {
    width: 100%;
  }
}
