/* Home page vehicle finder (Storefront module).
   Everything is scoped under .pp-hero / .pp-finder so the Bootstrap 3 theme cannot restyle it. */

.pp-hero { position: relative; margin: 0 0 24px; }

/* Stand-in until the CI3 slider is ported: the slider replaces the background of this block. */
.pp-hero__slider { min-height: 440px; border-radius: 12px; overflow: hidden; background: #262b31; }

.pp-finder {
    --pp-accent: #e95101;       /* brand orange: focus ring, markers, hover borders */
    --pp-accent-dark: #c44400;  /* same hue, 5:1 contrast on white: buttons, links, active chip */
    --pp-ink: #1f2933;
    --pp-muted: #66707a;
    --pp-line: #d5dae0;

    position: absolute;
    z-index: 20;
    top: 24px;
    nav-right: 24px;
    width: 360px;
    max-width: calc(100% - 48px);
    padding: 20px 20px 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(16, 24, 40, .30);
    color: var(--pp-ink);
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}

.pp-finder *, .pp-finder *::before, .pp-finder *::after { box-sizing: border-box; }

.pp-finder .pp-finder__title { margin: 0 0 2px; font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--pp-ink); }
.pp-finder .pp-finder__sub { margin: 0 0 14px; color: var(--pp-muted); }

/* Popular makes: one scrolling row, bleeding to the card edges */
.pp-finder .pp-finder__chips {
    display: flex;
    gap: 8px;
    margin: 0 -20px 14px;
    padding: 2px 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.pp-finder .pp-finder__chips::-webkit-scrollbar { display: none; }

.pp-finder .pp-finder__chip {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--pp-line);
    border-radius: 16px;
    background: #fff;
    color: var(--pp-ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.pp-finder .pp-finder__chip:hover { border-color: var(--pp-accent); }
.pp-finder .pp-finder__chip.is-on { background: var(--pp-accent-dark); border-color: var(--pp-accent-dark); color: #fff; }

/*.pp-finder .pp-finder__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }*/
.pp-finder .pp-finder__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
/*.pp-finder .pp-finder__field { display: block; margin: 0; font-weight: 400; } */
.pp-finder .pp-finder__field { display: block; min-width: 0; margin: 0; font-weight: 400; }
.pp-finder .pp-finder__field--wide { grid-column: 1 / -1; }
.pp-finder .pp-finder__label { display: block; margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--pp-muted); }

.pp-finder .pp-finder__select {
    display: block;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 36px 0 12px;
    border: 1px solid var(--pp-line);
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366707a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
    box-shadow: none;
    color: var(--pp-ink);
    font: inherit;
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.pp-finder .pp-finder__select:focus { border-color: var(--pp-accent); }
.pp-finder .pp-finder__select:disabled { background-color: #f3f4f6; color: #8a949e; cursor: not-allowed; }

.pp-finder .pp-finder__select:focus-visible,
.pp-finder .pp-finder__chip:focus-visible,
.pp-finder .pp-finder__submit:focus-visible,
.pp-finder .pp-finder__more summary:focus-visible { outline: 2px solid var(--pp-accent); outline-offset: 2px; }

.pp-finder .pp-finder__more { margin: 12px 0 0; }
.pp-finder .pp-finder__more summary { padding: 2px 0; list-style: none; color: var(--pp-muted); font-weight: 600; cursor: pointer; }
.pp-finder .pp-finder__more summary::-webkit-details-marker { display: none; }
.pp-finder .pp-finder__more summary::before { content: '+'; display: inline-block; width: 16px; color: var(--pp-accent); font-weight: 700; }
.pp-finder .pp-finder__more[open] summary::before { content: '\2212'; }
.pp-finder .pp-finder__more .pp-finder__grid { margin-top: 10px; }

.pp-finder .pp-finder__year { margin-top: 12px; }

/* The count lives in the button: "Show 38 parts" */
.pp-finder .pp-finder__submit {
    display: block;
    width: 100%;
    height: 46px;
    margin: 16px 0 0;
    border: 0;
    border-radius: 8px;
    background: var(--pp-accent-dark);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s;
}
.pp-finder .pp-finder__submit:hover:not(:disabled) { background: #a83a00; }
.pp-finder .pp-finder__submit:disabled { background: #c9ced4; color: #4b5560; cursor: not-allowed; }
.pp-finder.is-loading .pp-finder__submit { opacity: .8; }

.pp-finder .pp-finder__status { margin: 8px 0 0; color: #b42318; font-weight: 600; }
.pp-finder .pp-finder__status[hidden] { display: none; }
.pp-finder .pp-finder__hint { margin: 10px 0 0; color: var(--pp-muted); font-size: 13px; }
.pp-finder .pp-finder__hint a { color: var(--pp-accent-dark); font-weight: 600; text-decoration: underline; }

/* Tablet and phone: the card drops onto the bottom edge of the slider instead of covering it */
@media (max-width: 991px) {
    .pp-hero__slider { min-height: 260px; }
    .pp-finder { position: relative; top: auto; right: auto; width: auto; max-width: none; margin: -56px 12px 0; }
    /*.pp-finder { position: relative; top: auto; left: auto; width: auto; max-width: none; margin: -56px 12px 0; }*/
}

@media (max-width: 480px) {
    .pp-finder { padding: 16px 16px 14px; }
    .pp-finder .pp-finder__chips { margin: 0 -16px 12px; padding: 2px 16px; }

    /* One column: Make, Model, Year (and Fuel, Engine) each get a full row */
    .pp-finder .pp-finder__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .pp-finder *, .pp-finder *::before, .pp-finder *::after { transition: none !important; }
}
