/* Homepage only. Existing catalogue, content sections and footer keep design-v2.
   Proposal: each product is one card (photo, name, pack, price, cart button),
   the tabs sit above the cards they switch. */
.home-hero--showcase .home-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  grid-template-areas:
    "copy    showcase"
    "actions showcase"
    "person  showcase";
  grid-template-rows: auto auto 1fr;
  column-gap: 3rem;
  row-gap: 0;
  align-items: start;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.home-intro-copy { grid-area: copy; min-width: 0; }
.home-hero--showcase h1 { max-width: 21ch; font-size: clamp(2.1rem, 3.2vw, 2.8rem); }
.home-hero--showcase .home-hero__lead { font-size: 1rem; line-height: 1.65; margin: 1.25rem 0 0; }
.home-hero--showcase .hero-actions { grid-area: actions; margin-top: 1.5rem; }
.home-showcase { grid-area: showcase; min-width: 0; }

/* Tabs: above the cards, shaped as buttons so they read as a control. */
.home-showcase-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.home-showcase-tabs { display: flex; gap: .5rem; min-width: 0; }
.home-showcase-tabs button {
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--white); color: var(--ink);
  padding: .45rem 1rem; min-height: 2.75rem;
  font: inherit; font-size: .875rem; line-height: 1.25; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.home-showcase-tabs button:hover { border-color: var(--blue); color: var(--blue-dark); }
.home-showcase-tabs button[aria-pressed="true"] { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; font-weight: 650; }
.home-showcase-all { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; color: var(--blue-dark); font-size: .875rem; font-weight: 650; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.home-showcase-all:hover { color: var(--blue); }
.home-showcase-all:focus-visible, .home-showcase-tabs button:focus-visible, .home-showcase-card__link:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 3px;
}

/* Cards */
.home-showcase-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.1rem; }
.home-showcase-card { display: flex; flex-direction: column; min-width: 0; }
.home-showcase-card__link { display: flex; flex-direction: column; flex: 1 1 auto; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.home-showcase-card__visual {
  display: block; aspect-ratio: 1; overflow: hidden; margin-bottom: .7rem;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 50% 64%, #d6e8e5 0%, #e8f1f0 58%, #f1f6f5 100%);
}
[data-showcase-panel="care"] .home-showcase-card__visual { background: radial-gradient(ellipse at 50% 64%, #cbe7f3 0%, #e4f1f8 58%, #f0f7fb 100%); }
[data-showcase-panel="home"] .home-showcase-card__visual { background: radial-gradient(ellipse at 50% 64%, #d5e6ef 0%, #e7f0f5 58%, #f1f6f9 100%); }
.home-showcase-card__visual img { display: block; width: 100%; height: 100%; padding: 5%; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s ease; }
.home-showcase-card__link:hover .home-showcase-card__visual img { transform: scale(1.045); }
.home-showcase-card__text { display: flex; flex-direction: column; }
.home-showcase-card__name { font-size: .9375rem; line-height: 1.35; font-weight: 650; overflow-wrap: break-word; hyphens: auto; }
.home-showcase-card__link:hover .home-showcase-card__name { text-decoration: underline; text-underline-offset: 3px; }
.home-showcase-card__package { margin-top: .15rem; font-size: .8125rem; line-height: 1.4; color: var(--muted); }
.home-showcase-card__price { margin-top: auto; padding-top: .35rem; font-size: 1.375rem; line-height: 1.3; font-weight: 750; color: var(--blue-dark); white-space: nowrap; }
.home-showcase-card__price span { margin-left: .2rem; font-size: 1rem; font-weight: 500; }
.home-showcase-card__add { width: 100%; min-height: 2.75rem; margin-top: .65rem; padding: .45rem .5rem; font-size: .875rem; white-space: nowrap; }
/* Three cart buttons sit next to the main "Смотреть каталог" button, so they are outlined, not filled. */
.home-showcase-card__add.btn { --bs-btn-bg: var(--white); --bs-btn-color: var(--blue-dark); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: var(--blue-dark); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--blue-dark); --bs-btn-active-bg: var(--blue-dark); --bs-btn-active-color: #fff; --bs-btn-active-border-color: var(--blue-dark); background-color: var(--white); color: var(--blue-dark); border: 1px solid var(--blue); box-shadow: none; }
.home-showcase-card__add.btn:hover, .home-showcase-card__add.btn:active { background-color: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.home-showcase-note { font-size: .8125rem; line-height: 1.6; color: var(--muted); margin: 1rem 0 0; }
.home-showcase [hidden] { display: none !important; }

/* Galina */
.home-intro-person { grid-area: person; min-width: 0; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.home-intro-author { display: flex; align-items: center; gap: 1.15rem; }
.home-intro-author picture { display: block; flex: 0 0 auto; }
.home-intro-author img { width: 6rem; height: 7.5rem; flex: 0 0 auto; object-fit: cover; object-position: 50% 32%; border-radius: var(--radius-sm); }
.home-intro-author strong { display: block; font-size: 1.1rem; line-height: 1.4; }
.home-intro-author p { margin: .4rem 0; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.home-intro-author a { font-size: .875rem; font-weight: 650; }
.home-hero--showcase .hero-trust { display: grid; gap: .55rem; margin: 1.1rem 0 0; }
.home-hero--showcase .hero-trust strong { font-size: .875rem; font-weight: 600; }
.home-intro-cities { font-size: .875rem; color: var(--muted); margin: 1.1rem 0 0; }
.home-intro-cities a { white-space: nowrap; }

/* Cards rise in when a tab is switched. Nothing is animated on first paint. */
@keyframes showcase-card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.home-showcase-cards.is-entering .home-showcase-card { animation: showcase-card-in .45s cubic-bezier(.18,.72,.2,1) both; }
.home-showcase-cards.is-entering .home-showcase-card:nth-child(2) { animation-delay: .05s; }
.home-showcase-cards.is-entering .home-showcase-card:nth-child(3) { animation-delay: .1s; }

@media (max-width: 1100px) and (min-width: 901px) {
  .home-hero--showcase .home-intro-grid { column-gap: 2rem; }
  .home-showcase-tabs { gap: .35rem; }
  .home-showcase-tabs button { font-size: .8125rem; padding: .45rem .7rem; }
  .home-showcase-all { font-size: .8125rem; }
  .home-showcase-cards { gap: .75rem; }
}
/* Names may wrap to two lines below this width. Reserve the room under the pack size,
   so the cards keep one height when a tab is switched. */
@media (max-width: 1199px) {
  .home-showcase-card__text { min-height: 3.85rem; }
}
@media (max-width: 900px) {
  .home-hero--showcase .home-intro-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "showcase" "actions" "person";
    grid-template-rows: none;
    padding-top: 2rem; padding-bottom: 2rem;
  }
  .home-showcase { width: 100%; margin-top: 1.5rem; }
  .home-hero--showcase .hero-actions { margin-top: 1.25rem; }
  .home-hero--showcase h1 { max-width: 24ch; }
  .home-hero--showcase .home-hero__lead { max-width: 42rem; }
}
@media (max-width: 600px) {
  .home-hero--showcase .home-intro-grid { padding-top: 1.75rem; }
  .home-hero--showcase h1 { font-size: 2rem; line-height: 1.15; }
  .home-hero--showcase .home-hero__lead { font-size: .9375rem; margin-top: 1rem; }
  .home-showcase { margin-top: 1.1rem; }
  /* The full-width catalogue button follows the cards, so the text link is not repeated. */
  .home-showcase-all { display: none; }
  .home-showcase-tabs { width: 100%; gap: .35rem; }
  .home-showcase-tabs button { flex: 1 1 auto; padding: .45rem .4rem; font-size: .8125rem; }
  .home-showcase-cards { gap: .5rem; margin-top: .85rem; }
  .home-showcase-card__visual { margin-bottom: .5rem; border-radius: var(--radius-sm); }
  .home-showcase-card__text { min-height: 3.35rem; }
  .home-showcase-card__name { font-size: .8125rem; line-height: 1.3; }
  .home-showcase-card__package { font-size: .75rem; }
  .home-showcase-card__price { font-size: 1.0625rem; }
  .home-showcase-card__price span { margin-left: .15rem; font-size: .875rem; }
  .home-showcase-card__add { margin-top: .5rem; padding: .4rem .2rem; font-size: .8125rem; }
  .home-showcase-note { margin-top: .85rem; }
  .home-hero--showcase .hero-actions .btn { width: 100%; }
  .home-intro-person { margin-top: 1.5rem; padding-top: 1.25rem; }
  .home-intro-author { gap: 1rem; }
  .home-intro-author img { width: 5rem; height: 6.25rem; }
  .home-intro-author strong { font-size: 1rem; }
}
@media (max-width: 359px) {
  .home-hero--showcase h1 { font-size: 1.875rem; }
  .home-showcase-tabs button { padding: .4rem .3rem; font-size: .75rem; white-space: normal; border-radius: .9rem; }
  .home-showcase-card__add { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .home-showcase-card { animation: none !important; }
  .home-showcase-card__visual img { transition: none; }
}
