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

/* --- Fitments (Accordion) --- */
.ap24-fitments {
    color: #1e293b;
}

.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 #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

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

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

/* Chevron Icon */
.ap24-fitments__summary::after {
    content: '';
    width: 1.25rem;
    height: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s;
}

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

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

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

.ap24-fitments__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: #e2e8f0;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.ap24-fitments__content {
    padding: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

/* Nested Model Accordion */
.ap24-fitments__model {
    margin-bottom: 0.5rem;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ap24-fitments__model .ap24-fitments__summary {
    background-color: #fff;
    font-size: 0.95rem;
}

.ap24-fitments__table-wrapper {
    overflow-x: auto;
    padding: 0;
    background: #fff;
    border-radius: 0 0 0.5rem 0.5rem;
}

.ap24-fitments__table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ap24-fitments__table th {
    text-align: center;
    font-weight: 600;
    padding: 0.75rem 1rem;
    background-color: #f1f5f9;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.ap24-fitments__table td {
    text-align: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

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

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

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

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

.ap24-specs__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.25;
}

.ap24-specs__card {
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ap24-specs__list {
    margin: 0;
}

.ap24-specs__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.ap24-specs__row:nth-child(even) {
    background: #f8fafc;
}

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

.ap24-specs__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
}

.ap24-specs__value {
    font-size: 0.95rem;
    justify-self: start;
    color: #1e293b;
    margin: 0;
    line-height: 1.5;
}

@media (min-width: 640px) {
    .ap24-specs__row {
        grid-template-columns: 40% 60%;
        align-items: center;
    }

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