/**
 * ISO Carousel — [iso_carousel] shortcode styles
 *
 * Reuses .iso-sr-card* classes from search-results.css for the card body and
 * adds: section header (red accent), horizontal slider with prev/next nav,
 * dot pagination, "In Search Of:" red prefix in the title, "Message Buyer"
 * CTA per card, and the two action buttons under the slider.
 */

/* ── Section ─────────────────────────────────────────────────────────────── */

.iso-carousel {
    width: 100%;
    background: #f5f5f7;
    padding: 48px 16px;
}

.iso-carousel__inner {
    max-width: 1240px;
    margin: 0 auto;
}

.iso-carousel__header {
    margin-bottom: 24px;
    text-align: left;
}

.iso-carousel__title {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a1a2e;
    margin: 0 0 8px;
    line-height: 1.2;
}

.iso-carousel__title-accent {
    color: #e63946;
    margin-right: 6px;
}

.iso-carousel__subtitle {
    font-size: 0.95rem;
    color: #4b5563;
    max-width: 760px;
    margin: 0;
    line-height: 1.5;
}

/* ── Viewport + track ────────────────────────────────────────────────────── */

.iso-carousel__viewport {
    position: relative;
}

.iso-carousel__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 4px 2px 12px;
}

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

.iso-carousel__slide {
    flex: 0 0 auto;
    width: calc((100% - 16px * 3) / 4); /* 4-up by default */
    scroll-snap-align: start;
    display: flex;
}

@media (max-width: 1100px) {
    .iso-carousel__slide { width: calc((100% - 16px * 2) / 3); }
}

@media (max-width: 820px) {
    .iso-carousel__slide { width: calc((100% - 16px) / 2); }
}

@media (max-width: 560px) {
    .iso-carousel__slide { width: 88%; }
}

/* ── Card overrides ──────────────────────────────────────────────────────── */

.iso-carousel-card {
    position: relative;
    container-type: inline-size;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.iso-carousel-card__favorite {
    all: unset;
    box-sizing: border-box;
    position: absolute !important;
    top: calc(75cqw + 12px) !important;
    right: 12px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 10 !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #ef1f2d !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: none !important;
    box-shadow: none !important;
    transition: transform 150ms ease, color 150ms ease, opacity 150ms ease;
}

.iso-carousel-card__favorite svg {
    color: red !important;
    width: 17px !important;
    height: 17px !important;
    display: block !important;
    max-width: 17px !important;
    max-height: 17px !important;
    fill: transparent !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.iso-carousel-card__favorite:hover,
.iso-carousel-card__favorite:focus {
    background: transparent !important;
    transform: scale(1.06);
    outline: none !important;
}

.iso-carousel-card__favorite.is-active svg {
    fill: currentColor !important;
}

.iso-carousel-card__favorite:disabled {
    cursor: progress !important;
    opacity: 0.65 !important;
}

.iso-carousel-card__title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    min-height: calc(1.35em * 2); /* reserve 2 lines so card footers align across rows */
    cursor: help; /* hint that hovering reveals the full title via the native tooltip */
}

.iso-carousel-card__title-prefix {
    color: #e63946;
    font-weight: 700;
    margin-right: 4px;
}

.iso-carousel-card__title-text {
    color: #1a1a2e;
    font-weight: 700;
}

.iso-carousel-card__cta {
    display: block;
    margin: 0 12px 12px;
    padding: 10px 16px;
    background: #e63946;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0.01em;
    transition: background 150ms ease, transform 150ms ease;
}

.iso-carousel-card__cta:hover,
.iso-carousel-card__cta:focus {
    background: #c92b38;
    color: #ffffff !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

/* ── Prev / next nav buttons ─────────────────────────────────────────────── */

.iso-carousel__nav {
    position: absolute;
    top: 38%;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1a1a2e;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 150ms ease, color 150ms ease, opacity 150ms ease;
}

.iso-carousel__nav:hover,
.iso-carousel__nav:focus {
    background: #e63946;
    color: #ffffff;
    border-color: #e63946;
    outline: none;
}

.iso-carousel__nav--prev { left: -18px; }
.iso-carousel__nav--next { right: -18px; }

@media (max-width: 600px) {
    .iso-carousel__nav { display: none; }
}

/* ── Pagination dots ─────────────────────────────────────────────────────── */

.iso-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 16px 0 0;
}

.iso-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
}

.iso-carousel__dot:hover {
    background: #9ca3af;
}

.iso-carousel__dot.is-active {
    background: #1a1a2e;
    transform: scale(1.2);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.iso-carousel__empty {
    padding: 32px;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    font-size: 0.95rem;
}
