/* Shared homepage browsing behavior; card renderers retain their own design. */
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel] {
  --av-carousel-width: calc((100% - 46px) / 4);
  display: grid; grid-template-columns: none; grid-template-rows: minmax(0, 1fr);
  grid-auto-flow: column; grid-auto-columns: var(--av-carousel-width); align-items: stretch;
  gap: var(--av-home-card-gap, 14px); min-width: 0; max-width: 100%; width: 100%;
  margin-inline: 0; padding: 0 2px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scroll-padding-inline: 2px;
  overscroll-behavior-inline: contain; scrollbar-width: none;
}
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel]::-webkit-scrollbar { display: none; }
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel] > * { min-width: 0; max-width: none; width: auto; margin: 0; scroll-snap-align: start; }
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel] > [hidden] { display: none !important; }
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel="collection"] { --av-browse-media-height: 220px; grid-template-rows: repeat(4, auto); row-gap: 6px; }
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel="collection"] > .collection-card { grid-row: span 4; }
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel="review"],
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel="proof"] { --av-carousel-width: calc((100% - 32px) / 3); }
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel][data-carousel-count="0"],
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel][data-carousel-count="1"] { --av-carousel-width: calc(100% - 4px); }
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel][data-carousel-count="2"] { --av-carousel-width: calc((100% - 18px) / 2); }
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel][data-carousel-count="3"] { --av-carousel-width: calc((100% - 32px) / 3); }
:is(.home-page #mainContent, .av-reviews, .shop-page-container) .av-carousel-heading { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-heading > :first-child { min-width: 0; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-heading :is(h1, h2) { overflow-wrap: anywhere; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-controls { display: inline-flex; gap: 4px; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-controls[hidden] { display: none; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-heading-actions:has(> .av-carousel-controls[hidden]):not(:has(> a, > button, > label)) { display: none; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-arrow { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--avs-border-strong); border-radius: 50%; background: var(--avs-menu-bg); color: var(--avs-menu-text); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; transform: none; opacity: 1; visibility: visible; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-arrow:disabled { opacity: .35; cursor: default; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-arrow:focus-visible { outline: 2px solid var(--avs-blue-dark); outline-offset: -3px; }
:is(.home-page, .av-reviews, .shop-page-container) .av-carousel-arrow:hover:not(:disabled) { border-color: var(--avs-menu-focus); background: var(--avs-menu-hover-bg); color: var(--avs-menu-hover-text); }
.home-page .google-review-details summary.av-carousel-heading { list-style: none; }
.home-page .google-review-details summary.av-carousel-heading::-webkit-details-marker { display: none; }
.home-page .google-review-details summary.av-carousel-heading > span::before { content: '▸ '; }
.home-page .google-review-details[open] summary.av-carousel-heading > span::before { content: '▾ '; }
@media (min-width: 768px) and (max-width: 1199px) {
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel="collection"] { --av-browse-media-height: 200px; }
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel] { --av-carousel-width: clamp(240px, 38%, 340px); }
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel][data-carousel-count="3"] { --av-carousel-width: clamp(240px, 38%, 340px); }
}
@media (max-width: 767px) {
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel="collection"] { --av-browse-media-height: 180px; }
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel] { --av-carousel-width: min(84%, 320px); }
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel][data-carousel-count="2"],
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel][data-carousel-count="3"] { --av-carousel-width: min(84%, 320px); }
  :is(.home-page, .av-reviews, .shop-page-container) .av-carousel-heading-actions { max-width: 100%; }
  .home-page #mainContent .av-carousel-heading:has(.section-link, .collection-all) { flex-wrap: nowrap; }
  .home-page #mainContent .av-carousel-heading:has(.section-link, .collection-all) .av-carousel-heading-actions { margin-left: auto; }
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) .trust-subsection-header.av-carousel-heading { flex-wrap: wrap; }
  .home-page #mainContent .quick-shop-heading.av-carousel-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .home-page .quick-shop-heading.av-carousel-heading .quick-shop-copy { display: contents; }
  .home-page .quick-shop-heading.av-carousel-heading .eyebrow { grid-column: 1; grid-row: 1; }
  .home-page .quick-shop-heading.av-carousel-heading .av-carousel-heading-actions { grid-column: 2; grid-row: 1; }
  .home-page .quick-shop-heading.av-carousel-heading :is(h1, .quick-shop-description) { grid-column: 1 / -1; }
}
@media (max-width: 360px) { .home-page #mainContent .av-carousel-heading h2 { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) {
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel] { scroll-behavior: auto; }
}
/* Product cards keep a compact width even when the assortment is small. */
:is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel="product"][data-carousel-count] { --av-carousel-width: clamp(280px, calc((100% - 46px) / 4), 320px); }
@media (min-width: 768px) and (max-width: 1199px) {
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel="product"][data-carousel-count] { --av-carousel-width: clamp(250px, 34%, 320px); }
}
@media (max-width: 767px) {
  :is(.home-page #mainContent, .av-reviews, .shop-page-container) [data-card-carousel="product"][data-carousel-count] { --av-carousel-width: min(84%, 320px); }
}
@media (max-width: 360px) { .home-page #featured .av-carousel-heading h2 { font-size: 19px; } }

/* Keep the row stable while hiding directions without another product. */
.av-carousel-controls[data-carousel-kind="product"] .av-carousel-arrow:disabled { visibility: hidden; }
