/* ==========================================================================
   cleanxi. — Cleaning Chemistry. Supplied Simply.
   Exact 1:1 Pixel-Accurate Stylesheet + Responsive Scaling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&display=swap');

:root {
  --bg-page: #F9F8F4;
  --bg-card: #F3F1ED;
  --bg-card-hover: #EAE7E1;
  --text-dark: #121716;
  --text-body: #2C3230;
  --text-muted: #5A625F;
  --brand-teal: #115E50;
  --brand-teal-italic: #136B5E;
  --brand-dot: #157363;
  --btn-dark: #16211F;
  --btn-dark-hover: #0F4C41;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-page);
  color: var(--text-dark);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Main 1536px Design Canvas Container */
.site-wrapper {
  --u: calc(min(100vw, 1536px) / 1536);
  width: 100%;
  max-width: 1536px;
  margin: 0 auto;
  background-color: var(--bg-page);
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Hero & Header Section (Proportional 1536 x 695 Stage on Desktop)
   ========================================================================== */
.hero-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1536 / 695;
  background-color: #EFEEE9;
  overflow: hidden;
  user-select: none;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  z-index: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

/* Header / Navbar */
.site-header {
  position: relative;
  width: 100%;
  height: calc(92 * var(--u));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(17 * var(--u)) 7.8125% 0 7.8125%; /* 120px / 1536px = 7.8125% */
}

.brand-logo-group {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-dark);
  margin-top: calc(-3 * var(--u));
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-sans);
  font-size: calc(48 * var(--u));
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.02;
  color: #121716;
}

.brand-wordmark .dot {
  color: var(--brand-dot);
}

.brand-tagline {
  font-family: var(--font-sans);
  font-size: calc(9.8 * var(--u));
  font-weight: 500;
  letter-spacing: 0.235em;
  text-transform: uppercase;
  color: #2B3130;
  margin-top: calc(6 * var(--u));
  margin-left: calc(2 * var(--u));
  white-space: nowrap;
}

/* Center Navigation Links */
.main-nav {
  display: flex;
  align-items: center;
  gap: calc(49 * var(--u));
  margin-top: calc(17 * var(--u));
  margin-left: calc(-48 * var(--u));
  flex-shrink: 0;
}

.nav-link {
  position: relative;
  font-family: var(--font-sans);
  font-size: calc(14.2 * var(--u));
  font-weight: 500;
  color: #1B2120;
  text-decoration: none;
  padding-bottom: calc(15 * var(--u));
  transition: color 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--brand-teal);
}

.nav-link.active {
  font-weight: 600;
  color: #121716;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2.5px;
  background-color: var(--brand-teal);
  border-radius: 2px;
}

/* Right Header Actions (Search + CTA Pill) */
.header-actions {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  margin-top: calc(5 * var(--u));
  flex-shrink: 0;
}

.icon-search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #141918;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(34 * var(--u));
  height: calc(34 * var(--u));
  border-radius: 50%;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.icon-search-btn svg {
  width: calc(21 * var(--u));
  height: calc(21 * var(--u));
}

.icon-search-btn:hover {
  background-color: rgba(18, 23, 22, 0.07);
  transform: scale(1.05);
}

.btn-pill-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(11 * var(--u));
  background-color: #161F1E;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: calc(14 * var(--u));
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  border: none;
  border-radius: 9999px;
  height: calc(48 * var(--u));
  padding: 0 calc(25 * var(--u));
  cursor: pointer;
  transition: background-color 0.22s ease, transform 0.2s ease, box-shadow 0.22s ease;
  white-space: nowrap;
}

.btn-pill-dark:hover {
  background-color: #0F4C41;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 76, 65, 0.22);
}

.btn-pill-dark svg {
  width: calc(15 * var(--u));
  height: calc(15 * var(--u));
  transition: transform 0.2s ease;
}

.btn-pill-dark:hover svg {
  transform: translateX(3px);
}

/* ==========================================================================
   Hero Left Content Column
   ========================================================================== */
.hero-content {
  padding-left: 7.95%; /* ~122px on 1536px */
  padding-top: calc(64 * var(--u));  /* exact y=156 for eyebrow */
  max-width: 50%;
}

.eyebrow-label {
  font-family: var(--font-sans);
  font-size: calc(11.7 * var(--u));
  font-weight: 700;
  letter-spacing: 0.145em;
  text-transform: uppercase;
  color: #124C40;
  margin-bottom: calc(17 * var(--u));
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: calc(76 * var(--u));
  font-weight: 400;
  line-height: 0.99;
  letter-spacing: -0.022em;
  color: #141817;
  margin-bottom: calc(20 * var(--u));
}

.hero-headline .italic-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: #136A5C;
  letter-spacing: -0.015em;
}

.hero-description {
  font-family: var(--font-sans);
  font-size: calc(16.75 * var(--u));
  font-weight: 400;
  line-height: 1.56;
  letter-spacing: 0.002em;
  color: #272D2B;
  max-width: calc(525 * var(--u));
  margin-bottom: calc(30 * var(--u));
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
}

.btn-explore {
  height: calc(48 * var(--u));
  padding: 0 calc(30 * var(--u));
  background-color: #172220;
  font-size: calc(14 * var(--u));
  gap: calc(14 * var(--u));
}

.btn-how-it-works {
  display: inline-flex;
  align-items: center;
  gap: calc(15 * var(--u));
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: calc(13.7 * var(--u));
  font-weight: 500;
  color: #1B2120;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.btn-how-it-works:hover {
  opacity: 0.8;
}

.play-circle {
  width: calc(47 * var(--u));
  height: calc(47 * var(--u));
  border-radius: 50%;
  background-color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.btn-how-it-works:hover .play-circle {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.11);
}

.play-circle svg {
  width: calc(13 * var(--u));
  height: calc(13 * var(--u));
  margin-left: calc(2 * var(--u));
  color: #141918;
}

/* ==========================================================================
   Product Categories Section (Bottom Section: y=695..1024)
   ========================================================================== */
.categories-section {
  position: relative;
  z-index: 3;
  background-color: var(--bg-page);
  padding: 1px 7.8125% calc(28 * var(--u)) 7.8125%; /* 120px left & right on 1536px */
}

.categories-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: calc(-26 * var(--u));
  margin-bottom: calc(18 * var(--u));
}

.categories-title-block .eyebrow-label {
  font-size: calc(11.4 * var(--u));
  letter-spacing: 0.145em;
  color: #134E42;
  margin-bottom: calc(10 * var(--u));
}

.categories-heading {
  font-family: var(--font-serif);
  font-size: calc(45 * var(--u));
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #141817;
}

.categories-heading .italic-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: #156B5D;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: calc(9 * var(--u));
  font-family: var(--font-sans);
  font-size: calc(13.5 * var(--u));
  font-weight: 500;
  color: #1B2120;
  text-decoration: none;
  margin-bottom: calc(24 * var(--u));
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.view-all-link:hover {
  color: var(--brand-teal);
}

.view-all-link svg {
  transition: transform 0.2s ease;
}

.view-all-link:hover svg {
  transform: translateX(3px);
}

/* 8-Column Product Category Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: calc(8 * var(--u));
}

.category-card {
  background-color: var(--bg-card);
  border-radius: calc(12 * var(--u));
  padding: calc(10 * var(--u)) calc(14 * var(--u)) calc(16 * var(--u)) calc(20 * var(--u));
  height: calc(173 * var(--u));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text-dark);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.category-card.active-filter {
  outline: 2px solid var(--brand-teal);
  background-color: #EBF2F0;
}

.category-thumb-wrap {
  width: 100%;
  height: calc(82 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: calc(-4 * var(--u));
}

.category-thumb {
  max-width: 100%;
  max-height: calc(82 * var(--u));
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.category-card:hover .category-thumb {
  transform: scale(1.04);
}

.category-card-footer {
  display: flex;
  flex-direction: column;
  gap: calc(9 * var(--u));
}

.category-name {
  font-family: var(--font-sans);
  font-size: calc(13.2 * var(--u));
  font-weight: 500;
  line-height: 1.28;
  color: #181D1C;
  letter-spacing: -0.01em;
}

.category-arrow {
  color: #181D1C;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.category-arrow svg {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
}

.category-card:hover .category-arrow {
  transform: translateX(4px);
  color: var(--brand-teal);
}

/* ==========================================================================
   Interactive Modals & Drawers (Search, Quotation, Video, Category Drawer)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(14, 22, 20, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background-color: #F9F8F4;
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  position: relative;
  border: 1px solid rgba(18, 23, 22, 0.08);
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background-color: #EAE8E1;
  color: #141817;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background-color: #DCD9D0;
}

.modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: 8px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  color: #141817;
  margin-bottom: 10px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #1B2120;
  margin-bottom: 5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid #D5D3CA;
  background-color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: #141817;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-teal);
}

.search-results-list {
  margin-top: 16px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background-color: #F2F0EB;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.search-result-item:hover {
  background-color: #E6E3DC;
}

/* ==========================================================================
   Responsive Breakpoints (Tablet & Mobile)
   ========================================================================== */
@media (max-width: 760px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
}

@media (max-width: 820px) {
  .site-wrapper {
    --u: 0.72px;
  }
  .hero-stage {
    aspect-ratio: auto;
    min-height: 540px;
    padding-bottom: 32px;
  }
  .site-header {
    flex-wrap: wrap;
    height: auto;
    gap: 12px;
    padding: 16px 5%;
  }
  .main-nav {
    order: 3;
    width: 100%;
    margin: 4px 0 0 0;
    justify-content: flex-start;
    gap: 24px;
    overflow-x: auto;
  }
  .hero-content {
    max-width: 92%;
    padding: 24px 5% 28px 5%;
    background: linear-gradient(90deg, rgba(239,238,233,0.92) 0%, rgba(239,238,233,0.75) 80%, transparent 100%);
    border-radius: 16px;
  }
  .categories-section {
    padding: 24px 5% 40px 5%;
  }
  .categories-header {
    margin-top: 0;
  }
}

@media (max-width: 600px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .categories-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}
