/* UKShrimp - video-first layer for the Nine theme (loads after theme.css) */

:root {
    --vf-green: #15803d;
    --vf-ink: #14263a;
    --vf-overlay: rgba(0, 0, 0, 0.62);
}

/* ---------- shared badge ---------- */
.vf-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--vf-overlay);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    pointer-events: none;
}

/* ---------- LISTING PAGE: video hero ---------- */
.listing-details .media-section.vf-has-video .carousel-item {
    background: transparent;
}

.listing-details .vf-frame {
    position: relative;
}

/* the theme gives .video-js a fixed 420px height - the frame takes the clip's own ratio instead */
.listing-details .vf-frame.vf-sized {
    position: relative;
    height: auto !important;
    aspect-ratio: var(--vf-ratio);
    width: min(100%, calc(78vh * var(--vf-ratio-n))) !important;
    max-height: 78vh;
    margin: 0 auto;
    background-color: transparent;
    border-radius: 14px;
    overflow: hidden;
}

.listing-details .vf-frame.vf-sized video,
.listing-details .vf-frame.vf-sized .video-js {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    background-color: transparent;
}

.listing-details .vf-badge-live {
    top: 14px;
    left: 14px;
    background: var(--vf-green);
}

.listing-details .vf-badge-live.vf-badge-old {
    background: var(--vf-overlay);
}

.vf-sound {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--vf-overlay);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.vf-sound:hover,
.vf-sound:focus-visible {
    background: rgba(0, 0, 0, 0.8);
}

/* thumbnails strip: smaller, so the video owns the space */
.listing-details .vf-has-video .carousel-indicators [data-bs-target] {
    width: 84px;
    height: 84px;
}

/* ---------- LISTING PAGE: sticky buy bar ---------- */
.vf-buybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: #fff;
    border-top: 1px solid #e3e9f1;
    box-shadow: 0 -4px 16px rgba(20, 38, 58, 0.08);
    transform: translateY(110%);
    transition: transform 0.22s ease;
}

.vf-buybar.vf-show {
    transform: translateY(0);
}

.vf-buybar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.vf-buybar-info {
    flex: 1 1 auto;
    min-width: 0;
}

.vf-buybar-title {
    display: block;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vf-buybar-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0c579b;
    white-space: nowrap;
}

.vf-buybar-btn {
    min-height: 46px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
}

body.vf-buybar-on {
    padding-bottom: 72px;
}

@media (max-width: 575.98px) {
    .vf-buybar-title { display: none; }
    .vf-buybar-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .vf-buybar { transition: none; }
}

/* ---------- CARDS: video preview ---------- */
/* badge is rendered by partials/listing-card.phtml, so position it before JS runs */
.listings-cards .card-img > a {
    position: relative;
    display: block;
}

.listings-cards .vf-badge-fresh {
    background: var(--vf-green);
}

.listings-cards .vf-thumb {
    position: relative;
    display: block;
    overflow: hidden;
}

.listings-cards .vf-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    pointer-events: none;
}

.listings-cards .vf-thumb.vf-playing .vf-preview {
    opacity: 1;
}

.listings-cards .vf-thumb.vf-playing .vf-badge {
    background: var(--vf-green);
}

/* photo-only cards sit back a little so video listings stand out */
.listings-cards .card.vf-no-video .card-img-top {
    filter: saturate(0.85);
}

@media (prefers-reduced-motion: reduce) {
    .listings-cards .vf-preview { transition: none; }
}

/* ---------- dark mode ---------- */
.dark .vf-buybar {
    background: #1b1f24;
    border-top-color: #2c333b;
}

.dark .vf-buybar-price {
    color: #74b5f8;
}


/* Tank Feed portrait rail (home page) */
.vf-motion-rail{overflow:hidden}.vf-motion-rail .listings-cards{display:flex!important;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;padding:3px 4px 14px}.vf-motion-rail .listings-cards::-webkit-scrollbar{display:none}.vf-motion-rail .listing-card{position:relative;flex:0 0 clamp(235px,29vw,350px)!important;width:clamp(235px,29vw,350px)!important;height:clamp(420px,48vw,570px);overflow:hidden;scroll-snap-align:start;border:0;border-radius:18px;background:#102b36;box-shadow:0 12px 30px rgba(8,36,43,.18)}.vf-motion-rail .listing-card .card-img,.vf-motion-rail .listing-card .vf-thumb,.vf-motion-rail .listing-card .card-img-top,.vf-motion-rail .listing-card .vf-preview{display:block;width:100%;height:100%;object-fit:cover}.vf-motion-rail .listing-card .vf-badge{top:12px;left:12px}.vf-motion-rail .listing-card .card-body{position:absolute;z-index:4;inset:auto 0 0;min-height:43%;padding:62px 16px 66px;color:#fff;background:linear-gradient(0deg,rgba(4,19,25,.96) 7%,rgba(4,19,25,.71) 63%,transparent 100%);pointer-events:none}.vf-motion-rail .listing-card .card-seller{margin:0 0 7px;color:rgba(255,255,255,.82);font-size:12px}.vf-motion-rail .listing-card .reputation-score,.vf-motion-rail .listing-card .card-short-description,.vf-motion-rail .listing-card .card-details,.vf-motion-rail .listing-card>.btn-wishlist-async{display:none!important}.vf-motion-rail .listing-card .card-title{margin:0 0 8px;font-size:17px;line-height:1.2}.vf-motion-rail .listing-card .card-title a{color:#fff;text-decoration:none}.vf-motion-rail .listing-card .au-price{color:#baf4d1;font-weight:800;font-size:18px}.vf-motion-rail .listing-card .card-footer{position:absolute;z-index:5;right:14px;bottom:14px;margin:0;padding:0;border:0;background:transparent}.vf-motion-rail .listing-card .card-footer .btn{border:0;border-radius:999px;padding:9px 14px;color:#102b36;background:#fff;font-weight:700}.vf-motion-rail .vf-motion-clone{user-select:none}@media(max-width:575.98px){.vf-motion-rail .listings-cards{gap:12px}.vf-motion-rail .listing-card{flex-basis:78vw!important;width:78vw!important;height:126vw;max-height:560px}.vf-motion-rail .listing-card .card-body{padding:68px 15px 66px}}

/* UKShrimp: strain sub-line under the short card title (classic look; the dark skin restyles it) */
.listings-cards .uktf-card-sub{margin:-2px 0 6px;font-size:12px;line-height:1.3;color:#6b7785;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dark .listings-cards .uktf-card-sub{color:#9aa7b4}

/* =====================================================================
   UKShrimp: card photos - edge to edge, same shape on every card
   ===================================================================== */
.listings-cards .listing-card:not(.card-list) .card-img {
    position: relative;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border-radius: 12px;
    overflow: hidden;
    background: #eef2f6;
    width: 100% !important;
    height: auto !important;
}
.listings-cards .listing-card:not(.card-list) .card-img > a,
.listings-cards .listing-card:not(.card-list) .card-img .vf-thumb {
    display: block;
    position: relative;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
.listings-cards .listing-card:not(.card-list) .card-img img,
.listings-cards .listing-card:not(.card-list) .card-img .card-img-top {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 4 / 5;
    object-fit: cover !important;
    margin: 0 !important;
    border: 0 !important;
}
.listings-cards .listing-card:not(.card-list) .vf-preview { object-fit: cover; }
/* badge bottom-left of the photo, clear of the heart button */
.listings-cards .listing-card:not(.card-list) .card-img .vf-badge {
    top: auto;
    bottom: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}
.vf-badge svg { vertical-align: -1px; }
.vf-badge.vf-tier-today { background: #e0452b; }
.vf-badge.vf-tier-week { background: #15803d; }
.listings-cards .card.vf-no-video .card-img-top { filter: none; }

/* =====================================================================
   UKShrimp: Tank Feed (partials/uks-tank-feed.phtml)
   ===================================================================== */
.uks-tank-feed { margin-top: 2.25rem; margin-bottom: 1rem; }
.uks-tf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.uks-tf-title { margin: 0; font-size: 1.6rem; font-weight: 600; }
.uks-tf-all { font-size: .85rem; font-weight: 600; text-decoration: none; }
.uks-tf-wrap { position: relative; }
.uks-tf-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 2px 16px;
    -webkit-overflow-scrolling: touch;
}
.uks-tf-track::-webkit-scrollbar { display: none; }
.uks-tf-card {
    flex: 0 0 calc((100% - 80px) / 6);
    min-width: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6ebf1;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(20, 38, 58, .08);
    transition: box-shadow .2s ease, transform .2s ease;
}
.uks-tf-card:hover { box-shadow: 0 10px 26px rgba(20, 38, 58, .16); transform: translateY(-2px); }
.uks-tf-media {
    position: relative;
    display: block;
    aspect-ratio: 9 / 14;
    overflow: hidden;
    background: #0b1218;
}
.uks-tf-media .uks-tf-poster,
.uks-tf-media .uks-tf-video {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    border-radius: 0 !important;
}
.uks-tf-media .uks-tf-video { opacity: 0; transition: opacity .35s ease; z-index: 2; background: transparent; }
.uks-tf-media.is-playing .uks-tf-video { opacity: 1; }
.uks-tf-media .uks-tf-badge {
    top: auto;
    bottom: 10px;
    left: 10px;
    z-index: 3;
    max-width: calc(100% - 20px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}
.uks-tf-body { flex: 1 1 auto; padding: 10px 12px 6px; min-width: 0; }
.uks-tf-seller { font-size: 12px; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uks-tf-name { margin: 2px 0 2px; font-size: 15px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.uks-tf-name a { color: inherit; text-decoration: none; }
.uks-tf-name a:hover { text-decoration: underline; }
.uks-tf-sub { font-size: 12px; color: #6b7785; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uks-tf-price { margin-top: 6px; font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.uks-tf-foot { padding: 0 12px 12px; }
.uks-tf-btn { display: block; width: 100%; border-radius: 8px; font-weight: 600; }
.uks-tf-arrow {
    position: absolute;
    top: calc(50% - 60px);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e3e9f1;
    border-radius: 50%;
    background: #fff;
    color: #14263a;
    box-shadow: 0 4px 14px rgba(20, 38, 58, .18);
    cursor: pointer;
    transition: opacity .2s ease;
}
.uks-tf-prev { left: -14px; }
.uks-tf-next { right: -14px; }
.uks-tf-arrow[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 1199.98px) { .uks-tf-card { flex-basis: calc((100% - 48px) / 4); } }
@media (max-width: 991.98px)  { .uks-tf-card { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 767.98px) {
    .uks-tf-track { gap: 12px; }
    .uks-tf-card { flex-basis: 44vw; max-width: 260px; }
    .uks-tf-title { font-size: 1.35rem; }
}
@media (hover: none) { .uks-tf-arrow { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .uks-tf-track { scroll-behavior: auto; }
    .uks-tf-card, .uks-tf-media .uks-tf-video { transition: none; }
}

/* classic dark mode */
.dark .uks-tf-card { background: #1b1f24; border-color: #2c333b; }
.dark .uks-tf-arrow { background: #1b1f24; border-color: #2c333b; color: #fff; }
