/* Final responsive authority: only data-layout may switch structure. */
html[data-layout="horizontal"] .vertical-only,
html[data-layout="vertical"] .horizontal-only {
    display: none !important;
}

html[data-layout="horizontal"],
html[data-layout="horizontal"] body {
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

html[data-layout="horizontal"] .mobile-bottom-nav,
html[data-layout="horizontal"] .bottom-nav,
html[data-layout="horizontal"] .mobile-header,
html[data-layout="horizontal"] .mobile-appbar,
html[data-layout="horizontal"] .floating-contact-wrap {
    display: none !important;
}

html[data-layout] .tt-cover-slider {
    background-image: none !important;
}

html[data-layout="horizontal"] .tt-cover-slider > .tt-cover-slide {
    background-position: center top !important;
}

html[data-layout] .tt-cover-slider > .tt-cover-slide:not(.is-active) {
    display: none !important;
}

html[data-layout="horizontal"] .tt-launcher-shell,
html[data-layout="horizontal"] .tt-launcher-shell-phase1 {
    display: grid !important;
    grid-template-columns: clamp(150px, 16vw, 205px) minmax(0, 1fr) clamp(155px, 17vw, 217px) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-content: start !important;
    justify-content: stretch !important;
    place-content: start stretch !important;
    align-items: stretch !important;
    gap: clamp(8px, 1vw, 12px) !important;
    position: relative !important;
    inset: auto !important;
    width: min(calc(100% - 20px), 1440px) !important;
    max-width: 1440px !important;
    height: calc(100dvh - var(--tt-header-height, 58px)) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    transform: none !important;
}

/* Beat legacy square/portrait device queries with the same structural path. */
html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent {
    position: fixed !important;
    inset: var(--tt-header-height, 58px) 0 0 !important;
    width: 100% !important;
    height: calc(100dvh - var(--tt-header-height, 58px)) !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    will-change: auto !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    contain: none !important;
}

html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent > .tt-launcher-shell-phase1.container.py-4 {
    display: grid !important;
    grid-template-columns: clamp(150px, 16vw, 205px) minmax(0, 1fr) clamp(155px, 17vw, 217px) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-content: start !important;
    place-content: start stretch !important;
    align-items: stretch !important;
    position: absolute !important;
    inset: 0 auto auto 50% !important;
    width: min(calc(100% - 20px), 1440px) !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    overflow: hidden !important;
}

/*
 * Legacy launcher CSS placed both sidebars on `grid-row: 1 / span 50`.
 * That creates 49 implicit zero-height rows and shrinks row 1 to the
 * intrinsic banner height in Chromium, so the scrollable centre column is
 * clipped while the remainder of the workspace looks like a black panel.
 * All three direct children belong to the single viewport-height row.
 */
html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-sidebar-left {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-sidebar-right {
    grid-column: 3 !important;
    grid-row: 1 !important;
}

html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-main {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: flex-start !important;
    align-content: start !important;
    place-content: start !important;
    align-items: stretch !important;
    transform: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: auto !important;
    overscroll-behavior: contain !important;
    will-change: auto !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    contain: none !important;
}

html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-main > * {
    content-visibility: visible !important;
    contain: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
}

html[data-layout="horizontal"] .tt-launcher-sidebar-left,
html[data-layout="horizontal"] .tt-launcher-sidebar-right,
html[data-layout="horizontal"] .tt-detail-landscape-sidebar {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding-top: 0 !important;
    justify-content: flex-start !important;
    align-content: start !important;
    place-content: start !important;
    align-items: stretch !important;
    align-self: stretch !important;
    grid-template-rows: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: none !important;
}

html[data-layout="horizontal"] .tt-launcher-main > :first-child,
html[data-layout="horizontal"] .tt-detail-landscape-main > :first-child {
    margin-top: 0 !important;
    align-self: stretch !important;
}

html[data-layout="horizontal"] .tt-launcher-main,
html[data-layout="horizontal"] .tt-detail-landscape-main {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding-top: 0 !important;
    justify-content: flex-start !important;
    align-content: start !important;
    place-content: start !important;
    align-items: stretch !important;
    align-self: stretch !important;
    grid-template-rows: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: none !important;
}

/* Related products are part of the detail centre scroller.  Keep the block
   constrained to that column instead of inheriting the page-level container
   width, which otherwise pushes the cards outside the clipped workspace. */
html[data-layout="horizontal"] body.tt-detail-page
.tt-detail-landscape-main > .detail-related-container {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 18px 0 34px !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
}

html[data-layout="horizontal"] .tt-launcher-main > .profile-tactical,
html[data-layout="horizontal"] .tt-launcher-main > .tt-home-live-panel,
html[data-layout="horizontal"] .tt-launcher-main > .tt-price-filter-panel,
html[data-layout="horizontal"] .tt-launcher-main > #ttPriceFilterPanel_main,
html[data-layout="horizontal"] .tt-launcher-main > #productGrid,
html[data-layout="horizontal"] .tt-launcher-main > .pagination-container-modern,
html[data-layout="horizontal"] .tt-launcher-main > .tt-launcher-top-grid,
html[data-layout="horizontal"] .tt-launcher-main > .tt-guide-box {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

html[data-layout="horizontal"] .tt-launcher-main > .profile-tactical,
html[data-layout="horizontal"] .tt-launcher-main > .tt-launcher-top-grid,
html[data-layout="horizontal"] .tt-launcher-main > .tt-guide-box {
    display: block !important;
}

html[data-layout="horizontal"] .tt-launcher-main > .tt-home-live-panel,
html[data-layout="horizontal"] .tt-launcher-main > .tt-price-filter-panel,
html[data-layout="horizontal"] .tt-launcher-main > #ttPriceFilterPanel_main {
    display: grid !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

html[data-layout="horizontal"] .tt-launcher-main > .pagination-container-modern {
    display: flex !important;
}

html[data-layout="horizontal"] #productGrid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 14px !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

html[data-layout="horizontal"] #productGrid > .feed-item-scroll {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

html[data-layout="vertical"],
html[data-layout="vertical"] body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

html[data-layout="vertical"] .tt-launcher-sidebar-left,
html[data-layout="vertical"] .tt-launcher-sidebar-right,
html[data-layout="vertical"] .tt-detail-landscape-sidebar,
html[data-layout="vertical"] .tt-launcher-header-quicklinks,
html[data-layout="vertical"] .tt-launcher-context-nav {
    display: none !important;
}

html[data-layout="vertical"] .tt-launcher-shell,
html[data-layout="vertical"] .tt-launcher-shell-phase1,
html[data-layout="vertical"] .tt-launcher-main,
html[data-layout="vertical"] .tt-detail-landscape-main,
html[data-layout="vertical"] #productGrid {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    transform: none !important;
}

html[data-layout="vertical"] #productGrid > .feed-item-scroll {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
}

html.is-layout-changing *,
html.is-layout-changing *::before,
html.is-layout-changing *::after {
    transition: none !important;
    animation-duration: 0s !important;
}

/* Keep semantic hidden state on non-home routes. */
html[data-layout="horizontal"] .tt-launcher-main > .tt-launcher-top-grid[hidden] {
    display: none !important;
}

/* Compact product typography retained from the current local build. */
html[data-layout="horizontal"] #productGrid .product-title {
    font-size: clamp(11px, 1.05vw, 14px) !important;
    line-height: 1.32 !important;
}

html[data-layout="horizontal"] #productGrid .product-body,
html[data-layout="horizontal"] #productGrid .product-meta,
html[data-layout="horizontal"] #productGrid .product-actions,
html[data-layout="horizontal"] #productGrid .btn-copy-code {
    font-size: clamp(10px, .95vw, 13px) !important;
}

html[data-layout="horizontal"] #productGrid .product-price,
html[data-layout="horizontal"] #productGrid .contact-price,
html[data-layout="horizontal"] #productGrid .price-tag {
    font-size: clamp(13px, 1.3vw, 18px) !important;
}

html[data-layout="horizontal"] .pagination-container-modern .pagi-main-btn {
    min-height: clamp(38px, 4vw, 48px) !important;
    padding: 0 clamp(14px, 1.8vw, 24px) !important;
    font-size: clamp(12px, 1.2vw, 16px) !important;
}

html[data-layout="horizontal"] .pagination-container-modern .pagi-nav-btn {
    width: clamp(38px, 4vw, 48px) !important;
    height: clamp(38px, 4vw, 48px) !important;
    font-size: clamp(15px, 1.6vw, 21px) !important;
}

/* iPad landscape home: one fluid content track, one shared two-column grid. */
@media (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {
    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent,
    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent > .tt-launcher-shell-phase1,
    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-main,
    html[data-layout="horizontal"] body:not(.tt-detail-page) #productGrid {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent > .tt-launcher-shell-phase1.container.py-4 {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0 !important;
        margin-inline: auto !important;
        padding-inline: clamp(8px, 1.25vw, 16px) !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-shell-phase1 > .tt-launcher-sidebar-left,
    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-shell-phase1 > .tt-launcher-sidebar-right {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-main {
        display: block !important;
        grid-column: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #productGrid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(8px, 1vw, 16px) !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        inset: auto !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #productGrid > .feed-item-scroll,
    html[data-layout="horizontal"] body:not(.tt-detail-page) #productGrid .product-card {
        position: relative !important;
        inset: auto !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #productGrid .product-card {
        overflow: hidden !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #productGrid .product-card *,
    html[data-layout="horizontal"] body:not(.tt-detail-page) #productGrid .product-thumb-box {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #productGrid .product-thumb-box,
    html[data-layout="horizontal"] body:not(.tt-detail-page) #productGrid .product-thumb,
    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-top-grid .tt-top-img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
        object-position: center !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-top-grid .tt-top-card {
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

/* Cascade guard: older launcher selectors contain multiple IDs and !important.
   Match that specificity without changing markup or creating another grid. */
@media (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {
    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent > .tt-launcher-shell-phase1.container.py-4 {
        display: grid !important;
        position: relative !important;
        inset: auto !important;
        left: auto !important;
        right: auto !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 0 !important;
        margin-inline: auto !important;
        padding-inline: clamp(8px, 1.25vw, 16px) !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-sidebar-left,
    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-sidebar-right {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent .tt-launcher-main {
        display: block !important;
        position: relative !important;
        inset: auto !important;
        left: auto !important;
        right: auto !important;
        grid-column: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: clamp(8px, 1vw, 16px) !important;
        margin: 0 !important;
        padding: 0 !important;
        inset: auto !important;
        transform: none !important;
    }
}

/* iPad landscape with both PC side wings retained. All three tracks are
   fluid and their total (including gaps and shell padding) stays in viewport. */
@media (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {
    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent > .tt-launcher-shell-phase1.container.py-4 {
        display: grid !important;
        grid-template-columns:
            clamp(140px, 16vw, 170px)
            minmax(0, 1fr)
            clamp(150px, 17vw, 180px) !important;
        column-gap: clamp(6px, .8vw, 10px) !important;
        row-gap: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-inline: auto !important;
        padding-inline: clamp(8px, 1.25vw, 16px) !important;
        box-sizing: border-box !important;
        position: relative !important;
        inset: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-sidebar-left,
    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-sidebar-right {
        display: block !important;
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-sidebar-left {
        grid-column: 1 !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-main {
        grid-column: 2 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent > .tt-launcher-shell-phase1 > .tt-launcher-sidebar-right {
        grid-column: 3 !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(8px, 1vw, 14px) !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        inset: auto !important;
        transform: none !important;
    }
}

/* Equal iPad product cards: artwork keeps its own ratio inside an equal media
   stage; card bodies stretch so price/actions align across each grid row. */
@media (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {
    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid {
        align-items: stretch !important;
        grid-auto-rows: 1fr !important;
    }

    /* Bootstrap's .row clearfix pseudo-elements become anonymous grid items
       and otherwise consume a complete empty row above/below the cards. */
    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid::before,
    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid::after {
        content: none !important;
        display: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid > .feed-item-scroll {
        display: flex !important;
        align-self: stretch !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid .product-card {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid .product-card > a.tt-spa-link {
        display: block !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid .product-thumb-box {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 28 / 25 !important;
        overflow: hidden !important;
        background: #06111f !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid .product-thumb {
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid .product-body {
        display: flex !important;
        flex: 1 1 auto !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) #ttSpaContent#ttSpaContent #productGrid .product-meta {
        margin-top: auto !important;
    }
}

/* iPad sidebar price editor and pagination polish. These rules are kept in
   the final state sheet because the original controls were desktop-only. */
@media (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {
    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-sidebar-left .tt-launcher-price-custom {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 40px !important;
        padding: 8px 7px !important;
        border: 1px solid #f4b000 !important;
        border-radius: 9px !important;
        color: #1b1200 !important;
        background: linear-gradient(135deg, #ffe36a, #ffc21c 58%, #e99a00) !important;
        box-shadow: 0 0 0 1px rgba(255, 193, 7, .18), 0 8px 20px rgba(224, 145, 0, .2) !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        font-weight: 900 !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-sidebar-left .tt-launcher-price-custom i {
        color: #3b2700 !important;
        font-size: 13px !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-sidebar-left .tt-launcher-price-custom:hover,
    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-sidebar-left .tt-launcher-price-custom[aria-expanded="true"] {
        border-color: #ffe083 !important;
        color: #140d00 !important;
        background: linear-gradient(135deg, #fff09a, #ffd33d 58%, #f2aa08) !important;
        box-shadow: 0 0 0 2px rgba(255, 200, 32, .2), 0 10px 24px rgba(230, 151, 0, .25) !important;
        transform: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-sidebar-left .tt-sidebar-custom-price:not([hidden]) {
        display: grid !important;
        gap: 6px !important;
        width: 100% !important;
        min-width: 0 !important;
        margin-top: 8px !important;
        padding: 9px !important;
        border: 1px solid rgba(244, 176, 0, .42) !important;
        border-radius: 10px !important;
        background: #061321 !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .24) !important;
        box-sizing: border-box !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-sidebar-custom-price label {
        display: block !important;
        margin: 0 !important;
        color: #ffd65a !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        font-weight: 800 !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-sidebar-money-input {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-sidebar-money-input input {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 34px !important;
        padding: 0 34px 0 9px !important;
        border: 1px solid rgba(244, 176, 0, .34) !important;
        border-radius: 8px !important;
        outline: 0 !important;
        color: #fff8df !important;
        background: #020b14 !important;
        font-size: 11px !important;
        box-sizing: border-box !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-sidebar-money-input input:focus {
        border-color: #ffc928 !important;
        box-shadow: 0 0 0 2px rgba(255, 194, 28, .14) !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-sidebar-money-input span {
        position: absolute !important;
        top: 50% !important;
        right: 8px !important;
        transform: translateY(-50%) !important;
        color: #d7b65a !important;
        font-size: 8px !important;
        font-weight: 800 !important;
        pointer-events: none !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-sidebar-price-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
        margin-top: 2px !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-sidebar-price-actions button {
        min-width: 0 !important;
        height: 32px !important;
        padding: 0 4px !important;
        border: 1px solid rgba(255, 205, 70, .35) !important;
        border-radius: 8px !important;
        color: #f8e8ba !important;
        background: #13202c !important;
        font-size: 9px !important;
        font-weight: 800 !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-sidebar-price-actions button:first-child {
        border-color: #f5b400 !important;
        color: #211500 !important;
        background: linear-gradient(135deg, #ffe36a, #ffbd14) !important;
    }

    html[data-layout="horizontal"] body:not(.tt-detail-page) .tt-launcher-main > .pagination-container-modern {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: clamp(10px, 1.2vw, 14px) !important;
        width: 100% !important;
        margin: 24px 0 32px !important;
        padding: 6px 0 !important;
        clear: both !important;
        box-sizing: border-box !important;
    }
}

/* Mobile home/detail restore 2026-07-23.
   Append-only merge: preserves iPad grid, price editor and pagination rules. */
@media (max-width: 768px) {
    html body:not(.tt-detail-page) #ttSpaContent #productGrid > .feed-item-scroll {
        margin-bottom: 14px !important;
    }

    html body.tt-detail-page #ttSpaContent > .detail-container.container,
    html body.tt-detail-page #ttSpaContent .tt-detail-landscape-shell,
    html body.tt-detail-page #ttSpaContent .tt-detail-landscape-main,
    html body.tt-detail-page .detail-related-container {
        position: relative !important;
        left: 0 !important;
        right: auto !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    html body.tt-detail-page .detail-related-container .tt-related-lazy-box {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 0 16px !important;
        padding: 12px 10px !important;
        border-right: 0 !important;
        border-left: 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
    }

    html body.tt-detail-page .detail-related-container .tt-related-slider {
        display: flex !important;
        gap: 8px !important;
        width: 100% !important;
        padding-bottom: 8px !important;
        overflow-x: auto !important;
        box-sizing: border-box !important;
    }

    html body.tt-detail-page .detail-related-container .tt-related-card {
        flex: 0 0 41.5% !important;
        width: 41.5% !important;
        min-width: 41.5% !important;
        max-width: 41.5% !important;
    }

    html body.tt-detail-page .detail-related-container .tt-related-img img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1.18 / 1 !important;
        object-fit: cover !important;
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    html,
    html body.tt-detail-page,
    html body.tt-detail-page #ttSpaContent,
    html body.tt-detail-page #ttSpaContent > .detail-container.container,
    html body.tt-detail-page #ttSpaContent .tt-detail-landscape-shell,
    html body.tt-detail-page #ttSpaContent .tt-detail-landscape-main,
    html body.tt-detail-page .detail-related-container {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        box-sizing: border-box !important;
        transform: none !important;
    }
}

/* Restore the compact category controls on phones. The vertical layout used
   to hide the entire left sidebar even though these two controls live in it. */
@media (max-width: 768px), (orientation: portrait) {
    html[data-layout="vertical"] body:not(.tt-detail-page) .tt-launcher-shell-phase1 > .tt-launcher-sidebar-left {
        display: block !important;
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 0 14px !important;
        padding: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    html[data-layout="vertical"] body:not(.tt-detail-page) .tt-launcher-sidebar-left > .mode-tabs,
    html[data-layout="vertical"] body:not(.tt-detail-page) .tt-launcher-sidebar-left > .grid-category {
        display: grid !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    html[data-layout="vertical"] body:not(.tt-detail-page) .tt-launcher-sidebar-left > .tt-launcher-menu {
        display: none !important;
    }
}

/* iPad landscape: keep the right banner carousel inside its grid column.
   Banner uploads can have very different natural heights, so the carousel
   owns one stable cover ratio instead of inheriting each image's height. */
@media (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {
    html[data-layout="horizontal"] .tt-launcher-sidebar-right,
    html[data-layout="horizontal"] .tt-launcher-sidebar-right .tt-right-panel,
    html[data-layout="horizontal"] .tt-sidebar-banner-panel,
    html[data-layout="horizontal"] .tt-sidebar-banner-viewport {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    html[data-layout="horizontal"] .tt-sidebar-banner-panel {
        overflow: hidden !important;
    }

    html[data-layout="horizontal"] .tt-sidebar-banner-viewport {
        position: relative !important;
        height: auto !important;
        aspect-ratio: 5 / 8 !important;
        overflow: hidden !important;
    }

    html[data-layout="horizontal"] .tt-sidebar-banner-slide {
        display: none !important;
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        transform: none !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    html[data-layout="horizontal"] .tt-sidebar-banner-slide.is-active {
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
    }

    html[data-layout="horizontal"] .tt-sidebar-banner-slide img {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important;
    }

    html[data-layout="horizontal"] .tt-sidebar-banner-arrow {
        width: clamp(24px, 3vw, 32px) !important;
        height: clamp(32px, 4vw, 42px) !important;
    }

    html[data-layout="horizontal"] .tt-sidebar-banner-dots {
        bottom: 7px !important;
        gap: 4px !important;
    }
}

/* tt-article-scroll-fix */
html[data-layout="horizontal"] body:has(#ttSpaContent .tt-article-detail) #ttSpaContent { overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
