/* ═══════════════════════════════════════════════════════════
   CWP 2C "SOFT BORDER" OVERRIDES — Performance optimized
   ═══════════════════════════════════════════════════════════
   Laad NA cwp-products.css. Overschrijft alleen card styling.
   v2: backdrop-filter verwijderd, bg opacity verhoogd.
   ═══════════════════════════════════════════════════════════ */

/* ───── CARD WRAPPER ───── */
.cwp-product-item {
    background: #fff;
    border: 0.5px solid #e8dfd2;
    border-radius: 14px;
    box-shadow: none;
    transition: border-color 0.4s ease,
                box-shadow 0.4s ease,
                transform 0.4s ease;
}

.cwp-product-item:hover {
    border-color: var(--cwp-primary-color);
    box-shadow: 0 8px 30px rgba(138, 125, 107, 0.1);
    transform: translateY(-2px);
}

/* ───── INSET IMAGE WRAPPER ───── */
.cwp-image-inset {
    position: relative;
    margin: 8px 8px 0;
    border-radius: 10px;
    overflow: hidden;
    z-index: 1;
}

/* ───── PRODUCT IMAGE ───── */
.cwp-product-image {
    aspect-ratio: 5 / 5.3;
    border-radius: 10px;
}

.cwp-product-image img {
    object-position: center center;
}

.cwp-product-item:hover .cwp-product-image img {
    opacity: 1;
}

.cwp-product-image:hover img {
    opacity: 1;
}

.cwp-product-image img.lazy[src*="data:image/svg+xml"] {
    background-color: #f5f0ea;
    background-image: none;
    animation: none;
}

/* ───── ACTIONS: bottom-right, fade from below ───── */
.cwp-product-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    left: auto;
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    z-index: 10;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease,
                transform 0.25s ease;
}

.cwp-product-item:hover .cwp-product-actions {
    opacity: 1;
    transform: translateY(0);
}

.cwp-wishlist-button {
    background: rgba(255, 255, 255, 0.95);
    border: none !important;
    border-radius: 50%;
    width: clamp(32px, 8vw, 34px);
    height: clamp(32px, 8vw, 34px);
    box-shadow: none !important;
    transition: all 0.25s ease;
}

.cwp-wishlist-button svg {
    width: 16px;
    height: 16px;
    fill: #8a7d6b;
}

.cwp-wishlist-button:hover {
    background: #fff;
    transform: scale(1.08);
    box-shadow: none !important;
}

.cwp-wishlist-button:hover svg {
    fill: #6d303b;
}

.cwp-cart-icon {
    width: clamp(32px, 8vw, 34px) !important;
    height: clamp(32px, 8vw, 34px) !important;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    transition: all 0.25s ease;
}

.cwp-cart-icon:hover {
    background: #fff;
    border-color: transparent;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: none;
}

.cwp-cart-icon i,
.cwp-cart-icon .holi-holi-cart {
    font-size: 18px;
    color: #663040;
}

.cwp-cart-icon:hover i,
.cwp-cart-icon:hover .holi-holi-cart {
    color: #6d303b;
}

.cwp-cart-icon.cwp-added-success {
    background: rgba(39, 174, 96, 0.15);
}

/* ───── BADGES: pill-shaped ───── */
.cwp-kampanj-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    top: auto;
    right: auto;
    font-size: 9px;
    letter-spacing: 2px;
    font-weight: 500;
    padding: 4px 11px;
    border-radius: 20px;
    box-shadow: none;
    background: rgba(109, 48, 59, 0.88);
}

.cwp-out-of-stock-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    top: auto;
    right: auto;
    font-size: 9px;
    letter-spacing: 2px;
    font-weight: 500;
    padding: 4px 11px;
    border-radius: 20px;
    box-shadow: none;
    background: rgba(28, 28, 28, 0.82);
}

.new-badge {
    z-index: 10;
    position: absolute;
    font-family: var(--cwp-font-primary);
    font-weight: 500;
    right: auto;
    left: 10px;
    top: 10px;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #3a3a3a;
    background: rgba(243, 237, 230, 0.95);
    border-radius: 20px;
    padding: 4px 11px;
    line-height: 1.4;
    text-align: center;
    box-shadow: none;
}

/* ───── PRODUCT INFO ───── */
.cwp-product-info {
    padding: 14px 16px 16px;
    border-radius: 0;
}

/* ───── TITLE: Cormorant Garamond serif ───── */
.cwp-product-title,
.cwp-product-title a,
.cwp-product-title * {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    line-height: 1.3 !important;
    letter-spacing: 0.01em !important;
}

.cwp-product-title {
    margin: 0 0 6px 0;
    min-height: 42px;
    margin-bottom: 2px;
}

.cwp-product-title a { color: #3a3a3a; }
.cwp-product-title a:hover { color: #4f4f4f; }

.cwp-products-container h3.cwp-product-title,
.cwp-products-container h3.cwp-product-title a,
.cwp-products-container .cwp-product-title,
.cwp-products-container .cwp-product-title a,
h3.cwp-product-title,
h3.cwp-product-title a {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-weight: 400;
    font-style: normal !important;
    line-height: 1.3 !important;
}

@media screen and (-webkit-min-device-pixel-ratio: 1) {
    .cwp-product-title,
    .cwp-product-title a {
        font-family: 'Cormorant Garamond', Georgia, serif !important;
    }
}

/* ───── GOLD SEPARATOR ───── */
.cwp-gold-sep {
    width: 24px;
    height: 1px;
    background: var(--cwp-primary-color);
    margin-bottom: 8px;
    transition: width 0.4s ease;
}

.cwp-product-item:hover .cwp-gold-sep {
    width: 40px;
}

/* ───── PRICE ROW ───── */
.cwp-price-rating-row { margin: 0; }

.cwp-product-price {
    font-size: 14px;
    font-weight: 500;
    color: #3a3a3a;
    gap: 6px;
}

.cwp-product-price .price ins,
.cwp-product-price ins {
    color: #3a3a3a !important;
    font-weight: 500 !important;
}

.cwp-product-price .price del,
.cwp-product-price del {
    color: #b5b0a8 !important;
    font-size: 11px !important;
    font-weight: 300 !important;
}

.cwp-product-price ins .woocommerce-Price-amount,
.cwp-product-price ins bdi,
.cwp-product-price ins .amount {
    color: #3a3a3a !important;
    font-weight: 500 !important;
}

.cwp-product-price del .woocommerce-Price-amount,
.cwp-product-price del bdi,
.cwp-product-price del .amount {
    color: #b5b0a8 !important;
    font-size: 11px !important;
    font-weight: 300 !important;
}

/* ───── META ───── */
.cwp-coming-soon { font-size: 13px; color: #b09e82; }

.cwp-variants-text {
    font-size: 10px;
    color: #b09e82;
    margin-top: 6px;
    letter-spacing: 0.3px;
}

/* ───── RESPONSIVE ───── */
@media (max-width: 768px) {
    .cwp-product-item:hover .cwp-product-image img.cwp-hover-image {
        opacity: 0;
    }
    .cwp-product-image.cwp-has-hover:hover img.cwp-hover-image {
        opacity: 1;
    }
}

@media (max-width: 575px) {
    .cwp-image-inset { margin: 6px 6px 0; border-radius: 8px; }
    .cwp-product-image { border-radius: 8px; }
    .cwp-product-item { border-radius: 12px; }
    .cwp-product-info { padding: 12px 12px 14px; }

    .cwp-product-title,
    .cwp-product-title a,
    .cwp-product-title * { font-size: 14px !important; }
    .cwp-product-title { min-height: 36px; }
    .cwp-product-price { font-size: 13px; }
    .cwp-product-price del,
    .cwp-product-price .price del { font-size: 10px !important; }

    .cwp-kampanj-label,
    .cwp-out-of-stock-badge,
    .new-badge { font-size: 8px; padding: 3px 9px; }

    .cwp-product-actions { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   ACTIVE FILTER CHIPS — in de desktop sort-bar
   ═══════════════════════════════════════════════════════════ */

/* Sort-bar wordt flex-container: chips links, sortera rechts */
.cwp-sort-bar:not(.cwp-sort-standalone) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* Chips-container — links uitgelijnd, met margin-left zodat hij start
   waar het grid begint (sidebar 300px + gap 40px = 340px) */
.cwp-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 0 340px;
    padding: 0;
    flex: 1;
    min-width: 0;
}

/* Sortera-knop blijft rechts en mag niet inkrimpen */
.cwp-sort-bar:not(.cwp-sort-standalone) .cwp-sort-trigger {
    flex-shrink: 0;
    margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════
   CHIP STYLING
   ═══════════════════════════════════════════════════════════ */

.cwp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 12px;
    background: #f3ede6;
    border: 1px solid #e8dfd2;
    border-radius: 20px;
    font-family: var(--cwp-font-primary);
    font-size: 12px;
    font-weight: 400;
    color: #3a3a3a;
    line-height: 1.4;
    transition: background 0.2s ease, border-color 0.2s ease;
    cursor: default;
    user-select: none;
    white-space: nowrap;
}

.cwp-chip:hover {
    background: #ebe2d4;
    border-color: var(--cwp-primary-color);
}

.cwp-chip-label {
    white-space: nowrap;
}

.cwp-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(58, 58, 58, 0.1);
    color: #3a3a3a;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    margin-left: 2px;
}

.cwp-chip-remove:hover {
    background: #6d303b;
    color: #fff;
}

.cwp-chip-remove::before {
    content: '×';
    font-weight: 400;
    margin-top: -1px;
}

/* ═══════════════════════════════════════════════════════════
   RENSA LINK in sidebar header (naast FILTRERA)
   ═══════════════════════════════════════════════════════════ */

.cwp-filter-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cwp-filter-header-title {
    flex: 1;
}

.cwp-filter-header-rensa {
    font-family: var(--cwp-font-primary);
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.3px;
    color: #6d303b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.cwp-filter-header-rensa:hover {
    opacity: 0.7;
    color: #6d303b;
    text-decoration: none;
}

.cwp-filter-header-rensa .cwp-rensa-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(109, 48, 59, 0.1);
    font-size: 12px;
    line-height: 1;
}

.cwp-filter-header-rensa:hover .cwp-rensa-x {
    background: #6d303b;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   OUDE "Rensa filter" KNOP — verbergen op desktop, blijven op mobiel
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 769px) {
    .cwp-filters-container:not(.cwp-standalone-filters) .cwp-clear-filters {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — mobiel
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
    /* Op tablet/mobiel geen 340px offset (geen sidebar naast grid) */
    .cwp-active-chips {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    /* Mobiel: chips zelf staan vol-breed.
       Desktop sort-bar wordt op mobiel sowieso verborgen via bestaande CSS,
       dus de chips daarbinnen zijn automatisch ook weg op mobiel. */
    .cwp-active-chips {
        margin: 0 10px 0 10px;
    }

    .cwp-chip {
        font-size: 11px;
        padding: 4px 8px 4px 10px;
    }

    .cwp-chip-remove {
        width: 15px;
        height: 15px;
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════════════════════════
   MOBIEL — verberg de ingebouwde desktop sort-bar
   (alleen [cwp_sort_only] mag op mobiel zichtbaar zijn)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Verberg de sort-trigger op mobiel — alleen [cwp_sort_only] is zichtbaar */
    .cwp-sort-bar:not(.cwp-sort-standalone) .cwp-sort-trigger,
    .cwp-sort-bar:not(.cwp-sort-standalone) .cwp-sort-select,
    .cwp-sort-bar:not(.cwp-sort-standalone) .cwp-sort-dropdown {
        display: none !important;
    }
}