/* file: assets/fit-clean.css */
/* =========================================================
   TT24 Fitments – Legacy Design Port
   - Ported from Legacy AutoParts24/assets/finder.css
   ========================================================= */

/* --- Fitments (Accordion) --- */
.ap24-fitments {
    color: #182840;
    border: 1px solid #e4ebf3;
    border-radius: 0.9rem;
    padding: 0.65rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 14px 28px -32px rgba(15, 23, 42, 0.34);
}

.ap24-fitments__title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: inherit;
}

.ap24-fitments__brand,
.ap24-fitments__model {
    border: 1px solid #e2e9f2;
    border-radius: 0.78rem;
    background: #fff;
    margin-bottom: 0.58rem;
    overflow: hidden;
}

.ap24-fitments__brand {
    border-color: #dbe5f2;
    box-shadow: 0 12px 26px -31px rgba(15, 23, 42, 0.35);
}

.ap24-fitments__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.76rem 0.88rem;
    cursor: pointer;
    user-select: none;
    background: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    list-style: none;
}

.ap24-fitments__brand > .ap24-fitments__summary {
    background: linear-gradient(135deg, #f4f9ff 0%, #e8f1ff 100%);
    border-bottom: 1px solid #edf2f7;
    border-left: 3px solid #2f5bd2;
}

.ap24-fitments__model > .ap24-fitments__summary {
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    border-left: 3px solid #9eb9de;
}

.ap24-fitments__summary::-webkit-details-marker {
    display: none;
}

/* Chevron Icon */
.ap24-fitments__summary::after {
    content: '';
    width: 0.95rem;
    height: 0.95rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20' stroke='%23556784' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15.5 7.5L10 13 4.5 7.5'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

details[open]>.ap24-fitments__summary::after {
    transform: rotate(180deg);
}

.ap24-fitments__summary:hover {
    background-color: #f8fbff;
}

.ap24-fitments__summary-main {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.ap24-fitments__summary-main--brand .ap24-fitments__name {
    font-size: 1.17rem;
    line-height: 1.12;
    letter-spacing: 0.005em;
}

.ap24-fitments__summary-main--model .ap24-fitments__name {
    font-size: 0.98rem;
    line-height: 1.2;
    color: #21395c;
}

.ap24-fitments__name {
    display: inline-block;
    font-weight: 700;
    color: #162b4a;
    text-transform: uppercase;
    word-break: break-word;
}

.ap24-fitments__summary-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    padding-right: 0.25rem;
}

.ap24-fitments__summary-metric {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.45rem;
    padding: 0.16rem 0.58rem;
    border-radius: 999px;
    border: 1px solid #b9cff3;
    background: linear-gradient(135deg, #e8f1ff 0%, #dae8ff 100%);
    color: #1f4bb6;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    white-space: nowrap;
}

.ap24-fitments__brand > .ap24-fitments__summary .ap24-fitments__summary-metric {
    border-color: #2955c7;
    background: linear-gradient(135deg, #2f5bd2 0%, #234dbf 100%);
    color: #ffffff;
    box-shadow: 0 6px 14px -11px rgba(35, 77, 191, 0.9);
}

.ap24-fitments__model > .ap24-fitments__summary .ap24-fitments__summary-metric {
    border-color: #c7d7ef;
    background: linear-gradient(135deg, #f2f7ff 0%, #e9f1ff 100%);
    color: #335d97;
}

.ap24-fitments__meta-text {
    display: none;
}

.ap24-fitments__label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.ap24-fitments__count {
    display: none;
}

.ap24-fitments__content {
    padding: 0.55rem;
    border-top: 1px solid #edf2f7;
    background: #f9fbff;
}

/* Nested Model Accordion */
.ap24-fitments__model {
    margin-bottom: 0.52rem;
    border: 1px solid #e0e7f1;
    box-shadow: none;
}

.ap24-fitments__model .ap24-fitments__summary {
    font-size: 0.9rem;
}

.ap24-fitments__table-shell {
    border: 1px solid #e0e7f1;
    border-radius: 0.72rem;
    overflow: hidden;
    background: #fff;
    margin-top: 0.4rem;
    box-shadow: none;
}

.ap24-fitments__table-wrapper {
    overflow-x: auto;
    padding: 0 !important;
    margin: 0;
    border-top: 0;
    background: #fff;
}

.ap24-fitments__table {
    width: 100%;
    min-width: 740px;
    margin: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    border: 0;
    font-size: 0.88rem;
}

.ap24-fitments__table thead,
.ap24-fitments__table tbody,
.ap24-fitments__table tr {
    margin: 0;
    padding: 0;
}

.ap24-fitments__table th {
    text-align: center;
    font-weight: 620;
    padding: 0.68rem 0.72rem;
    background: #f1f5fb;
    color: #425a77;
    border: 0;
    border-bottom: 1px solid #e5ecf4;
    white-space: nowrap;
    vertical-align: middle;
}

.ap24-fitments__table thead th {
    border-top: 0 !important;
}

.ap24-fitments__table td {
    text-align: center;
    padding: 0.68rem 0.72rem;
    border: 0;
    border-bottom: 1px solid #edf3f8;
    color: #22364f;
    vertical-align: middle;
    line-height: 1.35;
}

.ap24-fitments__table th:not(:last-child),
.ap24-fitments__table td:not(:last-child) {
    border-right: 1px solid #dfe8f3;
}

.ap24-fitments__table tr:last-child td {
    border-bottom: none;
}

.ap24-fitments__table tr:hover td {
    background-color: #fbfdff;
}

.ap24-fitments__table .text-right {
    text-align: center;
}

.ap24-fitments__table th:first-child,
.ap24-fitments__table td:first-child,
.ap24-fitments__table th:last-child,
.ap24-fitments__table td:last-child {
    text-align: center;
}

.ap24-fitments__table td:last-child {
    font-size: 0.84rem;
}

@media (max-width: 900px) {
    .ap24-fitments {
        border-radius: 0.8rem;
        padding: 0.5rem;
    }

    .ap24-fitments__summary {
        padding: 0.7rem 0.75rem;
    }

    .ap24-fitments__summary-main--brand .ap24-fitments__name {
        font-size: 1.05rem;
    }

    .ap24-fitments__summary-main--model .ap24-fitments__name {
        font-size: 0.89rem;
    }

    .ap24-fitments__summary-metric {
        font-size: 0.69rem;
        padding: 0.14rem 0.5rem;
    }

    .ap24-fitments__content {
        padding: 0.44rem;
    }

    .ap24-fitments__table {
        min-width: 660px;
        font-size: 0.82rem;
    }

    .ap24-fitments__table th,
    .ap24-fitments__table td {
        padding: 0.56rem 0.58rem;
    }
}

/* --- Specs (Card) --- */
.ap24-specs {
    color: #12233f;
    width: 100%;
}

.ap24-specs__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.9rem 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.ap24-specs__card {
    border-radius: 0.9rem;
    border: 1px solid #e3e9f2;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    overflow: hidden;
    box-shadow: 0 12px 28px -26px rgba(17, 35, 63, 0.28);
}

.ap24-specs__list {
    margin: 0;
    padding: 0.25rem 0;
}

.ap24-specs__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.22rem;
    padding: 0.78rem 1rem;
    margin: 0;
    border-bottom: 1px solid #eef3f8;
    background: transparent;
}

.ap24-specs__row:last-child {
    border-bottom: none;
}

.ap24-specs__label {
    display: flex;
    align-items: flex-start;
    margin: 0;
}

.ap24-specs__label-text {
    display: inline-block;
    color: #526482;
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: none;
}

.ap24-specs__value {
    justify-self: start;
    margin: 0;
    line-height: 1.55;
    min-width: 0;
}

.ap24-specs__value-text {
    display: block;
    color: #162642;
    font-size: 0.98rem;
    font-weight: 420;
    word-break: break-word;
}

.ap24-specs__value-text--mono {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.56rem;
    border-radius: 999px;
    background: #f7faff;
    border: 1px solid #d6e1f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    font-weight: 540;
    letter-spacing: 0.01em;
    color: #2a4368;
}

.ap24-specs__value-text--badge {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.62rem;
    border-radius: 999px;
    background: #eaf2ff;
    border: 1px solid #cfe0fb;
    color: #1d45b3;
    font-size: 0.88rem;
    font-weight: 640;
}

.ap24-specs__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ap24-specs__chip {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: #f5f8fd;
    border: 1px solid #dce6f4;
    color: #2148ba;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.ap24-specs__row--identity {
    background: transparent;
}

.ap24-specs__row--highlight {
    background: transparent;
}

@media (min-width: 640px) {
    .ap24-specs__row {
        grid-template-columns: minmax(165px, 205px) minmax(0, 1fr);
        align-items: start;
    }

    .ap24-specs__label {
        padding-top: 0.12rem;
    }

    .ap24-specs__value {
        justify-self: start;
        text-align: left;
    }
}

@media (max-width: 639px) {
    .ap24-specs__card {
        border-radius: 1rem;
    }

    .ap24-specs__row {
        padding: 0.68rem 0.85rem;
    }

    .ap24-specs__value-text {
        font-size: 0.95rem;
    }

    .ap24-specs__label-text {
        font-size: 0.79rem;
    }
}
