/* Module: prijsoverzicht - CSS voor nieuwe layout - VERSIE 2.1 FIXED */

/* Verberg de PrestaShop winkelwagen sectie (quantity + add-to-cart) */
.product-quantity {
    display: none !important;
}

/* RESET ALLES voor prijsoverzicht module */
.prijsoverzicht-module-container,
.prijsoverzicht-module-container.card,
div.prijsoverzicht-module-container.card {
    font-family: 'Heebo', Arial, Helvetica, sans-serif;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 5px !important;
    background-color: #f8f9fa !important;
    color: #222222 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    display: block !important;
}

/* Reset current prices container volledig */
.prijsoverzicht-current-prices,
.prijsoverzicht-module-container .prijsoverzicht-current-prices,
div.prijsoverzicht-current-prices {
    overflow: visible !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* ============================================
   DIRECT BESTELLEN KNOP (JavaScript controlled)
   ============================================ */
.prijsoverzicht-direct-order-container {
    margin-top: 15px;
    text-align: center;
}

.prijsoverzicht-direct-order-btn {
    display: inline-block;
    padding: 15px 12px;
    background-color: #fad505;
    color: #222222;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    min-width: 50%;
}

.prijsoverzicht-direct-order-btn:hover {
    background-color: #222222;
    color: #fad505;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.prijsoverzicht-module-container .card-body {
    padding: 0 !important;
    margin: 0 !important;
}

/* HEADER SECTIE - Zeer specifieke CSS voor uitlijning */
.prijsoverzicht-module-container .prijsoverzicht-header,
.prijsoverzicht-module-container div.prijsoverzicht-header,
div.prijsoverzicht-module-container div.prijsoverzicht-header {
    margin: 0 !important;
    padding: 0 !important;
    background-color: transparent !important;
    width: 100% !important;
    display: block !important;
}

/* CARD TITLE - Zeer specifieke CSS */
.prijsoverzicht-module-container .card-title,
.prijsoverzicht-module-container h5.card-title,
.prijsoverzicht-module-container .prijsoverzicht-header .card-title,
.prijsoverzicht-module-container .prijsoverzicht-header h5.card-title {
    margin: 0 !important;
    padding: 15px 15px 12px 15px !important; /* Padding rondom de titel */
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #222222 !important;
    border-bottom: 2px solid #fad505 !important;
    background-color: #f8f9fa !important;
    width: 100% !important;
    text-align: left !important;
    display: block !important;
    line-height: 1.2 !important;
}

/* Current prices container - geen padding */
.prijsoverzicht-module-container .prijsoverzicht-current-prices,
.prijsoverzicht-module-container div.prijsoverzicht-current-prices {
    padding: 0 !important;
    margin: 0 !important;
}

.price-entry-row-link { /* De <a> tag die de hele rij klikbaar maakt */
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.price-entry-row-link:hover .price-entry-row { /* Hover-effect op de div, zodat de hele rij verandert */
    background-color: #fffef0 !important; /* Lichtgele achtergrond bij hover */
}

.price-entry-row {
    display: flex;
    align-items: center;
    padding: 12px 15px !important; /* GEFIXTE PADDING - 15px zijkanten om uit te lijnen met titel */
    border-bottom: 1px solid #e5e5e5; /* Lichtgrijze scheidingslijn tussen rijen */
    gap: 10px;
    background-color: #ffffff; /* Witte achtergrond */
    transition: background-color 0.2s ease;
}

.price-entry-row:last-child {
    border-bottom: none;
}

.shop-logo-container {
    flex: 0 0 50px; /* Iets kleinere vaste breedte voor logo */
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    background-color: #fff; /* Witte achtergrond voor logo's zodat ze goed uitkomen */
    border-radius: 3px;
    padding: 2px;
}

.shop-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.shop-details {
    flex-grow: 1;
    flex-basis: 0;
    min-width: 150px;
    padding-right: 10px;
}

/* NIEUW: Styling voor de shop-name-and-marketing wrapper */
.shop-name-and-marketing {
    display: flex; /* Maak een flex container */
    align-items: center; /* Centreer items verticaal */
    gap: 8px; /* Ruimte tussen winkelnaam en marketing tekst */
    margin-bottom: 4px; /* Ruimte onder deze wrapper, boven bezorgvoorwaarden */
}

.shop-details .shop-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: #222222;
    white-space: nowrap; /* Voorkom afbreken van winkelnaam */
}

.shop-details .delivery-conditions {
    font-size: 0.8rem;
    color: #666666;
    line-height: 1.4;
}
.shop-details .delivery-conditions p {
    margin-bottom: 0;
    font-size: inherit;
    color: inherit;
}


.price-section {
    flex: 0 0 auto;
    text-align: right;
    margin-left: auto;
    min-width: 180px;
}

.price-and-button-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 5px;
}

.price-section .price-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #222222;
    white-space: nowrap;
}

.view-button-container {
    display: flex;
    align-items: center;
}

.btn-bekijken {
    display: inline-block;
    padding: 8px 16px;
    background-color: #fad505;
    color: #222222 !important;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none !important;
}

.btn-bekijken:hover {
    background-color: #222222;
    color: #fad505 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none !important;
}

/* Marketing Text Label - Aangepast voor inline weergave */
.marketing-text-label { /* GEEN .price-section meer, want hij zit nu in shop-details */
    display: inline-block; /* Zorgt dat het naast de winkelnaam komt */
    background-color: #fad505;
    color: #222222;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    /* Verwijder margin-top, want die is nu niet nodig door Flexbox */
}
.marketing-text-label p {
    margin-bottom: 0;
    font-size: inherit;
    color: inherit;
    display: inline;
}


/* Responsive aanpassingen */
@media (max-width: 600px) {
    .price-entry-row {
        /* Zorgt ervoor dat de directe kinderen naast elkaar staan */
        flex-direction: row; 
        /* Centreert de items verticaal in de rij */
        align-items: center; 
        /* Voegt ruimte toe tussen de items */
        gap: 8px; 
        padding: 10px;
        /* Zorgt ervoor dat items die niet passen naar de volgende regel gaan */
        flex-wrap: wrap; 
        /* Verdeelt de ruimte horizontaal tussen de items */
        justify-content: space-between; 
    }

    .shop-logo-container {
        width: auto;
        max-width: 150px; /* Houdt een maximum breedte aan voor het logo */
        margin-right: 0;
        margin-bottom: 0; /* Geen bottom margin meer als ze naast elkaar staan */
    }

    .shop-details {
        /* Zorgt ervoor dat shop-details flexibel is en de beschikbare ruimte kan innemen */
        flex-grow: 1; 
        width: auto; /* Reset de breedte om flexibel te zijn */
        padding-right: 0;
    }

    .shop-name-and-marketing {
        flex-wrap: wrap; 
        gap: 5px;
    }

    .price-section {
        /* Zorgt ervoor dat price-section aan de rechterkant kan uitlijnen en flexibel is */
        width: auto; /* Reset de breedte */
        text-align: right; /* Lijnt de tekst in deze sectie rechts uit */
        margin-left: 0;
        margin-top: 0; /* Geen top margin meer als ze naast elkaar staan */
    }

    .price-and-button-wrapper {
        /* Zorgt ervoor dat de prijs en knop naast elkaar blijven en aan de rechterkant uitlijnen */
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: flex-end; /* Essentieel om ze rechts uit te lijnen */
        width: auto; /* Zodat het flexibel is in breedte */
        padding-right:30px;
    }

    .price-value {
        white-space: nowrap; /* Voorkomt dat de prijs afbreekt op meerdere regels */
    }

    .view-button-container .btn {
        padding: 8px 12px; /* Pas de padding van de knop eventueel aan voor kleinere schermen */
        font-size: 14px; /* Pas de lettergrootte van de knop aan indien nodig */
    }

/* Responsive aanpassingen */
@media (max-width: 361px) {
    .price-section {
        /* Zorgt ervoor dat price-section aan de rechterkant kan uitlijnen en flexibel is */
        width: auto; /* Reset de breedte */
        text-align: right; /* Lijnt de tekst in deze sectie rechts uit */
        margin-left: 0;
        margin-top: 0; /* Geen top margin meer als ze naast elkaar staan */
        min-width: 285px;
    }
}

/* Verkoopprijs styling */
.sale-price-section {
    background-color: #2d5a2d; /* Donkergroene achtergrond */
    border: 1px solid #4a7c4a;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.sale-price-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.sale-price-title {
    color: #90EE90; /* Lichtgroene tekst */
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sale-price-title i {
    font-size: 1.1rem;
}

.sale-price-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.price-display {
    font-size: 1.3rem;
    font-weight: bold;
    color: #90EE90;
    margin-bottom: 5px;
}

.sale-price-note {
    font-size: 0.8rem;
    color: #bbb;
    font-style: italic;
}

/* Responsive aanpassingen voor verkoopprijs */
@media (max-width: 600px) {
    .sale-price-info {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .sale-price-value {
        align-items: flex-start;
        text-align: left;
    }
}

/* Responsive aanpassingen */
@media (max-width: 430px) {
    .price-section {
        /* Zorgt ervoor dat price-section aan de rechterkant kan uitlijnen en flexibel is */
        width: auto; /* Reset de breedte */
        text-align: right; /* Lijnt de tekst in deze sectie rechts uit */
        margin-left: 0;
        margin-top: 0; /* Geen top margin meer als ze naast elkaar staan */
        min-width: 350px;
    }
}

/* ============================================
   FASE 1+2: VARIANT DROPDOWN STYLING
   ============================================ */

/* Variant count badge */
.variant-count-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background-color: #f2f2f2;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-size: 0.85em;
    color: #fad505;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.variant-count-badge:hover {
    background-color: #fad505;
    color: #222222;
    border-color: #fad505;
}

.variant-count-badge .variant-dropdown-icon {
    font-size: 14px;
    vertical-align: middle;
    margin-left: 4px;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* FASE 2: Price entry wrapper - BELANGRIJK voor dropdown positioning */
.price-entry-wrapper {
    position: relative;
    margin-bottom: 0 !important; /* Geen extra spacing */
    display: block !important; /* Override parent flex */
    width: 100%;
}

.price-entry-row {
    position: static; /* Geen positioning, zodat flexbox normaal werkt */
    display: flex !important; /* Behoud flexbox voor row zelf */
}

.shop-details {
    position: static;
}

.shop-name-and-marketing {
    position: relative;
    z-index: 1;
}

/* Variant dropdown container - FLOATING OVER CONTENT */
.variant-dropdown {
    position: absolute;
    top: 100%; /* Direct onder de price-entry-wrapper */
    left: 60px; /* Ruimte voor shop logo */
    min-width: 400px;
    max-width: 600px;
    background-color: #ffffff;
    border: 1px solid #fad505;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(250, 213, 5, 0.2), 0 2px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999; /* Hoog genoeg om over andere elementen heen te gaan */
    margin-top: 2px;
}

/* Loading state */
.variant-dropdown-loading {
    padding: 15px;
    text-align: center;
    color: #fad505;
    font-size: 0.9em;
}

.variant-dropdown-loading .material-icons {
    vertical-align: middle;
    margin-right: 5px;
    font-size: 18px;
    color: #fad505;
}

/* Rotating animation for loading icon */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating {
    animation: rotate 1s linear infinite;
    display: inline-block;
}

/* Error state */
.variant-dropdown-error {
    padding: 15px;
    text-align: center;
    color: #666666;
    font-size: 0.9em;
    font-style: italic;
}

/* Variant list */
.variant-dropdown-list {
    padding: 0;
    margin: 0;
}

/* Individual variant option */
.variant-option {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 15px; /* Ruimte tussen titel en prijs */
    background-color: #ffffff;
}

.variant-option:last-child {
    border-bottom: none;
}

.variant-option:hover {
    background-color: #fffef0;
    border-left: 3px solid #fad505;
    padding-left: 12px; /* Compenseer border */
}

.variant-option:hover .variant-price {
    color: #222222;
    transform: scale(1.05); /* Kleine zoom effect */
}

/* Variant title */
.variant-title {
    flex: 1;
    font-size: 0.9em;
    color: #222222 !important;
    margin-right: 10px;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Variant price - GEEL en opvallend */
.variant-price {
    font-weight: bold !important;
    color: #fad505 !important;
    font-size: 1.1em !important; /* Iets groter voor zichtbaarheid */
    white-space: nowrap;
    min-width: 70px; /* Vaste breedte voor uitlijning */
    text-align: right;
    letter-spacing: 0.5px; /* Betere leesbaarheid */
}

/* Scrollbar styling for dropdown */
.variant-dropdown::-webkit-scrollbar {
    width: 8px;
}

.variant-dropdown::-webkit-scrollbar-track {
    background: #f2f2f2;
}

.variant-dropdown::-webkit-scrollbar-thumb {
    background: #e5e5e5;
    border-radius: 4px;
}

.variant-dropdown::-webkit-scrollbar-thumb:hover {
    background: #fad505;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .variant-dropdown {
        max-height: 200px;
    }
    
    .variant-option {
        padding: 8px 10px;
    }
    
    .variant-title {
        font-size: 0.85em;
    }
    
    .variant-price {
        font-size: 0.9em;
    }
}

}