/* Order + category pages — Ninseo theme tokens + responsive layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body.theme-ninseo.order-page,
body.order-page.theme-ninseo {
  --text: #1b1d29;
  --text-muted: #5c6070;
  --bg: #f4f5fa;
  --bg-elevated: #ffffff;
  --border: #e3e6f0;
  --link: #dd6ba0;
  --link-visited: #b84f82;
  --accent: #dd6ba0;
  --accent-hover: #c9558c;
  --radius: 14px;
  --tap-min: 44px;
  --ub-pad-x: clamp(0.85rem, 3.2vw, 1.5rem);
  overflow-x: clip;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 0.75rem 1rem;
  background: #fff;
  color: #000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Keep service content from fighting Elementor header chrome */
body.order-page .site-main {
  min-height: 0 !important;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.ub-order-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem var(--ub-pad-x) 3rem;
  /* Clear sticky Ninseo header on small screens */
  padding-top: max(1.25rem, calc(env(safe-area-inset-top, 0px) + 5.5rem));
}

@media (min-width: 1025px) {
  .ub-order-wrap {
    padding-top: 1.75rem;
  }
}

.order-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

/* Mobile / tablet: form first, then article */
.order-layout > .order-aside {
  order: -1;
}

.order-layout > .order-article {
  order: 0;
  min-width: 0;
  max-width: none;
  width: 100%;
}

@media (min-width: 960px) {
  .order-layout {
    grid-template-columns: minmax(0, 1fr) min(22rem, 34%);
    gap: 2.5rem;
  }

  .order-layout > .order-aside {
    order: 0;
  }

  .order-layout > .order-article {
    max-width: 42rem;
  }
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent-hover);
}

.order-article h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 5vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.order-h1 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.order-platform-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .order-platform-badge {
    width: 40px;
    height: 40px;
  }
}

.order-hero-icon {
  margin: 0 0 0.85rem;
  max-width: min(96px, 28vw);
}

@media (min-width: 768px) {
  .order-hero-icon {
    max-width: 140px;
  }
}

@media (min-width: 960px) {
  .order-hero-icon {
    max-width: 180px;
  }
}

.order-hero-icon img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.platform-hub-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.platform-hub-list li {
  margin: 0;
}

.platform-hub-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.85rem;
  text-decoration: none;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  min-height: var(--tap-min);
}

@media (min-width: 768px) {
  .platform-hub-list {
    gap: 0.5rem;
  }

  .platform-hub-list a {
    padding: 0.85rem 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
  }

  .platform-hub-list li:last-child a {
    border-bottom: 0;
  }
}

.platform-hub-list a:hover,
.platform-hub-list a:focus-visible {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--link) 35%, var(--border));
}

.platform-hub-list__name {
  color: var(--link);
  font-weight: 600;
  flex: 1 1 12rem;
  overflow-wrap: anywhere;
}

.platform-hub-list__price {
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.order-article h2 {
  margin: 1.75rem 0 0.65rem;
  font-size: clamp(1.1rem, 3.5vw, 1.25rem);
  color: var(--text);
}

.order-article h3 {
  margin: 1.15rem 0 0.45rem;
  font-size: 1.02rem;
  color: var(--text);
}

.order-article .lede {
  font-size: clamp(1rem, 2.8vw, 1.05rem);
  color: var(--text);
}

.order-article p,
.order-article li {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.order-article strong {
  color: var(--text);
}

.order-article a,
.order-article a:visited {
  color: var(--link);
}

.catalog-facts,
.related-list {
  padding-left: 1.15rem;
  margin: 0.5rem 0 0;
}

.order-article .muted {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.order-aside {
  position: relative;
  width: 100%;
  min-width: 0;
}

@media (min-width: 960px) {
  .order-aside {
    position: sticky;
    top: 6.5rem;
  }
}

.order-form {
  position: relative;
  width: 100%;
  padding: 1.15rem 1.05rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(27, 29, 41, 0.06);
  overflow: hidden;
}

@media (min-width: 768px) {
  .order-form {
    padding: 1.25rem 1.2rem 1.35rem;
  }
}

.order-form__accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--order-accent, var(--accent));
}

.order-form__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.05rem, 3vw, 1.15rem);
  color: var(--text);
}

.order-form__price {
  margin: 0;
  color: var(--accent-hover);
  font-weight: 600;
}

.order-form__limits {
  margin: 0.15rem 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.order-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.order-field input,
.order-field select {
  width: 100%;
  max-width: 100%;
  min-height: var(--tap-min);
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* avoid iOS zoom on focus */
}

.order-field input:focus-visible,
.order-field select:focus-visible {
  outline: 2px solid var(--order-accent, var(--accent));
  outline-offset: 1px;
}

.order-total {
  margin: 0.5rem 0 1rem;
  font-size: 1.05rem;
  color: var(--text);
}

.order-submit,
a.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: var(--tap-min);
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--order-accent, var(--accent));
  color: #fff !important;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.order-submit:hover,
a.cta-primary:hover {
  filter: brightness(0.95);
}

.order-note {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Tablet: comfortable two-column hub cards when space allows */
@media (min-width: 600px) and (max-width: 959px) {
  .platform-hub-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .platform-hub-list a {
    height: 100%;
    align-content: center;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .ub-order-wrap {
    padding-top: 1rem;
    padding-bottom: 2.5rem;
  }

  .order-form {
    border-radius: 12px;
  }

  .breadcrumb {
    font-size: 0.8rem;
  }
}

/* Reduce Elementor/header overflow on narrow viewports for order pages */
@media (max-width: 1024px) {
  body.order-page .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100% !important;
  }

  body.order-page img,
  body.order-page svg,
  body.order-page video,
  body.order-page iframe {
    max-width: 100%;
  }
}
