/**
 * ListingBridges — Sliders CSS
 * Hero slider + Card carousel. Theme-aware via CSS custom properties.
 *
 * Developed by: Stark Create
 * @version 1.2.0
 */

/* ================================================================
   HERO SLIDER — [lb_hero]
   Full-width background image slider with overlay text.
   ================================================================ */
.lb-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #1d2327;
}

.lb-hero__header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 24px 32px;
}

.lb-hero__title {
    font-family: var(--lb-font-sans, inherit);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* Track holds slides; only active is visible */
.lb-hero__track {
    position: relative;
    width: 100%;
    height: 480px;
}

.lb-hero__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 1;
}

.lb-hero__slide--active {
    opacity: 1;
    z-index: 2;
}

/* Dark gradient overlay */
.lb-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.7) 0%,
        rgba(0,0,0,.25) 40%,
        rgba(0,0,0,.1) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 40px 32px;
}

.lb-hero__content {
    max-width: 600px;
}

.lb-hero__listing-title {
    font-family: var(--lb-font-sans, inherit);
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
    line-height: 1.2;
}

.lb-hero__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .9rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 14px;
}

.lb-hero__meta span {
    background: rgba(255,255,255,.15);
    padding: 4px 12px;
    border-radius: var(--lb-radius, 0);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lb-hero__link {
    display: inline-block;
    padding: 10px 24px;
    background: var(--lb-color-accent, #bb2125);
    color: #fff;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    border-radius: var(--lb-radius, 0);
    transition: background var(--lb-transition, .2s ease);
}

.lb-hero__link:hover {
    background: var(--lb-color-accent-hover, #a01c20);
    color: #fff;
}

/* Navigation arrows */
.lb-hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,.4);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease;
    border-radius: var(--lb-radius, 0);
    line-height: 1;
}

.lb-hero__arrow:hover {
    background: rgba(0,0,0,.65);
}

.lb-hero__arrow--prev { left: 16px; }
.lb-hero__arrow--next { right: 16px; }

/* Dot indicators */
.lb-hero__dots {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.lb-hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.6);
    background: transparent;
    cursor: pointer;
    transition: all .2s ease;
    padding: 0;
}

.lb-hero__dot--active,
.lb-hero__dot:hover {
    background: #fff;
    border-color: #fff;
}

/* CTA bar at bottom */
.lb-hero__cta-bar {
    background: var(--lb-color-primary, #0d1741);
    text-align: center;
    padding: 14px 20px;
}

.lb-hero__cta {
    color: #fff;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .03em;
    transition: opacity .2s ease;
}

.lb-hero__cta:hover {
    opacity: .8;
    color: #fff;
}

/* ================================================================
   CAROUSEL — [lb_carousel]
   Horizontal scrolling card strip.
   ================================================================ */
.lb-carousel {
    margin: 24px 0;
}

.lb-carousel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.lb-carousel__title {
    font-family: var(--lb-font-sans, inherit);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--lb-color-text, #1d2327);
    margin: 0;
}

.lb-carousel__cta {
    color: var(--lb-color-accent, #bb2125);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity .2s ease;
}

.lb-carousel__cta:hover {
    opacity: .7;
}

/* Track wrapper for arrows + scroll area */
.lb-carousel__track-wrap {
    position: relative;
}

.lb-carousel__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lb-carousel__track::-webkit-scrollbar {
    display: none;
}

/* Individual card */
.lb-carousel__card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--lb-color-surface, #fff);
    border: 1px solid var(--lb-color-border-light, #e5e7eb);
    border-radius: var(--lb-radius, 0);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform var(--lb-transition, .2s ease), box-shadow var(--lb-transition, .2s ease);
    display: flex;
    flex-direction: column;
}

.lb-carousel__card:hover {
    transform: translateY(-3px);
    box-shadow: var(--lb-shadow-hover, 0 8px 24px rgba(0,0,0,.16));
}

.lb-carousel__img-wrap {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--lb-color-bg, #f0f0f1);
}

.lb-carousel__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform .35s ease;
}

.lb-carousel__img--empty {
    background: linear-gradient(135deg, #d1d5db, #e5e7eb);
}

.lb-carousel__card:hover .lb-carousel__img {
    transform: scale(1.04);
}

.lb-carousel__price {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--lb-color-primary, #0d1741);
    color: #fff;
    padding: 4px 10px;
    font-size: .85rem;
    font-weight: 700;
    border-radius: calc(var(--lb-radius, 0) / 2);
    line-height: 1.2;
}

.lb-carousel__info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lb-carousel__card-title {
    font-size: .88rem;
    font-weight: 600;
    color: var(--lb-color-text, #1d2327);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lb-carousel__meta {
    font-size: .8rem;
    color: var(--lb-color-text-muted, #6b7280);
}

.lb-carousel__side {
    font-size: .75rem;
    font-weight: 600;
    color: var(--lb-color-primary, #0d1741);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 2px;
}

/* Carousel arrows */
.lb-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: var(--lb-color-surface, #fff);
    border: 1px solid var(--lb-color-border, #d1d5db);
    color: var(--lb-color-text, #1d2327);
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: var(--lb-shadow-sm, 0 1px 3px rgba(0,0,0,.08));
    transition: all .2s ease;
    line-height: 1;
}

.lb-carousel__arrow:hover {
    background: var(--lb-color-bg, #f0f0f1);
    box-shadow: var(--lb-shadow-md, 0 4px 12px rgba(0,0,0,.1));
}

.lb-carousel__arrow--prev { left: -18px; }
.lb-carousel__arrow--next { right: -18px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .lb-hero__track { height: 340px; }
    .lb-hero__overlay { padding: 24px 20px; }
    .lb-hero__listing-title { font-size: 1.3rem; }
    .lb-hero__arrow { width: 36px; height: 36px; font-size: 1.2rem; }
    .lb-hero__arrow--prev { left: 8px; }
    .lb-hero__arrow--next { right: 8px; }
    .lb-hero__dots { bottom: 50px; }

    .lb-carousel__card { flex: 0 0 240px; }
    .lb-carousel__arrow { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .lb-hero__track { height: 400px; }
    .lb-carousel__card { flex: 0 0 260px; }
}
