/* Prime Chemca — site-wide responsive layer
   Overrides inline layout styles on tablet and phone. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img, video, svg, canvas {
  max-width: 100%;
  height: auto;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

input, select, textarea, button {
  max-width: 100%;
}

.contact-form-card input,
.contact-form-card select,
.contact-form-card textarea {
  width: 100%;
  box-sizing: border-box;
}

button, a, .nav-toggle, .mobile-nav-acc {
  touch-action: manipulation;
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid #e5e7e2;
  background: #ffffff;
  color: #16150f;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle:focus-visible {
  outline: 2px solid #1d9417;
  outline-offset: 2px;
}

.nav-toggle-bars {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

body.nav-open .nav-toggle-bars {
  background: transparent;
}

body.nav-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: #ffffff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 20px 36px;
  border-top: 1px solid #e5e7e2;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .back-to-top-btn {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none;
}

body.nav-open .mobile-nav {
  display: block;
}

.mobile-nav a,
.mobile-nav-acc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 4px;
  border: none;
  border-bottom: 1px solid #eef0ec;
  background: none;
  color: #16150f;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.mobile-nav a:hover,
.mobile-nav-acc:hover {
  color: #1d9417;
}

.mobile-nav-sub {
  display: none;
  padding: 4px 0 10px 8px;
}

.mobile-nav-sub.is-open {
  display: block;
}

.mobile-nav-sub a {
  font-size: 13.5px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  font-family: Archivo, sans-serif;
  padding: 11px 4px;
  border-bottom: 1px solid #f4f6f3;
}

.mobile-nav-sub a span {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  color: #8a8478;
  letter-spacing: 0.04em;
  margin-top: 2px;
  text-transform: none;
}

.mobile-nav-quote {
  display: flex !important;
  align-items: center;
  justify-content: center !important;
  margin-top: 18px;
  padding: 16px 18px !important;
  background: #16150f !important;
  color: #ffffff !important;
  border: none !important;
  text-align: center;
}

.mobile-nav-contact {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eef0ec;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
}

.mobile-nav-contact a {
  display: inline;
  width: auto;
  padding: 0;
  border: none;
  font-size: 12.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.03em;
  color: #5e635b;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.site-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid #2c2a22;
}

.site-footer-bottom {
  padding: 26px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* Breakpoints                                                         */
/* ------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav-desktop,
  .site-quote-desktop {
    display: none !important;
  }

  .site-topbar-contacts {
    display: none !important;
  }

  .site-mainbar-inner {
    gap: 12px !important;
  }
}

@media (max-width: 1024px) {
  .site-footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 36px !important;
  }

  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  [style*="grid-template-columns:1."]:not(.site-footer-grid),
  [style*="grid-template-columns:0."],
  [style*="grid-template-columns:1fr 0."] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  [style*="display:grid"] > * {
    min-width: 0;
    max-width: 100%;
  }

  .hero-grid > div:last-child {
    display: none !important;
  }

  .hero-grid > div:first-child {
    padding: 64px 0 56px !important;
  }

  h1 {
    font-size: clamp(30px, 6vw, 50px) !important;
    line-height: 1.08 !important;
  }

  h2 {
    font-size: clamp(24px, 4.4vw, 36px) !important;
    line-height: 1.12 !important;
  }
}

@media (max-width: 960px) {
  [style*="max-width:1320px"],
  [style*="max-width:1280px"],
  [style*="max-width:980px"],
  [style*="max-width:880px"] {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .site-topbar-inner,
  .site-mainbar-inner,
  .site-footer-inner {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .hero-stats {
    flex-wrap: wrap !important;
  }

  .hero-stats > div {
    padding-left: 0 !important;
    padding-right: 24px !important;
    padding-top: 18px !important;
    border-left: none !important;
    min-width: 120px;
  }
}

@media (max-width: 768px) {
  .site-topbar {
    display: none !important;
  }

  .site-mainbar-inner {
    height: 72px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .site-logo-img {
    height: 48px !important;
  }

  .logo-title {
    font-size: 18px !important;
  }

  .logo-slogan {
    font-size: 8px !important;
    letter-spacing: 0.12em !important;
  }

  [style*="max-width:1320px"],
  [style*="max-width:1280px"],
  [style*="max-width:980px"],
  [style*="max-width:880px"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .site-footer-inner {
    padding: 48px 16px 0 !important;
  }

  .site-footer-grid {
    padding-bottom: 36px !important;
  }

  [style*="padding:64px 56px"],
  [style*="padding:54px 48px"] {
    padding: 36px 20px !important;
  }

  .contact-form-card {
    padding: 22px 18px !important;
  }

  [style*="aspect-ratio:21/8"] {
    aspect-ratio: 16 / 10 !important;
  }

  [style*="minmax(330px"],
  [style*="minmax(280px"] {
    grid-template-columns: 1fr !important;
  }

  .rs-split {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .product-card {
    flex-basis: min(310px, calc(100vw - 64px)) !important;
    width: min(310px, calc(100vw - 64px)) !important;
  }

  #product-slider-container {
    margin-left: -16px !important;
    margin-right: -16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .faq-btn span:first-child {
    font-size: 16px !important;
  }

  .back-to-top-btn {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }

  input, select, textarea {
    font-size: 16px !important;
  }

  [style*="white-space:nowrap"] {
    white-space: normal !important;
  }
}

@media (max-width: 640px) {
  .site-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start !important;
  }

  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  [style*="minmax(220px"],
  [style*="minmax(200px"] {
    grid-template-columns: 1fr !important;
  }

  .logo-slogan {
    display: none !important;
  }

  .hero-stats {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .hero-stats > div {
    padding: 16px 0 !important;
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
  }

  .hero-stats > div:first-child {
    border-top: none;
  }

  [style*="min-height:100vh"] {
    min-height: 0 !important;
    padding-top: 56px;
    padding-bottom: 56px;
  }
}

@media (max-width: 480px) {
  .site-logo-img {
    height: 42px !important;
  }

  .logo-title {
    font-size: 16px !important;
  }

  [style*="padding:96px"],
  [style*="padding:90px"],
  [style*="padding:88px"],
  [style*="padding:84px"],
  [style*="padding:80px"],
  [style*="padding:74px"],
  [style*="padding:72px"] {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .hero-grid > div:first-child {
    padding: 40px 0 36px !important;
  }

  .hero-grid a {
    width: 100%;
    justify-content: center;
  }

  a[href^="mailto:"],
  a[href^="tel:"] {
    overflow-wrap: anywhere;
  }

  [style*="aspect-ratio:21/8"] span {
    left: 10px !important;
    right: 10px;
    bottom: 10px !important;
    max-width: calc(100% - 20px);
  }
}

@media (min-width: 1101px) {
  .mobile-nav {
    display: none !important;
  }

  body.nav-open {
    overflow: auto;
  }
}
