/* ==========================================================================
   Golden Drive — Search result cards
   Markup: resources/views/website/components/search-car-card.blade.php
   Grid/list toggle: #car-results.view-grid / #car-results.view-list
   ========================================================================== */

.gd-car {
    --gd-gold: #be944e;
    --gd-gold-dark: #a37b39;
    --gd-gold-soft: #f7f0e4;
    --gd-ink: #201f1d;
    --gd-ink-2: #4a4740;
    --gd-muted: #8a857b;
    --gd-line: #eee8dd;
    --gd-save: #1f8a4c;
    --gd-save-bg: #e6f5ec;

    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--gd-line);
    border-radius: 18px;
    overflow: hidden;
    color: var(--gd-ink);
    box-shadow: 0 1px 2px rgba(32, 31, 29, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gd-car:hover {
    transform: translateY(-3px);
    border-color: rgba(190, 148, 78, 0.45);
    box-shadow: 0 22px 44px -22px rgba(61, 41, 7, 0.4), 0 2px 8px rgba(32, 31, 29, 0.05);
}

.gd-car.is-featured {
    border-color: rgba(190, 148, 78, 0.5);
}

#car-results > .row,
.gd-results-skeleton > .row {
    --bs-gutter-x: 20px;
    --bs-gutter-y: 20px;
}

/* ---------- Media ---------- */

.gd-car__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(160deg, #f6f3ee 0%, #ebe5da 100%);
    overflow: hidden;
}

.gd-car__photo {
    display: block;
    width: 100%;
    height: 100%;
}

.gd-car__photo img,
.gd-car__media .owl-carousel .owl-item img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gd-car:hover .gd-car__photo img {
    transform: scale(1.04);
}

.gd-car__gallery,
.gd-car__gallery .owl-stage-outer,
.gd-car__gallery .owl-stage,
.gd-car__gallery .owl-item {
    height: 100%;
}

/* Subtle bottom shade so dots and the photo count stay readable on bright photos */
.gd-car__media::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 38%;
    background: linear-gradient(to top, rgba(20, 18, 14, 0.38), transparent);
    pointer-events: none;
    z-index: 1;
}

.gd-car__gallery .owl-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 0 !important;
}

.gd-car__gallery .owl-dots .owl-dot span {
    display: block;
    width: 6px !important;
    height: 6px !important;
    margin: 0 !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55) !important;
    transition: width 0.25s ease, background 0.25s ease;
}

.gd-car__gallery .owl-dots .owl-dot.active span {
    width: 18px !important;
    background: #fff !important;
}

/* Selectors are anchored on .gd-car .owl-carousel to outrank the theme's .img-slider.owl-carousel rules */
.gd-car .gd-car__gallery.owl-carousel .owl-nav {
    position: absolute;
    inset: 50% 10px auto 10px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    margin: 0;
    opacity: 1;
    transform: translateY(-50%);
    pointer-events: none;
}

.gd-car .gd-car__gallery.owl-carousel .owl-nav.disabled {
    display: none;
}

.gd-car .gd-car__gallery.owl-carousel .owl-nav button.owl-prev,
.gd-car .gd-car__gallery.owl-carousel .owl-nav button.owl-next {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--gd-ink);
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    pointer-events: auto;
}

.gd-car .gd-car__gallery.owl-carousel .owl-nav button i {
    line-height: 1;
}

.gd-car:hover .gd-car__gallery.owl-carousel .owl-nav button,
.gd-car .gd-car__gallery.owl-carousel .owl-nav button:focus-visible {
    opacity: 1;
    transform: scale(1);
}

.gd-car .gd-car__gallery.owl-carousel .owl-nav button:hover {
    background: var(--gd-gold) !important;
    color: #fff;
}

@media (hover: none) {
    .gd-car .gd-car__gallery.owl-carousel .owl-nav {
        display: none;
    }
}

.gd-car__count {
    position: absolute;
    inset-inline-end: 10px;
    bottom: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(20, 18, 14, 0.55);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gd-car__badges {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

.gd-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.gd-badge i {
    font-size: 10px;
}

.gd-badge--featured {
    background: linear-gradient(135deg, #cfa862, var(--gd-gold-dark));
    color: #fff;
}

.gd-badge--save {
    background: #fff;
    color: var(--gd-save);
}

.gd-badge--last {
    background: #fff4ec;
    color: #c2410c;
}

/* ---------- Body ---------- */

.gd-car__body {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 16px 18px 18px;
}

.gd-car__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.gd-car__eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gd-gold-dark);
}

.gd-car__eyebrow > span:first-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gd-car__year {
    flex: 0 0 auto;
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--gd-gold-soft);
    color: var(--gd-ink-2);
    letter-spacing: 0.02em;
}

.gd-car__rating {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gd-ink);
}

.gd-car__rating i {
    color: #f5a623;
    font-size: 12px;
}

.gd-car__rating small {
    font-size: 12px;
    font-weight: 500;
    color: var(--gd-muted);
}

.gd-car__title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
}

.gd-car__link {
    color: var(--gd-ink);
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* The whole card body opens the booking; the CTA and photos keep their own links */
.gd-car__link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.gd-car__link:hover {
    color: var(--gd-gold-dark);
}

.gd-car__link:focus-visible {
    outline: none;
}

.gd-car__link:focus-visible::after {
    border-radius: 0 0 18px 18px;
    box-shadow: inset 0 0 0 2px var(--gd-gold);
}

.gd-car__similar {
    margin: 2px 0 14px;
    font-size: 13px;
    color: var(--gd-muted);
}

.gd-car__specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.gd-car__specs li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8f6f2;
    font-size: 13px;
    font-weight: 500;
    color: var(--gd-ink-2);
}

.gd-car__specs img {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    opacity: 0.75;
}

.gd-car__specs span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ---------- Footer: price + CTA ---------- */

.gd-car__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--gd-line);
}

.gd-car__price {
    min-width: 0;
    line-height: 1.25;
}

.gd-car__rate {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 6px;
}

.gd-car__rate del {
    font-size: 13px;
    font-weight: 500;
    color: var(--gd-muted);
}

.gd-car__rate strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--gd-ink);
    white-space: nowrap;
}

.gd-car__rate > span {
    font-size: 13px;
    color: var(--gd-muted);
}

.gd-car__total {
    margin-top: 3px;
    font-size: 13px;
    color: var(--gd-ink-2);
}

.gd-car__total b {
    font-weight: 700;
    color: var(--gd-ink);
}

.gd-car__tax {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--gd-save);
}

.gd-car__tax i {
    font-size: 12px;
}

.gd-car__cta {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    background: var(--gd-ink);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.gd-car__cta i {
    transition: transform 0.2s ease;
}

.gd-car__cta:hover,
.gd-car:hover .gd-car__cta {
    background: linear-gradient(135deg, #cfa862 0%, var(--gd-gold) 45%, var(--gd-gold-dark) 100%);
    color: #fff;
    box-shadow: 0 10px 20px -10px rgba(163, 123, 57, 0.9);
}

.gd-car:hover .gd-car__cta i {
    transform: translateX(3px);
}

[dir="rtl"] .gd-car:hover .gd-car__cta i {
    transform: scaleX(-1) translateX(3px);
}

.gd-car__cta:focus-visible {
    outline: 3px solid rgba(190, 148, 78, 0.5);
    outline-offset: 2px;
}

[dir="rtl"] .gd-car .gd-flip {
    display: inline-block;
    transform: scaleX(-1);
}

/* ---------- List view (desktop): photo on the side ---------- */

@media (min-width: 992px) {
    #car-results.view-list .gd-car-col {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    #car-results.view-list .gd-car {
        flex-direction: row;
    }

    #car-results.view-list .gd-car__media {
        flex: 0 0 38%;
        max-width: 420px;
        aspect-ratio: auto;
        min-height: 240px;
    }

    #car-results.view-list .gd-car__photo img,
    #car-results.view-list .gd-car__media .owl-carousel .owl-item img {
        aspect-ratio: auto;
        min-height: 240px;
    }

    #car-results.view-list .gd-car__body {
        padding: 22px 26px;
    }

    #car-results.view-list .gd-car__title {
        font-size: 22px;
    }

    #car-results.view-list .gd-car__specs {
        grid-template-columns: repeat(4, minmax(0, auto));
        justify-content: start;
    }

    #car-results.view-list .gd-car__footer {
        align-items: center;
    }

    #car-results.view-list .gd-car__cta {
        min-width: 170px;
    }
}

/* ---------- Tablet & mobile: compact two-column cards ---------- */

@media (max-width: 991.98px) {
    #car-results > .row,
    .gd-results-skeleton > .row {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }

    .gd-car {
        border-radius: 14px;
    }

    .gd-car:hover {
        transform: none;
    }

    .gd-car__media {
        aspect-ratio: 4 / 3;
    }

    .gd-car__photo img,
    .gd-car__media .owl-carousel .owl-item img {
        aspect-ratio: 4 / 3;
    }

    .gd-car__badges {
        top: 8px;
        inset-inline-start: 8px;
        gap: 4px;
    }

    .gd-badge {
        padding: 3px 8px;
        font-size: 11px;
    }

    .gd-car__count {
        display: none;
    }

    .gd-car__gallery .owl-dots {
        bottom: 6px;
    }

    .gd-car__body {
        padding: 10px 10px 12px;
    }

    .gd-car__head {
        margin-bottom: 2px;
    }

    .gd-car__eyebrow {
        font-size: 10.5px;
        gap: 5px;
    }

    .gd-car__year {
        display: none;
    }

    .gd-car__rating {
        font-size: 12px;
    }

    .gd-car__rating small {
        display: none;
    }

    .gd-car__title {
        font-size: 14.5px;
    }

    .gd-car__similar {
        margin: 1px 0 8px;
        font-size: 11.5px;
    }

    .gd-car__specs {
        gap: 4px 6px;
        margin-bottom: 10px;
    }

    .gd-car__specs li {
        gap: 5px;
        padding: 0;
        background: transparent;
        font-size: 11.5px;
    }

    .gd-car__specs img {
        width: 12px;
        height: 12px;
    }

    .gd-car__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 8px;
    }

    .gd-car__rate {
        gap: 0 4px;
    }

    .gd-car__rate strong {
        font-size: 16px;
    }

    .gd-car__rate > span,
    .gd-car__rate del {
        font-size: 11.5px;
    }

    .gd-car__total {
        margin-top: 1px;
        font-size: 11.5px;
    }

    .gd-car__tax {
        font-size: 10.5px;
        margin-top: 2px;
    }

    .gd-car__cta {
        width: 100%;
        min-height: 42px;
        padding: 0 10px;
        border-radius: 10px;
        font-size: 13.5px;
    }

    /* List view on phones: one wide card per row */
    #car-results.view-list .gd-car-col {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    #car-results.view-list .gd-car__media,
    #car-results.view-list .gd-car__photo img,
    #car-results.view-list .gd-car__media .owl-carousel .owl-item img {
        aspect-ratio: 16 / 9;
    }

    #car-results.view-list .gd-car__body {
        padding: 14px 14px 16px;
    }

    #car-results.view-list .gd-car__title {
        font-size: 17px;
    }

    #car-results.view-list .gd-car__year {
        display: inline;
    }

    #car-results.view-list .gd-car__specs li {
        padding: 7px 9px;
        background: #f8f6f2;
        font-size: 12.5px;
    }

    #car-results.view-list .gd-car__footer {
        flex-direction: row;
        align-items: center;
    }

    #car-results.view-list .gd-car__rate strong {
        font-size: 19px;
    }

    #car-results.view-list .gd-car__cta {
        width: auto;
        min-width: 130px;
    }
}

@media (max-width: 359.98px) {
    .gd-car__specs {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Loading skeleton ---------- */

.gd-skel {
    height: 100%;
    border: 1px solid #eee8dd;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.gd-skel__media {
    aspect-ratio: 16 / 10;
}

.gd-skel__body {
    padding: 16px 18px 18px;
}

.gd-skel__line {
    height: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.gd-skel__line--title {
    width: 70%;
    height: 18px;
}

.gd-skel__line--short {
    width: 40%;
}

.gd-skel__specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.gd-skel__specs span {
    height: 32px;
    border-radius: 10px;
}

.gd-skel__foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 14px;
    border-top: 1px dashed #eee8dd;
}

.gd-skel__foot span:first-child {
    width: 38%;
    height: 26px;
    border-radius: 8px;
}

.gd-skel__foot span:last-child {
    width: 34%;
    height: 44px;
    border-radius: 12px;
}

.gd-skel__media,
.gd-skel__line,
.gd-skel__specs span,
.gd-skel__foot span {
    background: linear-gradient(90deg, #f2eee7 25%, #faf8f4 37%, #f2eee7 63%);
    background-size: 400% 100%;
    animation: gd-shimmer 1.3s ease infinite;
}

@keyframes gd-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (max-width: 991.98px) {
    .gd-skel {
        border-radius: 14px;
    }

    .gd-skel__media {
        aspect-ratio: 4 / 3;
    }

    .gd-skel__body {
        padding: 10px;
    }

    .gd-skel__specs span {
        height: 14px;
    }

    .gd-skel__foot {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .gd-skel__foot span:first-child,
    .gd-skel__foot span:last-child {
        width: 100%;
    }

    .gd-skel__foot span:last-child {
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gd-car,
    .gd-car *,
    .gd-skel * {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- "Add your dates" nudge (results opened without dates) ---------- */

.gd-nudge {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid rgba(190, 148, 78, 0.35);
    border-radius: 16px;
    background: linear-gradient(90deg, #fbf7f0, #fff);
}

.gd-nudge__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #be944e;
    color: #fff;
    font-size: 19px;
}

.gd-nudge__text {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.gd-nudge__text b {
    display: block;
    font-size: 15px;
    color: #201f1d;
}

.gd-nudge__text span {
    font-size: 13.5px;
    color: #8a857b;
}

.gd-nudge__btn {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: #201f1d;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.gd-nudge__btn:hover {
    background: #000;
}

/* ---------- Pagination ---------- */

.gd-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 8px;
    padding: 12px 14px;
    border: 1px solid #eee8dd;
    border-radius: 16px;
    background: #fff;
}

.gd-pager__info {
    margin: 0;
    font-size: 13.5px;
    color: #8a857b;
}

.gd-pager__nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gd-pager__pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gd-pager__btn,
.gd-pager__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #eee8dd;
    border-radius: 12px;
    background: #fff;
    color: #201f1d;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.gd-pager__page {
    padding: 0;
}

a.gd-pager__btn:hover,
a.gd-pager__page:hover {
    border-color: #be944e;
    background: #fbf7f0;
    color: #201f1d;
}

.gd-pager__page.is-active {
    border-color: #201f1d;
    background: #201f1d;
    color: #fff;
}

.gd-pager__btn.is-disabled {
    color: #c9c3b8;
    cursor: not-allowed;
}

.gd-pager__gap {
    padding: 0 4px;
    color: #8a857b;
}

[dir="rtl"] .gd-pager .gd-flip {
    display: inline-block;
    transform: scaleX(-1);
}

@media (max-width: 991.98px) {
    .gd-nudge {
        flex-wrap: wrap;
        gap: 10px 12px;
        padding: 12px;
    }

    .gd-nudge__btn {
        width: 100%;
    }

    .gd-pager {
        flex-direction: column;
        padding: 12px 10px;
    }

    .gd-pager__nav {
        width: 100%;
        justify-content: space-between;
    }

    .gd-pager__btn span {
        display: none;
    }
}
