/**
 * [k360_produkt_kobling] - trailere og udstyr på produktsiden
 */
.k360-coupling {
    --k-navy: #1F3065;
    --k-red: #E62229;
    --k-ink: #1a1d24;
    --k-muted: #6b7080;
    --k-line: #e6e8ee;
    --k-mist: #f4f5f8;
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--k-ink);
    margin: 48px 0;
}

.k360-coupling *,
.k360-coupling *::before,
.k360-coupling *::after { box-sizing: border-box; }

.k360-coupling__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.k360-coupling .k360-coupling__title {
    margin: 0;
    font-family: inherit;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--k-ink);
}

.k360-coupling__lead {
    margin: 6px 0 0;
    max-width: 62ch;
    font-size: 15px;
    line-height: 1.5;
    color: var(--k-muted);
}

.k360-coupling__all {
    font-size: 14px;
    font-weight: 600;
    color: var(--k-navy) !important;
    text-decoration: none !important;
    border-bottom: 2px solid currentColor;
    white-space: nowrap;
}
.k360-coupling__all:hover { color: var(--k-red) !important; }

.k360-coupling__search input {
    width: 240px;
    max-width: 100%;
    height: 42px;
    padding: 0 16px;
    border: 1.5px solid var(--k-line);
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    background: #fff;
}
.k360-coupling__search input:focus { outline: none; border-color: var(--k-navy); }

/* Passer til: kompakte trailerkort i et gitter */
.k360-fits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.k360-fits__item.is-extra { display: none; }
.k360-coupling.is-expanded .k360-fits__item.is-extra { display: block; }
.k360-fits__item[hidden] { display: none !important; }

.k360-fits__link {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--k-line);
    border-radius: 12px;
    background: #fff;
    color: inherit !important;
    text-decoration: none !important;
    transition: border-color .15s ease;
}
.k360-fits__link:hover { border-color: var(--k-navy); }
.k360-fits__link:focus-visible { outline: 2px solid var(--k-navy); outline-offset: 2px; }

.k360-fits__img {
    display: block;
    width: 88px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: var(--k-mist);
    overflow: hidden;
}
.k360-fits__img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    padding: 4px;
    margin: 0 !important;
}

.k360-fits__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.3;
}
.k360-fits__link:hover .k360-fits__name { color: var(--k-navy); }

.k360-fits__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.k360-fits__badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: #d1fae5;
    color: #065f46;
    font-size: 12px;
    font-weight: 600;
}
.k360-fits__badge--addon { background: #e8ebf4; color: var(--k-navy); }

.k360-fits__price { font-size: 13px; font-weight: 600; color: var(--k-muted); }
.k360-fits__price .woocommerce-Price-amount { color: inherit; }

.k360-coupling .k360-coupling__more {
    margin-top: 16px;
    padding: 12px 22px;
    border: 1.5px solid var(--k-line);
    border-radius: 999px;
    background: #fff;
    color: var(--k-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.k360-coupling .k360-coupling__more:hover { border-color: var(--k-ink); background: #fff; color: var(--k-ink); }

@media (max-width: 600px) {
    .k360-coupling { margin: 32px 0; }
    .k360-coupling .k360-coupling__title { font-size: 20px; }
    .k360-coupling__search,
    .k360-coupling__search input { width: 100%; }
    .k360-fits { grid-template-columns: minmax(0, 1fr); }
}

/* Produktkort i koblingen - WooCommerces clearfix må ikke optage en plads i gitteret */
.k360-coupling ul.products::before,
.k360-coupling ul.products::after { display: none !important; content: none !important; }
.k360-coupling .woocommerce ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (max-width: 1024px) { .k360-coupling .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 767px)  { .k360-coupling .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; } }
