:root {
  --ink: #151515;
  --muted: #686868;
  --paper: #f5f3ee;
  --white: #ffffff;
  --line: #dfd9ce;
  --panel: #ece8df;
  --steel: #26282b;
  --orange: #f28a00;
  --blue: #0c6f9d;
  --green: #54735d;
  --shadow: 0 18px 46px rgba(22, 22, 22, 0.16);
  --radius: 8px;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 74px;
  padding: 12px clamp(16px, 4vw, 54px);
  background: rgba(245, 243, 238, 0.94);
  border-bottom: 1px solid rgba(21, 21, 21, 0.1);
  backdrop-filter: blur(16px);
}

.brand,
.header-actions,
.main-nav,
.language-switcher {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-size: 1.28rem;
  font-weight: 900;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.main-nav {
  justify-content: center;
  gap: clamp(16px, 2.5vw, 34px);
  font-size: 0.95rem;
  font-weight: 800;
}

.main-nav > a,
.nav-item > a {
  padding: 12px 0;
  color: #2b2b2b;
  border-bottom: 2px solid transparent;
}

.main-nav > a:hover,
.nav-item:hover > a {
  border-color: var(--orange);
}

.nav-item {
  position: relative;
}

.sub-menu {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 50%;
  min-width: 250px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-item:hover .sub-menu,
.nav-item:focus-within .sub-menu {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.sub-menu a {
  display: block;
  padding: 12px;
  color: #303030;
  border-radius: 6px;
}

.sub-menu a:hover {
  background: #f1eee7;
}

.header-actions {
  gap: 12px;
}

.language-switcher {
  gap: 4px;
  padding: 4px;
  background: #e5e0d6;
  border-radius: var(--radius);
}

.lang-btn {
  min-width: 40px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #343434;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
}

.lang-btn.is-active {
  background: var(--ink);
  color: var(--white);
}

.admin-link {
  padding: 9px 12px;
  color: #2c2c2c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 900;
}

.hero {
  position: relative;
  min-height: clamp(560px, calc(100svh - 74px), 760px);
  overflow: hidden;
  color: var(--white);
  background: var(--steel);
  isolation: isolate;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  animation: heroImageDrift 18s ease-in-out infinite alternate;
}

.hero-overlay {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.9) 0%, rgba(8, 8, 8, 0.68) 45%, rgba(8, 8, 8, 0.08) 100%),
    linear-gradient(0deg, rgba(8, 8, 8, 0.36), rgba(8, 8, 8, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(760px, calc(100% - 36px));
  min-height: inherit;
  margin-inline: clamp(18px, 6vw, 92px);
}

.hero-content .eyebrow,
.hero h1,
.hero p:not(.eyebrow),
.hero-actions {
  opacity: 0;
  transform: translateY(18px);
  animation: heroTextReveal 760ms cubic-bezier(0.18, 0.72, 0.22, 1) forwards;
}

.hero h1 {
  animation-delay: 130ms;
}

.hero p:not(.eyebrow) {
  animation-delay: 260ms;
}

.hero-actions {
  animation-delay: 390ms;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  position: relative;
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.65rem, 5.2vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero h1::after {
  content: "";
  display: block;
  width: min(164px, 42vw);
  height: 4px;
  margin-top: 18px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  animation: heroAccentGrow 900ms ease forwards 520ms;
}

.hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--orange);
  color: #121212;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.42);
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(16px, 4vw, 56px);
}

.section-heading {
  max-width: 860px;
  margin: 0 auto clamp(30px, 5vw, 50px);
  text-align: center;
}

.section-heading h2,
.split-heading h2,
.contact-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.split-heading p:not(.eyebrow),
.contact-copy p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.72;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  max-width: 1260px;
  margin-inline: auto;
}

.scenario-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(20, 20, 20, 0.08);
}

.scenario-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.scenario-card div {
  padding: 16px;
}

.scenario-card h3,
.product-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.scenario-card p,
.product-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.scenario-card a,
.product-card a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--orange);
  font-weight: 900;
}

.products-section {
  background: var(--white);
}

.product-toolbar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto 26px;
  overflow-x: auto;
  padding: 0 4px 8px;
  scroll-snap-type: x proximity;
}

.filter-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: #303030;
  cursor: pointer;
  font-weight: 900;
}

.filter-btn.is-active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.product-grid {
  display: flex;
  gap: 18px;
  max-width: min(1480px, calc(100vw - 32px));
  margin-inline: auto;
  overflow-x: auto;
  padding: 0 4px 16px;
  scroll-padding-inline: 4px;
  scroll-snap-type: x mandatory;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1.05fr);
  flex: 0 0 clamp(780px, 76vw, 1120px);
  overflow: hidden;
  min-width: 0;
  background: var(--paper);
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: var(--radius);
  scroll-snap-align: start;
}

.product-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 0;
  background: #ded8cf;
}

.product-carousel-track {
  display: flex;
  width: calc(var(--slide-count, 1) * 100%);
  height: 100%;
  transform: translateX(0);
}

.product-carousel.is-animated .product-carousel-track {
  animation: productImageScroll var(--slide-time, 12s) ease-in-out infinite alternate;
}

.product-carousel img {
  flex: 0 0 var(--slide-width, 100%);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-dots {
  position: absolute;
  inset-inline: 14px;
  inset-block-end: 12px;
  display: flex;
  gap: 6px;
  justify-content: center;
  pointer-events: none;
}

.product-dots span {
  width: 7px;
  height: 7px;
  margin: 0;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 999px;
}

.product-card > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: clamp(22px, 3vw, 42px);
}

.product-card > div > span {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.product-card li {
  padding: 7px 9px;
  background: var(--white);
  border-radius: 6px;
  color: #343434;
  font-size: 0.8rem;
  font-weight: 800;
}

.product-card a {
  margin-top: auto;
  padding-top: 18px;
}

@keyframes heroTextReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroAccentGrow {
  to {
    transform: scaleX(1);
  }
}

@keyframes heroImageDrift {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.045) translateX(-1.2%);
  }
}

@keyframes productImageScroll {
  0%,
  16% {
    transform: translateX(0);
  }

  84%,
  100% {
    transform: translateX(var(--slide-end, 0%));
  }
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: end;
  max-width: 1260px;
  margin: 0 auto 34px;
}

.factory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1260px;
  margin-inline: auto;
}

.factory-grid figure,
.certificate-grid figure {
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(20, 20, 20, 0.08);
}

.factory-grid figure.wide {
  grid-column: span 2;
}

.factory-grid img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

figcaption {
  padding: 12px 14px;
  color: #3a3a3a;
  font-weight: 900;
}

.guides-section {
  background: #ebe7dc;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1260px;
  margin-inline: auto;
}

.guide-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.08);
}

.guide-card a {
  display: grid;
  height: 100%;
}

.guide-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #ddd7ce;
}

.guide-card div {
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.guide-card span {
  margin-bottom: 10px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-card h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.22;
}

.guide-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.guide-card strong {
  margin-top: auto;
  padding-top: 18px;
  color: var(--orange);
  font-weight: 900;
}

.post-page {
  background: var(--paper);
}

.post-article {
  width: min(920px, calc(100% - 32px));
  margin-inline: auto;
  padding: clamp(42px, 7vw, 90px) 0;
}

.post-article h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.post-summary {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.72;
}

.post-hero-image {
  width: 100%;
  margin: 34px 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.post-body h2,
.post-faq h2 {
  margin: 34px 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.16;
}

.post-body p,
.post-body li,
.post-faq p,
.post-cta p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.78;
}

.post-body ul {
  padding-inline-start: 22px;
}

.post-faq {
  margin-top: 38px;
}

.post-faq details {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.post-faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.post-faq summary {
  cursor: pointer;
  font-weight: 900;
}

.post-cta {
  margin-top: 42px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.08);
}

.post-cta strong {
  display: block;
  font-size: 1.35rem;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
  background:
    linear-gradient(120deg, rgba(18, 18, 18, 0.94), rgba(18, 18, 18, 0.82)),
    url("/assets/images/rolling-door-2.png") center / cover;
  color: var(--white);
}

.contact-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.74);
}

.whatsapp-link {
  display: inline-flex;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-weight: 900;
}

.lead-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.lead-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 900;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #d2d2d2;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.lead-form textarea {
  min-height: 132px;
  resize: vertical;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 138, 0, 0.18);
}

.full-field {
  grid-column: 1 / -1;
}

.form-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--green);
  font-weight: 900;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(16px, 4vw, 56px);
  background: #111;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer strong {
  color: var(--white);
}

.empty-state,
.load-error {
  grid-column: 1 / -1;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

[dir="rtl"] body {
  font-family: Tahoma, Arial, sans-serif;
}

[dir="rtl"] .hero-overlay {
  background:
    linear-gradient(270deg, rgba(8, 8, 8, 0.9) 0%, rgba(8, 8, 8, 0.68) 45%, rgba(8, 8, 8, 0.08) 100%),
    linear-gradient(0deg, rgba(8, 8, 8, 0.36), rgba(8, 8, 8, 0));
}

[dir="rtl"] .eyebrow {
  letter-spacing: 0;
}

[dir="rtl"] .hero h1::after {
  transform-origin: right center;
}

[dir="rtl"] .sub-menu {
  transform: translate(50%, 8px);
}

[dir="rtl"] .nav-item:hover .sub-menu,
[dir="rtl"] .nav-item:focus-within .sub-menu {
  transform: translate(50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-image,
  .hero-content .eyebrow,
  .hero h1,
  .hero h1::after,
  .hero p:not(.eyebrow),
  .hero-actions,
  .product-carousel.is-animated .product-carousel-track {
    animation: none;
  }

  .hero-content .eyebrow,
  .hero h1,
  .hero p:not(.eyebrow),
  .hero-actions {
    opacity: 1;
    transform: none;
  }

  .hero h1::after {
    transform: none;
  }
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .scenario-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .factory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    flex-basis: min(860px, calc(100vw - 36px));
    grid-template-columns: minmax(300px, 0.95fr) minmax(300px, 1.05fr);
  }

  .split-heading,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 10px 14px;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .admin-link {
    display: none;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    overflow: visible;
    font-size: 0.78rem;
  }

  .main-nav > a,
  .nav-item > a {
    display: block;
    padding: 9px 5px;
    overflow-wrap: anywhere;
    text-align: center;
    background: #e9e4da;
    border: 0;
    border-radius: 6px;
  }

  .sub-menu {
    position: fixed;
    inset-inline: 12px;
    inset-block-start: 112px;
    min-width: 0;
    transform: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }

  .hero h1 {
    max-width: 13ch;
    font-size: clamp(2.1rem, 10.4vw, 3.55rem);
  }

  .hero-actions,
  .lead-form,
  .scenario-grid,
  .factory-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    max-width: calc(100vw - 20px);
  }

  .product-card {
    flex-basis: min(420px, calc(100vw - 28px));
    grid-template-columns: 1fr;
  }

  .product-carousel {
    min-height: 280px;
    aspect-ratio: 4 / 3;
  }

  .hero-actions {
    display: grid;
    width: min(100%, 360px);
  }

  .section-heading {
    text-align: start;
  }

  .factory-grid figure.wide {
    grid-column: auto;
  }

  .filter-btn {
    flex: 0 0 auto;
    max-width: 78vw;
  }

  .site-footer {
    flex-direction: column;
  }
}
