/* ==========================================================================
   Motomarine v3 · Boat listings
   .cs-boat-tile = inventory tile (photo with badges, title, price block,
   two buttons; the whole tile is a link via __link, the buttons sit above
   it). --compact = 4/3 photo with the name left and the price stack right. .cs-motor-tile = outboard tile whose price row slides up to reveal
   Shop now on hover.
   "Get best price" opens #priceModal (modal.css).
   ========================================================================== */

/* --- Boat tile --- */
.cs-boat-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--white);
    overflow: hidden;
    transition: var(--transition);
}
.cs-boat-tile:hover {
    box-shadow: var(--shadow);
}
.cs-boat-tile__link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.cs-boat-tile__media {
    position: relative;
    aspect-ratio: 16 / 11;
    background: var(--light-bg);
    overflow: hidden;
}
.cs-boat-tile__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.cs-boat-tile:hover .cs-boat-tile__media img {
    transform: scale(1.04);
}
.cs-boat-tile__badges {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: flex;
    gap: 6px;
}
.cs-boat-tile__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}
.cs-boat-tile__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--heading);
    transition: var(--transition);
}
.cs-boat-tile:hover .cs-boat-tile__title {
    color: var(--primary);
}
.cs-boat-tile__pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 6px 16px;
    margin-top: auto;
}
.cs-boat-tile__label {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
    color: var(--muted);
}
.cs-boat-tile__now,
.cs-boat-tile__call {
    display: block;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--secondary);
}
.cs-boat-tile__was {
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}
.cs-boat-tile__was s {
    text-decoration-thickness: 1px;
}
.cs-boat-tile__was span {
    display: block;
}
.cs-boat-tile__savings {
    color: #047857;
}
.cs-boat-tile__actions {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 10px;
}
.cs-boat-tile__actions .cs-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 6px;
    font-size: 11px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.bg-lighter .cs-boat-tile {
    border: 0;
    box-shadow: var(--shadow);
}

/* --- Compact tile: 4/3 photo, name and yard left, price stack right --- */
.cs-boat-tile--compact .cs-boat-tile__media {
    aspect-ratio: 4 / 3;
}
.cs-boat-tile--compact .cs-boat-tile__media img {
    filter: brightness(.82);
}
.cs-boat-tile--compact .cs-boat-tile__body {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 16px;
}
/* Buttons sit under the body in their own row */
.cs-boat-tile--compact > .cs-boat-tile__actions {
    padding: 0 20px 20px;
}
.cs-boat-tile__info {
    min-width: 0;
}
.cs-boat-tile--compact .cs-boat-tile__title {
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.25;
    text-transform: uppercase;
}
.cs-boat-tile__meta {
    display: block;
    font-size: 13px;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--muted);
}
.cs-boat-tile__meta span {
    margin: 0 4px;
}
.cs-boat-tile__price {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}
.cs-boat-tile--compact .cs-boat-tile__was {
    line-height: 1.2;
}
.cs-boat-tile--compact .cs-boat-tile__now,
.cs-boat-tile--compact .cs-boat-tile__call {
    font-size: 24px;
    color: var(--primary);
}
.cs-boat-tile--compact .cs-boat-tile__call {
    font-size: 20px;
    padding-top: 4px;
}
.cs-boat-tile__save {
    display: inline-flex;
    align-items: center;
    height: 24px;
    margin-top: 2px;
    padding: 0 10px;
    border-radius: 0;
    background: rgba(41, 64, 111, .1);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--secondary);
}

.cs-boats__more {
    margin-top: 40px;
}

/* --- Motor tile --- */
.cs-motor-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--white);
    overflow: hidden;
    transition: var(--transition);
}
.cs-motor-tile__link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.cs-motor-tile:hover {
    box-shadow: var(--shadow);
}
.cs-motor-tile__media {
    aspect-ratio: 4 / 3;
    background: var(--white);
    overflow: hidden;
}
/* Motor photos are cut-outs: show the whole motor, clear of the price badge */
.cs-motor-tile__media img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 20px 15px 0;
    object-fit: contain;
}
.cs-motor-tile__body {
    flex: 1 1 auto;
    padding: 20px 20px 18px;
}
.cs-motor-tile__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--heading);
}
/* Price row: the values slide up and Shop now slides in on hover */
.cs-motor-tile__price {
    position: relative;
    height: 60px;
    border-top: 1px solid var(--border);
    overflow: hidden;
    font-family: var(--font-heading);
    font-weight: 600;
}
.cs-motor-tile__values,
.cs-motor-tile__shop {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .35s var(--ease-out), opacity .25s ease;
}
.cs-motor-tile__was {
    font-size: 15px;
    color: var(--body);
    text-decoration: line-through;
}
.cs-motor-tile__now {
    font-size: 18px;
    color: var(--primary);
}
.cs-motor-tile__shop {
    z-index: 2;
    font-size: 15px;
    color: var(--white);
    background: var(--primary);
    transform: translateY(100%);
    opacity: 0;
}
.cs-motor-tile__shop i {
    font-size: 16px;
    transition: var(--transition);
}
.cs-motor-tile__shop:hover {
    color: var(--white);
    background: var(--primary-hover);
}
.cs-motor-tile__shop:hover i {
    transform: translateX(4px);
}
.cs-motor-tile:hover .cs-motor-tile__values {
    transform: translateY(-100%);
    opacity: 0;
}
.cs-motor-tile:hover .cs-motor-tile__shop {
    transform: none;
    opacity: 1;
}
.bg-lighter .cs-motor-tile {
    border: 0;
    box-shadow: var(--shadow);
}

/* --- Responsive --- */
@media (max-width: 575px) {
    .cs-boat-tile__body {
        padding: 18px;
    }
}

/* ==========================================================================
   v5 · Modern boat and motor tiles
   Boat tile: 4/3 photo with pill badges top left, yard eyebrow, title,
   spec pills, price row on a hairline with a green savings pill, buttons.
   Compact tile: the info panel floats up over the photo.
   Motor tile: brand eyebrow, spec pills, price left and a round arrow
   chip right. Every tile is one link, so it lifts on hover.
   ========================================================================== */

/* --- Boat tile --- */
.cs-boat-tile {
    border: 1px solid var(--border-light);
    box-shadow: rgba(15, 23, 43, .05) 0 1px 3px 0;
    transition: box-shadow .3s ease, transform .3s var(--ease-out);
}
.cs-boat-tile:hover {
    box-shadow: rgba(15, 23, 43, .12) 0 14px 30px 0;
    transform: translateY(-4px);
}
.cs-boat-tile__media {
    aspect-ratio: 4 / 3;
}
.cs-boat-tile__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 43, .35) 0%, rgba(15, 23, 43, 0) 35%);
    pointer-events: none;
}
.cs-boat-tile:hover .cs-boat-tile__media img {
    transform: scale(1.05);
}
.cs-boat-tile__badges {
    top: 14px;
    right: 14px;
    left: 14px;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.cs-boat-tile__badges .cs-badge {
    height: 24px;
    padding-right: 10px;
    padding-left: 10px;
    border-radius: 40px;
    font-size: 10px;
    line-height: 24px;
    box-shadow: rgba(15, 23, 43, .15) 0 2px 6px 0;
}
.cs-boat-tile__body {
    gap: 0;
    padding: 20px;
}
.cs-boat-tile__loc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}
.cs-boat-tile__loc i {
    font-size: 12px;
    color: var(--primary);
}
.cs-boat-tile__title {
    margin-bottom: 14px;
    font-size: 18px;
    line-height: 1.3;
}
.cs-boat-tile__pricing {
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-top: auto;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
}
.cs-boat-tile__label {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}
.cs-boat-tile__now {
    font-size: 24px;
    color: var(--heading);
}
.cs-boat-tile__call {
    font-size: 20px;
    color: var(--primary);
}
.cs-boat-tile__was {
    font-size: 12px;
    line-height: 1.4;
    text-align: right;
}
.cs-boat-tile__savings {
    display: inline-flex !important;
    align-items: center;
    height: 22px;
    margin-top: 4px;
    padding: 0 8px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
    color: #047857;
    background: rgba(4, 120, 87, .1);
}
.cs-boat-tile__actions {
    gap: 8px;
}

/* --- Compact tile: info panel floats over the photo --- */
.cs-boat-tile--compact {
    border: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
    filter: drop-shadow(0 2px 5px rgba(15, 23, 43, .1));
}
.cs-boat-tile--compact:hover {
    box-shadow: none;
    filter: drop-shadow(0 12px 20px rgba(15, 23, 43, .16));
}
.cs-boat-tile--compact .cs-boat-tile__media {
    aspect-ratio: 4 / 3;
}
.cs-boat-tile--compact .cs-boat-tile__media img {
    filter: none;
}
.cs-boat-tile--compact .cs-boat-tile__body {
    position: relative;
    z-index: 2;
    margin: -64px 16px 0;
    padding: 20px 20px 16px;
    background: var(--white);
}
.cs-boat-tile--compact .cs-boat-tile__title {
    margin-bottom: 6px;
    font-size: 17px;
    text-transform: none;
}
.cs-boat-tile--compact .cs-boat-tile__meta {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
}
.cs-boat-tile--compact .cs-boat-tile__now {
    font-size: 22px;
    color: var(--heading);
}
.cs-boat-tile--compact .cs-boat-tile__call {
    font-size: 18px;
    color: var(--primary);
}
.cs-boat-tile--compact .cs-boat-tile__was {
    font-size: 11px;
}
.cs-boat-tile__save {
    height: 22px;
    padding: 0 8px;
    border-radius: 40px;
    font-size: 10px;
    color: #047857;
    background: rgba(4, 120, 87, .1);
}
.cs-boat-tile--compact > .cs-boat-tile__actions {
    position: relative;
    z-index: 2;
    margin: 0 16px;
    padding: 0 20px 20px;
    border-top: 0;
    background: var(--white);
}
.bg-lighter .cs-boat-tile--compact {
    box-shadow: none;
}

/* --- Motor tile: brand and savings pills on the photo, title and a plain
   spec line, price left and a round red arrow button right --- */
.cs-motor-tile {
    border: 1px solid var(--border-light);
    box-shadow: rgba(15, 23, 43, .05) 0 1px 3px 0;
    transition: box-shadow .3s ease, transform .3s var(--ease-out);
}
.cs-motor-tile:hover {
    box-shadow: rgba(15, 23, 43, .12) 0 14px 30px 0;
    transform: translateY(-4px);
}
.cs-motor-tile__media {
    position: relative;
}
.cs-motor-tile__media img {
    transition: transform .6s ease;
}
.cs-motor-tile:hover .cs-motor-tile__media img {
    transform: scale(1.05);
}
.cs-motor-tile__tag,
.cs-motor-tile__save {
    position: absolute;
    top: 14px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 40px;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    box-shadow: rgba(15, 23, 43, .15) 0 2px 6px 0;
}
.cs-motor-tile__tag {
    left: 14px;
    color: var(--heading);
    background: var(--white);
}
.cs-motor-tile__save {
    right: 14px;
    color: var(--white);
    background: var(--primary);
}
.cs-motor-tile__body {
    padding: 18px 20px 16px;
}
.cs-motor-tile__title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.4;
}
.cs-motor-tile__meta {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}
.cs-motor-tile__meta span {
    margin: 0 4px;
    color: var(--primary);
}
.cs-motor-tile__price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: auto;
    margin: 0 20px;
    padding: 14px 0 18px;
    border-top: 1px solid var(--border-light);
    overflow: visible;
}
.cs-motor-tile__values,
.cs-motor-tile__shop,
.cs-motor-tile:hover .cs-motor-tile__values,
.cs-motor-tile:hover .cs-motor-tile__shop {
    position: static;
    inset: auto;
    opacity: 1;
    transform: none;
    transition: none;
}
.cs-motor-tile__values {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 2px 8px;
}
.cs-motor-tile__now {
    order: -1;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--heading);
}
.cs-motor-tile__was {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}
/* Round arrow button; the text stays for screen readers */
.cs-motor-tile__shop,
.cs-motor-tile__shop:hover {
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 0;
    color: var(--white);
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .12);
    transition: background .2s ease, box-shadow .2s ease;
}
.cs-motor-tile__shop i,
.cs-motor-tile__shop:hover i,
.cs-motor-tile:hover .cs-motor-tile__shop i {
    display: inline;
    width: auto;
    height: auto;
    font-size: 16px;
    color: var(--white);
    background: none;
    transform: none;
}
.cs-motor-tile:hover .cs-motor-tile__shop,
.cs-motor-tile__shop:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 0 6px rgba(var(--primary-rgb), .18);
}

/* --- Light and dark sections --- */
.bg-lighter .cs-boat-tile:not(.cs-boat-tile--compact),
.bg-lighter .cs-motor-tile {
    border-color: transparent;
}
.bg-dark .cs-boat-tile,
.bg-dark .cs-motor-tile {
    border-color: rgba(255, 255, 255, .12);
    box-shadow: none;
}
.bg-dark .cs-boat-tile__pricing,
.bg-dark .cs-motor-tile__price {
    border-top-color: rgba(255, 255, 255, .1);
}

/* --- Responsive --- */
@media (max-width: 575px) {
    .cs-boat-tile__body {
        padding: 18px;
    }
    .cs-boat-tile--compact .cs-boat-tile__body {
        margin: -48px 12px 0;
        padding: 18px 18px 14px;
    }
    .cs-boat-tile--compact > .cs-boat-tile__actions {
        margin: 0 12px;
        padding: 0 18px 18px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .cs-boat-tile,
    .cs-motor-tile,
    .cs-boat-tile__media img,
    .cs-motor-tile__media img {
        transition: none;
    }
}

/* Badges on the photo read on any image */
.cs-boat-tile__badges .cs-badge-new {
    color: #047857;
    background: var(--white);
}
.cs-boat-tile__badges .cs-badge-used {
    color: var(--secondary);
    background: var(--white);
}
.bg-dark .cs-motor-tile__meta {
    color: rgba(255, 255, 255, .6);
}
.bg-dark .cs-motor-tile__now {
    color: var(--white);
}
/* Motor arrow: small light pink chip that fills red on hover */
.cs-motor-tile__shop,
.cs-motor-tile__shop:hover {
    width: 32px;
    height: 32px;
    background: var(--primary-tint-10);
    box-shadow: none;
}
.cs-motor-tile__shop i,
.cs-motor-tile__shop:hover i,
.cs-motor-tile:hover .cs-motor-tile__shop i {
    font-size: 13px;
    color: var(--primary);
}
.cs-motor-tile:hover .cs-motor-tile__shop,
.cs-motor-tile__shop:hover {
    background: var(--primary);
    box-shadow: none;
}
.cs-motor-tile:hover .cs-motor-tile__shop i,
.cs-motor-tile__shop:hover i {
    color: var(--white);
}
.cs-motor-tile__shop,
.cs-motor-tile__shop:hover {
    width: 26px;
    height: 26px;
}
.cs-motor-tile__shop i,
.cs-motor-tile__shop:hover i,
.cs-motor-tile:hover .cs-motor-tile__shop i {
    font-size: 11px;
    -webkit-text-stroke: .5px currentColor;
}
/* Motor horsepower as a small tinted pill with a bolt */
.cs-motor-tile__meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border-radius: 40px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-tint-10);
}
.cs-motor-tile__meta i {
    font-size: 11px;
}
.bg-dark .cs-motor-tile__meta {
    color: var(--white);
    background: rgba(var(--primary-rgb), .25);
}
/* Arrow chip: the hidden "Shop now" text still counted as a flex item and
   pushed the chevron right, so drop the gap and centre the glyph box */
.cs-motor-tile__shop,
.cs-motor-tile__shop:hover {
    gap: 0;
    line-height: 1;
}
.cs-motor-tile__shop i,
.cs-motor-tile__shop:hover i,
.cs-motor-tile:hover .cs-motor-tile__shop i {
    display: block;
    line-height: 1;
}
.cs-motor-tile__shop i::before {
    display: block;
    vertical-align: 0;
}
/* Motor titles: always two lines tall, clipped after two, so the hp pill
   and price line up across a row */
.cs-motor-tile__title {
    display: -webkit-box;
    min-height: calc(2em * 1.35);
    margin-bottom: 10px;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* Narrow four-column rows on small laptops: a touch smaller so titles stay two lines */
@media (min-width: 992px) and (max-width: 1299px) {
    .cs-motor-tile__title {
        font-size: 14px;
    }
    .cs-motor-tile__body {
        padding-right: 16px;
        padding-left: 16px;
    }
}
