/* wp-content/themes/gtmotor/assets/css/components/scroller.css */

/* Sizing, scrolling, snap, arrows, dots and edge masks are now owned entirely
   by the unified carousel engine (assets/css/components/carousel.css). This file
   keeps ONLY the per-card VISUAL styling for the stock card + skeletons. Each
   card fills its .gtm-carousel__item (width:100%; height:100%). */

/* --- Card Styles (V2 Stock) --- */

.gtm-card-stock-v2 {
    width: 100%;
    height: 100%;
    /* A long card title must not stretch the fixed carousel column; min-width:0
       lets the title's ellipsis engage instead of ballooning the card. */
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #676767;
    border-radius: 16px;
    padding: 24px 16px;
    gap: 32px;
    text-decoration: none;
    transition: box-shadow 0.2s ease;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.gtm-card-stock-v2:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.stock-card-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    flex-grow: 1;
    width: 100%;
    min-width: 0;
}

.gtm-card-stock-v2 .brand-tag {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 4px 16px;
    border-radius: 99px;

    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: #333;
}

.gtm-card-stock-v2.brand-honda .brand-tag { background-color: var(--brand-honda); }
.gtm-card-stock-v2.brand-ducati .brand-tag { background-color: var(--brand-ducati); }
.gtm-card-stock-v2.brand-kawasaki .brand-tag { background-color: var(--brand-kawasaki); }
.gtm-card-stock-v2.brand-yamaha .brand-tag { background-color: var(--brand-yamaha); }
.gtm-card-stock-v2.brand-ducati.family-scrambler .brand-tag{
  background-color: var(--brand-scrambler);
}

.gtm-card-stock-v2 .title {
    color: #FFF;

    font-size: 16px;
    font-weight: 900;
    line-height: 24px;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
    display: block;
}

.gtm-card-stock-v2 .condition {
    color: rgba(255, 255, 255, 0.64);

    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
    display: block;
}

.gtm-card-stock-v2 .media {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    border-radius: 8px;
    border: 2px solid #FFF;
    background: #fff;
    overflow: hidden;
    margin-top: auto;
    flex-shrink: 0;
}

.gtm-card-stock-v2 .media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.stock-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

.gtm-card-stock-v2 .gtm-pill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    border-radius: 96px;
    border: 2px solid #FFF;

    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #FFF;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.gtm-card-stock-v2 .gtm-cta {
    background: #fff;
    color: #333;
    transition: background 0.2s;
}

.gtm-card-stock-v2 .gtm-cta:hover {
    background: #e0e0e0;
}

.gtm-card-stock-v2 .gtm-price,
.gtm-card-stock-v2 .gtm-price * {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
}

/* --- Skeleton placeholder (renders inside a .gtm-carousel__item) --- */

.gtm-card-skeleton {
    width: 100%;
    height: 100%;
    min-height: 450px;
    min-width: 0;
    background: #e0e0e0;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.gtm-card-skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    100% { transform: translateX(100%); }
}
