/* Shred Finder — bike detail page (/bike/%id): hero + specs left, stores right
   Motion: hero rises first, specs follow, store rows cascade in (30ms stagger) */

.detail-page {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas:
        'top    top'
        'hero   stores'
        'specs  stores';
    gap: 0 32px;
    align-items: start;
}

.detail-page > .topbar  { grid-area: top; }
.detail-page > .detail-hero  { grid-area: hero; }
.detail-page > .detail-specs { grid-area: specs; }
.detail-page > .detail-stores { grid-area: stores; }

.topbar a.back-link::before {
    content: '← ';
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.detail-hero {
    padding: 28px 0 8px;
    animation: sf-rise var(--sf-slow) var(--sf-ease) both;
}

.detail-hero h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    line-height: 0.95;
    text-transform: uppercase;
    margin: 4px 0 12px;
    color: var(--sf-text);
}

.detail-price {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 2.6rem;
    color: var(--sf-orange);
    margin: 0 0 8px;
}

.detail-blurb {
    font-size: 1.1rem;
    color: var(--sf-text);
    margin: 0 0 6px;
}

.price-note {
    font-size: 0.8rem;
    color: var(--sf-muted);
    margin: 0 0 20px;
}

.detail-hero .bike-badge {
    display: inline-block;
}

/* zImage stamps the class straight onto the <img>; ambient layer = a slow lime glow */
img.detail-art {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    aspect-ratio: 5 / 3;
    margin: 0 0 8px;
    animation:
        sf-roll-in 600ms var(--sf-ease) both,
        sf-breathe 4s ease-in-out 600ms infinite alternate;
}

/* hero entrance: the bike rolls in from the left and settles (primary layer) */
@keyframes sf-roll-in {
    from { opacity: 0; transform: translateX(-40px) rotate(-2deg); }
    to   { opacity: 1; transform: translateX(0) rotate(0); }
}

@keyframes sf-breathe {
    from { filter: drop-shadow(0 0 6px rgba(198, 244, 50, 0.10)); }
    to   { filter: drop-shadow(0 0 22px rgba(198, 244, 50, 0.30)); }
}

/* ── Specs table ──────────────────────────────────────────────────── */
.detail-specs {
    animation: sf-rise var(--sf-slow) var(--sf-ease) 80ms both;
}

.detail-specs .zTable-container h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    text-transform: uppercase;
    color: var(--sf-text);
}

.detail-specs .zTable {
    width: 100%;
    color: var(--sf-text) !important;
    background: var(--sf-surface) !important;
    border: 1px solid var(--sf-line) !important;
    border-radius: 14px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.detail-specs .zTable th,
.detail-specs .zTable td {
    padding: 12px 16px !important;
    border-color: var(--sf-line) !important;
    background: transparent !important;
    color: var(--sf-text) !important;
}

.detail-specs .zTable thead th {
    color: var(--sf-muted) !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--sf-surface-2) !important;
}

.detail-specs .zTable td:first-child {
    color: var(--sf-muted) !important;
    width: 40%;
}

/* ── Where to buy ─────────────────────────────────────────────────── */
.detail-stores {
    position: sticky;
    top: calc(var(--sf-nav-h) + 16px);
    margin-top: 28px;
    padding: 22px;
    background: var(--sf-surface);
    border: 1px solid var(--sf-line);
    border-radius: 18px;
    animation: sf-pop var(--sf-slow) var(--sf-ease) 120ms both;
}

.store-group + .store-group {
    margin-top: 20px;
}

.store-group h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
    color: var(--sf-text);
}

.store-list {
    display: grid;
    gap: 8px;
}

.store-row {
    animation: sf-card-in 250ms var(--sf-ease) both;
}

.store-row:nth-child(2) { animation-delay: 30ms; }
.store-row:nth-child(3) { animation-delay: 60ms; }
.store-row:nth-child(4) { animation-delay: 90ms; }
.store-row:nth-child(5) { animation-delay: 120ms; }

.store-row a,
a.store-row-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none !important;
    color: var(--sf-text) !important;
    background: var(--sf-surface-2);
    border: 1px solid var(--sf-line);
    transition:
        transform var(--sf-standard) var(--sf-bounce),
        border-color var(--sf-standard) var(--sf-ease),
        background-color var(--sf-standard) var(--sf-ease);
}

.store-row a::after {
    content: '↗';
    color: var(--sf-lime);
    transition: transform var(--sf-standard) var(--sf-bounce);
}

.store-row a:hover {
    transform: translateX(4px);
    border-color: var(--sf-lime);
    background: rgba(198, 244, 50, 0.08);
    transition-duration: var(--sf-quick);
}

.store-row a:hover::after {
    transform: translate(2px, -2px) scale(1.2);
}

.store-row a:active {
    transform: scale(0.97);
    transition-duration: 60ms;
}

.store-row a:focus-visible {
    outline: 3px solid var(--sf-lime);
    outline-offset: 2px;
}

.ship-note {
    font-size: 0.8rem;
    color: var(--sf-muted);
    margin: 0 0 16px;
}

/* a group with no store for the visitor's country says so instead of sitting empty */
.store-group:not(:has(.store-row)) .store-list::after {
    content: 'No store here covers your country yet — try the other options.';
    font-size: 0.85rem;
    color: var(--sf-muted);
}

/* the official / buy-direct link is the hero of the New group */
.store-group:first-of-type .store-row:first-child a {
    background: var(--sf-lime);
    color: #10160f !important;
    border-color: var(--sf-lime);
}

.store-group:first-of-type .store-row:first-child a::after {
    color: #10160f;
}

/* ── Small screens: stack everything ─────────────────────────────── */
@media (max-width: 860px) {
    .detail-page {
        grid-template-columns: 1fr;
        grid-template-areas: 'top' 'hero' 'stores' 'specs';
    }

    .detail-stores {
        position: static;
        margin: 8px 0 24px;
    }
}

/* ── ★ Save / ⇄ Compare buttons under the price, and the "done!" notes ── */
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 6px;
}

.save-btn,
.save-btn .zDialog-container,
.compare-btn,
.compare-btn .zDialog-container {
    display: contents;
}

.save-btn .zDialog-feedback,
.compare-btn .zDialog-feedback {
    display: none;
}

.save-btn button,
.compare-btn button {
    padding: 11px 20px !important;
    border-radius: 999px !important;
    font-weight: 700;
    box-shadow: none !important;
    transition:
        transform var(--sf-standard) var(--sf-bounce),
        background-color var(--sf-quick) var(--sf-ease);
}

.save-btn button {
    color: #10160f !important;
    background: var(--sf-lime) !important;
    border: 2px solid var(--sf-lime) !important;
}

.compare-btn button {
    color: var(--sf-text) !important;
    background: transparent !important;
    border: 2px solid var(--sf-orange) !important;
}

.compare-btn button:hover {
    background: rgba(255, 122, 26, 0.15) !important;
}

.save-btn button:hover,
.compare-btn button:hover {
    transform: translateY(-2px) scale(1.03);
    transition-duration: var(--sf-quick);
}

.save-btn button:active,
.compare-btn button:active {
    transform: scale(0.94);
    transition-duration: 60ms;
}

.action-note {
    display: inline-block;
    margin: 6px 8px 0 0;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 600;
    color: #10160f;
    background: var(--sf-lime);
    animation: sf-pop 260ms var(--sf-bounce) both;
}

.detail-hero .help-btn {
    margin-top: 10px;
    padding: 9px 18px !important;
    border-radius: 999px !important;
    font-weight: 700;
    color: var(--sf-lime) !important;
    background: transparent !important;
    border: 2px solid var(--sf-lime) !important;
}
