/* NexAuto Custom Card Styling v2.5.0 - Pixel Perfect
 * - Aangepaste border-radius en sale-kleuren
 * - Verbeterde responsive grid
 */

:root {
    --card-border-radius: 12px;
    --card-border-color: #d8dae0;
    --card-primary-action-bg: #4F46E5;
    --card-primary-action-hover: #4338CA;
    --card-text-primary: #1F2937;
    --card-text-secondary: #6B7280;
    --card-spec-bg: #F3F4F6;
    /* GEWIJZIGD: Nieuwe sale kleur */
    --card-sale-color: #5AC271;
}

/* Styling voor het nieuwe merklogo */
.nexapp-exact-brand-logo {
    height: 24px; /* Hoogte van het logo */
    width: auto;  /* Breedte past zich automatisch aan */
    max-width: 100px; /* Maximale breedte om te grote logo's te voorkomen */
    object-fit: contain; /* Zorgt dat het logo niet vervormt */
}

/* --- Hoofd Grid Layout --- */
/* Zorgt ervoor dat onze kaarten de volledige hoogte van de grid-cel benutten */
ul.products li.product {
    display: flex;
    flex-direction: column;
}

.nexapp-custom-card-wrapper {
    height: 100%;
    display: flex; /* Zorgt dat de article 100% hoogte krijgt */
}

.nexapp-exact-auto-card {
    background: #ffffff;
    border-radius: var(--card-border-radius);
    border: 1.5px solid var(--card-border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%; /* Zorgt dat de kaart de li vult */
    position: relative;
    transition: box-shadow .2s ease, transform .2s ease;
}

.nexapp-exact-auto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.nexapp-exact-real-content {
    opacity: 0;
    transition: opacity .3s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- Content Secties --- */
.nexapp-exact-top-content, .nexapp-exact-bottom-content {
    padding: 16px;
}
.nexapp-exact-top-content {
    border-bottom: 1px solid var(--card-border-color);
}
.nexapp-exact-bottom-content {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Badges --- */
.nexapp-exact-card-badges {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    min-height: 25px;
}
.nexapp-exact-category, .nexapp-exact-sale-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}
.nexapp-exact-category {
    background-color: transparent;
    border: 1px solid var(--card-border-color);
    color: var(--card-text-secondary);
}
.nexapp-exact-sale-badge {
    background-color: #5AC271 !important;
    color: #fff;
    font-weight: 600;
}
.woo-listing-top .woocommerce-ordering select {
    background-color: #fff !important;
    border-color: #D8DAE0 !important;
}

/* --- Title & Brand --- */
.nexapp-exact-brand-title {
    display: flex;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.nexapp-exact-brand-logo-placeholder {
    font-size: 1rem;
    color: var(--card-text-secondary);
}
.nexapp-exact-model {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
    color: var(--card-text-primary);
}

/* --- Specs Pills --- */
.nexapp-exact-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nexapp-exact-specs div {
    background: var(--card-spec-bg);
    color: var(--card-text-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nexapp-exact-specs img {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}
.nexapp-nap-icon {
    width: 32px;
    height: auto;
    margin-left: -2px;
}

/* --- Image --- */
.nexapp-exact-image-wrapper {
    width: 100%;
    padding-top: 66.66%;
    position: relative;
    background-color: #f9fafb;
}
.nexapp-exact-image-wrapper a, .nexapp-exact-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Price --- */
.nexapp-exact-price-section {
    line-height: 1.2;
}
.nexapp-exact-original-price {
    font-size: 1.25rem;
    color: var(--card-text-secondary);
    text-decoration: line-through;
    opacity: 0.8;
}
.nexapp-exact-sale-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #5AC271 !important;
}
.nexapp-exact-main-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--card-text-primary);
}

/* --- Buttons --- */
.nexapp-exact-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.nexapp-exact-btn {
    padding: 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all .2s ease;
    border: 1px solid transparent;
}
.nexapp-exact-btn-secondary {
    background: #fff;
    color: var(--card-text-primary);
    border-color: var(--card-border-color);
}
.nexapp-exact-btn-secondary:hover {
    background: var(--card-spec-bg);
}
.nexapp-exact-btn-primary {
    background: var(--card-primary-action-bg);
    color: #fff;
}
.nexapp-exact-btn-primary:hover {
    background: var(--card-primary-action-hover);
}

/* --- SKELETON LOADING --- */
.nexapp-exact-skeleton-loader {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2; background: #fff; transition: opacity .3s ease-out;
    display: flex; flex-direction: column;
}
.nexapp-exact-skeleton-loader.loaded { opacity: 0; pointer-events: none; }
.nexapp-skeleton-top, .nexapp-skeleton-bottom { padding: 16px; }
.nexapp-skeleton-image { height: 200px; flex-shrink: 0; animation: skeleton-shine 1.5s infinite linear; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; }
.nexapp-skeleton-line { background: #f0f0f0; border-radius: 4px; height: 16px; animation: skeleton-shine 1.5s infinite linear; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; }
.nexapp-skeleton-pills { display: flex; gap: 8px; margin-top: 12px; }
@keyframes skeleton-shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

[data-products] {
    grid-column-gap: var(--grid-columns-gap, 20px) !important;
    grid-row-gap: var(--grid-rows-gap, 20px)!important;
}

/* --- NIEUW: RESPONSIVE GRID CONTROL --- */
/* Standaard (desktop) is 4 kolommen, ingesteld door WooCommerce class 'columns-4' */
@media (max-width: 1460px) {
    ul.products.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 1100px) {
    ul.products.columns-4,
    ul.products.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 720px) {
    ul.products.columns-4,
    ul.products.columns-3,
    ul.products.columns-2 {
        grid-template-columns: repeat(1, 1fr);
    }
}