/* =====================================================
   HERO — FINAL STABLE VERSION
   Container: 1140px
   Height: 520px
   ===================================================== */

.hero {
  padding: 40px 0;
  position: relative;
  z-index: 10;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =====================================================
   MAIN GRID
   ===================================================== */

.hero-inner {
  max-width: 1140px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 640px 476px;
  column-gap: 24px;

  height: 520px;
  box-sizing: border-box;
}

/* =====================================================
   LEFT — SLIDER
   ===================================================== */

.hero-slider {
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
}

.hero-slider,
.hero-slider .swiper,
.hero-slider .swiper-wrapper,
.hero-slider .swiper-slide,
.hero-slide {
  height: 100%;
}

.hero-slider .swiper-slide {
  overflow: hidden;
}

.hero-slide {
  position: relative;
  overflow: hidden;
}

.hero-slide-bg {
  position: absolute !important;
  inset: 0;
  top: 0;
  left: 0;

  width: 100% !important;
  height: 100% !important;

  display: block;
  object-fit: cover !important;
  object-position: center center;
  max-width: none !important;
  max-height: none !important;
}

/* overlay */
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.55),
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.05)
  );
  z-index: 1;
}

/* =====================================================
   CONTENT — FIXED LEVELS FOR ALL SLIDES
   ===================================================== */

.hero-slide-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  height: 100%;
  padding: 56px;
  color: #ffffff;
  box-sizing: border-box;

  display: grid;
  grid-template-rows: 112px 96px auto;
  align-content: start;
}

/* TITLE */
.hero-slide-content h2 {
  font-size: 44px;
  line-height: 1.05;
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;

  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* TEXT */
.hero-slide-content p {
  font-size: 16px;
  line-height: 1.5;
  margin: 18px 0 0 0;
  max-width: 420px;
  font-weight: 400;
  color: rgba(255,255,255,0.95);
}

/* BUTTON */
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  justify-self: start;

  height: 54px;
  padding: 0 38px;
  margin-top: 32px;
  border-radius: 16px;

  font-size: 14px;
  font-weight: 600;
  text-decoration: none;

  background: #ffffff;
  color: #000000;
}

.hero-btn:hover {
  background: rgba(255,255,255,0.75);
}

/* =====================================================
   RIGHT — OFFERS (CHESS HEIGHT GRID)
   ===================================================== */

.hero-offers {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* each column is its own grid */
.hero-col {
  display: grid;
  gap: 16px;
  height: 100%;
}

/* LEFT COLUMN: high → low */
.hero-col--left {
  grid-template-rows: 1.15fr 0.85fr;
}

/* RIGHT COLUMN: low → high */
.hero-col--right {
  grid-template-rows: 0.85fr 1.15fr;
}

/* CARD */
.hero-offer {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  width: 100%;
  height: 100%;
}

/* IMAGE */
.hero-offer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* overlay */
.hero-offer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.55),
    rgba(0,0,0,0.1)
  );
  z-index: 1;
}

/* =====================================================
   OFFER LABELS — CHESS POSITION (TOP / BOTTOM)
   ===================================================== */

.hero-offer span {
  position: absolute;
  z-index: 2;
  left: 16px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255,255,255,0.9);
  color: #000;
  border-radius: 20px;
}

/* LEFT TOP — TOP */
.hero-col--left .hero-offer:first-child span {
  top: 16px;
  bottom: auto;
}

/* LEFT BOTTOM — BOTTOM */
.hero-col--left .hero-offer:last-child span {
  bottom: 16px;
  top: auto;
}

/* RIGHT TOP — BOTTOM */
.hero-col--right .hero-offer:first-child span {
  bottom: 16px;
  top: auto;
}

/* RIGHT BOTTOM — TOP */
.hero-col--right .hero-offer:last-child span {
  top: 16px;
  bottom: auto;
}

/* =====================================================
   WOODMART SAFETY
   ===================================================== */

.main-page-wrapper,
.wd-page-content,
.site-content {
  overflow-x: visible;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1200px) {

  .hero-inner {
    grid-template-columns: 1fr;
    height: auto;
    padding: 0 20px;
  }

  .hero-slider {
    height: 460px;
    border-radius: 24px;
  }

  .hero-offers {
    margin-top: 24px;

    display: flex;
    gap: 16px;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;

    height: auto;
  }

  .hero-col {
    display: contents;
    grid-template-rows: auto;
  }

  .hero-offer {
    flex: 1 1 0;
    min-width: 200px;
    max-width: 1fr;
    height: 200px;
  }

  .hero-offer span {
    top: auto !important;
    bottom: 16px !important;
  }
}

/* =====================================================
   HARD FORCE FULL COVER
   ===================================================== */

.hero-slider,
.hero-slider .swiper,
.hero-slider .swiper-wrapper,
.hero-slider .swiper-slide,
.hero-slide {
  height: 100% !important;
  min-height: 100%;
}

.hero-slider img {
  display: block !important;
  vertical-align: top;
  line-height: 0;
}

.hero-slider .swiper-slide {
  overflow: hidden !important;
}

.hero-slider,
.hero-slider * {
  box-sizing: border-box;
}

@media (max-width: 768px) {

  .hero-inner {
    padding: 0 16px;
  }

  .hero-slider {
    height: 380px;
    border-radius: 20px;
  }

  .hero-slide-content {
    padding: 32px 20px;
    grid-template-rows: 78px 88px auto;
  }

  .hero-slide-content h2 {
    font-size: 30px;
    line-height: 1.08;
  }

  .hero-slide-content p {
    font-size: 15px;
    line-height: 1.45;
    margin-top: 14px;
    max-width: 100%;
  }

  .hero-btn {
    margin-top: 22px;
  }

  /* оставляем только 2 карточки */
  .hero-offer:nth-of-type(3),
  .hero-offer:nth-of-type(4) {
    display: none;
  }

  .hero-offer {
    min-width: 180px;
    height: 180px;
  }
}

@media (max-width: 480px) {

  .hero-offers {
    display: none;
  }

  .hero-slider {
    height: 340px;
  }

  .hero-slide-content {
    padding: 24px 16px;
    grid-template-rows: 64px 82px auto;
  }

  .hero-slide-content h2 {
    font-size: 24px;
    line-height: 1.1;
  }

  .hero-slide-content p {
    line-height: 1.45;
  }

  .hero-btn {
    margin-top: 18px;
    height: 50px;
    padding: 0 26px;
  }
}