/* Mechanic Partners pages - /mechanics/ and /mechanics/<slug>/
   Uses the same brand colours as the rest of the site (see
   website/templates/website/parts/_header.html / _footer.html):
   navy #10385b, gold #f8ac30. Kept in its own file so it's a clean,
   reviewable diff - nothing here touches services.css. */

:root {
    --lc-navy: #10385b;
    --lc-gold: #f8ac30;
    --lc-gold-hover: #f0a020;
}

/* ---------- Hero / intro ---------- */
.partners-hero {
    background: var(--lc-navy);
    color: #fff;
    padding: 56px 0 40px;
    text-align: center;
}

.partners-hero .own-business-title {
    color: #fff;
}

.partners-hero__sub {
    max-width: 640px;
    margin: 16px auto 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 16px;
    line-height: 1.6;
}

/* ---------- List page ---------- */
.partners-list-section {
    padding: 48px 0 64px;
}

.partner-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.partner-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e6e9ee;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(16, 56, 91, 0.06);
    transition: box-shadow 0.15s, transform 0.15s;
}

.partner-card:hover {
    box-shadow: 0 8px 24px rgba(16, 56, 91, 0.12);
    transform: translateY(-2px);
}

.partner-card__media {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f4f6f8;
    overflow: hidden;
}

.partner-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Google photos carousel - native horizontal scroll with snap, so swiping
   works on mobile without a library. partners.js only syncs the dots. */
.partner-carousel {
    position: relative;
}

/* The detail hero only caps its height, so give the carousel a real one
   for the track's height: 100% to resolve against. */
.partner-detail-hero__media.partner-carousel {
    height: 360px;
}

.partner-carousel__track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    cursor: pointer;
}

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

.partner-carousel__slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    margin: 0;
    scroll-snap-align: start;
}

.partner-carousel__credit {
    position: absolute;
    right: 8px;
    bottom: 6px;
    max-width: 70%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #fff;
    font-size: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.partner-carousel__dots {
    position: absolute;
    left: 12px;
    bottom: 10px;
    display: flex;
    gap: 6px;
    pointer-events: none;
}

.partner-carousel__dot {
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.15s, width 0.15s;
}

.partner-carousel__dot.is-active {
    width: 22px;
    background: #fff;
}

.partner-card__body {
    padding: 18px 20px 4px;
    flex: 1;
}

.partner-card__name {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 800;
}

.partner-card__name a {
    color: var(--lc-navy);
    text-decoration: none;
}

.partner-card__name a:hover {
    text-decoration: underline;
}

.partner-card__address {
    margin: 0;
    color: #5b6b7a;
    font-size: 14px;
    line-height: 1.5;
}

.partner-card__toggle {
    margin-top: 10px;
    background: none;
    border: none;
    padding: 0;
    color: var(--lc-navy);
    font-weight: 700;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.partner-card__more {
    margin: 10px 0 0;
    color: #33414d;
    font-size: 14px;
    line-height: 1.55;
}

.partner-card__actions {
    padding: 16px 20px 20px;
}

.partner-card__book-btn,
.partner-detail-hero__book-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--lc-gold);
    color: var(--lc-navy);
    font-weight: 800;
    font-size: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
}

.partner-card__book-btn:hover,
.partner-detail-hero__book-btn:hover {
    background: var(--lc-gold-hover);
    color: var(--lc-navy);
}

.partners-empty {
    text-align: center;
    color: #5b6b7a;
    padding: 48px 0;
}

/* ---------- Detail page ---------- */
.partner-detail-hero {
    position: relative;
    background: var(--lc-navy);
    color: #fff;
}

.partner-detail-hero__media {
    width: 100%;
    max-height: 360px;
    overflow: hidden;
}

.partner-detail-hero__media img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
    opacity: 0.85;
}

.partner-detail-hero__content {
    padding: 28px 0 40px;
}

.partner-detail-hero__name {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 900;
}

.partner-detail-hero__rating {
    margin: 0 0 8px;
    color: var(--lc-gold);
    font-weight: 700;
}

.partner-detail-hero__address {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.75);
}

.partner-detail-hero__book-btn {
    display: inline-block;
    width: auto;
    min-width: 220px;
    padding: 14px 28px;
    font-size: 16px;
}

.partner-detail-book {
    /* keep the picker clear of the sticky site header after #book jumps */
    scroll-margin-top: 96px;
}

.partner-detail-book__label {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* One service per line, chips at their natural width */
.partner-detail-book__options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

/* Service chips - real radio inputs, visually hidden, so keyboard and
   screen readers get a normal radio group. */
.partner-detail-book__option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.partner-detail-book__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.partner-detail-book__option span {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.partner-detail-book__option:hover span {
    border-color: #fff;
}

.partner-detail-book__option input:checked + span {
    background: var(--lc-gold);
    border-color: var(--lc-gold);
    color: var(--lc-navy);
}

.partner-detail-book__option input:focus-visible + span {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.partner-detail-body {
    padding: 40px 0 96px;
}

.partner-detail-body__heading {
    font-size: 22px;
    font-weight: 800;
    color: var(--lc-navy);
    margin: 0 0 12px;
}

.partner-detail-body__desc {
    font-size: 16px;
    line-height: 1.7;
    color: #33414d;
    max-width: 720px;
}

.partner-detail-body__back {
    display: inline-block;
    margin-top: 28px;
    color: var(--lc-navy);
    font-weight: 700;
    text-decoration: none;
}

.partner-detail-body__back:hover {
    text-decoration: underline;
}

/* ---------- Sticky mobile "Book now" bar ----------
   Hidden on desktop (the hero button is already prominent there).
   On mobile this is the whole point of the page - the ticket specifically
   asked for the mobile book button to be much more visible than AutoGuru's,
   so it's pinned full-width to the bottom of the screen at all times. */
.partner-mobile-book-bar {
    display: none;
}

@media (max-width: 768px) {
    .partner-detail-hero__book-btn {
        display: none;
    }

    .partner-mobile-book-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 500;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: #fff;
        box-shadow: 0 -4px 16px rgba(16, 56, 91, 0.18);
    }

    .partner-mobile-book-bar__btn {
        display: block;
        width: 100%;
        text-align: center;
        background: var(--lc-gold);
        color: var(--lc-navy);
        font-weight: 800;
        font-size: 17px;
        padding: 16px;
        border-radius: 10px;
        text-decoration: none;
    }

    /* Keep the sticky bar from covering the bottom of the page content */
    .partner-detail-body {
        padding-bottom: 120px;
    }
}
