/* Vuelta home page: only what blocks cannot say. The sections are core blocks styled by theme.json, block style
   variations (Hero, Tile, Card, Arrow, Outline arrow, Rating, Mint, Deep) and block attributes (tools/build-home-specs.py).
   Here: the hero's phone art direction, the tiles' phone ratio and the review cards printed by [vuelta_reviews].
   Token variables only; raw values are limited to 0, hairlines, image focus points and motion transforms. */

/* ---------- hero (Hero cover) ---------- */
.wp-block-cover.is-style-hero { min-height: var(--wp--custom--layout--hero-min); }
/* the photo runs full width, the copy sits on the store's content edge */
/* (core sets width:auto on the inner container of a cover with a content position, with a stronger selector) */
.wp-block-cover.is-style-hero.has-custom-content-position[class*="is-position-"] .wp-block-cover__inner-container { width: 100%; max-width: var(--wp--custom--layout--wide); margin-inline: auto; }
.wp-block-cover.is-style-hero .vt-hero__picture { position: absolute; inset: 0; display: block; }
/* phones: copy on cream first, then a full-width photo window cropped around the pets (no scrim over faces) */
@media (max-width: 781px) {
	.wp-block-cover.is-style-hero { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding: 0 !important; background: var(--wp--preset--color--base); }
	.wp-block-cover.is-style-hero .wp-block-cover__background { display: none; }
	.wp-block-cover.is-style-hero .wp-block-cover__inner-container { order: 1; padding: var(--wp--preset--spacing--50) var(--wp--custom--layout--gutter-mobile); box-sizing: border-box; }
	.wp-block-cover.is-style-hero .vt-hero__picture { order: 2; position: relative; width: 100%; aspect-ratio: var(--wp--custom--image--split); }
	.wp-block-cover.is-style-hero img.wp-block-cover__image-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 74%; }
}

/* ---------- tiles (Tile cover) ---------- */
.wp-block-cover.is-style-tile { min-height: var(--wp--custom--layout--tile-min); }
/* phones: the 4:3 split ratio keeps both pets of the wide scene in frame */
@media (max-width: 599px) {
	.wp-block-cover.is-style-tile { min-height: 0; aspect-ratio: var(--wp--custom--image--split); }
	.wp-block-cover.is-style-tile img.wp-block-cover__image-background { object-position: 62% 50%; }
}

/* ---------- customer reviews: cards printed by the [vuelta_reviews] shortcode ---------- */
.vt-review-cards { display: grid; gap: var(--wp--preset--spacing--40); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 782px) { .vt-review-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vt-review-card { display: grid; grid-template-rows: auto 1fr auto; gap: var(--wp--preset--spacing--30); margin: 0; padding: var(--wp--preset--spacing--50); border-radius: var(--wp--custom--radius--card); background: var(--wp--preset--color--surface); border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--accent-6); box-shadow: var(--wp--preset--shadow--sm); }
.vt-review-card__stars { position: relative; display: block; width: calc(var(--wp--custom--icon--sm) * 5); height: var(--wp--custom--icon--sm); background: var(--wp--preset--color--accent-6); -webkit-mask: var(--wp--custom--icon-url--star-fill) left center / var(--wp--custom--icon--sm) var(--wp--custom--icon--sm) repeat-x; mask: var(--wp--custom--icon-url--star-fill) left center / var(--wp--custom--icon--sm) var(--wp--custom--icon--sm) repeat-x; }
.vt-review-card__stars > span { position: absolute; inset: 0 auto 0 0; width: calc(var(--vt-rating) / 5 * 100%); background: var(--wp--preset--color--star); }
.vt-review-card__text { margin: 0; padding: 0; border: 0; font-size: var(--wp--preset--font-size--large); font-weight: var(--wp--custom--font-weight--medium); line-height: var(--wp--custom--line-height--snug); color: var(--wp--preset--color--contrast); }
.vt-review-card__text p { margin: 0; }
.vt-review-card__who { display: flex; align-items: center; gap: var(--wp--preset--spacing--30); padding-top: var(--wp--preset--spacing--30); border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--accent-6); }
.vt-review-card__who > span:last-child { display: grid; font-size: var(--wp--preset--font-size--small); }
.vt-review-card__who a { color: var(--wp--preset--color--accent-4); text-decoration: none; }
.vt-review-card__who a:hover { color: var(--wp--preset--color--link); text-decoration: underline; }
.vt-review-card .vt-avatar { display: grid; place-items: center; width: var(--wp--custom--icon--xl); height: var(--wp--custom--icon--xl); border-radius: var(--wp--custom--radius--badge); background: var(--wp--preset--color--soft); font-weight: var(--wp--custom--font-weight--black); }

@media (prefers-reduced-motion: reduce) {
	.wp-block-cover.is-style-tile img.wp-block-cover__image-background { transition: none; }
	.wp-block-cover.is-style-tile:hover img.wp-block-cover__image-background { transform: none; }
}

/* ---------- product rows (Product Collection, carousel layout; tools/build-home-specs.py carousel()) ----------
   One card width, scroll snap, no scrollbar; WooCommerce's previous/next buttons in the row head drive the scroll. */
.vt-row .wc-block-product-template.is-product-collection-layout-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: var(--wp--custom--layout--row-card-mobile); gap: var(--wp--preset--spacing--30); margin: 0; padding: var(--wp--preset--spacing--20) 0 var(--wp--preset--spacing--40); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.vt-row .wc-block-product-template.is-product-collection-layout-carousel::-webkit-scrollbar { display: none; }
.vt-row .wc-block-product-template.is-product-collection-layout-carousel > li { width: auto !important; max-width: none !important; margin: 0 !important; scroll-snap-align: start; }
@media (min-width: 782px) { .vt-row .wc-block-product-template.is-product-collection-layout-carousel { grid-auto-columns: var(--wp--custom--layout--row-card); gap: var(--wp--preset--spacing--40); } }
.vt-row-head { margin-bottom: var(--wp--preset--spacing--40); }
.vt-row-head > * { margin: 0; }
.vt-row .wc-block-next-previous-buttons { display: flex; gap: var(--wp--preset--spacing--20); }
.vt-row .wc-block-next-previous-buttons[hidden] { display: none; }
.vt-row .wc-block-next-previous-buttons__button { display: grid; place-items: center; width: var(--wp--custom--control--min); height: var(--wp--custom--control--min); padding: 0; border: 0; border-radius: var(--wp--custom--radius--icon-button); background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--on-contrast); cursor: pointer; transition: background var(--wp--custom--transition--fast); }
.vt-row .wc-block-next-previous-buttons__button:hover { background: var(--wp--preset--color--accent-1); }
.vt-row .wc-block-next-previous-buttons__button[aria-disabled="true"] { background: var(--wp--preset--color--accent-6); color: var(--wp--preset--color--accent-4); cursor: not-allowed; }
.vt-row .wc-block-next-previous-buttons__button:focus-visible { outline: var(--wp--custom--border--focus) solid var(--wp--preset--color--focus); outline-offset: var(--wp--custom--border--focus); }

/* ---------- category tiles (Mint tile): the whole tile is the link, the photo zooms on hover ---------- */
.vt-tile { position: relative; overflow: clip; }
.vt-tile > * { margin: 0; }
.vt-tile .wp-block-image { width: 100%; }
.vt-tile .wp-block-image img { width: 100%; transition: transform var(--wp--custom--transition--base); }
.vt-tile p a { text-decoration: none; }
.vt-tile p a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.vt-tile:hover .wp-block-image img { transform: scale(var(--wp--custom--motion--zoom)); }
.vt-tile:has(a:focus-visible) { outline: var(--wp--custom--border--focus) solid var(--wp--preset--color--focus); outline-offset: var(--wp--custom--border--focus); }
.vt-tile a:focus-visible { outline: 0; }

/* ---------- deals: the photo fills its column, the panel scrolls its products ---------- */
.vt-deals { overflow: clip; }
.vt-deals__photo { align-self: stretch; }
.vt-deals__photo .wp-block-image { height: 100%; margin: 0; }
.vt-deals__photo .wp-block-image img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: var(--wp--custom--image--split); }
/* desktop: the panel sets the height, the photo fills it (it never stretches the section to its own height) */
@media (min-width: 782px) { .vt-deals__photo { position: relative; } .vt-deals__photo .wp-block-image { position: absolute; inset: 0; } .vt-deals__photo .wp-block-image img { aspect-ratio: auto; } }
.vt-deals > .wp-block-column:last-child { min-width: 0; }

/* ---------- customer reviews: the section stays hidden while there is no card to show ---------- */
.vt-reviews-home:not(:has(.vt-review-card)) { display: none; }

@media (prefers-reduced-motion: reduce) { .vt-tile .wp-block-image img { transition: none; } .vt-tile:hover .wp-block-image img { transform: none; } }

/* ---------- deal tabs (core Tabs): the tab list as chips, the chosen tab filled; panels are product rows ---------- */
.vt-tabs { display: grid; gap: var(--wp--preset--spacing--40); }
.vt-tabs > * { margin: 0; }
.vt-tabs .wp-block-tab-list { display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--20); }
.vt-tabs .wp-block-tab-list button { min-height: var(--wp--custom--control--min); padding: 0 var(--wp--preset--spacing--40); border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--border-strong); border-radius: var(--wp--custom--radius--chip); background: var(--wp--preset--color--surface); color: var(--wp--preset--color--contrast); font-size: var(--wp--preset--font-size--small); font-weight: var(--wp--custom--font-weight--bold); transition: background var(--wp--custom--transition--fast), border-color var(--wp--custom--transition--fast); }
.vt-tabs .wp-block-tab-list button:hover { border-color: var(--wp--preset--color--contrast); }
.vt-tabs .wp-block-tab-list button[aria-selected="true"] { border-color: var(--wp--preset--color--contrast); background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--on-contrast); }
.vt-tabs .wp-block-tab-list button[aria-selected="true"]::before { content: none; }
.vt-tabs .wp-block-tab-panel > * { margin: 0; }
@media (prefers-reduced-motion: reduce) { .vt-tabs .wp-block-tab-list button { transition: none; } }
