/* =====================================
   LLC — EXPLORE GARAGES
   Explore-only styles. Load AFTER home.css,
   which provides the shared shell: sidebar,
   top bar, mobile nav, buttons, empty state.
===================================== */

.accent-dot {
    color: var(--violet);
}

.explore-container {
    max-width: 1180px;
    margin: 0 auto;
    padding-top: 32px;
}

@keyframes explore-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

@keyframes heart-pop {
    0% {
        transform: scale(0.7);
    }

    100% {
        transform: scale(1);
    }
}

/* =====================================
   HERO + SEARCH
===================================== */

.explore-hero {
    position: relative;
    isolation: isolate;
    padding: 46px 46px 38px;
    overflow: hidden;
    background: linear-gradient(150deg, #4b2579 0%, #7447a8 55%, #9a6fd0 100%);
    border-radius: 22px;
    box-shadow: 0 16px 44px rgba(90, 47, 141, 0.28);
    color: #fff;
}

/* Faint grid texture fading out from the top-right corner */
.explore-hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 38px 38px;
    content: "";
    -webkit-mask-image: radial-gradient(ellipse at top right, #000, transparent 72%);
    mask-image: radial-gradient(ellipse at top right, #000, transparent 72%);
    pointer-events: none;
}

/* Rings, like the welcome panel on the home page */
.explore-hero::after {
    position: absolute;
    top: -130px;
    right: -100px;
    z-index: -1;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    box-shadow: 0 0 0 48px rgba(255, 255, 255, 0.035), 0 0 0 96px rgba(255, 255, 255, 0.025);
    content: "";
    pointer-events: none;
}

.explore-hero .eyebrow {
    color: rgba(255, 255, 255, 0.78);
}

.explore-hero h2 {
    margin: 0 0 14px;
    font-size: clamp(32px, 4.4vw, 54px);
    font-weight: 850;
    letter-spacing: -1.6px;
    line-height: 1.05;
}

.hero-accent {
    color: #dcc6f7;
}

.hero-copy {
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 16.5px;
    line-height: 1.6;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 700px;
    margin-top: 28px;
    padding: 7px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(20, 8, 40, 0.28);
    transition: box-shadow 200ms ease;
}

.search-form:focus-within {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 10px 30px rgba(20, 8, 40, 0.28);
}

.search-icon {
    display: grid;
    place-items: center;
    padding-left: 12px;
    color: var(--muted);
}

.search-icon .icon {
    width: 20px;
    height: 20px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 6px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    border: 0;
    outline: none;
}

.search-form input::placeholder {
    color: #a9a6b3;
}

.clear-search {
    flex-shrink: 0;
    padding: 0 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.clear-search:hover {
    color: var(--violet);
}

.search-form button {
    flex-shrink: 0;
    height: 46px;
    padding: 0 26px;
    background: var(--violet-gradient);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}

.search-form button:hover {
    filter: brightness(1.08);
}

.search-form button:active {
    transform: scale(0.97);
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.quick-tags-label {
    margin-right: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.quick-tags a {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.quick-tags a:hover {
    background: #fff;
    color: var(--violet-dark);
    transform: translateY(-1px);
}

.results-count {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
    padding: 7px 14px;
    background: rgba(12, 5, 24, 0.25);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    border-radius: 999px;
}

/* =====================================
   RESULTS HEADING
===================================== */

.garage-results {
    padding-top: 44px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 0 2px 20px;
}

.section-heading .eyebrow {
    margin-bottom: 4px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 2.6vw, 30px);
    font-weight: 800;
    letter-spacing: -0.7px;
}

.sort-pill {
    padding: 6px 12px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 1px;
    white-space: nowrap;
    border: 1px solid var(--border);
    border-radius: 999px;
}

/* =====================================
   BUILD CARDS
===================================== */

.garage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 24px;
}

.garage-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
    animation: explore-in 520ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.garage-card:nth-child(2) {
    animation-delay: 60ms;
}

.garage-card:nth-child(3) {
    animation-delay: 120ms;
}

.garage-card:nth-child(4) {
    animation-delay: 180ms;
}

.garage-card:nth-child(5) {
    animation-delay: 240ms;
}

.garage-card:nth-child(6) {
    animation-delay: 300ms;
}

/* Accent line that sweeps across the top on hover */
.garage-card::before {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 3;
    height: 3px;
    background: linear-gradient(90deg, #6a3d9f, #b48be6, #8553be);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
    pointer-events: none;
}

.garage-card:hover {
    border-color: var(--violet-border);
    box-shadow: 0 2px 6px rgba(30, 20, 45, 0.05), 0 18px 44px rgba(116, 70, 168, 0.16);
}

.garage-card:hover::before {
    transform: scaleX(1);
}

@media (hover: hover) {
    .garage-card:hover {
        transform: translateY(-4px);
    }
}

/* Photo with depth + viewfinder corners */

.car-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #16141a;
}

.car-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.garage-card:hover .car-image img {
    transform: scale(1.045);
}

.car-image::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(12, 6, 22, 0.45), transparent 46%);
    content: "";
    pointer-events: none;
}

.car-image::before {
    --c: rgba(255, 255, 255, 0.92);
    --l: 22px;
    --t: 2px;
    position: absolute;
    inset: 14px;
    z-index: 2;
    background:
        linear-gradient(var(--c), var(--c)) left top / var(--l) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) left top / var(--t) var(--l) no-repeat,
        linear-gradient(var(--c), var(--c)) right top / var(--l) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) right top / var(--t) var(--l) no-repeat,
        linear-gradient(var(--c), var(--c)) left bottom / var(--l) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) left bottom / var(--t) var(--l) no-repeat,
        linear-gradient(var(--c), var(--c)) right bottom / var(--l) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) right bottom / var(--t) var(--l) no-repeat;
    content: "";
    opacity: 0;
    transition: opacity 280ms ease, inset 280ms ease;
    pointer-events: none;
}

.garage-card:hover .car-image::before {
    inset: 20px;
    opacity: 1;
}

.view-label {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 3;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--violet-dark);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.1px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(20, 8, 40, 0.25);
    transition: opacity 220ms ease, transform 220ms ease;
}

/* On devices with hover, reveal the label only on hover */
@media (hover: hover) {
    .view-label {
        opacity: 0;
        transform: translateY(6px);
    }

    .garage-card:hover .view-label {
        opacity: 1;
        transform: none;
    }
}

/* Info */

.car-info {
    padding: 18px 20px 18px;
}

.car-description {
    display: -webkit-box;
    min-height: 3em;
    margin: 0 0 18px;
    padding-left: 14px;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 14.5px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-line;
    border-left: 2px solid var(--violet-border);
    transition: border-color 250ms ease;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.garage-card:hover .car-description {
    border-left-color: var(--violet);
}

.car-owner {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-top: 15px;
    border-top: 1px solid var(--border-soft);
}

.owner-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    object-fit: cover;
    background: var(--violet-light);
    border: 2px solid transparent;
    border-radius: 50%;
}

/* Gradient ring, matching the post avatars */
img.owner-avatar {
    background:
        linear-gradient(var(--violet-light), var(--violet-light)) padding-box,
        var(--violet-gradient) border-box;
}

.owner-initial {
    display: grid;
    place-items: center;
    color: var(--violet);
    font-size: 15px;
    font-weight: 800;
    background:
        linear-gradient(145deg, #f8f3fd, #e6d8f5) padding-box,
        var(--violet-gradient) border-box;
}

.owner-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.owner-details strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.owner-details small {
    overflow: hidden;
    color: var(--muted);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Like button — keeps the hooks explore.js uses */

.garage-like-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    background: #fff;
    color: var(--ink-soft);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.garage-like-button:hover {
    background: var(--violet-light);
    color: var(--violet);
    border-color: var(--violet-border);
}

.garage-like-button:active {
    transform: scale(0.95);
}

.garage-like-button[data-liked="true"] {
    background: var(--violet-light);
    color: var(--violet);
    border-color: var(--violet-border);
}

.garage-like-button[data-liked="true"] .like-icon {
    animation: heart-pop 320ms cubic-bezier(0.3, 1.6, 0.5, 1);
}

.garage-like-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.like-icon {
    font-size: 17px;
    line-height: 1;
}

.like-count {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

/* =====================================
   PAGINATION
===================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 44px;
}

.pagination a {
    padding: 10px 18px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.pagination a:hover {
    background: var(--violet-light);
    color: var(--violet);
    border-color: var(--violet-border);
    transform: translateY(-1px);
}

.page-status {
    padding: 0 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

/* =====================================
   RESPONSIVE
===================================== */

@media (max-width: 650px) {
    .explore-container {
        padding: 6px 12px 0;
    }

    .explore-hero {
        padding: 28px 20px 24px;
        border-radius: 18px;
    }

    .explore-hero h2 {
        font-size: 30px;
        letter-spacing: -1px;
    }

    .hero-copy {
        font-size: 15px;
    }

    .search-form {
        flex-wrap: wrap;
        margin-top: 22px;
        padding: 6px;
    }

    .search-form input {
        flex: 1 1 140px;
    }

    .search-form button {
        flex: 1 1 100%;
    }

    .quick-tags {
        flex-wrap: nowrap;
        margin-right: -20px;
        padding-right: 20px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .quick-tags::-webkit-scrollbar {
        display: none;
    }

    .quick-tags a {
        flex-shrink: 0;
    }

    .garage-results {
        padding-top: 32px;
    }

    .section-heading {
        margin-right: 4px;
        margin-left: 4px;
    }

    .garage-grid {
        gap: 16px;
    }

    .garage-card:hover {
        transform: none;
    }

    .car-info {
        padding: 16px 16px 16px;
    }
}