/* Product category landing (templates/category-landing.php). */

.amz-cl {
    --amz-cl-accent: #e31c23;
    --amz-cl-accent-hover: #c8161c;
    --amz-cl-ink: #1a1f2c;
    --amz-cl-muted: #6b7380;
    --amz-cl-line: #e2e5ea;
    --amz-cl-soft: #f5f6f8;
    --amz-cl-ok: #1f8a4c;
    --amz-cl-radius: 6px;
    color: var(--amz-cl-ink);
    background: var(--amz-cl-soft);
    padding: 18px 0 56px;
    font-size: 15px;
    line-height: 1.45;
}

.amz-cl *,
.amz-cl *::before,
.amz-cl *::after {
    box-sizing: border-box;
}

.amz-cl__wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.amz-cl a {
    text-decoration: none;
}

/* —— Breadcrumb —— */
/* Uses the Motor theme's .b-crumbs styles; only drop its 30px gap above the grey landing. */
.b-crumbs-wrap.amz-cl-crumbs {
    margin-bottom: 0;
}

/* —— Title —— */
.amz-cl__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
    margin: 0 0 6px;
}

.amz-cl .amz-cl__title {
    display: block;
    max-width: none;
    width: auto;
    margin: 0;
    padding: 0;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: none;
    white-space: normal;
}

.amz-cl .amz-cl__title::before,
.amz-cl .amz-cl__title::after {
    display: none;
}

.amz-cl__title-count {
    color: var(--amz-cl-muted);
    font-size: 15px;
}

.amz-cl__intro {
    max-width: 820px;
    margin: 0 0 18px;
    color: var(--amz-cl-muted);
}

/* —— Car finder —— */
.amz-cl__finder {
    background: #fff;
    border: 1px solid var(--amz-cl-line);
    border-radius: var(--amz-cl-radius);
    padding: 18px 20px 16px;
    margin-bottom: 24px;
}

.amz-cl .amz-cl__finder-title {
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 1.3;
    text-transform: none;
}

.amz-cl__finder .amz-st {
    margin: 0;
}

.amz-cl__usp {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    color: var(--amz-cl-muted);
    font-size: 13px;
}

.amz-cl__usp li {
    position: relative;
    margin: 0;
    padding-left: 20px;
}

.amz-cl__usp li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 4px;
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--amz-cl-ok);
    border-bottom: 2px solid var(--amz-cl-ok);
    transform: rotate(-45deg);
}

/* —— Sidebar + list —— */
.amz-cl__body {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.amz-cl__filters {
    background: #fff;
    border: 1px solid var(--amz-cl-line);
    border-radius: var(--amz-cl-radius);
    padding: 4px 16px 12px;
    position: sticky;
    top: 16px;
}

.amz-cl__filters summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 0;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.amz-cl__filters summary::-webkit-details-marker {
    display: none;
}

.amz-cl__badge {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--amz-cl-accent);
    border-radius: 10px;
    padding: 1px 8px;
}

.amz-cl__reset {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--amz-cl-accent);
}

.amz-cl__facet {
    border-top: 1px solid var(--amz-cl-line);
    padding: 12px 0 4px;
}

.amz-cl .amz-cl__facet h3 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--amz-cl-muted);
}

.amz-cl__opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    color: var(--amz-cl-ink);
    font-size: 14px;
}

.amz-cl__opt:hover {
    color: var(--amz-cl-accent);
}

.amz-cl__opt {
    cursor: pointer;
}

/* Native inputs stay for keyboard / form submit; the .amz-cl__check box is the visual. */
.amz-cl__input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.amz-cl__input:focus-visible + .amz-cl__check {
    outline: 2px solid var(--amz-cl-accent);
    outline-offset: 2px;
}

.amz-cl .amz-cl__apply {
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 14px 0 4px;
    border: 0;
    border-radius: var(--amz-cl-radius);
    background: var(--amz-cl-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.amz-cl .amz-cl__apply:hover {
    background: var(--amz-cl-accent-hover);
}

.amz-cl__check {
    flex: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #b9bfc8;
    border-radius: 3px;
    background: #fff;
    position: relative;
}

.amz-cl__check.is-radio {
    border-radius: 50%;
}

.amz-cl__opt.is-on .amz-cl__check {
    border-color: var(--amz-cl-accent);
    background: var(--amz-cl-accent);
}

.amz-cl__opt.is-on .amz-cl__check::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.amz-cl__opt.is-on {
    font-weight: 600;
}

.amz-cl__n {
    margin-left: auto;
    color: var(--amz-cl-muted);
    font-size: 12px;
}

.amz-cl__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    background: #fff;
    border: 1px solid var(--amz-cl-line);
    border-radius: var(--amz-cl-radius);
    padding: 10px 14px;
}

.amz-cl .amz-cl__list-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    text-transform: none;
}

.amz-cl__sort {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    color: var(--amz-cl-muted);
}

.amz-cl__sort select {
    height: 36px;
    min-width: 170px;
    padding: 0 10px;
    border: 1px solid var(--amz-cl-line);
    border-radius: 4px;
    background: #fff;
    color: var(--amz-cl-ink);
    font-size: 14px;
}

.amz-cl__hint {
    margin: 10px 2px 14px;
    color: var(--amz-cl-muted);
    font-size: 13px;
}

.amz-cl__empty {
    background: #fff;
    border: 1px solid var(--amz-cl-line);
    border-radius: var(--amz-cl-radius);
    padding: 24px;
}

.amz-cl__empty a {
    color: var(--amz-cl-accent);
}

/* —— Cards: fixed image box so tall/wide pictures never change the row —— */
.amz-cl__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.amz-cl__card {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--amz-cl-line);
    border-radius: var(--amz-cl-radius);
    overflow: hidden;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.amz-cl__card:hover {
    border-color: #cfd4db;
    box-shadow: 0 6px 18px rgba(26, 31, 44, 0.08);
}

.amz-cl .amz-cl__img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    padding: 14px;
    background: #fff;
    border-bottom: 1px solid var(--amz-cl-line);
    overflow: hidden;
}

.amz-cl .amz-cl__img img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    margin: 0;
}

.amz-cl__info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 3px;
    padding: 12px 14px 14px;
}

.amz-cl__brand {
    min-height: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--amz-cl-muted);
}

.amz-cl .amz-cl__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    color: var(--amz-cl-ink);
    font-weight: 600;
    font-size: 14.5px;
    line-height: 1.35;
}

.amz-cl .amz-cl__name:hover {
    color: var(--amz-cl-accent);
}

.amz-cl__sku {
    font-size: 12px;
    color: var(--amz-cl-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amz-cl__foot {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.amz-cl__price {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.amz-cl__price .amz-price__tag {
    font-weight: 400;
    font-size: 13px;
    color: var(--amz-cl-muted);
}

.amz-cl__stock {
    font-size: 13px;
}

.amz-cl__stock.is-in {
    color: var(--amz-cl-ok);
}

.amz-cl__stock.is-in::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--amz-cl-ok);
    vertical-align: 1px;
}

.amz-cl__stock.is-out {
    color: var(--amz-cl-muted);
}

.amz-cl .amz-cl__btn {
    margin-top: 8px;
    display: block;
    text-align: center;
    padding: 10px 12px;
    border-radius: 4px;
    background: var(--amz-cl-accent);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.amz-cl .amz-cl__btn:hover,
.amz-cl .amz-cl__btn:focus-visible {
    background: var(--amz-cl-accent-hover);
    color: #fff;
}

.amz-cl__pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 26px;
}

.amz-cl__pager a {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--amz-cl-line);
    border-radius: 4px;
    color: var(--amz-cl-ink);
}

.amz-cl__pager a.is-current {
    background: var(--amz-cl-ink);
    border-color: var(--amz-cl-ink);
    color: #fff;
}

@media (max-width: 1100px) {
    .amz-cl__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .amz-cl__body {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .amz-cl__filters {
        position: static;
    }

    .amz-cl__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .amz-cl {
        padding-top: 12px;
    }

    .amz-cl__finder {
        padding: 14px;
    }

    .amz-cl .amz-cl__img {
        height: 140px;
        padding: 10px;
    }

    .amz-cl__info {
        padding: 10px;
    }

    .amz-cl .amz-cl__name {
        font-size: 13.5px;
    }

    .amz-cl__price {
        font-size: 15px;
    }

    .amz-cl__sort select {
        min-width: 0;
    }
}

/* Filtre: caret only matters on phones, where the panel is a closed dropdown. */
.amz-cl__caret {
    display: none;
    margin-left: auto;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    transition: transform 0.15s ease;
}

@media (min-width: 861px) {
    .amz-cl__filters summary {
        cursor: default;
    }
}

@media (max-width: 860px) {
    .amz-cl__filters {
        padding: 0 14px;
    }

    .amz-cl__filters summary {
        padding: 13px 0;
    }

    .amz-cl__filters[open] {
        padding-bottom: 12px;
    }

    .amz-cl__caret {
        display: block;
    }

    .amz-cl__filters[open] .amz-cl__caret {
        transform: rotate(-135deg) translateY(-3px);
    }
}

/* Part manufacturer logos */
.amz-cl .amz-cl__logo {
    display: block;
    width: auto !important;
    height: 35px !important;
    max-width: 100px !important;
    object-fit: contain;
    margin: 0;
}

.amz-cl__brand {
    display: flex;
    align-items: center;
    min-height: 24px;
}

.amz-cl__brandopt {
    display: flex;
    align-items: center;
    min-height: 22px;
}

.amz-cl__brandopt .amz-cl__logo {
    height: 20px !important;
    max-width: 90px !important;
}
