/*
Theme Name: BabyMate Custom
Theme URI: https://test.zsbabymate.com
Author: BabyMate
Description: Custom WordPress theme for BabyMate baby and pet stroller factory website.
Version: 0.2.0
Text Domain: babymate
*/

:root {
  --ink: #09111f;
  --muted: #657082;
  --line: #ece8e1;
  --paper: #fffaf4;
  --cream: #fff4e9;
  --orange: #ff9853;
  --orange-deep: #e87528;
  --white: #ffffff;
  --hero-title-family: "Montserrat", Arial, sans-serif;
  --hero-title-size: 92px;
  --hero-title-weight: 800;
  --content-width: 1440px;
  --page-gutter: 96px;
  --product-arrow-size: 15px;
  --product-arrow-stroke: 3px;
  --product-arrow-gap: 10px;
  --product-arrow-offset: -3px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

body.admin-bar .site-header {
  top: 32px;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(9, 17, 31, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content-width), calc(100% - var(--page-gutter)));
  max-width: var(--content-width);
  margin: 0 auto;
}

.brand-logo img {
  width: 236px;
  height: auto;
}

.header-actions { display: flex; align-items: center; gap: 28px; }
.site-language-switcher { position: relative; }
.site-language-current { display: inline-flex; height: 40px; align-items: center; gap: 12px; border: 0; padding: 0; background: transparent; color: #000; font-size: 18px; font-weight: 900; }
.language-chevron { width: 10px; height: 10px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.site-language-menu { position: absolute; top: calc(100% + 10px); left: 50%; z-index: 80; display: grid; min-width: 88px; padding: 8px; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; background: #fff; box-shadow: 0 16px 38px rgba(0,0,0,.16); opacity: 0; pointer-events: none; transform: translate(-50%, 7px); transition: opacity .15s ease, transform .15s ease; }
.site-language-menu a { border-radius: 8px; padding: 9px 12px; font-size: 14px; font-weight: 900; text-align: center; }
.site-language-menu a:hover, .site-language-menu a:focus-visible { background: #fff0e6; outline: none; }
.site-language-switcher:hover .site-language-menu, .site-language-switcher:focus-within .site-language-menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.site-search-toggle { display: grid; width: 40px; height: 40px; place-items: center; border: 0; padding: 8px; background: transparent; color: #000; }
.site-search-toggle svg { width: 24px; height: 24px; fill: currentColor; }
.site-search-toggle:hover { color: #ef9b5c; }
.site-search-toggle:focus-visible, .site-search-close:focus-visible, .site-search-result:focus-visible { outline: 3px solid #ef9b5c; outline-offset: 3px; }
.site-search-form input:focus, .site-search-form input:focus-visible { outline: none; box-shadow: none; }
.site-search-panel { position: fixed; inset: 0; z-index: 9999; }
.site-search-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(10, 12, 16, .62); backdrop-filter: blur(5px); }
.site-search-dialog { position: relative; width: min(760px, calc(100% - 40px)); max-height: min(720px, calc(100vh - 80px)); overflow: auto; margin: 40px auto; border-radius: 20px; padding: 34px; background: #fff; box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.site-search-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.site-search-heading span { color: #ef9b5c; font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.site-search-heading h2 { margin: 6px 0 24px; font-size: 34px; line-height: 1.15; }
.site-search-close { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f2f2f2; font-size: 30px; line-height: 1; }
.site-search-form { display: grid; grid-template-columns: 24px 1fr auto; gap: 14px; align-items: center; border: 2px solid #111; border-radius: 999px; padding: 7px 8px 7px 20px; }
.site-search-form svg { width: 21px; height: 21px; fill: #111; }
.site-search-form input { min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font-size: 17px; font-weight: 700; }
.site-search-form button { height: 44px; border: 0; border-radius: 999px; padding: 0 24px; background: #ef9b5c; color: #111; font-weight: 900; }
.site-search-hint { margin: 12px 8px 20px; color: #6b6b6b; font-size: 13px; }
.site-search-results { display: grid; gap: 10px; }
.site-search-result { width: 100%; border: 1px solid #e5e5e5; border-radius: 14px; padding: 16px 18px; background: #fff; text-align: left; transition: border-color .15s ease, transform .15s ease; }
.site-search-result:hover { border-color: #ef9b5c; transform: translateY(-1px); }
.site-search-result strong, .site-search-result span { display: block; }
.site-search-result strong { margin-bottom: 5px; font-size: 16px; }
.site-search-result span { overflow: hidden; color: #666; font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.site-search-empty { border-radius: 14px; padding: 22px; background: #f6f6f6; color: #555; text-align: center; }
.search-target-flash { animation: search-target-flash 1.5s ease; }
@keyframes search-target-flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: inset 0 0 0 5px #ef9b5c; } }
body.site-search-open { overflow: hidden; }

@media (max-width: 760px) {
  .header-actions { gap: 10px; }
  .site-search-dialog { width: calc(100% - 24px); margin: 12px auto; padding: 24px 18px; }
  .site-search-heading h2 { font-size: 28px; }
  .site-search-form { grid-template-columns: 22px 1fr; }
  .site-search-form button { grid-column: 1 / -1; width: 100%; }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 18px;
  font-weight: 800;
}

.nav-dropdown {
  position: relative;
  padding: 36px 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--product-arrow-gap);
}

.nav-chevron {
  width: var(--product-arrow-size);
  height: var(--product-arrow-size);
  border-right: var(--product-arrow-stroke) solid currentColor;
  border-bottom: var(--product-arrow-stroke) solid currentColor;
  transform: translateY(var(--product-arrow-offset)) rotate(45deg);
}

.dropdown-menu {
  position: absolute;
  top: 88px;
  left: 50%;
  display: grid;
  min-width: 240px;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(9, 17, 31, 0.08);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(9, 17, 31, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: 160ms ease;
}

.dropdown-menu a {
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 14px;
  font-weight: 800;
}

.dropdown-menu a:hover {
  background: var(--cream);
}

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

.header-cta {
  display: inline-flex;
  min-width: 126px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: #ede8df;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 900ms ease, visibility 0s linear 900ms;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 900ms ease;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(9, 17, 31, 0.7), rgba(9, 17, 31, 0.25) 42%, rgba(9, 17, 31, 0.05));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  min-height: 760px;
  width: min(var(--content-width), calc(100% - var(--page-gutter)));
  max-width: var(--content-width);
  margin: 0 auto;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1040px;
  margin: 24px 0 22px;
  font-family: var(--hero-title-family);
  font-size: clamp(48px, 6.1vw, var(--hero-title-size));
  line-height: 1.02;
  font-weight: var(--hero-title-weight);
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero p {
  max-width: 560px;
  margin: 0 0 46px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 600;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  display: inline-flex;
  min-width: 162px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 24px;
  font-weight: 900;
}

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

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

.hero-slider-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-slider-arrow,
.hero-slider-dot {
  border: 0;
  padding: 0;
  cursor: pointer;
}

.hero-slider-arrow {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(9, 17, 31, 0.28);
  color: var(--white);
  backdrop-filter: blur(8px);
  transition: background 180ms ease, border-color 180ms ease;
}

.hero-slider-arrow:hover,
.hero-slider-arrow:focus-visible {
  border-color: var(--white);
  background: rgba(9, 17, 31, 0.58);
}

.hero-slider-arrow span {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.hero-slider-prev span {
  transform: translateX(2px) rotate(-135deg);
}

.hero-slider-next span {
  transform: translateX(-2px) rotate(45deg);
}

.hero-slider-dots {
  display: flex;
  gap: 8px;
}

.hero-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 180ms ease, background 180ms ease;
}

.hero-slider-dot.is-active {
  width: 26px;
  background: var(--orange);
}

.hero-slider-dot:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.section {
  padding: 96px 0;
}

.container {
  width: min(var(--content-width), calc(100% - var(--page-gutter)));
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-heading {
  display: grid;
  gap: 18px;
  max-width: 850px;
  margin-bottom: 54px;
}

.section-heading.center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 900;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 600;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.product-card {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--cream);
}

.product-card img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.product-card-title {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 14px;
  padding: 17px 20px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 18px;
  font-weight: 900;
}

.capability-section {
  background: var(--paper);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.capability-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 18px 60px rgba(9, 17, 31, 0.07);
}

.capability-card img {
  height: 170px;
  width: 100%;
  object-fit: cover;
}

.capability-card div {
  padding: 24px;
}

.capability-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 900;
}

.capability-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 600;
}

.factory-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  overflow: hidden;
  border-radius: 30px;
  background: var(--orange);
}

.factory-panel img {
  width: 100%;
  height: 560px;
  object-fit: cover;
}

.factory-copy {
  display: grid;
  align-content: center;
  padding: 56px;
  color: var(--white);
}

.factory-copy h2 {
  margin: 0 0 22px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  font-weight: 900;
}

.factory-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  background: var(--white);
}

.stat-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--orange-deep);
  font-size: 44px;
  line-height: 1;
  font-weight: 900;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.contact-band {
  background: var(--ink);
  color: var(--white);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
  align-items: center;
}

.contact-band h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 900;
}

.contact-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 600;
}

.contact-card {
  display: grid;
  gap: 12px;
  border-radius: 24px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.08);
}

.contact-card a,
.contact-card span {
  color: var(--white);
  font-weight: 800;
}

.site-footer {
  padding: 42px 0;
  background: var(--white);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content-width), calc(100% - var(--page-gutter)));
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Keep the wide hero close to the source image ratio on desktop displays.
   The cap prevents the banner from taking over the entire 4K viewport. */
@media (min-width: 1920px) {
  .hero,
  .hero-content {
    min-height: clamp(760px, 40.24vw, 1440px);
  }

  .hero-media img {
    object-position: center center;
  }
}

@media (max-width: 980px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .header-inner {
    width: calc(100% - 48px);
    flex-wrap: wrap;
    gap: 18px;
    padding: 18px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    gap: 22px;
    overflow-x: auto;
    font-size: 15px;
  }

  .nav-dropdown {
    padding: 0;
  }

  .product-grid,
  .capability-grid,
  .factory-panel,
  .stats-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero-content {
    min-height: 680px;
  }

  .hero-content,
  .container,
  .footer-inner {
    width: calc(100% - 48px);
  }

  .factory-copy {
    padding: 36px 24px;
  }

  .factory-panel img {
    height: 390px;
  }
}

@media (max-width: 640px) {
  .brand-logo img {
    width: 190px;
  }

  .header-cta {
    display: none;
  }

  .section {
    padding: 68px 0;
  }

  .hero-slider-controls {
    left: 50%;
    bottom: 22px;
  }

  .hero-slider-arrow {
    width: 34px;
    height: 34px;
  }

  .product-card,
  .product-card img {
    min-height: 360px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }
}
