/* am24 home.css — Phase E (builder B). Loaded only on the home page. Uses css/am24/tokens.css variables only. */
.am24-hero [hidden], .am24-cats [hidden] { display: none !important; }
.am24-wrap { max-width: var(--am24-container); margin: 0 auto; padding: 0 var(--am24-gutter); box-sizing: border-box; }

/* ---------- hero ---------- */
.am24-hero { background: var(--am24-forest); color: #fff; overflow: hidden; font-family: var(--am24-font); }
.am24-hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--am24-s5); align-items: center; min-height: 400px; padding-top: 20px; padding-bottom: 20px; }
.am24-hero__title { margin: 0 0 var(--am24-s1); max-width: 600px; font-size: 38px; line-height: 1.12; font-weight: var(--am24-fw-head); letter-spacing: -.02em; color: #fff; }
.am24-hero__sub { margin: 0 0 20px; max-width: 600px; font-size: 16px; line-height: 1.5; color: var(--am24-on-forest); }

.am24-search { background: var(--am24-surface); color: var(--am24-text); border-radius: 16px; box-shadow: var(--am24-shadow-hero); padding: var(--am24-s2) 18px 18px; }
.am24-tabs { display: inline-flex; background: var(--am24-surface-2); border-radius: var(--am24-radius-pill); padding: 4px; margin-bottom: 14px; max-width: 100%; }
.am24-tab { font: inherit; font-weight: 600; font-size: 15px; border: 0; background: none; border-radius: var(--am24-radius-pill); padding: 0 20px; min-height: 40px; cursor: pointer; color: var(--am24-muted); white-space: nowrap; }
.am24-tab:hover { color: var(--am24-text); }
.am24-tab.is-on { background: var(--am24-accent); color: #fff; }
.am24-tab:focus-visible, .am24-search__btn:focus-visible { outline: 2px solid var(--am24-accent); outline-offset: 2px; }

.am24-search__form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.am24-search__row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.am24-field { display: block; margin: 0; min-width: 0; }
.am24-field__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.am24-field--kw { min-width: 0; }
.am24-search .am24-field select, .am24-search .am24-field input[type=text] {
    width: 100%; height: 48px; box-sizing: border-box; border: 1px solid var(--am24-border); border-radius: var(--am24-radius-input);
    padding: 0 12px; background-color: var(--am24-surface); color: var(--am24-text); font: inherit; font-size: 16px; margin: 0;
}
.am24-search .am24-field select:focus, .am24-search .am24-field input[type=text]:focus { border-color: var(--am24-accent); outline: 0; box-shadow: 0 0 0 2px var(--am24-tint); }
.am24-search .am24-search__btn { height: 48px; min-width: 120px; border: 0; border-radius: var(--am24-radius-pill); background: var(--am24-accent); color: #fff; font: inherit; font-weight: 700; font-size: 16px; padding: 0 24px; cursor: pointer; margin: 0; }
.am24-search .am24-search__btn:hover { background: var(--am24-accent-hover); }

.am24-hero__media { position: relative; height: 360px; }
.am24-hero__media::after { content: ""; position: absolute; z-index: 2; right: -60px; bottom: -20px; width: 300px; height: 180px; background: var(--am24-cream); border-top-left-radius: 180px; }
.am24-hero__media img { position: absolute; z-index: 1; right: -60px; top: 0; width: 520px; height: 340px; max-width: none; object-fit: cover; border-radius: 200px 0 0 200px; }

/* ---------- icon strip ---------- */
.am24-strip { background: var(--am24-bg); font-family: var(--am24-font); }
.am24-strip__list { list-style: none; margin: 0 auto; padding: var(--am24-s3) var(--am24-gutter) 0; display: flex; justify-content: center; gap: var(--am24-s3); flex-wrap: wrap; }
.am24-strip__list li { margin: 0; padding: 0; }
.am24-strip__item { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 84px; text-decoration: none; color: var(--am24-text); text-align: center; }
.am24-strip__tile { width: 64px; height: 64px; border-radius: 50%; background: var(--am24-surface); border: 1px solid var(--am24-border); display: flex; align-items: center; justify-content: center; transition: transform .15s, box-shadow .15s, border-color .15s; }
.am24-strip__tile img { width: 40px; height: 40px; display: block; }
.am24-strip__item:hover .am24-strip__tile { border-color: var(--am24-accent); transform: translateY(-2px); box-shadow: var(--am24-shadow-hover); }
.am24-strip__name { font-size: 13px; font-weight: 600; line-height: 1.2; margin-top: 6px; min-height: 2.4em; display: flex; align-items: flex-start; justify-content: center; }
.am24-strip__count { font-size: var(--am24-fs-xs); color: var(--am24-muted); }

/* ---------- shared block chrome (home) ---------- */
body.home-page .content_block.am24Theme { background: none; box-shadow: none; border: 0; padding: 0; margin: 0; }
.am24-featured, .am24-cats, .am24-news, .am24-about { font-family: var(--am24-font); padding: var(--am24-s5) 0 var(--am24-s1); }
.am24-featured { padding-top: 24px; }
.am24-strip { padding-bottom: 0; }
.am24-bhead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--am24-s2); flex-wrap: wrap; margin-bottom: var(--am24-s2); }
.am24-bhead .am24-tabs { margin: 0; }
.am24-h2, body.home-page .content_block.listings_box > h3 { margin: 0; font-size: var(--am24-fs-h2); line-height: 1.25; font-weight: var(--am24-fw-head); letter-spacing: -.01em; color: var(--am24-text); font-family: var(--am24-font); }
.am24-more { font-weight: 600; color: var(--am24-accent); text-decoration: none; }
.am24-more:hover { text-decoration: underline; }

/* ---------- browse by category ---------- */
.am24-cgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--am24-s2); align-items: stretch; }
.am24-cat { display: flex; flex-direction: column; background: var(--am24-surface); border: 1px solid var(--am24-border); border-radius: var(--am24-radius); padding: 18px 20px; scroll-margin-top: 80px; transition: box-shadow .15s; }
.am24-cat:hover, .am24-cat:target { box-shadow: var(--am24-shadow-hover); }
.am24-cat:target { border-color: var(--am24-accent); }
.am24-cat__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.am24-cat__link, .am24-cat__link:visited { color: var(--am24-text); }
.am24-cat__link { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; text-decoration: none; color: var(--am24-text); min-height: var(--am24-tap); }
.am24-cat__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--am24-tint); display: flex; align-items: center; justify-content: center; flex: none; }
.am24-cat__icon img { width: 32px; height: 32px; display: block; }
.am24-cat__name { font-weight: 700; font-size: var(--am24-fs-h3); line-height: 1.2; }
.am24-cat__link:hover .am24-cat__name { color: var(--am24-accent); }
.am24-pill { white-space: nowrap; margin-left: auto; background: var(--am24-surface-2); border-radius: var(--am24-radius-pill); padding: 2px 10px; font-size: var(--am24-fs-xs); font-weight: 600; color: var(--am24-muted); }
.am24-breeds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; font-size: var(--am24-fs-sm); }
.am24-breeds li { margin: 0; padding: 0; }
.am24-breeds a { color: var(--am24-text); text-decoration: none; display: inline-block; padding: 5px 0; }
.am24-breeds a:hover { color: var(--am24-accent); text-decoration: underline; }
.am24-breeds__n { white-space: nowrap; color: var(--am24-muted); font-size: var(--am24-fs-xs); }
.am24-cat__all { margin: auto 0 0; padding-top: 6px; font-size: var(--am24-fs-sm); }
.am24-cat__all a { color: var(--am24-accent); font-weight: 600; text-decoration: none; display: inline-block; padding: 8px 0; }
.am24-cat__all a:hover { text-decoration: underline; }

/* ---------- recently added (Nova listing_box_1, restyled, home only) ---------- */
body.home-page .content_block.listings_box { font-family: var(--am24-font); padding: var(--am24-s5) 0 0; background: none; border: 0; box-shadow: none; }
body.home-page .content_block.listings_box > h3 { margin-bottom: var(--am24-s2); text-align: left; padding: 0; }
body.home-page .listings_box ul.featured { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
body.home-page .listings_box ul.featured > li { width: 100% !important; max-width: none !important; min-width: 0; flex: none !important; grid-column: auto !important; padding: 0; margin: 0; background: var(--am24-surface); border: 1px solid var(--am24-border); border-radius: var(--am24-radius); overflow: hidden; transition: box-shadow .15s; }
body.home-page .listings_box ul.featured > li:hover { box-shadow: var(--am24-shadow-hover); }
body.home-page .listings_box .picture { aspect-ratio: 4 / 3; background: var(--am24-surface-2); position: relative; overflow: hidden; margin: 0; }
body.home-page .listings_box .picture a { display: block; height: 100%; }
body.home-page .listings_box .picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.home-page .listings_box .card-info { list-style: none; margin: 0; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
body.home-page .listings_box .card-info > li { margin: 0; padding: 0; }
body.home-page .listings_box .card-info .title a { display: block; font-weight: 600; font-size: 15px; color: var(--am24-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.home-page .listings_box .card-info .title a:hover { color: var(--am24-accent); }
body.home-page .listings_box .card-info .fields { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--am24-muted); }
body.home-page .listings_box .card-info .fields span { background: var(--am24-surface-2); border-radius: var(--am24-radius-pill); padding: 2px 8px; }
body.home-page .listings_box .card-info .price_tag { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; }
body.home-page .listings_box .card-info .price_tag div, body.home-page .listings_box .card-info .price_tag div span { font-weight: 700; font-size: 16px; color: var(--am24-forest); }

/* ---------- news ---------- */
.am24-news { padding-bottom: var(--am24-s5); }
.am24-news__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--am24-s2); }
.am24-news__grid li { margin: 0; padding: 0; }
.am24-news__card { display: flex; flex-direction: column; gap: 6px; height: 100%; box-sizing: border-box; background: var(--am24-surface); border: 1px solid var(--am24-border); border-radius: var(--am24-radius); padding: 16px 18px; text-decoration: none; color: var(--am24-text); transition: box-shadow .15s; }
.am24-news__card:hover { box-shadow: var(--am24-shadow-hover); }
.am24-news__title { font-weight: 600; line-height: 1.35; }
.am24-news__card:hover .am24-news__title { color: var(--am24-accent); }
.am24-news__date { font-size: var(--am24-fs-xs); color: var(--am24-muted); }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
    body.home-page .listings_box ul.featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .am24-hero__inner { grid-template-columns: 1fr; min-height: 0; padding-top: var(--am24-s3); padding-bottom: var(--am24-s3); }
    .am24-hero__media { display: none; }
    .am24-hero__title { font-size: 30px; }
    .am24-cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .am24-news__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .am24-hero__title { font-size: 26px; }
    .am24-hero__sub { font-size: 16px; }
    .am24-search { padding: 14px; }
    .am24-tabs { display: flex; width: 100%; }
    .am24-tab { flex: 1; padding: 0 8px; min-height: var(--am24-tap); font-size: 14px; }
    .am24-search__form { grid-template-columns: 1fr; }
    .am24-strip__list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: var(--am24-s2); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .am24-strip__list::-webkit-scrollbar { display: none; }
    .am24-strip__item { flex: none; }
    .am24-cgrid { grid-template-columns: minmax(0, 1fr); }
    .am24-h2, body.home-page .content_block.listings_box > h3 { font-size: 22px; }
    .am24-bhead .am24-tabs { width: 100%; }
    .am24-featured, .am24-cats, .am24-news { padding-top: var(--am24-s4); }
}
@media (prefers-reduced-motion: reduce) {
    .am24-strip__tile, .am24-cat { transition: none; }
}

/* ---------- home-only fixes ---------- */
body.home-page #main_container .inside-container { padding-top: 0 !important; margin-top: 0 !important; }
body.home-page #main_container aside.middle .content_block, body.home-page #main_container aside.bottom .content_block { margin-top: 0; margin-bottom: 0; }
body.home-page #system_message:empty { display: none; }
.am24-hero__title { text-wrap: balance; }
body.home-page .header-banner-cont { display: none !important; } /* Nova demo "468 x 60" banner placeholder: empty space on home */

/* ---------- round 2: recently added polish (home only; card style consistent with pages.css) ---------- */
body.home-page .content_block.listings_box > div { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; }
body.home-page .listings_box ul.featured { margin: 0 !important; }
body.home-page .listings_box ul.featured > li { position: relative; }
body.home-page .listings_box .card-info .fields:not(:has(span:not(:empty))) { display: none; }
body.home-page .listings_box .card-info .fields span:empty { display: none; }
body.home-page .listings_box .card-info .price_tag { display: block; min-height: 24px; }
body.home-page .listings_box .card-info .price_tag nav.icons { position: absolute; top: 8px; right: 8px; z-index: 3; margin: 0; padding: 0; }
body.home-page .listings_box .card-info .price_tag span.favorite { display: block; width: 36px; height: 36px; margin: 0; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .95); position: relative; cursor: pointer; }
body.home-page .listings_box .card-info .price_tag span.favorite .icon { position: absolute; left: 0; top: 0; width: 36px; height: 36px; background: var(--am24-muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='M12 21s-8-5.2-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 5.800-8 11-8 11z'/%3E%3C/svg%3E") center/20px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='M12 21s-8-5.2-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 5.800-8 11-8 11z'/%3E%3C/svg%3E") center/20px no-repeat; }
body.home-page .listings_box .card-info .price_tag span.favorite.remove .icon { background: var(--am24-accent); }
.am24-news { padding-bottom: var(--am24-s2); }
body.home-page #main_container .inside-container { padding-bottom: var(--am24-s4) !important; }
body.home-page .listings_box .card-info, body.home-page .listings_box .card-info > li, body.home-page .listings_box .card-info .price_tag nav.icons { position: static; }
body.home-page .listings_box .card-info .price_tag nav.icons { position: absolute; }
body.home-page .content_block.listings_box { margin-left: 0 !important; margin-right: 0 !important; }
.am24-cats .am24-cat__link .am24-cat__name { color: var(--am24-text); }
.am24-cats .am24-cat__link:hover .am24-cat__name { color: var(--am24-accent); }

/* round 3 */
body.home-page .listings_box .card-info .price_tag span.favorite { display: grid; place-items: center; }
body.home-page .listings_box .card-info .price_tag span.favorite .icon { position: static !important; margin: 0 !important; width: 20px !important; height: 20px !important; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center; top: auto !important; left: auto !important; }
@media (max-width: 479px) {
    .am24-search__row { grid-template-columns: 1fr; }
    .am24-search .am24-search__btn { width: 100%; }
}

@media (max-width: 767px) {
    body.home-page .listings_box ul.featured { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* ---------- round 4: no counts, See-all links, hub, breed rows, articles ---------- */
.am24-strip__count, .am24-pill, .am24-breeds__n { display: none; }
.am24-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 20px; border: 1.5px solid var(--am24-accent); border-radius: var(--am24-radius-pill); background: var(--am24-surface); color: var(--am24-accent); font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.am24-btn:hover { background: var(--am24-accent); color: #fff; }
.am24-cat__all a { display: inline-block; }

/* popular breed photo rows */
.am24-breedrow { font-family: var(--am24-font); padding: var(--am24-s5) 0 0; }
.am24-bcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--am24-s2); }
.am24-bcards li { margin: 0; padding: 0; }
.am24-bcard { display: block; text-decoration: none; color: var(--am24-text); }
.am24-bcard__img { display: block; aspect-ratio: 4 / 3; border-radius: var(--am24-radius); overflow: hidden; background: var(--am24-surface-2); }
.am24-bcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.am24-bcard:hover .am24-bcard__img img { transform: scale(1.04); }
.am24-bcard__name { display: block; margin-top: 8px; font-weight: 600; font-size: 15px; line-height: 1.3; }
.am24-bcard:hover .am24-bcard__name { color: var(--am24-accent); }

/* Most popular hub */
.am24-hub { font-family: var(--am24-font); padding: var(--am24-s5) 0 0; }
.am24-hub__panel { background: var(--am24-surface); border: 1px solid var(--am24-border); border-radius: 16px; padding: var(--am24-s3); }
.am24-hub__head { display: flex; align-items: center; justify-content: space-between; gap: var(--am24-s2); flex-wrap: wrap; margin-bottom: var(--am24-s2); }
.am24-hub__head .am24-tabs { margin: 0; }
.am24-tabs--scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.am24-tabs--scroll::-webkit-scrollbar { display: none; }
.am24-hub__title { margin: 0 0 var(--am24-s2); font-size: var(--am24-fs-h3); font-weight: var(--am24-fw-head); color: var(--am24-text); font-family: var(--am24-font); }
.am24-hubgroup { margin-bottom: var(--am24-s2); }
.am24-hubgroup__title { margin: 0 0 4px; font-size: 15px; font-weight: 700; font-family: var(--am24-font); }
.am24-hubgroup__title a { color: var(--am24-text); text-decoration: none; }
.am24-hubgroup__title a:hover { color: var(--am24-accent); }
.am24-hublist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 var(--am24-s2); }
.am24-hublist--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.am24-hublist li { margin: 0; padding: 0; }
.am24-hublist a { display: block; padding: 6px 0; font-size: var(--am24-fs-sm); line-height: 1.35; color: var(--am24-accent); text-decoration: none; }
.am24-hublist a:hover { text-decoration: underline; }
.am24-hubpane:not(.is-expanded) .am24-extra { display: none; }
.am24-hub__more { display: block; width: auto; margin: var(--am24-s2) 0 0 auto; padding: 0 4px; min-height: 44px; background: none; border: 0; border-radius: 0; font: 600 15px var(--am24-font); color: var(--am24-accent); cursor: pointer; text-align: right; }
.am24-hub__more:hover { color: var(--am24-accent-hover); text-decoration: underline; }

/* latest articles */
.am24-news__grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.am24-news__card { padding: 0; overflow: hidden; }
.am24-news__img { display: block; aspect-ratio: 16 / 9; background: var(--am24-tint); overflow: hidden; }
.am24-news__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am24-news__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.am24-chip { align-self: flex-start; background: var(--am24-tint); color: var(--am24-accent); border-radius: var(--am24-radius-pill); padding: 2px 10px; font-size: var(--am24-fs-xs); font-weight: 600; }
.am24-news__title { color: var(--am24-text); font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.am24-news__card:hover .am24-news__title { color: var(--am24-accent); }
.am24-news__excerpt { color: var(--am24-muted); font-size: var(--am24-fs-sm); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.am24-news__more { margin-top: auto; color: var(--am24-accent); font-weight: 600; font-size: var(--am24-fs-sm); }

@media (max-width: 1023px) {
    .am24-bcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .am24-hublist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .am24-bcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .am24-hub__panel { padding: var(--am24-s2); }
    .am24-hublist, .am24-hublist--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
    .am24-hublist a { padding: 10px 0; }
    .am24-hub__head .am24-tabs { width: 100%; }
    .am24-hub__head .am24-tab { flex: none; }
    .am24-news__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- round 5 ---------- */
/* icon strip: one row of 10 from 992px, horizontal scroll row below */
@media (min-width: 992px) {
    .am24-strip__list { flex-wrap: nowrap; justify-content: space-between; gap: 0; }
    .am24-strip__list li { flex: 1 1 0; min-width: 0; }
    .am24-strip__item { width: auto; max-width: 110px; margin: 0 auto; }
}
@media (max-width: 991px) {
    .am24-strip__list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: var(--am24-s2); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .am24-strip__list::-webkit-scrollbar { display: none; }
    .am24-strip__item { flex: none; width: 84px; }
    .am24-tabs--scroll { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
}
/* hub: subheading kept for structure, hidden visually; 12 links per tab on mobile */
.am24-hub__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
@media (max-width: 767px) {
    .am24-hubpane:not(.is-expanded) .am24-x12 { display: none; }
}
/* hero photo bleeds to the viewport edge */
@media (min-width: 992px) {
    .am24-hero__media { --am24-bleed: calc((100vw - min(100vw, var(--am24-container))) / 2 + var(--am24-gutter)); }
    .am24-hero__media img { right: calc(-1 * var(--am24-bleed)); width: calc(460px + var(--am24-bleed)); }
    .am24-hero__media::after { right: calc(-1 * var(--am24-bleed)); width: calc(240px + var(--am24-bleed)); }
}
/* articles */
.am24-news__grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- category cards: all equal; grid class by card count (no orphans) ---------- */
.am24-cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.am24-cgrid .am24-breeds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) { .am24-cgrid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 768px) and (max-width: 1199px) {
    .am24-cgrid--n9, .am24-cgrid--n6, .am24-cgrid--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .am24-cgrid--n10 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .am24-cgrid--n10 .am24-breeds { grid-template-columns: minmax(0, 1fr); }
    .am24-cgrid--n9, .am24-cgrid--n6, .am24-cgrid--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .am24-cgrid--n8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .am24-cgrid--n12 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .am24-cgrid--n11 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- E3: "View all ->" text links in section heads (no buttons) ---------- */
.am24-bhead .am24-viewall, body.home-page .content_block.has-header-link > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin: 0 0 0 auto !important; width: auto; font: 600 15px var(--am24-font); color: var(--am24-accent); text-decoration: none; white-space: nowrap; order: 0; }
.am24-bhead .am24-viewall:hover, body.home-page .content_block.has-header-link > a:hover { color: var(--am24-accent-hover); text-decoration: underline; }
.am24-bhead .am24-viewall span { margin-left: 4px; }
.am24-bhead:has(.am24-viewall) { align-items: center; flex-wrap: nowrap; }

/* =====================================================================================================================
   2026-10-12 — homepage P4H pass: hero search (Animal / Breed / City), hero photo frame, featured ads row, category
   cards + compact tiles, "Also popular" breed links, hub columns, About + FAQ.
   ===================================================================================================================== */

/* hero search: 2 x 2 (Animal | Breed / City | Search), one column on phones */
.am24-search__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.am24-search .am24-search__btn { width: 100%; min-width: 0; }
.am24-search .am24-field select:disabled { background-color: var(--am24-surface-2); color: var(--am24-muted); cursor: not-allowed; opacity: 1; }
@media (max-width: 600px) {
    .am24-search__form { grid-template-columns: minmax(0, 1fr); }
}

/* hero photo: rounded frame anchored to the viewport edge, cover crop with a focal point (--am24-hero-pos from am24Theme),
   never wider than 720px so a small source is not blown up; the cream accent sits behind the photo, not over it */
.am24-hero__media picture { display: contents; }
.am24-hero__media img { object-fit: cover; object-position: var(--am24-hero-pos, 50% 45%); background: var(--am24-forest-2, rgba(255, 255, 255, .06)); }
.am24-hero__media::after { z-index: 0; left: auto; right: min(350px, calc(100% - 168px)); bottom: 0; top: auto; width: 168px; height: 168px; border-radius: 50%; }
@media (min-width: 992px) {
    .am24-hero__media { --am24-hero-w: min(calc(460px + var(--am24-bleed)), 720px); }
    .am24-hero__media img { width: var(--am24-hero-w); height: 340px; }
    .am24-hero__media::after { width: 168px; right: min(calc(var(--am24-hero-w) - var(--am24-bleed) - 110px), calc(100% - 168px)); }
}

/* featured ads: one row of the normal cards; 4 per view >= 1024, 3 >= 768, swipe row with a peek below */
.am24-featured { padding-top: var(--am24-s4); }
.am24-featured .am24-bhead { align-items: center; flex-wrap: nowrap; }
.am24-row__nav { display: flex; gap: 8px; margin-left: auto; }
.am24-row__nav[hidden] { display: none; }
.am24-row__btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--am24-border); background: var(--am24-surface); color: var(--am24-text); font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.am24-row__btn:hover:not(:disabled) { border-color: var(--am24-accent); color: var(--am24-accent); }
.am24-row__btn:disabled { opacity: .35; cursor: default; }
.am24-row__btn:focus-visible { outline: 2px solid var(--am24-accent); outline-offset: 2px; }
body.home-page .am24-featured ul.am24-row {
    display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 18px) / 4); gap: 18px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 2px 2px 8px !important; margin: 0 -2px !important;
}
body.home-page .am24-featured ul.am24-row::-webkit-scrollbar { display: none; }
body.home-page .am24-featured ul.am24-row > li { scroll-snap-align: start; }
@media (max-width: 1023px) {
    body.home-page .am24-featured ul.am24-row { grid-auto-columns: calc((100% - 2 * 18px) / 3); }
}
@media (max-width: 767px) {
    body.home-page .am24-featured ul.am24-row { grid-auto-columns: 44%; gap: 12px; }
    .am24-row__nav { display: none !important; }
}
@media (max-width: 479px) {
    body.home-page .am24-featured ul.am24-row { grid-auto-columns: 62%; }
}

/* browse by category: full cards 3 / 2 / 1 across; "More pets" rows; compact tiles when no category has 3+ types with ads */
.am24-cgrid--full { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 991px) { .am24-cgrid--full { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 599px) { .am24-cgrid--full { grid-template-columns: minmax(0, 1fr) !important; } }
.am24-cat__link--static { cursor: default; }
.am24-cat--more .am24-cat__icon { color: var(--am24-accent); }
.am24-crows { list-style: none; margin: -4px 0 0; padding: 0; }
.am24-crow { margin: 0; padding: 0; border-top: 1px solid var(--am24-border); scroll-margin-top: 80px; }
.am24-crow:first-child { border-top: 0; }
.am24-crow:target { background: var(--am24-tint); border-radius: 8px; }
.am24-crow__main { display: flex; align-items: center; gap: 10px; min-height: var(--am24-tap); text-decoration: none; color: var(--am24-text); }
.am24-crow__main img { width: 28px; height: 28px; flex: none; display: block; }
.am24-crow__name { font-weight: 600; font-size: 15px; }
.am24-crow__main:hover .am24-crow__name { color: var(--am24-accent); text-decoration: underline; }
.am24-crow__n { margin-left: auto; font-size: var(--am24-fs-xs); color: var(--am24-muted); white-space: nowrap; }
.am24-crow__sub { display: flex; flex-wrap: wrap; gap: 0 14px; margin: -8px 0 4px 38px; font-size: var(--am24-fs-sm); }
.am24-crow__sub a { color: var(--am24-accent); text-decoration: none; padding: 4px 0; }
.am24-crow__sub a:hover { text-decoration: underline; }
.am24-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--am24-s2); }
.am24-tiles li { margin: 0; padding: 0; scroll-margin-top: 80px; }
.am24-tile { display: flex; align-items: center; gap: 14px; height: 100%; box-sizing: border-box; padding: 14px 18px; background: var(--am24-surface); border: 1px solid var(--am24-border); border-radius: var(--am24-radius); text-decoration: none; color: var(--am24-text); transition: box-shadow .15s, border-color .15s; }
.am24-tile:hover { box-shadow: var(--am24-shadow-hover); border-color: var(--am24-accent); }
.am24-tile__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.am24-tile__name { font-weight: 700; font-size: var(--am24-fs-h3); line-height: 1.2; }
.am24-tile__n { font-size: var(--am24-fs-sm); color: var(--am24-muted); }
.am24-tile__arr { color: var(--am24-accent); font-size: 18px; flex: none; }
.am24-tile:hover .am24-tile__name { color: var(--am24-accent); }
@media (max-width: 991px) { .am24-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .am24-tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; } .am24-tile { padding: 12px 14px; } }

/* "Also popular" breed links under the photo rows */
.am24-also { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: var(--am24-s2) 0 0; font-size: var(--am24-fs-sm); }
.am24-also__label { color: var(--am24-muted); font-weight: 600; margin-right: 4px; }
.am24-also__chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--am24-border); border-radius: var(--am24-radius-pill); background: var(--am24-surface); color: var(--am24-text); text-decoration: none; font-weight: 500; }
.am24-also__chip:hover { border-color: var(--am24-accent); color: var(--am24-accent); }
@media (max-width: 599px) { .am24-also__label { width: 100%; } }

/* Most popular hub: "Other pets" groups flow in columns (was one long column) */
.am24-hubcols { column-count: 4; column-gap: var(--am24-s3); }
.am24-hubcols .am24-hubgroup { break-inside: auto; margin-bottom: var(--am24-s2); }
.am24-hubcols .am24-hubgroup__title { break-after: avoid; break-inside: avoid; }
.am24-hubcols .am24-hublist li { break-inside: avoid; }
.am24-hubcols .am24-hublist { display: block; }
@media (max-width: 1023px) { .am24-hubcols { column-count: 3; } }
@media (max-width: 600px) { .am24-hubcols { column-count: 2; column-gap: 12px; } }

/* latest articles: category chip was stretched to the card height by flex */
/* (e2-account.css has an unscoped .am24-chip rule for the post-ad chips: min-height 96px, flex column, border) */
.am24-news__body .am24-chip { flex: none; align-self: flex-start; display: inline-block; height: auto; min-height: 0; padding: 2px 10px; border: 0; border-radius: var(--am24-radius-pill); background: var(--am24-tint); color: var(--am24-accent) !important; font: 600 var(--am24-fs-xs)/1.6 var(--am24-font); cursor: inherit; }

/* About + FAQ */
.am24-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: var(--am24-s5); padding: var(--am24-s5) 0 var(--am24-s2); }
.am24-about__intro p { margin: var(--am24-s2) 0 0; font-size: 16px; line-height: 1.6; color: var(--am24-text); }
.am24-faq .am24-h2 { margin-bottom: var(--am24-s1); }
.am24-faq__item { border-bottom: 1px solid var(--am24-border); }
.am24-faq__item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 0; font-weight: 600; font-size: 16px; cursor: pointer; color: var(--am24-text); }
.am24-faq__item summary::-webkit-details-marker { display: none; }
.am24-faq__item summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--am24-tint); color: var(--am24-accent); font-size: 20px; line-height: 28px; text-align: center; }
.am24-faq__item[open] summary::after { content: "\2212"; }
.am24-faq__item summary:hover { color: var(--am24-accent); }
.am24-faq__item summary:focus-visible { outline: 2px solid var(--am24-accent); outline-offset: 2px; }
.am24-faq__item p { margin: 0 0 16px; font-size: var(--am24-fs-sm); line-height: 1.6; color: var(--am24-text); }
.am24-faq__item a { color: var(--am24-accent); }
@media (max-width: 991px) { .am24-about { grid-template-columns: minmax(0, 1fr); gap: var(--am24-s3); } }
@media (prefers-reduced-motion: reduce) { .am24-tile { transition: none; } }
