.storefront-content-block {
  --content-block-accent: var(--primary-color, #37698f);
  --content-block-ink: #17201d;
  --content-block-muted: #65706d;
  --content-block-surface: #f4f8fa;
  --content-block-line: color-mix(in srgb, var(--content-block-accent) 18%, #d9dfdc);
  position: relative;
  width: 100%;
  margin-block: clamp(1.25rem, 2.8vw, 2.5rem);
  padding: clamp(1.1rem, 2.4vw, 2rem);
  overflow: clip;
  color: var(--content-block-ink);
  background: var(--content-block-surface);
  border: 1px solid var(--content-block-line);
  border-radius: clamp(1.15rem, 2vw, 1.75rem);
}

.storefront-content-block--theme-sky {
  --content-block-accent: #2f6793;
  --content-block-surface: #edf6fb;
}

.storefront-content-block--theme-mint {
  --content-block-accent: #397568;
  --content-block-surface: #eef8f4;
}

.storefront-content-block--theme-sand {
  --content-block-accent: #815426;
  --content-block-surface: #fbf5e9;
}

.storefront-content-block--theme-berry {
  --content-block-accent: #a14f6b;
  --content-block-surface: #fcf0f4;
}

.storefront-content-block--theme-ink {
  --content-block-accent: #dcecf5;
  --content-block-ink: #fff;
  --content-block-muted: #d9e1e4;
  --content-block-surface: #24343d;
  --content-block-line: rgba(255, 255, 255, 0.16);
}

.storefront-content-block__header {
  max-width: 760px;
  margin-bottom: clamp(0.9rem, 2vw, 1.35rem);
}

.storefront-content-block__header--callout {
  margin-bottom: 0;
}

.storefront-content-block__eyebrow {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--content-block-accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.storefront-content-block__header h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.35rem, 2.5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.08;
  text-wrap: balance;
}

.storefront-content-block__header p {
  max-width: 65ch;
  margin: 0.65rem 0 0;
  color: var(--content-block-muted);
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1.55;
}

.storefront-content-block__proof-grid,
.storefront-content-block__tiles,
.storefront-content-block__products,
.storefront-content-block__chips {
  padding: 0;
  margin: 0;
  list-style: none;
}

.storefront-content-block__proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(0.65rem, 1.3vw, 1rem);
}

.storefront-content-block__proof-card {
  min-width: 0;
  background: color-mix(in srgb, var(--content-block-surface) 34%, #fff);
  border: 1px solid var(--content-block-line);
  border-radius: 1rem;
}

.storefront-content-block--theme-ink .storefront-content-block__proof-card {
  background: rgba(255, 255, 255, 0.07);
}

.storefront-content-block__card-link {
  display: flex;
  min-height: 100%;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  color: inherit;
  text-decoration: none;
}

.storefront-content-block__card-copy {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.storefront-content-block__card-copy strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.storefront-content-block__card-copy > span {
  color: var(--content-block-muted);
  font-size: 0.88rem;
  line-height: 1.42;
}

.storefront-content-block__callout-copy,
.storefront-content-block__callout-visual {
  position: relative;
  z-index: 1;
}

.storefront-content-block--illustration_callout,
.storefront-content-block--promo_banner,
.storefront-content-block--empty_state {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.62fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
}

.storefront-content-block--variant-split {
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
}

.storefront-content-block--variant-split .storefront-content-block__callout-copy {
  order: 2;
}

/* `product.after_details` lives inside the right product column. On tablets
   and smaller desktop widths that column is much narrower than the viewport,
   so the global 260px split would leave only 65–130px for Russian copy. Keep
   this correction scoped to the direct after-details block: full-width
   product.before_related collections and custom-page callouts retain their
   normal layouts. */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .page-product .product-details > .storefront-content-block--variant-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-product .product-details > .storefront-content-block--variant-split .storefront-content-block__callout-copy {
    order: initial;
  }
}

.storefront-content-block--variant-compact {
  padding: clamp(0.9rem, 1.7vw, 1.25rem);
}

.storefront-content-block--empty_state {
  max-width: 920px;
  margin-inline: auto;
}

.storefront-content-block__callout-visual {
  min-height: 150px;
}

.storefront-content-block__asset,
.storefront-content-block__product-image {
  position: relative;
  display: grid;
  width: 100%;
  overflow: hidden;
  place-items: center;
  background: color-mix(in srgb, var(--content-block-accent) 8%, #fff);
}

.storefront-content-block__hero-asset {
  min-height: clamp(170px, 25vw, 310px);
  border-radius: 1.2rem;
}

.storefront-content-block__card-asset {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 0.9rem;
}

.storefront-content-block__tile-asset {
  aspect-ratio: 1 / 1;
}

.storefront-content-block__asset img,
.storefront-content-block__product-image img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-content-block__asset img {
  object-position: var(--content-block-focal-x, 50%) var(--content-block-focal-y, 50%);
}

.storefront-content-block__card-asset img {
  object-fit: contain;
}

.storefront-content-block__tile-asset img {
  object-fit: contain;
  padding: clamp(0.45rem, 1.2vw, 0.8rem);
}

.storefront-content-block__asset-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  color: var(--content-block-accent);
  font-size: clamp(1.4rem, 4vw, 3.25rem);
  place-items: center;
}

.storefront-content-block__card-asset .storefront-content-block__asset-fallback {
  font-size: 1.45rem;
}

.storefront-content-block__asset.is-ready .storefront-content-block__asset-fallback,
.storefront-content-block__product-image.is-ready .storefront-content-block__asset-fallback {
  display: none;
}

.storefront-content-block__asset.is-fallback > img,
.storefront-content-block__asset.is-fallback > source,
.storefront-content-block__product-image.is-fallback > img {
  display: none;
}

.storefront-content-block__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.storefront-content-block__chips li {
  padding: 0.42rem 0.7rem;
  color: var(--content-block-ink);
  background: color-mix(in srgb, var(--content-block-accent) 10%, #fff);
  border: 1px solid var(--content-block-line);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.storefront-content-block__cta {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  margin-top: 1rem;
  color: #fff;
  background: var(--content-block-accent);
  border-radius: 0.85rem;
  font-weight: 750;
  line-height: 1.1;
  text-decoration: none;
}

.storefront-content-block--theme-ink .storefront-content-block__cta {
  color: #24343d;
}

.storefront-content-block--theme-ink .storefront-content-block__tile-link,
.storefront-content-block--theme-ink .storefront-content-block__chips li {
  color: #24343d;
}

.storefront-content-block--theme-ink .storefront-content-block__tile-copy > span:not(.storefront-content-block__tile-link-label) {
  color: #65706d;
}

.storefront-content-block--theme-ink .storefront-content-block__tile-link-label {
  color: #37698f;
}

/* Product and tile surfaces stay white even inside the ink theme. Keep their
 * accents dark enough for text and fallback icons on that light surface. */
.storefront-content-block--theme-ink .storefront-content-block__product-prices > span,
.storefront-content-block--theme-ink .storefront-content-block__product-image .storefront-content-block__asset-fallback,
.storefront-content-block--theme-ink .storefront-content-block__tile-asset .storefront-content-block__asset-fallback,
.storefront-content-block--theme-ink .storefront-content-block__card-asset .storefront-content-block__asset-fallback {
  color: #285f82;
}

.storefront-content-block__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  gap: clamp(0.7rem, 1.6vw, 1.1rem);
}

.storefront-content-block__tile {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--content-block-line);
  border-radius: 1.1rem;
}

.storefront-content-block__tile-link {
  display: grid;
  height: 100%;
  color: var(--content-block-ink);
  text-decoration: none;
}

.storefront-content-block__tile-copy {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  padding: 0.85rem;
}

.storefront-content-block__tile-copy strong {
  font-size: 1rem;
  line-height: 1.3;
}

.storefront-content-block__tile-copy > span:not(.storefront-content-block__tile-link-label) {
  color: var(--content-block-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.storefront-content-block__tile-link-label {
  margin-top: 0.35rem;
  color: var(--content-block-accent);
  font-size: 0.85rem;
  font-weight: 800;
}

.storefront-content-block__products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr));
  gap: clamp(0.65rem, 1.4vw, 1rem);
}

.storefront-content-block__collection-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 280px);
  gap: clamp(0.8rem, 2vw, 1.5rem);
  align-items: center;
  margin-bottom: clamp(0.9rem, 2vw, 1.35rem);
}

.storefront-content-block__collection-intro .storefront-content-block__header {
  margin-bottom: 0;
}

.storefront-content-block__collection-visual {
  width: 100%;
  max-width: 280px;
  justify-self: end;
}

.storefront-content-block__collection-asset {
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
}

.storefront-content-block__collection-asset img {
  object-fit: contain;
  padding: 0.45rem;
}

.storefront-content-block__product {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--content-block-line);
  border-radius: 1rem;
}

.storefront-content-block__product-link {
  display: grid;
  height: 100%;
  color: #17201d;
  text-decoration: none;
}

.storefront-content-block__product-image {
  /* Товарные обложки в подборках нормализованы в 3:4. Квадратная
     рамка оставляла поля по бокам, даже когда padding был нулевым. */
  aspect-ratio: 3 / 4;
  min-height: 0;
}

.storefront-content-block__product-image img {
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  padding: 0;
}

.storefront-content-block__product-copy {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: 0.75rem;
}

.storefront-content-block__product-brand {
  overflow: hidden;
  color: #69736f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.storefront-content-block__product-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.storefront-content-block__product-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
  margin-top: 0.3rem;
}

.storefront-content-block__product-prices > span {
  color: var(--content-block-accent);
  font-size: 1.08rem;
  font-weight: 850;
}

.storefront-content-block__product-prices del {
  color: #929a96;
  font-size: 0.78rem;
}

@media (hover: hover) and (pointer: fine) {
  .storefront-content-block__cta,
  .storefront-content-block__card-link,
  .storefront-content-block__tile-link,
  .storefront-content-block__product-link {
    transition: transform 180ms ease-out, box-shadow 180ms ease-out, opacity 180ms ease-out;
  }

  .storefront-content-block__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--content-block-accent) 24%, transparent);
  }

  .storefront-content-block__card-link:hover,
  .storefront-content-block__tile-link:hover,
  .storefront-content-block__product-link:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 767.98px) {
  .storefront-content-block {
    margin-block: 1rem;
    padding: 1rem;
    border-radius: 1.15rem;
  }

  .storefront-content-block--illustration_callout,
  .storefront-content-block--promo_banner,
  .storefront-content-block--empty_state,
  .storefront-content-block--variant-split {
    grid-template-columns: 1fr;
  }

  .storefront-content-block--variant-split .storefront-content-block__callout-copy {
    order: initial;
  }

  .storefront-content-block__callout-visual {
    min-height: 140px;
  }

  .storefront-content-block__asset img {
    object-position: var(--content-block-mobile-focal-x, 50%) var(--content-block-mobile-focal-y, 50%);
  }

  .storefront-content-block__hero-asset {
    min-height: 150px;
    max-height: 250px;
  }

  .storefront-content-block__proof-grid {
    grid-template-columns: 1fr;
  }

  .storefront-content-block__collection-intro {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 34%);
  }

  .storefront-content-block__tiles {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  }

  .storefront-content-block__products {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr));
  }
}

@media (max-width: 420px) {
  .storefront-content-block__tiles,
  .storefront-content-block__products {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 359.98px) {
  .storefront-content-block__collection-intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .storefront-content-block__collection-visual {
    width: min(100%, 220px);
    justify-self: center;
  }
}

@media (min-width: 360px) and (max-width: 599.98px) {
  .storefront-content-block__tiles,
  .storefront-content-block__products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .storefront-content-block *,
  .storefront-content-block *::before,
  .storefront-content-block *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }
}
