/*
 * WEBDEV-2576 - Condensed listing rows (/parts-condensed). Type sizes stepped up one notch on 2026-11-17 (WEBDEV-2643).
 *
 * Loaded after listing-ui-redesign.css on parts/condensed/index.blade.php only. Every selector is scoped
 * under .listing-condensed so nothing reaches /parts. listing-ui-redesign.css (card rules 962-1031, chips
 * 1114-1154, comments 1156-1232, dropdowns 1234-1270, <1024 block 2112+) and part-listing.css use
 * !important on the rules overridden here, so these do too, with higher specificity where the originals
 * already carry .listing-page-redesign or .part-card.
 *
 * Target: 8 rows at 1280x1000. One row is 84px + 8px gap; chrome above the list is trimmed by 36px.
 */

/* ------------------------------------------------------------------ */
/* Chrome: markup is the /parts copy; only vertical padding is trimmed */
/* ------------------------------------------------------------------ */
.listing-condensed .listing-topbar { padding: 10px 24px 10px !important; }
.listing-condensed .listing-recents { min-height: 40px !important; padding: 4px 25px !important; }
.listing-condensed .listing-heading { min-height: 48px !important; padding: 7px 28px !important; }
.listing-condensed #parts-list { padding-top: 6px; }
.listing-condensed #parts-list > .part-card { margin-left: 28px !important; margin-right: 28px !important; width: auto !important; max-width: none !important; }
/* Grouped (yard) lists and "other yards" already inset their cards through container padding. */
.listing-condensed .parts-group-cards { padding: 8px 28px 4px !important; }
.listing-condensed .parts-group-cards > .part-card,
.listing-condensed #other-yards-parts > .part-card { margin-top: 0 !important; margin-left: 0 !important; margin-right: 0 !important; width: 100% !important; max-width: 100% !important; }

/* ------------------------------------------------------------------ */
/* Row                                                                 */
/* ------------------------------------------------------------------ */
.listing-condensed .part-card,
.listing-condensed .part-card.has-redesign-layout {
    display: grid !important;
    grid-template-columns: auto minmax(240px, 1fr) 156px 160px 150px;
    grid-template-areas: none;
    column-gap: 10px;
    row-gap: 0;
    align-items: center;
    height: auto !important;
    min-height: 92px !important;
    padding: 6px 12px !important;
    border: 1px solid #dfe5e7 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(25, 40, 50, 0.05) !important;
    background: #fff !important;
    margin-bottom: 8px !important;
    overflow: visible !important;
    position: relative;
    box-sizing: border-box;
}
.listing-condensed .part-card:hover,
.listing-condensed .part-card.has-redesign-layout:hover { box-shadow: 0 4px 12px rgba(25, 40, 50, 0.09) !important; border-color: #cfd8db !important; }

/* Thumb: first image only, lightbox link kept */
/* The photo is a square as tall as the text column (title top to pills bottom): part-listing-condensed.js
   sets the cell's width and height on render and resize. Until it runs the cell is a 72px square. */
.listing-condensed .part-card .part-card-image { width: 72px !important; max-width: none; height: 72px; min-width: 0; align-self: center; display: block; }
.listing-condensed .part-card .part-card-image .image-gallery { display: block; width: 100%; height: 100%; }
.listing-condensed .part-card .part-card-image .main-image {
    width: 100% !important; height: 100% !important; min-height: 0 !important;
    border: 0 !important; border-radius: 8px !important; box-shadow: none !important; overflow: hidden; position: relative;
    background: linear-gradient(135deg, #eef2f3 0%, #b9c0c5 48%, #dfe3e4 100%) !important;
    display: grid !important; place-items: center; margin: 0 !important;
}
.listing-condensed .part-card .part-card-image .main-image a { display: block; width: 100%; height: 100%; }
.listing-condensed .part-card .part-card-image .main-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px !important; }
.listing-condensed .part-card .part-card-image .main-image:hover img { transform: none; }
.listing-condensed .part-card .part-card-image .main-image.aps-main-unavailable { font-family: var(--listing-font-body); font-size: 10px; font-weight: 500; line-height: 1.2; color: #6b7780; text-align: center; padding: 0 6px; cursor: default; }
.listing-condensed .part-card .photo-count-badge,
.listing-condensed .part-card .image-thumbnails,
.listing-condensed .part-card .stock-video,
.listing-condensed .part-card .youtube-link-below-gallery { display: none !important; }

/* Title / yard / comments */
.listing-condensed .part-card .part-card-details { min-width: 0; width: auto !important; max-width: 100%; }
.listing-condensed .part-card .part-card-details .part-item-name-link { text-decoration: none; display: block; min-width: 0; }
.listing-condensed .part-card .part-card-details h3,
.listing-condensed .part-card .part-card-details .part-item-name-link h3 {
    font-family: var(--listing-font-display); font-size: 18px !important; font-weight: 900 !important; line-height: 1.2 !important;
    letter-spacing: 0; color: #004d4f !important; -webkit-text-fill-color: #004d4f !important; margin: 0 !important;
    /* The full year / make / model / part name always shows; the row grows by a line when it wraps. */
    white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
}
.listing-condensed .part-card .part-card-details .part-item-name-link:hover h3 { color: #0b8e81 !important; -webkit-text-fill-color: #0b8e81 !important; text-decoration: underline; }
.listing-condensed .part-card .part-card-place { font-size: 12.5px; line-height: 1.25; color: #687481; margin: 2px 0 0 !important; display: flex; align-items: center; gap: 5px !important; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; min-width: 0; }
.listing-condensed .part-card .part-card-place > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.listing-condensed .part-card .part-card-place .part-card-location-rating { flex: none; display: inline-flex; align-items: center; margin-left: 2px; line-height: 1; }
.listing-condensed .part-card .part-card-place i,
.listing-condensed .part-card .part-card-place .fa-map-marker-alt { font-size: 11.5px; color: #687481; flex: none; }
.listing-condensed .part-card .part-card-place__dot { font-size: 12.5px !important; line-height: inherit !important; color: #a9b3ba; margin: 0 2px; }
.listing-condensed .part-card .part-card-place__distance { font-size: 12.5px !important; line-height: inherit !important; color: #09998D !important; font-weight: 800 !important; }
.listing-condensed .part-card .part-card-comments__line {
    display: flex !important; flex-direction: row !important; align-items: center !important; gap: 6px !important;
    margin: 3px 0 0 !important; padding: 0 !important; width: auto !important; max-width: 100% !important; min-width: 0;
    font-size: 13.5px !important; font-weight: 600 !important; line-height: 1.25 !important; color: #1f2937 !important;
    flex-wrap: nowrap !important; overflow: visible !important;
}
.listing-condensed .part-card .part-card-comments__line > span {
    display: block !important; flex: 1 1 auto; width: auto !important; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
    font-size: 13.5px !important; font-weight: 600 !important; line-height: 1.25 !important; color: #1f2937 !important;
}
/* Comment line: one clipped line. When it is clipped the row gets .is-clipped (part-listing-condensed.js),
   which shows the "Read more" link; hover shows the full text, click opens #part-comment-modal. */
.listing-condensed .part-card .part-card-comments__line .read-full-comment { display: none !important; }
.listing-condensed .part-card .part-card-comments__line.is-clipped > span { cursor: pointer; }
.listing-condensed .part-card .part-card-comments__line.is-clipped .read-full-comment {
    display: inline-block !important; flex: none; position: static !important; width: auto !important; margin: 0 !important; padding: 0 !important;
    font-size: 12px !important; font-weight: 800 !important; line-height: 1.25 !important; letter-spacing: 0.2px; text-transform: uppercase;
    color: #0b8e81 !important; text-decoration: none !important; white-space: nowrap; cursor: pointer;
}
.listing-condensed .part-card .part-card-comments__line.is-clipped .read-full-comment:hover { text-decoration: underline !important; }
.listing-condensed .part-card .part-card-comments__line .absolute { white-space: normal; width: max-content; max-width: 24rem; font-weight: 500 !important; }
/* Full comment modal (sits outside <section class="listing-condensed">, so not scoped under it) */
#part-comment-modal .part-comment-modal__body { font-size: 14px !important; line-height: 1.5 !important; color: #1f2937 !important; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
/* "Questions?" shrunk to a 22px icon button; attributes identical to the full card */
.listing-condensed .part-card .question-btn.listing-question-btn {
    position: static !important; flex: none; width: 24px !important; height: 24px !important; min-height: 0 !important; padding: 0 !important;
    border: 1px solid #e0e4e6 !important; border-radius: 50% !important; background: #fff !important; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
    color: var(--listing-text) !important; font-family: var(--listing-font-display); font-size: 12px !important; font-weight: 900 !important;
    line-height: 22px !important; text-align: center; cursor: pointer; margin: 0 !important; display: inline-block !important; float: none !important;
}
.listing-condensed .part-card .question-btn.listing-question-btn:hover { border-color: #0b8e81 !important; color: #0b8e81 !important; }

/* Grade / Status / Color / Stock# / Mileage as compact pills under the comment line. Fixed grid columns
   (three then two below 1680, one row of five above) so a value reads straight down the page. The second
   column is wide enough for the Mileage pill, which sits under Status on the second line. */
.listing-condensed .part-card .part-card-details .part-card-tags {
    display: grid !important; grid-template-columns: 140px 146px minmax(0, max-content); justify-content: start; gap: 3px 6px !important; align-items: center;
    margin: 4px 0 0 !important; min-width: 0; width: 100% !important; max-width: 100%;
}
.listing-condensed .part-card .part-card-tag {
    height: 26px !important; min-height: 0 !important; border: 1px solid #dfe4e8 !important; border-radius: 13px !important; padding: 0 10px !important;
    display: inline-flex !important; align-items: center; gap: 5px !important; font-size: 13px !important; line-height: 24px !important; font-weight: 500;
    color: #7a858e; background: #f3f6f8 !important; white-space: nowrap; max-width: 100%; overflow: hidden; box-sizing: border-box; flex: 0 0 auto;
    /* Same width for every pill in a column, so the values read straight down the page */
    width: 100%;
}
.listing-condensed .part-card .part-card-tag .part-card-tag__label { flex: none; }
.listing-condensed .part-card .part-card-details .part-type-inventory-note {
    margin: 4px 0 0 !important; padding: 3px 6px !important; gap: 5px !important; border-radius: 6px !important; width: 100%; max-width: 100%; box-sizing: border-box; align-items: center;
}
.listing-condensed .part-card .part-card-details .part-type-inventory-note__icon { width: 12px !important; height: 12px !important; font-size: 9px !important; }
.listing-condensed .part-card .part-card-details .part-type-inventory-note__text { font-size: 11.5px !important; line-height: 1.25 !important; margin: 0 !important; }
.listing-condensed .part-card .part-card-tag .part-card-tag__label { font-size: 13px !important; color: #7a858e !important; font-weight: 500 !important; }
.listing-condensed .part-card .part-card-tag .part-card-tag__value,
.listing-condensed .part-card .part-card-tag b { font-size: 13px !important; font-weight: 800 !important; color: #1a2433 !important; overflow: hidden; text-overflow: ellipsis; }

/* Warranty (28px) over the estimated delivery line in one 150px column. The Fitment select stays in the
   markup but is hidden: the global fitment picker (banner / Fitments panel) still fills it and Add to Quote
   still waits for it, so the shared JS is unchanged. */
.listing-condensed .part-card .part-card-controls,
.listing-condensed .part-card .part-card-controls.part-card-controls-row {
    display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 6px !important;
    min-width: 0; width: 100%; margin: 0 !important; padding: 0 !important; background: transparent !important; border-radius: 0 !important; box-shadow: none !important;
}
.listing-condensed .part-card .part-card-controls .part-card-controls-col--fitment { display: none !important; }
/* The expanded card's fulfillment footer, compacted: label + status badge on one line, date under it. */
.listing-condensed .part-card .part-card-controls .part-card-controls-col--delivery { display: block; height: auto; min-height: 0; padding: 0 2px !important; font-size: 12.5px !important; line-height: 1.25 !important; min-width: 0; overflow: hidden; }
.listing-condensed .part-card .part-card-controls .part-card-controls-col--delivery:empty { display: none; }
.listing-condensed .part-card .part-card-controls-col--delivery .part-fulfillment-block--shipping-only > .min-w-0 > p,
.listing-condensed .part-card .part-card-controls-col--delivery .part-fulfillment-block--pickup-only > .min-w-0 > p { display: none !important; }
.listing-condensed .part-card .part-card-controls-col--delivery [class*="space-y"] > * + * { margin-top: 2px !important; }
.listing-condensed .part-card .part-card-controls-col--delivery .delivery-card__text > .flex,
.listing-condensed .part-card .part-card-controls-col--delivery .js-fulfillment-footer-delivery.flex { display: flex !important; flex-wrap: wrap !important; align-items: center; gap: 2px 4px !important; min-width: 0; }
.listing-condensed .part-card .part-card-controls-col--delivery .delivery-card__label { flex: none; font-size: 11.5px !important; font-weight: 800 !important; letter-spacing: 0.2px; text-transform: uppercase; color: #7a858e !important; line-height: 1.2 !important; }
.listing-condensed .part-card .part-card-controls-col--delivery .fulfillment-status-badge {
    display: inline-flex !important; align-items: center; flex: 0 1 auto; min-width: 0; max-width: 100%; height: 16px; padding: 0 7px !important; border: 0 !important; border-radius: 8px !important;
    background: #d8f7ef !important; color: #0d887d !important; font-size: 10.5px !important; font-weight: 800 !important; line-height: 16px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin: 0 !important; justify-content: flex-start !important; text-align: left !important;
}
.listing-condensed .part-card .part-card-controls-col--delivery .delivery-card__date { display: block; margin: 1px 0 0 !important; font-size: 13px !important; font-weight: 800 !important; color: #185c60 !important; line-height: 1.25 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-condensed .part-card .part-card-controls .part-card-controls-col { display: block; min-width: 0; width: 100% !important; max-width: 100%; margin: 0 !important; padding: 0 !important; position: relative; }
.listing-condensed .part-card .part-card-controls .part-card-controls-col:empty { display: block; height: 32px; }
/* Labels stay in the DOM for the shared JS but are visually hidden; the selects carry title + aria-label. */
.listing-condensed .part-card .part-card-controls .dd-label { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; display: block !important; }
.listing-condensed .part-card .part-card-controls select,
.listing-condensed .part-card .part-card-controls select.dd.fitment-select,
.listing-condensed .part-card .part-card-controls select.dd.warranty-select {
    display: block !important; box-sizing: border-box; width: 100% !important; max-width: 100%;
    height: 32px !important; min-height: 32px !important; padding: 0 24px 0 9px !important; margin: 0 !important;
    border: 1px solid #dfe5e7 !important; border-radius: 7px !important; background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2399A1AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 7px center !important; background-size: 14px 14px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important; font-family: var(--listing-font-body); font-size: 13px !important; font-weight: 600 !important; line-height: 30px !important; color: #44505c !important;
    appearance: none !important; -webkit-appearance: none !important; -moz-appearance: none !important; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.listing-condensed .part-card .part-card-controls select:focus,
.listing-condensed .part-card .part-card-controls select.dd.fitment-select:focus,
.listing-condensed .part-card .part-card-controls select.dd.warranty-select:focus { outline: none; border-color: #0b8e81 !important; box-shadow: 0 0 0 2px rgba(11, 142, 129, 0.15) !important; }
.listing-condensed .part-card .fitment-readonly-text {
    display: block; box-sizing: border-box; height: 32px; line-height: 30px !important; padding: 0 9px; margin: 0;
    border: 1px solid #dfe4e8; border-radius: 7px; background: #f3f6f8; font-size: 13px !important; font-weight: 600; color: #44505c !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Price column */
.listing-condensed .part-card .part-card-price .part-card-fulfillment-slot { margin: 0 0 2px !important; line-height: 1; }
.listing-condensed .part-card .part-card-price .part-card-fulfillment-slot > span { font-size: 10.5px !important; font-weight: 800 !important; letter-spacing: 0.2px; padding: 0 6px !important; line-height: 14px !important; border-radius: 7px !important; }
.listing-condensed .part-card .part-card-price .part-card-promo { display: flex; align-items: center; gap: 4px !important; margin: 0 0 2px !important; min-width: 0; white-space: nowrap; }
.listing-condensed .part-card .part-card-price .part-card-promo__save { font-size: 11.5px !important; font-weight: 800 !important; color: #1a2433 !important; line-height: 14px; }
.listing-condensed .part-card .part-card-price .part-card-promo__pct { padding: 0 6px !important; border-radius: 7px !important; line-height: 14px; }
.listing-condensed .part-card .part-card-price .part-card-promo__pct span { font-size: 10.5px !important; font-weight: 800 !important; line-height: 14px !important; }
.listing-condensed .part-card .part-card-price { min-width: 0; }
.listing-condensed .part-card .part-card-price-label {
    font-family: var(--listing-font-display); font-size: 12.5px !important; font-weight: 900 !important; line-height: 1.2 !important; letter-spacing: 0.3px; text-transform: none;
    color: #74808a !important; padding: 0 !important; margin: 0 0 2px !important; white-space: normal;
}
.listing-condensed .part-card .part-card-price__row { display: flex !important; align-items: center; flex-wrap: nowrap; gap: 4px; min-width: 0; }
.listing-condensed .part-card .final-price-display,
.listing-condensed .part-card .price.final-price-display {
    font-family: var(--listing-font-display); font-size: 24px !important; font-weight: 900 !important; line-height: 1.1 !important;
    color: #185c60 !important; letter-spacing: -0.5px; white-space: nowrap; margin: 0 !important; padding: 0 !important;
}
/* Strike-through pre-discount price: hook kept for the shared price recalcs, not shown on the condensed row (Drop: discount badges). */
.listing-condensed .part-card .before-discount-price-display { display: none !important; }
.listing-condensed .part-card .price-breakdown-icon-wrapper { position: relative; display: inline-flex; align-items: center; overflow: visible; margin-left: 0 !important; }
.listing-condensed .part-card .price-breakdown-icon-wrapper .price-breakdown-icon,
.listing-condensed .part-card .price-breakdown-icon {
    width: 16px !important; height: 16px !important; min-width: 16px; border-radius: 50% !important; background: #fff !important; border: 1.25px solid #111827 !important;
    box-shadow: none !important; padding: 0 !important; margin: 0 0 0 3px !important; gap: 0 !important; display: inline-flex !important; align-items: center; justify-content: center;
    cursor: pointer; color: #111827 !important; position: relative; font-size: 10px !important; line-height: 1 !important;
}
.listing-condensed .part-card .price-breakdown-icon i,
.listing-condensed .part-card .price-breakdown-icon span:not(.sr-only) { display: none !important; }
.listing-condensed .part-card .price-breakdown-icon::after { content: "i"; font-family: var(--listing-font-body); font-size: 10px; font-weight: 700; font-style: normal; color: #111827; line-height: 1; }
.listing-condensed .part-card .price-breakdown-icon:hover { background: #f8fafc !important; transform: none; }
.listing-condensed .part-card .part-listing-part-price { display: block; font-size: 12.5px !important; color: #6b7780 !important; font-weight: 400 !important; line-height: 1.25; margin: 2px 0 0 !important; padding: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-condensed .part-card .part-listing-part-price .part-listing-part-price__value { color: #6b7780 !important; font-weight: 400 !important; font-size: 12.5px !important; }
/* Since WEBDEV-2442 moved the storefront from the Tailwind CDN to a compiled Tailwind v4 build, ".hidden" is
   emitted before ".inline-flex", so markup carrying both ("inline-flex ... hidden", e.g. the offer badge wrap)
   is visible. /parts has the same problem (WEBDEV-2640); this keeps the condensed row right until the build is fixed. */
.listing-condensed .part-card .hidden { display: none !important; }
.listing-condensed .part-card .part-listing-part-price .part-best-offer-badge-wrap { margin-left: 4px; vertical-align: middle; }
.listing-condensed .part-card .part-listing-part-price .part-best-offer-badge,
.listing-condensed .part-card .part-listing-part-price .part-offer-accepted-badge { font-size: 10.5px !important; font-weight: 800 !important; line-height: 16px !important; padding: 0 6px !important; }

/* Options / Add to Cart (Add to Quote for quote-only buyers) over Buy It Now */
.listing-condensed .part-card .part-card-actions { min-width: 0; display: flex !important; align-items: center !important; justify-content: flex-end; gap: 8px !important; margin: 0 !important; padding: 0 !important; }
.listing-condensed .part-card .part-card-actions .part-card-actions__buttons { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.listing-condensed .part-card .part-card-actions .group { position: relative; display: block !important; flex: 1 1 auto; width: auto; min-width: 0; }
.listing-condensed .part-card .part-card-actions .part-card-actions__buttons:has(.js-buy-it-now-btn) .add-to-cart-btn,
.listing-condensed .part-card .part-card-actions .part-card-actions__buttons:has(.js-buy-it-now-btn) .new-add-to-cart-button { height: 32px !important; font-size: 12.5px !important; border-radius: 8px !important; }
.listing-condensed .part-card .part-card-actions .js-buy-it-now-btn,
.listing-condensed .part-card .part-card-actions .js-buy-it-now-btn.new-add-to-cart-button { background: #145b60 !important; background-color: #145b60 !important; color: #fff !important; border-color: #145b60 !important; }
.listing-condensed .part-card .part-card-actions .js-buy-it-now-btn:hover { background: #0f4b4f !important; background-color: #0f4b4f !important; border-color: #0f4b4f !important; }
.listing-condensed .part-card .part-card-actions .js-buy-it-now-btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.listing-condensed .part-card .part-card-actions .add-to-cart-btn,
.listing-condensed .part-card .part-card-actions .new-add-to-cart-button {
    display: block !important; width: 100% !important; min-width: 0 !important; height: 36px !important; min-height: 0 !important;
    border-radius: 10px !important; background: #4de0ba !important; background-color: #4de0ba !important; color: #07585a !important; border: 1px solid #4de0ba !important;
    font-family: var(--listing-font-display); font-size: 13.5px !important; font-weight: 900 !important; line-height: 1 !important; letter-spacing: 0;
    padding: 0 10px !important; margin: 0 !important; cursor: pointer; white-space: nowrap; box-shadow: none !important; text-transform: none;
}
.listing-condensed .part-card .part-card-actions .add-to-cart-btn:hover { background: #3fd4ae !important; background-color: #3fd4ae !important; border-color: #3fd4ae !important; }
.listing-condensed .part-card .part-card-actions .add-to-cart-btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.listing-condensed .part-card .part-card-actions .js-fitment-tooltip { width: 14rem; }

/* ------------------------------------------------------------------ */
/* 768-1023: sidebar is a drawer, main column is full width            */
/* ------------------------------------------------------------------ */
@media (max-width: 1023px) {
    .listing-condensed #parts-list > .part-card { margin-left: 16px !important; margin-right: 16px !important; }
    .listing-condensed .parts-group-cards { padding: 8px 16px 4px !important; }
    .listing-condensed .part-card,
    .listing-condensed .part-card.has-redesign-layout { grid-template-columns: auto minmax(150px, 1fr) 156px 126px 136px; }
    .listing-condensed .part-card .part-card-details .part-card-tags { grid-template-columns: 140px minmax(0, max-content); }
}

/* ------------------------------------------------------------------ */
/* Below 768: thumb + text, then controls, then price + button         */
/* ------------------------------------------------------------------ */
@media (max-width: 767px) {
    .listing-condensed #parts-list > .part-card { margin-left: 12px !important; margin-right: 12px !important; }
    .listing-condensed .parts-group-cards { padding: 8px 12px 4px !important; }
    .listing-condensed .part-card,
    .listing-condensed .part-card.has-redesign-layout {
        /* Third column is auto so the price (col 1-2) never runs under the ? / Add to Quote buttons. */
        grid-template-columns: 72px minmax(0, 1fr) auto;
        grid-template-areas: "thumb text text" "controls controls controls" "price price actions";
        column-gap: 10px; row-gap: 8px; align-items: start;
        height: auto !important; min-height: 0 !important; padding: 10px !important;
    }
    .listing-condensed .part-card .part-card-image { grid-area: thumb; align-self: start; width: 72px !important; height: 72px !important; }
    .listing-condensed .part-card .part-card-details { grid-area: text; }
    .listing-condensed .part-card .part-card-details .part-card-tags { display: flex !important; flex-wrap: wrap !important; gap: 4px !important; }
    .listing-condensed .part-card .part-card-controls,
    .listing-condensed .part-card .part-card-controls.part-card-controls-row { grid-area: controls; flex-direction: row !important; flex-wrap: wrap !important; }
    .listing-condensed .part-card .part-card-tag { width: auto; }
    .listing-condensed .part-card .part-card-controls,
    .listing-condensed .part-card .part-card-controls.part-card-controls-row { align-items: center !important; }
    .listing-condensed .part-card .part-card-controls .part-card-controls-col { flex: 1 1 150px; width: auto !important; }
    .listing-condensed .part-card .part-card-price { grid-area: price; align-self: end; }
    .listing-condensed .part-card .part-card-actions { grid-area: actions; align-self: end; justify-self: end; }
    .listing-condensed .part-card .part-card-actions .group { flex: 0 0 auto; }
    .listing-condensed .part-card .part-card-price .final-price-display,
    .listing-condensed .part-card .part-card-price .price.final-price-display { white-space: nowrap; }
    .listing-condensed .part-card .part-card-actions .add-to-cart-btn,
    .listing-condensed .part-card .part-card-actions .new-add-to-cart-button { height: 36px !important; }
    .listing-condensed .part-card .part-card-actions .part-card-actions__buttons { flex-direction: row; gap: 6px; }
    .listing-condensed .part-card .part-card-actions .part-card-actions__buttons .group { flex: 1 1 auto; }
    .listing-condensed .part-card .part-card-comments__line .absolute { max-width: calc(100vw - 48px); }
    .listing-condensed .part-card .price-breakdown-tooltip { min-width: 0; width: calc(100vw - 48px); }
}

/* Fitment banner (first row on single-part-type searches): one line so it costs ~34px, not ~96px */
.listing-condensed #parts-list-fitment-banner,
.listing-condensed .parts-list-fitment-banner {
    padding: 4px 10px !important;
    margin-bottom: 6px !important;
    gap: 8px !important;
    border-radius: 8px !important;
}
.listing-condensed #parts-list-fitment-banner > span:first-child,
.listing-condensed .parts-list-fitment-banner > span:first-child {
    width: 20px !important; height: 20px !important; font-size: 12px !important;
}
.listing-condensed #parts-list-fitment-banner .flex-1,
.listing-condensed .parts-list-fitment-banner .flex-1 {
    display: flex !important; align-items: baseline; gap: 8px; min-width: 0;
}
.listing-condensed #parts-list-fitment-banner .flex-1 > div,
.listing-condensed .parts-list-fitment-banner .flex-1 > div {
    margin-top: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ */
/* Wide screens (1680px+): one line per part. Tags run inline, Fitment  */
/* and Warranty sit side by side, so the row drops to 68px and the      */
/* title column no longer absorbs all the spare width.                  */
/* ------------------------------------------------------------------ */
@media (min-width: 1680px) {
    .listing-condensed .part-card,
    .listing-condensed .part-card.has-redesign-layout {
        grid-template-columns: auto minmax(260px, 1fr) 170px 160px 150px;
        column-gap: 12px;
        height: auto !important;
        min-height: 84px !important;
        padding: 5px 12px !important;
        margin-bottom: 8px !important;
    }
    .listing-condensed .part-card .part-card-image { width: 52px !important; height: 52px; }
    .listing-condensed .part-card .part-card-image .main-image.aps-main-unavailable { font-size: 8px; }
    .listing-condensed .part-card .part-card-place { margin-top: 1px !important; }
    .listing-condensed .part-card .part-card-comments__line { margin-top: 2px !important; }
    /* All five pills on one line in fixed columns so every row lines up; Mileage is last and may grow */
    .listing-condensed .part-card .part-card-details .part-card-tags { grid-template-columns: 76px 110px 120px 130px minmax(146px, max-content); }
}

/* The "select a fitment" tooltip is centred on a 390px panel on /parts; on the 112px Add to Quote
   column it overhung the right edge of the page and made the whole page scroll sideways. */
.listing-condensed .part-card .part-card-actions .js-fitment-tooltip { left: auto !important; right: 0 !important; transform: none !important; }

/* ------------------------------------------------------------------ */
/* "?" and Compare stacked as 22px icon buttons left of Add to Quote   */
/* ------------------------------------------------------------------ */
.listing-condensed .part-card .part-card-actions .part-card-actions__icons { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; min-width: 24px; }
.listing-condensed .part-card .part-card-actions .part-card-actions__icons .group,
.listing-condensed .part-card .part-card-actions .part-card-actions__compare { display: inline-flex !important; flex: none; width: auto; min-width: 0; position: relative; }
.listing-condensed .part-card .part-card-actions .aps-compare-toggle,
.listing-condensed .part-card .part-card-actions .aps-compare-toggle.aps-compare-toggle--icon {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 0 !important;
    width: 24px !important; height: 24px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important;
    border: 1px solid #e0e4e6 !important; border-radius: 50% !important; background: #fff !important; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06) !important;
    color: var(--listing-text) !important; cursor: pointer;
}
.listing-condensed .part-card .part-card-actions .aps-compare-toggle:hover { border-color: #0b8e81 !important; color: #0b8e81 !important; background: #fff !important; }
.listing-condensed .part-card .part-card-actions .aps-compare-toggle.is-in-compare { background: #edf9f6 !important; border-color: #0b8e81 !important; color: #0b8e81 !important; }
.listing-condensed .part-card .part-card-actions .aps-compare-toggle[disabled],
.listing-condensed .part-card .part-card-actions .aps-compare-toggle.pointer-events-none { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
/* The checkbox box and "Compare" label stay in the DOM for parts-compare.js but only the icon is shown. */
.listing-condensed .part-card .part-card-actions .aps-compare-toggle__box,
.listing-condensed .part-card .part-card-actions .aps-compare-toggle__label { display: none !important; }
.listing-condensed .part-card .part-card-actions .aps-compare-toggle__icon { display: inline-flex !important; align-items: center; justify-content: center; width: 12px; height: 12px; color: inherit; }
.listing-condensed .part-card .part-card-actions .aps-compare-toggle__icon svg { display: block; width: 12px; height: 12px; fill: currentColor; }

/* Phone card, tidied (WEBDEV-2644 review): pills in two aligned columns, then warranty + delivery, then the price
   line, then one full-width actions row (? and compare on the left, the buttons sharing the rest). */
@media (max-width: 767px) {
    .listing-condensed .part-card,
    .listing-condensed .part-card.has-redesign-layout {
        grid-template-areas: "thumb text text" "controls controls controls" "price price price" "actions actions actions";
        row-gap: 10px;
    }
    .listing-condensed .part-card .part-card-details .part-card-tags { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 6px !important; }
    .listing-condensed .part-card .part-card-tag { width: 100%; }
    .listing-condensed .part-card .part-card-price { align-self: auto; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
    .listing-condensed .part-card .part-card-price .part-card-price-label { flex: 1 1 100%; }
    .listing-condensed .part-card .part-card-actions { justify-self: stretch; width: 100%; align-self: auto; gap: 10px !important; }
    .listing-condensed .part-card .part-card-actions .part-card-actions__icons { flex-direction: row; gap: 6px; }
    .listing-condensed .part-card .part-card-actions .part-card-actions__buttons { flex: 1 1 auto; flex-direction: row; gap: 8px; }
    .listing-condensed .part-card .part-card-actions .part-card-actions__buttons .group { flex: 1 1 0; min-width: 0; }
    .listing-condensed .part-card .part-card-actions .add-to-cart-btn,
    .listing-condensed .part-card .part-card-actions .new-add-to-cart-button { height: 40px !important; font-size: 13.5px !important; }
}

/* Wide screens (1680px+), per Brian's review of the 1920 view: the yard line joins the title row, Warranty
   gets its own column and the delivery footer the next, so the row drops to a title line, the comment and
   one pill line. Below 1680 nothing changes. */
@media (min-width: 1680px) {
    .listing-condensed .part-card,
    .listing-condensed .part-card.has-redesign-layout { grid-template-columns: auto minmax(260px, 1fr) 170px 160px 160px 150px; }
    /* The controls wrapper dissolves so its two columns become grid cells of their own */
    .listing-condensed .part-card .part-card-controls,
    .listing-condensed .part-card .part-card-controls.part-card-controls-row { display: contents !important; }
    .listing-condensed .part-card .part-card-controls .part-card-controls-col--warranty { grid-column: 3; align-self: center; }
    .listing-condensed .part-card .part-card-controls .part-card-controls-col--delivery { grid-column: 4; align-self: center; }
    .listing-condensed .part-card .part-card-price { grid-column: 5; }
    .listing-condensed .part-card .part-card-actions { grid-column: 6; }
}
/* From 1900px the yard line joins the title line (at 1680 to 1899 the text column is too narrow for long yard
   names and the line would clip). A long yard name wraps under itself rather than being cut. */
@media (min-width: 1900px) {
    .listing-condensed .part-card .part-card-details {
        display: grid; grid-template-columns: max-content minmax(0, 1fr); grid-template-areas: "title place" "comment comment" "tags tags" "note note";
        column-gap: 14px; align-items: baseline;
    }
    .listing-condensed .part-card .part-card-details .part-item-name-link { grid-area: title; min-width: 0; max-width: 100%; }
    .listing-condensed .part-card .part-card-details .part-item-name-link h3 { white-space: nowrap; }
    .listing-condensed .part-card .part-card-details .part-card-place { grid-area: place; margin: 0 !important; min-width: 0; white-space: normal; flex-wrap: wrap; }
    .listing-condensed .part-card .part-card-details .part-card-place > span { white-space: normal; overflow: visible; text-overflow: clip; }
    .listing-condensed .part-card .part-card-details .part-card-comments__line { grid-area: comment; margin-top: 2px !important; }
    .listing-condensed .part-card .part-card-details .part-card-tags { grid-area: tags; margin-top: 4px !important; }
    .listing-condensed .part-card .part-card-details .part-type-inventory-note { grid-area: note; }
}
