/* Editable homepage message: refined typography and safe, responsive placement. */
.home-hero .hero-copy {
  inset: 0 !important;
  width: 100% !important;
  max-width: none !important;
  padding: clamp(38px, 7vh, 78px) clamp(24px, 5vw, 82px) clamp(74px, 10vh, 110px) !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  color: var(--ink);
  text-align: left;
  text-shadow: 0 1px 0 rgba(255,255,255,.82), 0 9px 30px rgba(255,255,255,.7);
  pointer-events: none;
}

.home-hero .hero-copy[data-hero-horizontal="center"] { align-items: center; text-align: center; }
.home-hero .hero-copy[data-hero-horizontal="right"] { align-items: flex-end; text-align: right; }
.home-hero .hero-copy[data-hero-vertical="center"] { justify-content: center; }
.home-hero .hero-copy[data-hero-vertical="bottom"] { justify-content: flex-end; }

.home-hero .hero-copy h1 {
  width: min(570px, 86vw);
  max-width: 100%;
  margin: 0;
  font-family: Baskerville, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.home-hero .hero-copy h1:empty { display: none; }
.home-hero .hero-copy .hero-actions { pointer-events: auto; }
.home-hero .hero-copy[data-hero-horizontal="center"] .hero-actions { justify-content: center; }
.home-hero .hero-copy[data-hero-horizontal="right"] .hero-actions { justify-content: flex-end; }

html[dir="rtl"] .home-hero .hero-copy h1 {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.025em;
}

#bestsellers > .section-head h2 {
  font-family: Baskerville, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 400;
  letter-spacing: -.035em;
  text-wrap: balance;
}

html[dir="rtl"] #bestsellers > .section-head h2 {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.02em;
}

@keyframes gr-card-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .home-hero .hero-slide { transition-duration: .9s; }
  .home-hero .hero-slide img { transform: scale(1.006); transition: transform 7s ease-out; }
  .home-hero .hero-slide.active img { transform: scale(1.022); }
  #bestsellers .product-card { animation: gr-card-arrive .5s cubic-bezier(.22,.75,.25,1) both; }
  #bestsellers .product-card:nth-child(2n) { animation-delay: .06s; }
  #bestsellers .product-card:nth-child(3n) { animation-delay: .12s; }
}

@media (max-width: 700px) {
  .home-hero {
    height: max(520px, calc(100svh - 180px)) !important;
    min-height: max(520px, calc(100svh - 180px)) !important;
  }

  .home-hero .hero-copy {
    inset: 0 !important;
    width: 100% !important;
    padding: clamp(24px, 7svh, 54px) 20px 92px !important;
  }

  .home-hero .hero-copy h1 {
    width: min(620px, 88vw);
    font-size: clamp(36px, 10.5vw, 52px) !important;
    line-height: 1 !important;
  }

  html[dir="rtl"] .home-hero .hero-copy h1 { line-height: 1.2 !important; }
}

@media (max-height: 500px) and (max-width: 1100px) {
  .home-hero {
    height: max(240px, calc(100dvh - 170px)) !important;
    min-height: max(240px, calc(100dvh - 170px)) !important;
  }

  .home-hero .hero-copy {
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 18px 68px 22px !important;
  }

  .home-hero .hero-copy h1 {
    width: min(520px, 62vw);
    font-size: clamp(26px, 4.4vw, 38px) !important;
    line-height: 1 !important;
  }

  .home-hero .hero-actions { margin-top: 14px; }
  #bestsellers { padding-top: 24px !important; }
}
