/* Home page; the .tm-home scope overrides style.css home rules other pages still use */
.tm-home {
    --o: #ff5000;
    --o-text: #c23c00;
    --tint: #fff4ee;
    --ink: #1f2329;
    --text: #4a4f57;
    --muted: #6b7280;
    --line: #ebe6e2;
    --line-strong: #d9d2cc;
    --warm: #f7f3f0;
    --skel: #f1ece8;
    --r: 16px;
    --r-sm: 10px;
    --shadow: 0 1px 1px rgba(17, 17, 17, .03), 0 6px 12px -4px rgba(17, 17, 17, .05), 0 22px 44px -18px rgba(17, 17, 17, .14);
    --ease: cubic-bezier(.2, .8, .2, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --gap: 24px;
    --sec: 112px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
}
.tm-home *, .tm-home *::before, .tm-home *::after { box-sizing: border-box; }
/* Offsets the footer band's 48px rise (style.css) so it sits one section below */
.tm-home { padding-bottom: calc(var(--sec) - 48px); }
/* Undo style.css's bare span rule; :where keeps it from out-ranking the classes below */
.tm-home :where(span) { color: inherit; font-size: inherit; }
.tm-home :focus-visible { outline: 2px solid var(--o); outline-offset: 2px; }
.tm-home svg { flex: none; padding: 0; }
/* Match the footer's 80% .container (max 1408px); 80vw - 12px allows for the scrollbar */
.tm-home .container { max-width: max(calc((100% + 32px) * .8), min(calc(80vw - 12px), 1408px)); }

/* ── Buttons ── */
.tm-home .tm-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 22px; margin: 0; border-radius: var(--r-sm); border: 1.5px solid transparent;
    font: inherit; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
    cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
/* Same hover as the login buttons */
.tm-home .tm-btn--primary { background: var(--o); border-color: var(--o); color: #fff; }
.tm-home .tm-btn--primary:hover, .tm-home .tm-btn--primary:focus-visible { background: #fff; color: var(--o-text); }
/* For buttons repeated on every row */
.tm-home .tm-btn--ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.tm-home .tm-btn--ghost:hover, .tm-home .tm-btn--ghost:focus-visible { border-color: var(--o); color: var(--o-text); }
/* Arrow: › gains a shaft on hover (as the login buttons) */
.tm-home .tm-btn__arrow {
    position: relative; top: .06em; width: 10px; height: 10px; margin-left: -1px; overflow: visible;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tm-btn__arrow-line { opacity: 0; transition: opacity .2s ease; }
.tm-btn__arrow-head { transition: transform .2s var(--ease); }
.tm-btn:hover:not(:disabled) .tm-btn__arrow-line, .tm-btn:focus-visible .tm-btn__arrow-line { opacity: 1; }
.tm-btn:hover:not(:disabled) .tm-btn__arrow-head, .tm-btn:focus-visible .tm-btn__arrow-head { transform: translateX(3px); }
.tm-home .tm-btn:disabled { opacity: .6; cursor: default; }
/* Text link */
.tm-home .tm-link {
    position: relative; display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 auto; padding: 8px 0;
    border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; line-height: 1;
    white-space: nowrap; cursor: pointer; transition: color .2s ease;
}
/* Arrows sit 1px up: the label's underline padding lowers the box they centre on */
.tm-home .tm-link svg { position: relative; top: -1px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.tm-home .tm-link > span, .tm-home .tm-more > span {
    padding-bottom: 3px; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1.5px;
    transition: background-size .4s var(--ease-out);
}
.tm-home .tm-link:hover > span, .tm-home .tm-more:hover > span { background-size: 100% 1.5px; }
.tm-home .tm-link:hover { color: var(--o-text); }
.tm-home .tm-link:hover svg { transform: translateX(3px); }
.tm-home .tm-link:disabled { opacity: .6; cursor: default; }

/* ── Top banner ── */
/* Top padding clears the fixed 64px header */
.tm-home .tm-hero { position: relative; margin: 0; padding: 84px 16px 0; }
.tm-home .tm-hero.has-dots { padding-bottom: 30px; }
.tm-hero__grid { display: grid; gap: 32px; }
.tm-hero--split .tm-hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
/* Override style.css's !important carousel padding (meant for the old header) */
.tm-home #heroCarousel { padding: 0 !important; margin: 0; }
.tm-home .tm-hero__carousel .carousel-inner { border-radius: 20px; overflow: hidden; background: var(--warm); transform: translateZ(0); }
.tm-home .tm-hero__carousel .carousel-item > a { display: block; }
.tm-home #heroCarousel .carousel-item img.banner-img { display: block; width: 100%; height: auto; aspect-ratio: auto 3 / 1; object-fit: cover; }
/* Slower than Bootstrap's .6s carousel-fade */
.tm-home #heroCarousel.carousel-fade .carousel-item { transition-duration: .9s; }
.tm-home #heroCarousel.carousel-fade .active.carousel-item-left,
.tm-home #heroCarousel.carousel-fade .active.carousel-item-right { transition: opacity 0s .9s; }
.tm-hero__arrow {
    position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%;
    background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 2px 10px rgba(17, 17, 17, .18);
    opacity: 0; transition: opacity .25s ease, color .2s ease;
}
.tm-hero__arrow.is-prev { left: 20px; }
.tm-hero__arrow.is-next { right: 20px; }
.tm-hero__carousel:hover .tm-hero__arrow, .tm-hero__arrow:focus-visible { opacity: 1; }
.tm-hero__arrow:hover { color: var(--o); }
.tm-hero__arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* Dots sit below the banner: banner art fills to the edges */
.tm-home .tm-hero__dots {
    position: absolute; left: 0; right: 0; bottom: -28px; z-index: 1;
    display: flex; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none;
}
/* 22px hit area around an 8px dot */
.tm-home .tm-hero__dots li {
    position: relative; box-sizing: border-box; flex: none; width: 12px; height: 22px; margin: 0; padding: 0; border: 0;
    background: none; opacity: 1; text-indent: -999px; overflow: hidden; cursor: pointer; transition: width .35s var(--ease);
}
.tm-home .tm-hero__dots li::before {
    content: ""; position: absolute; top: 7px; bottom: 7px; left: 2px; right: 2px; border-radius: 99px;
    background: var(--line-strong); transition: background-color .35s ease;
}
/* Active dot fills while its slide shows; home.js sets .is-running / .is-paused */
.tm-home .tm-hero__dots li.active { width: 44px; }
.tm-home .tm-hero__dots li.active::after {
    content: ""; position: absolute; top: 7px; bottom: 7px; left: 2px; right: 2px; border-radius: 99px;
    background: var(--o); transform-origin: 0 50%;
}
html.tm-motion .tm-hero__carousel.is-running:not(.is-paused) .tm-hero__dots li.active::after { animation: tm-fill 5s linear both; }
@keyframes tm-fill { from { transform: scaleX(0); } to { transform: none; } }
.tm-home .tm-hero__dots li:hover:not(.active)::before { background: #bdb5ae; }
/* Side picture/text banner types: CMS option, unused on the live site */
.tm-hero__side { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.tm-hero__side.is-solo { align-items: center; text-align: center; max-width: 560px; margin: 0 auto; }
.tm-home .tm-hero__side img { display: block; width: 100%; height: auto; aspect-ratio: auto 3 / 2; object-fit: cover; border-radius: 20px; }
.tm-home .tm-hero__title { margin: 0; font-family: var(--font-display); font-size: 36px; line-height: 1.15; font-weight: 500; letter-spacing: .01em; color: var(--ink); }
.tm-home .tm-hero__desc { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); max-width: 48ch; }
.tm-home .tm-hero__side .tm-btn { margin-top: 4px; }

/* ── Shortcuts ── */
.tm-quick { margin-top: 24px; }
.tm-quick__list {
    position: relative; isolation: isolate;
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 8px; list-style: none;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.tm-quick__list > li { position: relative; }
.tm-quick__list > li + li::before {
    content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line); transition: opacity .25s ease;
}
.tm-quick__list > li:hover::before, .tm-quick__list > li:hover + li::before { opacity: 0; }
.tm-home .tm-quick__item {
    position: relative; z-index: 2;
    display: flex; align-items: center; gap: 12px; height: 100%; margin: 0 4px; padding: 10px;
    border-radius: var(--r-sm); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.25; text-decoration: none;
    transition: background-color .2s ease;
}
.tm-home .tm-quick__item:hover { background: var(--tint); color: var(--ink); }
/* Gliding hover pill added by home.js; replaces each item's own hover background */
.tm-quick__glow {
    position: absolute; z-index: 1; top: 0; left: 0; width: 0; height: 0; border-radius: var(--r-sm);
    background: var(--tint); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease), width .3s var(--ease), height .3s var(--ease), opacity .2s ease;
}
.tm-home .tm-quick__list.has-glow .tm-quick__item:hover { background: transparent; }
.tm-quick__icon {
    flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px;
    background: var(--tint); transition: background-color .2s ease, box-shadow .2s ease;
}
.tm-quick__icon img { display: block; width: 26px; height: 26px; transition: transform .3s var(--ease); }
.tm-quick__item:hover .tm-quick__icon img { transform: scale(1.06); }
/* Same tile hover as the header menu */
.tm-quick__item:hover .tm-quick__icon { background: #ffe8db; box-shadow: inset 0 0 0 1px #ffcfb3; }

/* ── Sections ── */
.tm-home .tm-sec { position: relative; isolation: isolate; margin: var(--sec) 0 0; padding: 0; }
.tm-sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 32px; }
/* Same face and weight as Loyalty's section titles */
.tm-home .tm-sec__title {
    margin: 0; font-family: var(--font-display); font-size: 40px; line-height: 1.12; font-weight: 500; letter-spacing: 0; color: var(--ink);
}
.tm-home .tm-sec__title > span { display: block; color: inherit; font-size: inherit; }
.tm-sec__tools { display: flex; align-items: center; gap: 20px; flex: none; padding-bottom: 4px; }
.tm-home .tm-more {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; color: var(--o-text);
    font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; transition: color .2s ease;
}
.tm-home .tm-more:hover { color: var(--o); }
.tm-more svg { position: relative; top: -1px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.tm-more:hover svg { transform: translateX(3px); }

/* Promotion tabs */
.tm-tabs { position: relative; display: flex; gap: 32px; margin: -12px 0 32px; padding: 0; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line); }
.tm-tabs::-webkit-scrollbar { display: none; }
.tm-home .tm-tab {
    flex: none; padding: 12px 0; border-bottom: 2px solid transparent; color: var(--text);
    font-size: 15px; font-weight: 600; line-height: 1.3; text-decoration: none; white-space: nowrap;
    transition: color .2s ease, border-color .2s ease;
}
.tm-home a.tm-tab:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.tm-home .tm-tab.is-active { color: var(--o-text); border-bottom-color: var(--o); }
/* Gliding bar added by home.js; hides the per-tab borders */
.tm-tabs__bar {
    position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--o); pointer-events: none;
    transition: transform .4s var(--ease-out), width .4s var(--ease-out);
}
.tm-home .tm-tabs.has-bar .tm-tab, .tm-home .tm-tabs.has-bar a.tm-tab:hover { border-bottom-color: transparent; }

/* Full-bleed warm band */
.tm-home .tm-sec--band { padding: 64px 0; }
.tm-sec--band::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: var(--warm); }

/* ── Pickers (home.js): stacked panels keep the tallest one's height ── */
.tm-offer__stage, .tm-stage__visual, .tm-stage__texts { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.tm-offer__stage > [data-panel], .tm-stage__visual > [data-panel], .tm-stage__texts > [data-panel] { grid-area: 1 / 1; min-width: 0; }
.tm-home [data-panel] { transition: opacity .3s ease, visibility 0s linear .3s, border-color .2s ease, box-shadow .25s ease; }
.tm-home [data-panel]:not(.is-on) { opacity: 0; visibility: hidden; }
.tm-home [data-panel].is-on { transition: opacity .45s ease, visibility 0s, border-color .2s ease, box-shadow .25s ease; }
/* z-index -1 inside the isolated list keeps the pill above the list's white */
.tm-pick__glow {
    position: absolute; z-index: -1; top: 0; left: 0; width: 0; height: 0; border-radius: var(--r-sm);
    background: var(--tint); pointer-events: none;
    transition: transform .4s var(--ease-out), width .4s var(--ease-out), height .4s var(--ease-out);
}

/* ── Hot promotion ── */
.tm-offer { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: stretch; }
.tm-offer > .tm-skel--rows { height: auto; }
.tm-offer__side {
    position: relative; isolation: isolate; display: flex; flex-direction: column; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
/* The rows share the card's height */
.tm-offer__list { display: flex; flex-direction: column; flex: 1; margin: 0; padding: 0; list-style: none; }
.tm-offer__list > li { position: relative; display: flex; flex: 1 1 auto; }
.tm-offer__list > li + li::before {
    content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--line); transition: opacity .25s ease;
}
.tm-offer__list > li:has(> .is-active)::before, .tm-offer__list > li:has(> .is-active) + li::before { opacity: 0; }
.tm-home .tm-offer__row {
    position: relative; z-index: 1; display: grid; grid-template-columns: 78px minmax(0, 1fr) auto 18px; align-items: center; gap: 16px;
    width: 100%; min-height: 70px; margin: 0; padding: 10px 14px 10px 10px; border: 0; border-radius: var(--r-sm);
    background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color .2s ease;
}
.tm-offer__thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: var(--warm); }
.tm-home .tm-offer__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out), opacity .5s ease; }
.tm-offer__row:hover .tm-offer__thumb img { transform: scale(1.06); }
.tm-offer__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tm-home .tm-offer__name { overflow: hidden; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.tm-home .tm-offer__meta { overflow: hidden; font-size: 13px; line-height: 1.35; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.tm-offer__price { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.tm-home .tm-offer__price strong { font-family: var(--font-display); font-size: 22px; line-height: 1; font-weight: 700; color: var(--ink); transition: color .2s ease; }
.tm-home .tm-offer__price strong span { font-size: .6em; vertical-align: .5em; margin-right: 1px; }
.tm-home .tm-offer__price small { font-size: 12px; line-height: 1; color: var(--muted); white-space: nowrap; }
.tm-offer__go {
    width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    color: var(--line-strong); transition: color .2s ease, transform .3s var(--ease);
}
.tm-offer__row:hover .tm-offer__go { color: var(--muted); }
/* Active row: own background until home.js adds the glow */
.tm-home .tm-offer__row.is-active { background: var(--tint); }
.tm-home .tm-offer__side.has-glow .tm-offer__row.is-active { background: transparent; }
.tm-home .tm-offer__row.is-active .tm-offer__price strong { color: var(--o); }
.tm-offer__row.is-active .tm-offer__go { color: var(--o); transform: translateX(2px); }
.tm-offer__card .tm-card__body { gap: 10px; padding: 20px 24px; }
.tm-offer__card .tm-card__actions { margin: auto 24px 0; }
.tm-home .tm-offer__card .tm-card__title { overflow: hidden; font-size: 22px; text-overflow: ellipsis; white-space: nowrap; }
/* Fixed line heights so nothing shifts as the cards take turns */
.tm-offer__card .tm-card__facts { min-height: 19px; }
.tm-home .tm-offer__card .tm-card__desc { height: calc(1.6em * 3); }
.tm-offer__buy { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 36px; }
.tm-home .tm-offer__buy .tm-sms { margin: 0; }
/* Autoplay progress line; its animationend makes home.js pick the next row */
.tm-offer.is-auto .tm-offer__row.is-active::after {
    content: ""; position: absolute; left: 12px; right: 14px; bottom: 0; height: 2px; border-radius: 2px;
    background: var(--o); transform-origin: 0 50%; animation: tm-fill 6s linear both;
}
.tm-offer.is-held .tm-offer__row.is-active::after { animation-play-state: paused; }

/* ── Cards ── */
.tm-card {
    display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r);
    transition: border-color .2s ease, box-shadow .25s ease;
}
.tm-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.tm-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--warm); }
.tm-home .tm-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out), opacity .5s ease; }
.tm-card:hover .tm-card__media img { transform: scale(1.05); }
.tm-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px; }
.tm-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tm-home .tm-card__title { margin: 0; min-width: 0; font-size: 19px; line-height: 1.35; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.tm-card__price { display: flex; align-items: baseline; gap: 8px; flex: none; }
/* Price styled as on Loyalty */
.tm-home .tm-card__price strong { font-family: var(--font-display); font-size: 30px; line-height: 1; font-weight: 700; color: var(--o); }
.tm-home .tm-card__price strong span { font-size: .6em; vertical-align: .5em; margin-right: 1px; }
.tm-home .tm-card__price s { font-size: 14px; color: var(--muted); }
.tm-card__facts { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.tm-card__facts > span { display: inline-flex; align-items: center; gap: 6px; }
.tm-card__facts svg { position: relative; top: 1px; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tm-home .tm-card__perday { color: var(--ink); font-weight: 600; }
/* SMS chip: a tap opens the SMS app, a click copies (home.js) */
.tm-home .tm-sms {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 32px; margin: 4px 0 0; padding: 0 12px 0 10px;
    border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink);
    font: inherit; font-size: 13px; line-height: 1; cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.tm-sms svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tm-sms .tm-sms__ico { color: var(--o); }
.tm-sms__ok { display: none; color: var(--o-text); }
.tm-home .tm-sms__label { color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.tm-home .tm-sms b { font-weight: 700; color: inherit; }
.tm-home .tm-sms i { font-style: normal; color: var(--muted); transition: transform .25s var(--ease); }
.tm-home .tm-sms span:last-child { font-weight: 600; }
/* The font's tall ascent sets its caps ~1px below a centred icon */
.tm-home .tm-sms > span, .tm-home .tm-sms > b, .tm-home .tm-sms > i { position: relative; top: -1px; }
.tm-home .tm-sms:hover { border-color: var(--o); background: var(--tint); }
.tm-home .tm-sms:hover i { transform: translateX(2px); }
.tm-home .tm-sms.is-copied { border-color: var(--o); background: var(--tint); color: var(--o-text); }
.tm-sms.is-copied .tm-sms__ico { display: none; }
.tm-sms.is-copied .tm-sms__ok { display: block; animation: tm-tick .3s var(--ease-out) both; }
@keyframes tm-tick { from { transform: scale(.4); opacity: 0; } }
.tm-home .tm-card__badge {
    align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: var(--tint); color: var(--o-text);
    font-size: 13px; font-weight: 600; line-height: 1.4;
}
/* CMS text, may carry its own markup: clamp to 3 lines */
.tm-home .tm-card__desc {
    margin: 0; font-size: 14px; line-height: 1.6; color: var(--text); max-height: calc(1.6em * 3); overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.tm-home .tm-card__desc * { margin: 0; padding: 0; font-size: inherit; line-height: inherit; color: inherit; }
.tm-card__actions { display: flex; align-items: center; gap: 12px; margin: auto 20px 0; padding: 14px 0 18px; border-top: 1px solid var(--line); }

/* ── VAS (_Vas.cshtml); banners are 3:2 and carry their own text ── */
.tm-home .tm-svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.tm-svc__item {
    display: flex; flex-direction: column; min-width: 0; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r);
    transition: border-color .2s ease, box-shadow .25s ease;
}
.tm-svc__item:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.tm-svc__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--warm); }
.tm-home .tm-svc__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out), opacity .5s ease; }
.tm-svc__item:hover .tm-svc__media img { transform: scale(1.04); }
.tm-svc__body { min-width: 0; padding: 18px 20px 0; }
.tm-home .tm-svc__name { margin: 0; overflow: hidden; font-size: 17px; line-height: 1.35; font-weight: 600; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.tm-home .tm-svc__desc {
    min-height: 1.5em; margin: 4px 0 0; overflow: hidden; font-size: 14px; line-height: 1.5; color: var(--text);
    text-overflow: ellipsis; white-space: nowrap;
}
.tm-svc__foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: auto 20px 0; padding: 14px 0 16px; border-top: 1px solid var(--line);
}
.tm-svc__body + .tm-svc__foot { margin-top: 16px; }
.tm-home .tm-svc__meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin: 0; font-size: 13px; line-height: 1.3; color: var(--muted); }
.tm-home .tm-svc__meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-home .tm-svc__meta strong { flex: none; font-family: var(--font-display); font-size: 20px; line-height: 1; font-weight: 700; color: var(--o); }
.tm-home .tm-svc__meta strong span { font-size: .62em; vertical-align: .45em; margin-right: 1px; }
.tm-home .tm-svc__meta strong + span::before { content: "·"; margin-right: 8px; color: var(--line-strong); }
.tm-home .tm-btn--sm { flex: none; height: 38px; padding: 0 16px; font-size: 14px; }

/* ── Devices (Index.cshtml renderDevices, from the shared _Device partial) ── */
.tm-stage { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: stretch; }
.tm-stage__visual { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r); background: var(--warm); }
/* Own grey: a fading panel is its own layer, so multiply can't see the stage's */
.tm-home .tm-stage__pic { display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--warm); }
/* Multiply turns the photos' white background into the tile's grey */
.tm-home .tm-stage__pic img {
    display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; mix-blend-mode: multiply;
    transition: transform .9s var(--ease-out), opacity .5s ease;
}
.tm-home .tm-stage__pic:hover img { transform: scale(1.04); }
.tm-stage__info { display: flex; flex-direction: column; justify-content: center; gap: 36px; min-width: 0; padding: 12px 0; }
/* Top lines and buttons stay put as devices take turns; only the middle changes */
.tm-stage__text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.tm-home .tm-stage__count { margin: 0; font-size: 13px; line-height: 1; font-weight: 600; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
.tm-home .tm-stage__count b { color: var(--o-text); font-weight: 700; }
.tm-home .tm-stage__name { max-width: 100%; margin: 0; overflow: hidden; font-family: var(--font-display); font-size: 36px; line-height: 1.12; font-weight: 500; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.tm-home .tm-stage__name a { color: inherit; text-decoration: none; transition: color .2s ease; }
.tm-home .tm-stage__name a:hover { color: var(--o-text); }
.tm-stage__price { display: flex; align-items: baseline; gap: 12px; min-height: 38px; }
.tm-home .tm-stage__price strong { font-family: var(--font-display); font-size: 38px; line-height: 1; font-weight: 700; color: var(--o); }
.tm-home .tm-stage__price strong span { font-size: .6em; vertical-align: .5em; margin-right: 1px; }
.tm-home .tm-stage__price s { font-size: 16px; color: var(--muted); }
.tm-home .tm-stage__specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; width: 100%; margin: 6px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line); }
.tm-home .tm-stage__specs li { display: flex; align-items: flex-start; gap: 8px; min-width: 0; font-size: 14px; line-height: 1.45; color: var(--text); }
.tm-stage__specs svg { width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: var(--o); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tm-home .tm-stage__lead { max-width: 46ch; margin: 2px 0 0; font-size: 15px; line-height: 1.6; color: var(--text); }
.tm-stage__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; margin-top: auto; padding-top: 12px; }
.tm-home .tm-stage__actions .tm-link { margin: 0; }
.tm-stage__thumbs { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.tm-stage__thumbs::-webkit-scrollbar { display: none; }
.tm-home .tm-stage__thumb {
    flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 92px; margin: 0; padding: 0;
    border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer;
    transition: color .2s ease;
}
.tm-stage__tile {
    display: flex; align-items: center; justify-content: center; width: 92px; height: 72px; padding: 8px;
    border: 1.5px solid transparent; border-radius: 12px; background: var(--warm); transition: border-color .25s ease;
}
.tm-home .tm-stage__tile img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .4s var(--ease); }
.tm-home .tm-stage__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-home .tm-stage__thumb:hover { color: var(--ink); }
.tm-stage__thumb:hover .tm-stage__tile { border-color: var(--line-strong); }
.tm-stage__thumb:hover .tm-stage__tile img { transform: scale(1.06); }
.tm-home .tm-stage__thumb.is-active { color: var(--ink); }
.tm-home .tm-stage__thumb.is-active .tm-stage__tile { border-color: var(--o); }
/* Autoplay progress bar; its animationend makes home.js pick the next thumb */
.tm-home .tm-stage__thumb { position: relative; padding-bottom: 10px; }
.tm-stage.is-auto .tm-stage__thumb.is-active::before,
.tm-stage.is-auto .tm-stage__thumb.is-active::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px; }
.tm-stage.is-auto .tm-stage__thumb.is-active::before { background: var(--line); }
.tm-stage.is-auto .tm-stage__thumb.is-active::after { background: var(--o); transform-origin: 0 50%; animation: tm-fill 6s linear both; }
.tm-stage.is-held .tm-stage__thumb.is-active::after { animation-play-state: paused; }

/* ── News (Index.cshtml renderNews, from the shared _News partial) ── */
.tm-news { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: stretch; }
.tm-home .tm-news__lead { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; }
.tm-news__pic { display: block; margin-bottom: 8px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r); background: var(--warm); }
.tm-home .tm-news__pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out), opacity .5s ease; }
.tm-news__lead:hover .tm-news__pic img { transform: scale(1.04); }
.tm-home .tm-news__day, .tm-home .tm-news__row time { font-size: 13px; line-height: 1.3; color: var(--muted); font-variant-numeric: tabular-nums; }
.tm-home .tm-news__title { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 600; color: var(--ink); }
/* On the inline span so the underline covers every line */
.tm-home .tm-news__title span {
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1.5px; padding-bottom: 2px;
    transition: background-size .6s var(--ease-out);
}
.tm-news__lead:hover .tm-news__title span { background-size: 100% 1.5px; }
.tm-news__list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.tm-news__list > li { display: flex; flex: 1 1 auto; border-bottom: 1px solid var(--line); }
.tm-home .tm-news__row {
    display: grid; grid-template-columns: 136px minmax(0, 1fr) 20px; align-items: center; gap: 20px; width: 100%; padding: 16px 0;
    color: var(--ink); text-decoration: none;
}
.tm-news__thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-sm); background: var(--warm); }
.tm-home .tm-news__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out), opacity .5s ease; }
.tm-news__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tm-home .tm-news__head {
    margin: 0; font-size: 17px; line-height: 1.45; font-weight: 600; color: var(--ink); overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.tm-news__go { display: flex; color: var(--line-strong); transition: color .2s ease, transform .3s var(--ease); }
.tm-news__go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tm-home .tm-news__head span {
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1.5px; padding-bottom: 1px;
    transition: background-size .5s var(--ease-out);
}
.tm-news__row:hover .tm-news__thumb img { transform: scale(1.06); }
.tm-news__row:hover .tm-news__head span { background-size: 100% 1.5px; }
.tm-news__row:hover .tm-news__go { color: var(--ink); transform: translateX(3px); }

/* ── Package popup: z above header (1000), below login modal (1040+) ── */
.tm-pkg { position: fixed; inset: 0; z-index: 1030; display: flex; align-items: center; justify-content: center; padding: 24px; }
.tm-pkg[hidden], .tm-pkg [hidden] { display: none !important; }
.tm-pkg__backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, .5); }
.tm-pkg__dialog {
    position: relative; display: flex; flex-direction: column; width: min(560px, 100%);
    max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
    background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 32px 80px -24px rgba(17, 17, 17, .5);
}
.tm-pkg__close {
    position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 2px 10px rgba(17, 17, 17, .18);
    transition: color .2s ease, background-color .2s ease;
}
.tm-pkg__close:hover { color: var(--o); background: #fff; }
.tm-pkg__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.tm-pkg__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tm-pkg__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--warm); }
.tm-pkg__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tm-pkg__body { display: flex; flex-direction: column; gap: 22px; padding: 24px 28px 26px; }
.tm-pkg__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tm-pkg__title { min-width: 0; }
.tm-home .tm-pkg__badge {
    display: inline-flex; margin: 0 0 8px; padding: 3px 10px; border-radius: 99px; background: var(--tint); color: var(--o-text);
    font-size: 12px; font-weight: 600; line-height: 1.4;
}
.tm-home .tm-pkg__name { margin: 0; font-family: var(--font-display); font-size: 32px; line-height: 1.1; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.tm-pkg__price { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tm-home .tm-pkg__price strong { font-family: var(--font-display); font-size: 36px; line-height: 1; font-weight: 700; color: var(--o); }
.tm-home .tm-pkg__price strong span { font-size: .55em; vertical-align: .62em; margin-right: 1px; }
.tm-home .tm-pkg__price s { font-size: 15px; color: var(--muted); }
.tm-pkg__stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 14px 0; border-radius: 14px; background: var(--warm); }
.tm-pkg__stat { padding: 2px 12px; text-align: center; }
.tm-pkg__stat + .tm-pkg__stat { border-left: 1px solid #e6dfd9; }
.tm-home .tm-pkg__stat b { display: block; font-family: var(--font-display); font-size: 24px; line-height: 1.15; font-weight: 700; color: var(--ink); }
.tm-home .tm-pkg__stat span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.tm-pkg__sec { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.tm-home .tm-pkg__label { margin: 0; font-size: 12px; line-height: 1.3; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tm-pkg__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tm-home .tm-pkg__list li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.tm-pkg__list svg {
    flex: none; width: 22px; height: 22px; margin-top: 0; padding: 4px; border-radius: 50%; background: var(--tint); color: var(--o);
    fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round;
}
.tm-home .tm-pkg__text, .tm-home .tm-pkg__aside { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); }
.tm-home .tm-pkg__text * { max-width: 100%; }
.tm-home .tm-pkg__aside { padding: 10px 14px; border-radius: 10px; background: var(--tint); color: var(--o-text); font-size: 14px; font-weight: 600; }
.tm-pkg__rating { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.tm-home .tm-pkg__count { font-size: 13px; color: var(--muted); }
/* Footer sits outside the scroll area, so it stays in view */
.tm-pkg__foot {
    display: flex; align-items: center; gap: 12px; padding: 16px 28px 20px; border-top: 1px solid var(--line); background: #fff;
}
.tm-pkg__sms:empty { display: none; }
.tm-home .tm-pkg__sms .tm-sms { margin: 0; height: 40px; }
.tm-home .tm-pkg__foot .tm-btn { margin-left: auto; min-width: 190px; height: 48px; }

/* Desktop: picture left on warm grey, details right; fits a 768px-tall screen without scrolling */
@media (min-width: 900px) {
    .tm-pkg__dialog {
        display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: minmax(0, 1fr) auto;
        width: min(960px, 100%);
    }
    .tm-pkg__dialog:has(.tm-pkg__media[hidden]) { grid-template-columns: minmax(0, 1fr); width: min(640px, 100%); }
    .tm-pkg__scroll { display: contents; }
    .tm-pkg__media {
        grid-column: 1; grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center;
        aspect-ratio: auto; padding: 32px; background: var(--warm);
    }
    .tm-pkg__media img { height: auto; aspect-ratio: 3 / 2; border-radius: 12px; }
    .tm-pkg__body {
        grid-column: -2; grid-row: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
        gap: 20px; padding: 32px 36px 24px;
    }
    .tm-pkg__head { padding-right: 44px; }
    .tm-pkg__foot { grid-column: -2; grid-row: 2; padding: 16px 36px 24px; }
    .tm-pkg__close { box-shadow: 0 0 0 1px var(--line); }
}

/* Open / close animations */
@keyframes tm-pkg-dim { from { opacity: 0; } }
@keyframes tm-pkg-rise { from { opacity: 0; transform: translateY(28px) scale(.98); } }
@keyframes tm-pkg-item { from { opacity: 0; transform: translateY(10px); } }
@keyframes tm-pkg-undim { to { opacity: 0; } }
@keyframes tm-pkg-sink { to { opacity: 0; transform: translateY(14px) scale(.99); } }
.tm-pkg.is-open .tm-pkg__backdrop { animation: tm-pkg-dim .3s ease both; }
.tm-pkg.is-open .tm-pkg__dialog { animation: tm-pkg-rise .55s var(--ease-out) both; }
.tm-pkg.is-open .tm-pkg__media img { animation: tm-hero-settle 1.3s var(--ease-out) both; }
.tm-pkg.is-open .tm-pkg__stat,
.tm-pkg.is-open .tm-pkg__list li { animation: tm-pkg-item .6s var(--ease-out) both; animation-delay: calc(.18s + var(--k, 0) * 55ms); }
.tm-pkg.is-closing .tm-pkg__backdrop { animation: tm-pkg-undim .22s ease both; }
.tm-pkg.is-closing .tm-pkg__dialog { animation: tm-pkg-sink .22s ease both; }

@media (max-width: 575px) {
    /* Bottom sheet on phones */
    .tm-pkg { align-items: flex-end; padding: 0; }
    .tm-pkg__dialog {
        width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .tm-pkg__dialog::before {
        content: ""; position: absolute; top: 8px; left: 50%; z-index: 2; width: 40px; height: 4px; margin-left: -20px;
        border-radius: 4px; background: rgba(255, 255, 255, .85); box-shadow: 0 1px 4px rgba(17, 17, 17, .25);
    }
    .tm-pkg__close { top: 12px; right: 12px; width: 36px; height: 36px; }
    .tm-pkg__body { gap: 18px; padding: 20px 18px 22px; }
    .tm-home .tm-pkg__name { font-size: 26px; }
    .tm-home .tm-pkg__price strong { font-size: 30px; }
    .tm-home .tm-pkg__stat b { font-size: 20px; }
    .tm-pkg__foot { flex-wrap: wrap; padding: 12px 18px 16px; }
    .tm-home .tm-pkg__foot .tm-btn { flex: 1 1 100%; min-width: 0; margin-left: 0; }
    @keyframes tm-pkg-up { from { transform: translateY(100%); } }
    @keyframes tm-pkg-down { to { transform: translateY(100%); } }
    .tm-pkg.is-open .tm-pkg__dialog { animation: tm-pkg-up .5s var(--ease-out) both; }
    .tm-pkg.is-closing .tm-pkg__dialog { animation: tm-pkg-down .25s ease-in both; }
}

/* ── Skeletons: shaped like the content so nothing shifts when it loads ── */
.tm-skel { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.tm-skel__media, .tm-skel__line, .tm-skel__thumb, .tm-skel--stage {
    background: linear-gradient(100deg, var(--skel) 35%, #f9f6f3 50%, var(--skel) 65%) 0 0 / 300% 100%;
    animation: tm-shimmer 1.6s linear infinite;
}
@keyframes tm-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.tm-skel__media { aspect-ratio: 3 / 2; }
.tm-skel__line { height: 14px; width: 60%; margin: 22px 20px 0; border-radius: 7px; }
.tm-skel__line.is-short { width: 36%; margin-top: 12px; }
.tm-skel__line.is-btn { width: 110px; height: 44px; margin: 28px 20px 18px; border-radius: var(--r-sm); }
.tm-skel--rows { display: flex; flex-direction: column; padding: 4px 20px; }
.tm-skel__row { display: flex; align-items: center; gap: 20px; flex: 1 1 auto; min-height: 64px; padding: 14px 0; }
.tm-skel__row + .tm-skel__row { border-top: 1px solid var(--line); }
.tm-skel__thumb { flex: none; width: 78px; aspect-ratio: 3 / 2; border-radius: 8px; }
.tm-news .tm-skel__thumb { width: 136px; aspect-ratio: 16 / 10; }
.tm-skel__lines { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tm-skel__lines .tm-skel__line, .tm-skel__lines .tm-skel__line.is-short { margin: 0; }
.tm-skel--stage { aspect-ratio: 4 / 3; border: 0; }
.tm-home .tm-empty { grid-column: 1 / -1; padding: 32px; border: 1px dashed var(--line-strong); border-radius: var(--r); text-align: center; color: var(--muted); }

/* ── Motion: html.tm-motion from Index.cshtml, .is-in from home.js ── */
@keyframes tm-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes tm-hero-open { from { clip-path: inset(4% 2.5% round 28px); } to { clip-path: inset(0 round 20px); } }
@keyframes tm-hero-settle { from { transform: scale(1.07); } to { transform: none; } }
/* Banner opens once home.js marks .is-ready (its image comes later, from the CMS server) */
html.tm-motion .tm-hero__carousel img.banner-img { transition: opacity .7s ease; }
html.tm-motion .tm-hero__carousel:not(.is-ready) img.banner-img { opacity: 0; }
html.tm-motion .tm-hero__carousel.is-ready .carousel-inner { animation: tm-hero-open 1.2s var(--ease-out) both; }
html.tm-motion .tm-hero__carousel.is-ready .carousel-item.active img.banner-img { animation: tm-hero-settle 1.8s var(--ease-out) both; }
html.tm-motion .tm-quick__list { animation: tm-rise .9s var(--ease-out) .2s both; }
html.tm-motion .tm-quick__list > li > a { animation: tm-rise .8s var(--ease-out) both; animation-delay: calc(.3s + var(--i, 0) * 55ms); }
.tm-quick__list > li:nth-child(2) > a { --i: 1; }
.tm-quick__list > li:nth-child(3) > a { --i: 2; }
.tm-quick__list > li:nth-child(4) > a { --i: 3; }
.tm-quick__list > li:nth-child(5) > a { --i: 4; }
.tm-quick__list > li:nth-child(6) > a { --i: 5; }
/* Section entrance once .is-in */
html.tm-motion .tm-home .tm-sec__title { overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
html.tm-motion .tm-home .tm-sec__title > span { transform: translateY(112%); transition: transform 1s var(--ease-out); }
html.tm-motion .tm-home .tm-sec.is-in .tm-sec__title > span { transform: none; }
html.tm-motion .tm-sec__tools, html.tm-motion .tm-tabs { opacity: 0; transition: opacity .8s ease .3s; }
html.tm-motion .tm-sec.is-in .tm-sec__tools, html.tm-motion .tm-sec.is-in .tm-tabs { opacity: 1; }
html.tm-motion :is(.tm-offer__stage, .tm-offer__side, .tm-offer__list > li, .tm-svc__item, .tm-stage__visual, .tm-stage__info,
    .tm-news__lead, .tm-news__list > li) { opacity: 0; }
html.tm-motion .tm-sec.is-in :is(.tm-offer__stage, .tm-offer__side, .tm-svc__item, .tm-stage__visual, .tm-stage__info,
    .tm-news__lead, .tm-news__list > li) { animation: tm-rise .9s var(--ease-out) both; animation-delay: calc(.1s + var(--i, 0) * 80ms); }
html.tm-motion .tm-sec.is-in .tm-offer__list > li { animation: tm-rise .7s var(--ease-out) both; animation-delay: calc(.28s + var(--j, 0) * 45ms); }
.tm-offer__side, .tm-stage__info { --i: 1; }
/* Fade in once loaded (home.js adds .is-loaded) rather than painting in strips */
html.tm-motion .tm-home img.tm-img:not(.is-loaded) { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .tm-home *, .tm-home *::before, .tm-home *::after { animation: none !important; transition: none !important; }
}

/* ── Smaller screens ── */
@media (max-width: 1199px) {
    .tm-home .tm-quick__item { flex-direction: column; justify-content: flex-start; gap: 8px; padding: 12px 4px; font-size: 14px; text-align: center; }
    .tm-stage, .tm-news { gap: 40px; }
    .tm-home .tm-news__row { grid-template-columns: 112px minmax(0, 1fr) 20px; gap: 16px; }
    .tm-news .tm-skel__thumb { width: 112px; }
    .tm-home .tm-stage__pic { padding: 36px; }
    .tm-home .tm-stage__name { font-size: 32px; }
}
@media (max-width: 991px) {
    .tm-home { --gap: 16px; --sec: 80px; }
    .tm-hero--split .tm-hero__grid { grid-template-columns: minmax(0, 1fr); }
    .tm-home .tm-hero__title { font-size: 30px; }
    .tm-home .tm-sec__title { font-size: 32px; }
    .tm-offer { gap: 20px; }
    .tm-offer__card .tm-card__body { padding: 18px 20px; }
    .tm-offer__card .tm-card__actions { margin: auto 20px 0; }
    .tm-home .tm-offer__card .tm-card__title { font-size: 19px; }
    .tm-home .tm-offer__row { grid-template-columns: 60px minmax(0, 1fr) auto 16px; gap: 12px; padding: 10px 10px 10px 8px; }
    .tm-offer .tm-skel__thumb { width: 60px; }
    /* Too narrow for the per-day price in rows; the card still shows it */
    .tm-home .tm-offer__price small { display: none; }
    .tm-stage { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .tm-stage__visual, .tm-skel--stage { aspect-ratio: 16 / 10; }
    .tm-stage__info { gap: 28px; padding: 0; }
    .tm-news { gap: 32px; }
    .tm-home .tm-news__title { font-size: 21px; }
    .tm-home .tm-news__head { font-size: 16px; }
    .tm-home .tm-news__row { grid-template-columns: 96px minmax(0, 1fr) 18px; gap: 14px; }
    .tm-news .tm-skel__thumb { width: 96px; }
}
@media (max-width: 767px) {
    .tm-home { --sec: 60px; }
    /* Phones use the page's 16px edges (as the header), not .container's 80% width */
    .tm-home .container { width: 100%; max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
    .tm-home .tm-hero { padding: 76px 0 0; }
    .tm-home .tm-hero.has-dots { padding-bottom: 28px; }
    .tm-home .tm-hero__carousel .carousel-inner { border-radius: 14px; }
    /* Touch: no hover arrows, swipe instead */
    .tm-hero__arrow { display: none; }
    .tm-quick { margin-top: 16px; }
    .tm-home .tm-sec__title { font-size: 26px; }
    .tm-sec__head { align-items: center; gap: 16px; margin-bottom: 22px; }
    .tm-sec__tools { padding-bottom: 0; }
    .tm-home .tm-sec--band { padding: 48px 0; }
    .tm-tabs { gap: 24px; margin: -8px -16px 22px; padding: 0 16px; scroll-padding-inline: 16px; }
    /* Packages: a row tap opens the popup (home.js) */
    .tm-offer { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .tm-offer__go { color: var(--muted); }
    .tm-home .tm-offer__row { grid-template-columns: 64px minmax(0, 1fr) auto 16px; min-height: 64px; }
    .tm-offer .tm-skel__thumb { width: 64px; }
    .tm-home .tm-offer__price small { display: block; }
    /* Services become a list in one card (no sideways swipe, nothing cut off) */
    .tm-home .tm-svc { display: block; padding: 2px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
    .tm-svc__item {
        display: grid; grid-template-columns: clamp(112px, 34%, 156px) minmax(0, 1fr); align-items: start; column-gap: 16px;
        padding: 16px 0; overflow: visible; background: none; border: 0; border-radius: 0;
    }
    .tm-svc__item + .tm-svc__item { border-top: 1px solid var(--line); }
    .tm-svc__item:hover { border-color: var(--line); box-shadow: none; }
    .tm-svc__media { grid-row: 1 / span 2; align-self: center; border-radius: var(--r-sm); }
    .tm-svc__body { padding: 0; }
    .tm-home .tm-svc__name { font-size: 16px; }
    .tm-home .tm-svc__desc { font-size: 13px; }
    .tm-svc__foot, .tm-svc__body + .tm-svc__foot {
        grid-column: 2; flex-direction: column; align-items: flex-start; gap: 10px; margin: 8px 0 0; padding: 0; border: 0;
    }
    .tm-home .tm-svc__meta { flex-wrap: wrap; row-gap: 2px; }
    .tm-home .tm-svc__meta > span { white-space: normal; }
    .tm-home .tm-svc .tm-btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
    /* Loading skeleton */
    .tm-home .tm-svc[aria-hidden] { display: grid; gap: 12px; padding: 0; background: none; border: 0; }
    .tm-home .tm-stage__pic { padding: 24px; }
    .tm-home .tm-stage__name { font-size: 28px; }
    .tm-home .tm-stage__price strong { font-size: 32px; }
    .tm-home .tm-stage__specs { gap: 8px 16px; }
    .tm-stage__thumbs { margin: 0 -16px; padding: 0 16px; }
    .tm-news { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .tm-home .tm-news__title { font-size: 20px; }
    .tm-home .tm-news__row { grid-template-columns: 104px minmax(0, 1fr) 18px; gap: 14px; padding: 14px 0; }
    .tm-news .tm-skel__thumb { width: 104px; }
    /* No hover on phones: show arrows so rows read as tappable */
    .tm-news__go { color: var(--muted); }
}
@media (max-width: 575px) {
    .tm-home { padding-bottom: calc(var(--sec) - 36px); }
    .tm-quick__list { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 6px; }
    .tm-quick__list > li + li::before { display: none; }
    .tm-home .tm-quick__item { margin: 0; padding: 10px 2px; font-size: 13px; }
    .tm-home .tm-hero__title { font-size: 26px; }
    .tm-home .tm-card__price strong { font-size: 26px; }
}
