/* =========================================================
   Product Hero — scoped styles (.mtkph-)
   ========================================================= */

.mtkph,
.mtkph * { box-sizing: border-box; }

.mtkph {
  --ph-ink: #0B0D0C;
  --ph-paper: #F7F6F2;
  --ph-line: rgba(247,246,242,0.14);
  --ph-muted: rgba(247,246,242,0.55);
  --ph-brand: #4a7bd9;
  --ph-brand-2: #78a0fa;
  --ph-wa: #25D366;
  position: relative;
  width: 100%;
  background: var(--ph-ink);
  color: var(--ph-paper);
  font-family: 'Inter', system-ui, sans-serif;
  overflow: hidden;
  isolation: isolate;
  padding-top: 64px;
}

.mtkph__bg { position: absolute; inset: 0; z-index: 0; }
.mtkph__waves { width: 100%; height: 100%; display: block; }

/* Stage / slides
 * We lock the stage height to the tallest slide so the hero doesn't
 * jump as the user navigates. Slides are absolutely positioned inside
 * the stage so they all fill the same space.
 */
.mtkph__stage {
  position: relative;
  z-index: 2;
  width: 100%;
  /* JS sets --mtkph-stage-h to the max measured slide height (px). */
  min-height: var(--mtkph-stage-h, auto);
}
.mtkph__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  display: none;
  animation: mtkph-slideIn .7s cubic-bezier(0.2,0.7,0.2,1) both;
}
.mtkph__slide.is-active { display: block; }
/* Before JS measures, show the first slide in flow so the page has
 * a real initial height to lock onto. */
.mtkph__stage:not([data-mtkph-stage-locked="1"]) .mtkph__slide {
  position: relative;
  inset: auto;
}
.mtkph__stage:not([data-mtkph-stage-locked="1"]) .mtkph__slide:not(.is-active) {
  display: none;
}
@keyframes mtkph-slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slider arrows */
.mtkph__arrow {
  position: absolute;
  top: 45%;
  z-index: 6;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(11,13,12,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ph-paper);
  border: 1px solid rgba(247,246,242,0.18);
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.mtkph__arrow svg { width: 22px; height: 22px; }
.mtkph__arrow:hover {
  background: var(--ph-brand);
  border-color: var(--ph-brand);
  transform: translateY(-50%) scale(1.05);
}
.mtkph__arrow--prev { left: 24px; }
.mtkph__arrow--next { right: 24px; }

/* Keep arrow icon direction the same in RTL — visual direction matches
 * physical position of the button (left button = arrow pointing left,
 * right button = arrow pointing right). */
[dir="rtl"] .mtkph__arrow svg,
html[dir="rtl"] .mtkph .mtkph__arrow svg,
.mtkph[dir="rtl"] .mtkph__arrow svg {
	transform: none !important;
}

/* Main grid */
.mtkph__main {
  position: relative;
  z-index: 4;
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 48px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

/* Visual */
.mtkph__visual {
  position: relative;
  animation: mtkph-fadeIn 1s ease both;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.mtkph__product {
  position: relative;
  filter: drop-shadow(0 50px 100px rgba(0,0,0,0.7)) drop-shadow(0 0 60px rgba(74,123,217,0.15));
  animation: mtkph-float 6s ease-in-out infinite;
  /* Fixed visual frame so every product image renders at the same size,
   * regardless of its source aspect ratio. */
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mtkph__product-svg,
.mtkph__product img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
@keyframes mtkph-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Brand badge */
.mtkph__brand-badge {
  position: absolute;
  top: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 16px;
  padding: 14px 22px 14px 20px;
  background: linear-gradient(135deg, rgba(74,123,217,0.15), rgba(11,13,12,0.85));
  border: 1px solid rgba(120,160,250,0.35);
  border-radius: 100px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}
.mtkph__brand-badge-label {
  font-family: 'Space Mono','JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.24em;
  color: var(--ph-brand-2);
  text-transform: uppercase;
  font-weight: 700;
  border-right: 1px solid rgba(120,160,250,0.3);
  padding-right: 16px;
}
.mtkph__brand-badge-name {
  font-family: 'Space Mono','JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--ph-paper);
  letter-spacing: 0.02em;
}

/* ===== Authorized Distributor badge (new design) ===== */
.mtk-badge {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 14px;
  background: linear-gradient(135deg, rgba(74,123,217,0.18), rgba(11,13,12,0.88));
  border: 1px solid rgba(120,160,250,0.40);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.10);
  font-family: 'Space Mono', ui-monospace, monospace;
}
.mtk-badge__check { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mtk-badge__check svg { width: 30px; height: 30px; display: block; }
.mtk-badge__body { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.mtk-badge__name { font-size: 17px; font-weight: 700; color: #F7F6F2; letter-spacing: 0.01em; }
.mtk-badge__label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #78a0fa; font-weight: 600; }

/* RTL support */
[dir="rtl"] .mtk-badge { left: auto; right: 16px; }
[dir="rtl"] .mtk-badge__body { align-items: flex-start; }
[dir="rtl"] .mtk-badge__label { letter-spacing: 0; }

/* Info column */
.mtkph__info { animation: mtkph-fadeUp 1s cubic-bezier(0.2,0.7,0.2,1) 0.2s both; }
.mtkph__meta {
  display: flex; align-items: center; gap: 16px;
  font-family: 'Space Mono','JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--ph-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.mtkph__sku { padding: 6px 12px; border: 1px solid var(--ph-line); border-radius: 4px; }
.mtkph__stock { display: inline-flex; align-items: center; gap: 8px; color: var(--ph-brand-2); }
.mtkph__pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ph-brand-2);
  box-shadow: 0 0 0 0 rgba(120,160,250,0.6);
  animation: mtkph-pulse 2s ease-in-out infinite;
}
@keyframes mtkph-pulse {
  0% { box-shadow: 0 0 0 0 rgba(120,160,250,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(120,160,250,0); }
  100% { box-shadow: 0 0 0 0 rgba(120,160,250,0); }
}

.mtkph__title {
  font-family: 'Space Mono','JetBrains Mono', monospace;
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 52px);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 24px;
  color: var(--ph-paper);
  word-break: break-word;
}

.mtkph__desc {
  font-family: 'Space Mono','JetBrains Mono', monospace;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.65;
  color: rgba(247,246,242,0.78);
  max-width: 56ch;
  margin: 0 0 36px;
}

.mtkph__specs {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}
.mtkph__specs li {
  display: flex; align-items: center; gap: 14px;
  font-family: 'Space Mono','JetBrains Mono', monospace;
  font-size: 13px;
  color: rgba(247,246,242,0.85);
  line-height: 1.4;
}
.mtkph__spec-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ph-line);
  border-radius: 6px;
  color: var(--ph-brand-2);
  flex-shrink: 0;
}
.mtkph__spec-icon svg { width: 18px; height: 18px; }

/* CTAs */
.mtkph__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.mtkph-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: 'Space Mono','JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.mtkph-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.mtkph-btn--primary {
  background: linear-gradient(135deg, var(--ph-brand-2) 0%, var(--ph-brand) 100%);
  color: var(--ph-ink);
  box-shadow: 0 8px 24px rgba(74,123,217,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}
.mtkph-btn--primary svg { color: var(--ph-wa); }
.mtkph-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(74,123,217,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.mtkph-btn--primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.mtkph-btn--primary:hover::before { transform: translateX(100%); }

.mtkph-btn--ghost {
  background: transparent;
  color: var(--ph-paper);
  border-color: var(--ph-line);
}
.mtkph-btn--ghost:hover {
  background: rgba(247,246,242,0.06);
  border-color: rgba(247,246,242,0.4);
}

/* Tabs */
.mtkph__tabs {
  position: relative;
  z-index: 4;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 48px 48px;
  display: flex; gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--ph-line);
}
.mtkph__tab {
  background: transparent;
  color: var(--ph-muted);
  font-family: 'Space Mono','JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 14px 22px;
  border: 1px solid var(--ph-line);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  text-align: left;
}
.mtkph__tab-num {
  font-size: 11px;
  color: var(--ph-muted);
  letter-spacing: 0.18em;
  border-right: 1px solid var(--ph-line);
  padding-right: 12px;
}
.mtkph__tab-name {
  font-size: 13px;
  font-weight: 700;
  color: inherit;
}
.mtkph__tab:hover {
  color: var(--ph-paper);
  border-color: rgba(247,246,242,0.35);
}
.mtkph__tab.is-active {
  color: var(--ph-paper);
  border-color: var(--ph-brand);
  background: linear-gradient(135deg, rgba(74,123,217,0.18), rgba(11,13,12,0.4));
  box-shadow: 0 4px 16px rgba(74,123,217,0.2);
}
.mtkph__tab.is-active .mtkph__tab-num { color: var(--ph-brand-2); border-right-color: rgba(120,160,250,0.3); }

/* Mobile-only progress dots */
.mtkph__dots {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  z-index: 5;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(11,13,12,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 100px;
}
.mtkph__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 0;
  background: rgba(247,246,242,0.35);
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}
.mtkph__dot.is-active {
  background: var(--ph-paper);
  width: 22px;
  border-radius: 4px;
}

@keyframes mtkph-fadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes mtkph-fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

[dir="rtl"] .mtkph__brand-badge { left: auto; right: 16px; }
[dir="rtl"] .mtkph__brand-badge-label {
  border-right: none;
  border-left: 1px solid rgba(120,160,250,0.3);
  padding-right: 0;
  padding-left: 16px;
}
[dir="rtl"] .mtkph-btn:not(.mtkph-btn--primary) svg { transform: scaleX(-1); }

@media (max-width: 1024px) {
  .mtkph__main { grid-template-columns: 1fr; gap: 40px; padding: 32px 32px 80px; }
  .mtkph__tabs { padding: 24px 32px 32px; }
  .mtkph__visual { max-width: 560px; }
  .mtkph__title { font-size: clamp(26px, 6vw, 40px); }
}
@media (max-width: 700px) {
  .mtkph { padding-top: 32px; }
  .mtkph__main { padding: 24px 20px 60px; gap: 28px; }
  .mtkph__visual { max-width: 380px; }
  .mtkph__specs { grid-template-columns: 1fr; gap: 12px; }
  .mtkph__title { font-size: clamp(22px, 5.4vw, 30px); }
  .mtkph__desc { font-size: 14px; line-height: 1.55; margin-bottom: 24px; }
  .mtkph__sku { font-size: 10px; padding: 5px 10px; }
  .mtkph__meta { font-size: 10px; gap: 10px; margin-bottom: 16px; }
  .mtkph-btn { width: 100%; justify-content: center; padding: 13px 18px; }
  .mtkph__specs li { font-size: 12px; gap: 12px; }
  .mtkph__spec-icon { width: 32px; height: 32px; }
  .mtkph__spec-icon svg { width: 16px; height: 16px; }
  .mtkph__tabs { display: none; }  /* hide on mobile — use dots instead */
  .mtkph__dots { display: inline-flex; }
  .mtkph__brand-badge { padding: 10px 14px; gap: 10px; top: 8px; left: 8px; }
  .mtkph__brand-badge-label { font-size: 9px; padding-right: 10px; }
  .mtkph__brand-badge-name { font-size: 12px; }
  .mtkph__arrow { display: none; }  /* hide arrows on mobile — use swipe */
  .mtkph__stage { touch-action: pan-y; }
}
@media (prefers-reduced-motion: reduce) {
  .mtkph__product, .mtkph__pulse, .mtkph__visual, .mtkph__info,
  .mtkph__waves path { animation: none !important; }
}
