/* Homepage concert cards (1.10.2), loaded after tto-home.css.
 * The approved card design is unchanged; this adds what live data needs:
 * one / two card layouts, the photo fallback, the Description Heading, sold out
 * and an empty state. Selectors start with "body" so a Customizer copy of
 * tto-home.css (printed later) cannot override them. */

/* Keep desktop cards compact and centre every complete or partial row. */
body .tto-home .tto-concert-grid{grid-template-columns:repeat(3,minmax(0,360px));justify-content:center;gap:26px}
body .tto-home .tto-concert-grid.tto-concert-grid--1{grid-template-columns:minmax(0,360px)}
body .tto-home .tto-concert-grid.tto-concert-grid--2{grid-template-columns:repeat(2,minmax(0,360px))}
body .tto-home .tto-card{text-align:left}

/* No Featured Image and no gallery: a quiet burgundy panel in the photo slot. */
body .tto-home .tto-card-image.tto-card-image--none{background:linear-gradient(135deg,#3a1022 0%,#780b2b 60%,#ad8446 100%)}

/* Description Heading under the title. */
body .tto-home .tto-card .tto-card-subtitle{margin:-8px 0 16px;color:#4f535c;font:italic 16px/1.45 var(--tto-serif,Georgia,'Times New Roman',serif)}

/* Ticket price without internal package terminology. */
body .tto-home .tto-card .tto-price__label{color:#6f675d;font-size:13px;font-weight:600;line-height:1.35;letter-spacing:.03em}
body .tto-home .tto-card .tto-price__regular{display:inline-block;margin-right:8px;color:var(--tto-muted,#5b6475);font-size:18px;font-weight:400;text-decoration:line-through}
body .tto-home .tto-card .tto-price__amount{color:var(--tto-fg,#202c3e);font-size:22px;font-weight:700;line-height:1.15}
body .tto-home .tto-card .tto-price__participants{color:#6f675d;font-size:12px;font-weight:400;line-height:1.4;letter-spacing:0}

/* Sold out: no price, a plain label in its place. */
body .tto-home .tto-card .tto-price--sold-out strong{color:var(--tto-primary,#780b2b);font-size:17px}

/* 1.10.4: badges (Sold Out / marketing / Promotion, from Events) above the title; they wrap, never overlap. */
body .tto-home .tto-card .tto-card-badges{margin:0 0 12px}

/* Nothing on sale. */
body .tto-home .tto-concerts-empty{max-width:640px;margin:0 auto;padding:36px 28px;border:1px solid var(--tto-border,#e2d9cb);border-radius:5px;background:var(--tto-bg,#fcfaf6);text-align:center}
body .tto-home .tto-concerts-empty__title{margin:0 0 8px;color:var(--tto-primary,#780b2b);font:400 26px/1.25 var(--tto-serif,Georgia,'Times New Roman',serif)}
body .tto-home .tto-concerts-empty__text{margin:0;color:#4f535c;font-size:17px;line-height:1.6}

/* 1.10.19: "Explore All Concerts" under the grid (not with the empty state): quiet line, outline button. */
body .tto-home .tto-concerts-more{display:flex;flex-direction:column;align-items:center;gap:10px;margin-top:24px;text-align:center}
body .tto-home .tto-concerts-more__text{margin:0;color:var(--tto-muted,#62636a);font-size:15px;line-height:1.5}
body .tto-home .tto-concerts-more .tto-buttons{justify-content:center}

@media (max-width:760px){
	body .tto-home .tto-concert-grid,
	body .tto-home .tto-concert-grid.tto-concert-grid--1,
	body .tto-home .tto-concert-grid.tto-concert-grid--2{grid-template-columns:1fr;justify-content:stretch;gap:24px}
}
body .tto-home .screen-reader-text{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* 1.10.14 desktop card (>=1025px) for the compact 264px column (tto-align.css section 2): editorial card, badges on the
 * photo (title badges top left, Promotion bottom left), date and time on one row, price above a full-width button.
 * Same content, order and links. Tablet and phone sizes are unchanged. ".tto-card" adds weight over tto-align.css.
 * 1.10.15: the photo is 16:10 of the 262px inner width (164px; was 124px, about 2.1:1).
 * 1.10.17: 248px column, photo 16:10 of its 246px inner width (154px); date, time, venue and ages one per line.
 * 1.10.18: 236px column (four per row), photo 16:10 of 234px (146px); type and spacing about 10% more compact. */
@media (min-width:1025px){
	body .tto-home .tto-card{position:relative;--tto-card-img:146px}
	body .tto-home .tto-card .tto-card-image{height:var(--tto-card-img)}
	body .tto-home .tto-card .tto-card-body{padding:10px 14px 13px}
	/* 1.10.37: status badges (Super Hot Selling, Sold Out) stay on the photo; the PROMOTION badge moves into the
	 * price block, a small cream pill directly above "Tickets from". */
	body .tto-home .tto-card .tto-card-badges{position:absolute;top:10px;left:10px;z-index:2;max-width:calc(100% - 20px);margin:0}
	body .tto-home .tto-card .tto-card-badges .to-badge{padding:3px 8px;font-size:11px;box-shadow:0 1px 3px rgba(20,20,20,.25)}
	body .tto-home .tto-card.tto-card .tto-card-promo{position:static;display:flex;flex-wrap:wrap;gap:4px;max-width:100%;margin:0 0 -2px;padding:0;list-style:none}
	body .tto-home .tto-card .tto-card-promo .to-badge{padding:2px 9px;border:1px solid #c9a45c;border-radius:999px;background:#fbf3e4;color:#780b2b;box-shadow:none;font-size:11px;font-weight:600;line-height:1.35;letter-spacing:.02em;text-transform:none}
	body .tto-home .tto-card .tto-card-title{margin:0 0 3px;font-size:16.5px;line-height:1.22}
	body .tto-home .tto-card .tto-card-subtitle{margin:0 0 5px;font-size:13px;line-height:1.35}
	/* Date, time, venue and ages: one per line, icons aligned in one column. */
	body .tto-home .tto-card .tto-details{flex-direction:column;gap:2px;margin-bottom:8px;font-size:13px;line-height:1.4}
	body .tto-home .tto-card .tto-detail{gap:7px}
	body .tto-home .tto-card .tto-detail::before{width:14px;height:14px}
	/* Price, then the button across the card; buttons level. */
	body .tto-home .tto-card .tto-card-bottom{flex-direction:column;align-items:stretch;gap:8px;padding-top:9px}
	/* Price: three lines. "Tickets from" / was + now (now is the bold one) / who it covers. Works for any price length
	 * and for a price with no discount (line two is then just the price). */
	body .tto-home .tto-card .tto-price{display:flex;flex-flow:row wrap;align-items:baseline;gap:1px 7px;min-width:0;margin-top:auto;line-height:1.3}
	body .tto-home .tto-card .tto-price :is(.tto-price__label,.tto-price__participants){flex:0 0 100%;display:block;margin:0}
	body .tto-home .tto-card .tto-price__label{font-size:12px}
	body .tto-home .tto-card .tto-price__regular{margin-right:0;font-size:13px;white-space:nowrap}
	body .tto-home .tto-card .tto-price__amount{display:inline-block;font-size:19px;line-height:1.2;white-space:nowrap}
	body .tto-home .tto-card .tto-price__participants{font-size:12px}
	body .tto-home .tto-card .tto-buttons{flex:0 0 auto;margin:0}
	body .tto-home .tto-card .tto-buttons .wp-block-button{width:100%}
	body .tto-home .tto-card .tto-btn .wp-block-button__link{width:100%;min-height:38px;padding:0 12px;font-size:13.5px}
}
/* Row alignment across a row of cards: photo, heading block and price/button are three shared rows
 * (subgrid), so a Sold Out badge, subtitle or Waiting List card keeps every divider and button level.
 * Browsers without subgrid keep the column layout above. */
@media (min-width:1025px){
	@supports (grid-template-rows:subgrid){
		body .tto-home .tto-concert-grid .tto-card{display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:0}
		body .tto-home .tto-concert-grid .tto-card .tto-card-body{display:contents}
		body .tto-home .tto-concert-grid .tto-card .tto-card-image{grid-row:1}
		body .tto-home .tto-concert-grid .tto-card .tto-card-head{grid-row:2;padding:10px 14px 0}
		body .tto-home .tto-concert-grid .tto-card .tto-card-bottom{grid-row:3;margin:0 14px 13px}
		body .tto-home .tto-concert-grid .tto-card .tto-card-bottom .tto-buttons{margin-top:auto}
		body .tto-home .tto-concert-grid .tto-card .tto-card-bottom .tto-price{align-self:end}
	}
}
