/**
 * Automotive Walsma Car Dealer
 * Widget styling voor frontend
 */

/* ============== BASIS ============== */
.awcd-wrapper {
    box-sizing: border-box;
}

.awcd-wrapper *,
.awcd-wrapper *::before,
.awcd-wrapper *::after {
    box-sizing: inherit;
}

.awcd-no-results {
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.awcd-no-image {
    background: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    color: #999;
    font-size: 14px;
}

/* ============== GRID LAYOUT ============== */
.awcd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============== KAART: BASIS ============== */
.awcd-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.awcd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.awcd-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.awcd-card-media {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.awcd-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
}

.awcd-card-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.awcd-status-verkocht .awcd-card-status-badge {
    background: #dc3232;
}

.awcd-status-gereserveerd .awcd-card-status-badge {
    background: #ffb900;
    color: #1a1a1a;
}

.awcd-status-binnenkort .awcd-card-status-badge {
    background: #00a0d2;
}

.awcd-card-body {
    padding: 16px;
}

.awcd-card-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 12px;
    font-weight: 600;
}

.awcd-card-specs {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}

.awcd-card-specs li {
    font-size: 13px;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.awcd-spec-label {
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.awcd-spec-value {
    color: #1a1a1a;
    font-weight: 500;
}

.awcd-card-price {
    font-size: 22px;
    font-weight: 700;
    color: #c8102e;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

/* ============== KAART: MODERN (overlay) ============== */
.awcd-card-modern .awcd-card-link {
    position: relative;
    display: block;
}

.awcd-card-modern .awcd-card-media {
    aspect-ratio: 4 / 3;
}

.awcd-card-modern .awcd-card-image {
    aspect-ratio: auto;
    height: 100%;
}

.awcd-card-modern .awcd-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    padding: 40px 16px 16px;
}

.awcd-card-modern .awcd-card-title,
.awcd-card-modern .awcd-spec-value {
    color: #fff;
}

.awcd-card-modern .awcd-spec-label {
    color: rgba(255, 255, 255, 0.7);
}

.awcd-card-modern .awcd-card-price {
    color: #ffce00;
    border-top-color: rgba(255, 255, 255, 0.2);
}

/* ============== KAART: LIJST ============== */
.awcd-card-lijst {
    display: flex;
    align-items: stretch;
}

.awcd-card-lijst .awcd-card-link {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.awcd-card-lijst .awcd-card-media {
    flex: 0 0 35%;
    max-width: 35%;
}

.awcd-card-lijst .awcd-card-image {
    height: 100%;
    aspect-ratio: auto;
}

.awcd-card-lijst .awcd-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Voor grid met lijst-stijl: hele rij innemen */
.awcd-grid-style-lijst {
    grid-template-columns: 1fr !important;
}

/* ============== ARCHIVE ============== */
.awcd-archive-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.awcd-result-count {
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

.awcd-archive-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.awcd-archive-sort label {
    font-size: 14px;
    color: #666;
}

.awcd-archive-sort select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    min-width: 200px;
}

.awcd-archive-sort select:focus {
    outline: none;
    border-color: #c8102e;
}

/* ============== PAGINATION ============== */
.awcd-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px;
}

.awcd-pagination a,
.awcd-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #f5f5f5;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.awcd-pagination a:hover {
    background: #e5e5e5;
    color: #1a1a1a;
}

.awcd-pagination .current {
    background: #c8102e;
    color: #fff;
    cursor: default;
}

.awcd-pagination .dots {
    background: transparent;
    cursor: default;
}

@media (max-width: 640px) {
    .awcd-archive-topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .awcd-archive-sort {
        flex-direction: column;
        align-items: stretch;
    }
    .awcd-archive-sort select {
        width: 100%;
    }
}

/* ============== SLIDER ============== */
.awcd-slider-wrapper {
    position: relative;
    padding: 0 0 50px;
}

.awcd-slider {
    overflow: hidden;
}

.awcd-slider .swiper-slide {
    height: auto;
    display: flex;
}

.awcd-slider .awcd-card {
    width: 100%;
}

.awcd-slider-prev,
.awcd-slider-next {
    color: #c8102e;
}

.awcd-slider-pagination {
    bottom: 10px !important;
}

.awcd-slider-pagination .swiper-pagination-bullet-active {
    background: #c8102e;
}

/* ============== DETAIL ============== */
.awcd-detail {
    max-width: 100%;
}

.awcd-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.awcd-detail-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.awcd-detail-price-block {
    text-align: right;
}

.awcd-detail-price {
    font-size: 30px;
    font-weight: 700;
    color: #c8102e;
    line-height: 1;
}

.awcd-detail-price-meta {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.awcd-tag {
    background: #f0f0f0;
    color: #555;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.awcd-tag-marge {
    background: #fff4e6;
    color: #b35900;
}

.awcd-tag-btw {
    background: #e6f4ff;
    color: #0056b3;
}

.awcd-detail-section {
    margin: 40px 0;
}

.awcd-detail-section h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #c8102e;
    display: inline-block;
}

.awcd-detail-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

/* Detail gallery */
.awcd-gallery-main {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.awcd-gallery-image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.awcd-gallery-thumbs {
    height: 80px;
}

.awcd-gallery-thumbs .swiper-slide {
    width: 100px;
    height: 80px;
    opacity: 0.5;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    transition: opacity 0.2s;
}

.awcd-gallery-thumbs .swiper-slide:hover,
.awcd-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
}

.awcd-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.awcd-gallery-prev,
.awcd-gallery-next {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.awcd-gallery-prev:after,
.awcd-gallery-next:after {
    font-size: 16px;
    font-weight: bold;
}

/* Detail specs */
.awcd-detail-specs-grid {
    display: grid;
    gap: 30px;
}

.awcd-detail-specs-grid.awcd-specs-layout-two-col {
    grid-template-columns: 1fr 1fr;
}

.awcd-detail-specs-grid.awcd-specs-layout-one-col {
    grid-template-columns: 1fr;
}

.awcd-detail-specs {
    width: 100%;
    border-collapse: collapse;
}

.awcd-detail-specs td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    vertical-align: middle;
}

.awcd-detail-specs td:first-child {
    color: #666;
    width: 50%;
}

.awcd-detail-specs td:last-child {
    font-weight: 500;
    text-align: right;
}

/* Detail opties */
.awcd-detail-opties {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.awcd-opties-cols-1 { grid-template-columns: 1fr; }
.awcd-opties-cols-2 { grid-template-columns: 1fr 1fr; }
.awcd-opties-cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.awcd-detail-opties li {
    padding: 10px 14px 10px 32px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 14px;
    position: relative;
}

/* Markering styles voor opties */
.awcd-detail-opties li::before {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    line-height: 1;
    color: #46b450;
}

/* Vinkje (default) */
.awcd-detail-opties.awcd-opties-marker-check li::before {
    content: '\2713';
}

/* Bolletje */
.awcd-detail-opties.awcd-opties-marker-dot li::before {
    content: '\2022';
    font-size: 20px;
}

/* Pijl */
.awcd-detail-opties.awcd-opties-marker-arrow li::before {
    content: '\203A';
    font-size: 18px;
}

/* Plus */
.awcd-detail-opties.awcd-opties-marker-plus li::before {
    content: '+';
    font-size: 18px;
}

/* Geen markering */
.awcd-detail-opties.awcd-opties-marker-none li {
    padding-left: 14px;
}

.awcd-detail-opties.awcd-opties-marker-none li::before {
    content: none;
    display: none;
}

/* Fallback voor oude class structuur (backwards compat) */
.awcd-opties-check-check .awcd-detail-opties li::before {
    content: '\2713';
}
.awcd-opties-check-dot .awcd-detail-opties li::before {
    content: '\2022';
    font-size: 20px;
}
.awcd-opties-check-arrow .awcd-detail-opties li::before {
    content: '\203A';
    font-size: 18px;
}
.awcd-opties-check-plus .awcd-detail-opties li::before {
    content: '+';
    font-size: 18px;
}
.awcd-opties-check-none .awcd-detail-opties li {
    padding-left: 14px;
}
.awcd-opties-check-none .awcd-detail-opties li::before {
    content: none;
    display: none;
}

/* ============== FILTER ============== */
.awcd-filter-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.awcd-filter-block {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.awcd-filter-block:last-of-type {
    border-bottom: none;
}

.awcd-filter-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.awcd-filter-checkboxes {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.awcd-filter-checkboxes li {
    margin-bottom: 6px;
}

.awcd-filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.awcd-filter-checkboxes input[type="checkbox"] {
    margin: 0;
}

.awcd-filter-count {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

.awcd-filter-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.awcd-filter-range input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.awcd-filter-range span {
    color: #999;
}

.awcd-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.awcd-filter-submit {
    flex: 1;
    background: #c8102e;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.awcd-filter-submit:hover {
    background: #a30d24;
}

.awcd-filter-reset {
    padding: 12px 20px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    font-size: 14px;
    transition: background 0.2s;
}

.awcd-filter-reset:hover {
    background: #e8e8e8;
}

/* ============== FEATURED ============== */
.awcd-featured {
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
}

.awcd-featured-horizontal {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.awcd-featured-vertical {
    display: flex;
    flex-direction: column;
}

.awcd-featured-overlay {
    position: relative;
}

.awcd-featured-overlay .awcd-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
}

.awcd-featured-overlay .awcd-featured-title,
.awcd-featured-overlay .awcd-featured-excerpt {
    color: #fff;
}

.awcd-featured-media {
    overflow: hidden;
}

.awcd-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 300px;
}

.awcd-featured-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.awcd-featured-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
}

.awcd-featured-excerpt {
    color: #666;
    margin: 0 0 16px;
    line-height: 1.5;
}

.awcd-featured-specs {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.awcd-featured-specs li {
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.awcd-featured-specs li:last-child {
    border-bottom: none;
}

.awcd-featured-overlay .awcd-featured-specs li {
    border-bottom-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.awcd-featured-price {
    font-size: 32px;
    font-weight: 700;
    color: #c8102e;
    margin-bottom: 20px;
}

.awcd-featured-button {
    display: inline-block;
    background: #c8102e;
    color: #fff;
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s;
    align-self: flex-start;
}

.awcd-featured-button:hover {
    background: #a30d24;
    color: #fff;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
    .awcd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .awcd-detail-specs-grid.awcd-specs-layout-two-col {
        grid-template-columns: 1fr;
    }
    .awcd-featured-horizontal {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .awcd-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .awcd-card-lijst {
        flex-direction: column;
    }
    .awcd-card-lijst .awcd-card-link {
        flex-direction: column;
    }
    .awcd-card-lijst .awcd-card-media {
        flex: 0 0 auto;
        max-width: 100%;
    }
    .awcd-detail-header {
        flex-direction: column;
    }
    .awcd-detail-title {
        font-size: 24px;
    }
    .awcd-detail-price-block {
        text-align: left;
    }
    .awcd-detail-price-meta {
        justify-content: flex-start;
    }
    .awcd-detail-price {
        font-size: 24px;
    }
    .awcd-detail-opties.awcd-opties-cols-2,
    .awcd-detail-opties.awcd-opties-cols-3 {
        grid-template-columns: 1fr;
    }
    .awcd-featured-content {
        padding: 20px;
    }
    .awcd-featured-title {
        font-size: 22px;
    }
}
