/*
    =======================================================
    MODERNISERING VAN 'FLY-SAMPLES' POPUP EN PAGINA LAYOUT
    =======================================================
*/

/* Algemene instellingen */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* --- OVERLAY EN ALGEMEEN POPUP --- */
#popup-fly-samples-overlay {
    display: none; /* Standaard verborgen, wordt getoond door JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    transition: opacity 0.3s ease;
}

#popup-fly-samples {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 450px;
    max-width: 90%;
    background-color: #FFFFFF;
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 99999;
    overflow-y: auto;
}

#popup-fly-samples.opened {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

body.popup-fly-samples-opened #popup-fly-samples-overlay {
    display: block;
}

body.no-scroll {
    overflow: hidden;
}

#popup-fly-samples .inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- HEADER EN SLUITKNOP POPUP --- */
.fly-samples-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px 10px;
}

h3.fly-samples-title {
    font-size: 24px;
    font-weight: 500;
    color: #000;
    margin: 0;
	padding-top: 16px;
}

.btn-close-fly-samples {
    position: static;
    font-size: 20px;
    color: #000;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-close-fly-samples:hover {
    color: #000;
}

/* --- CONTENT WRAPPER POPUP --- */
#popup-fly-samples .fly-samples-wrap {
    padding: 0;
    background-color: #FFFFFF;
    height: 100%;
    overflow-y: auto;
	scrollbar-width: none;
    -ms-overflow-style: none;
}

.fly-samples-wrap::-webkit-scrollbar {
  display: none;
}

.fly-samples-body-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

/* --- LEGE KLEURSTALEN MAND BERICHT --- */
.no-sample-message {
    text-align: center;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
}

.empty-samples-icon {
    width: 350px;
    max-width: 80%;
    margin: 0 auto 30px;
}

.empty-samples-icon img {
    width: 100%;
    height: auto;
    display: block;
}

.empty-samples-heading {
    font-size: 18px;
	font-weight: 500;
    color: #000;
    margin-bottom: 10px;
}

.empty-samples-text {
    font-size: 1em;
    color: #000;
    margin-bottom: 20px;
}

.return-to-samples .button {
	line-height: 1em;
    font-size: 1em;
    display: inline-block;
    padding: 12px 25px;
    background-color: #000000;
    color: #ffffff !important;
    font-weight: 600;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.2s ease, transform 0.2s ease;
	border: none;
}

.return-to-samples .button:hover {
    background-color: #000000;
}

/* --- PRODUCTEN LIJST IN POPUP --- */
.product-samples-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-samples-list .product-wrapper.mf-initial {
    display: grid;
    grid-template-columns: 65px 1fr 20px;
    align-items: center;
    gap: 20px;
    padding: 0;
    border-bottom: none;
}

.product-samples-list .product-wrapper:last-child {
    border-bottom: none;
}

.product-image-wrapper {
    width: 65px;
    height: 65px;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-name {
    font-size: 15px;
    line-height: 18px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.product-details {
    font-size: 12px;
    line-height: 16px;
    margin: 5px 0px;
    color: #000;
}

.product-gratis {
    font-size: 13px;
	line-height: 14px;
    font-weight: 600;
    color: #4ecf00;
}

.remove-sample-btn {
    color: #000;
    font-size: 1.5em;
	font-weight: 900;
    cursor: pointer;
    transition: color 0.2s ease;
}

.remove-sample-btn:hover {
    color: #ff3b00;
}

/* --- VOETNOOT EN FORMULIER POPUP --- */
.fly-samples-footer {
    padding: 20px 30px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
}

/* --- KLEURSTALEN PAGINA LAYOUT --- */
/* Dit is de algemene wrapper voor de hele kleurstalen pagina. */
.product-samples-container {
    display: flex;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 1410px;
    margin: 0 auto;
}

/* De directe ouder van de filters sidebar en de grid wrapper */
.product-samples-main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 20px;
}

/* Zorgt ervoor dat de grid wrapper de resterende ruimte opvult */
.product-samples-grid-wrapper {
    flex-grow: 1;
}

/* Styles voor de grid items */
.grid {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: -5px;
}

.xl-grid-item {
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #fff;
    box-sizing: border-box;
    margin: 10px; /* Margins tussen grid items */
}

.xl-grid-item img {
    width: 100%;
    height: auto;
    object-fit: inherit;
    aspect-ratio: 1;
    border-radius: 8px;
}

.sample-gridtitle {
    text-align: left;
    margin: 10px 0px 10px 0px;
    font-weight: 800;
    font-size: 16px;
    line-height: 20px;
    text-transform: uppercase;
}

.sample-subtitle {
    font-size: 11px;
    color: #000;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

@media only screen and (min-width: 767px) {
    .sample-subtitle {
        font-size: 13px;
    }
}

p.sample-related-product {
    font-size: 13px !important;
    line-height: 17px;
    text-align: left;
    margin: 5px 0px;
}

.sample-subtitle .sample-icon {
    margin-right: 5px;
    width: 20px;
    height: auto;
}

img.sample-icon {
    border-radius: 0;
}

button.select-sample-btn,
.select-sample-btn {
    color: #FFFFFF;
    background-color: #ff3b00;
    border: none !important;
    height: 35px;
    font-size: 12px;
    line-height: 15px;
}

button.select-sample-btn:hover,
.select-sample-btn:hover {
    border: none !important;
    box-shadow: none !important;
    background-color: #ff3b00;
}

.load-more-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

@media only screen and (max-width: 767px) {
    .xl-grid-item {
        max-width: calc(50% - 20px);
    }
	.product-samples-filters {
	    z-index: 99999;
	}
}

@media only screen and (min-width: 768px) and (max-width: 1400px) {
    .xl-grid-item {
        max-width: calc(33.33% - 20px);
        min-width: 240px; /* Deze blijft hier staan */
    }
}

@media only screen and (min-width: 1401px) {
    .xl-grid-item {
        max-width: calc(25% - 20px);
    }
}

.xl-grid-item.selected {
    outline: 2px solid #ff3b00;
    outline-offset: -2px;
    border: 1px solid #FFFFFF00;
}

/* --- ZIJBALK/FILTER STIJLEN (mobiel & desktop) --- */
.product-samples-filters {
    /* Mobiele styling: Fixed, schuift in */
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 450px;
    max-width: 90%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.product-samples-filters.open {
    transform: translateX(0);
}

/* HEADER EN SLUITKNOP VOOR MOBIELE FILTERS */
.filter-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px; 
}

h3.filter-sidebar-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.btn-close-filter-sidebar {
    color: #333;
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.btn-close-filter-sidebar:hover {
    color: #e74c3c;
}


.product-samples-filters h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.product-samples-filters ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-samples-filters li {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.filter-toggle-btn {
    display: block;
    width: 100%;
    padding: 15px;
    color: #ffffff;
    border: none;
    cursor: pointer;
    text-align: center;
    border-radius: 5px;
    margin-bottom: 20px;
    background-color: #ff3b00;
    font-size: 16px;
    line-height: 16px;
}

button#filter-toggle-btn:hover {
    background-color: #ff3b00;
    box-shadow: none;
}

/* Overlay voor mobiele filter zijbalk */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-overlay.open {
    visibility: visible;
    opacity: 1;
}

/* Desktop Styles voor pagina layout en filters */
@media (min-width: 768px) {
    .filter-toggle-btn {
        display: none;
    }

    .filter-overlay {
        display: none;
    }

    /* Verberg de mobiele header/sluitknop op desktop */
    .product-samples-filters .filter-sidebar-header {
        display: none;
    }

    /* product-samples-main is de flex container die de sidebar en grid-wrapper naast elkaar zet */
    .product-samples-main {
        flex-direction: row;
        gap: 40px;
        align-items: flex-start;
    }

    /* Zorg dat de filters sidebar statisch is en een vaste breedte heeft */
    .product-samples-filters {
        position: static;
        transform: translateX(0);
        flex: 0 0 350px;
        padding: 0;
        background: none;
        border-bottom: none;
        margin-bottom: 0;
        box-shadow: none;
    }

    .product-samples-filters h3 {
        padding-top: 20px;
        padding-bottom: 10px;
    }

    .product-samples-filters h3:first-child {
        padding-top: 0;
    }

    .product-samples-grid-wrapper {
        flex-grow: 1;
    }
}


/* --- TOAST NOTIFICATIE STIJLEN --- */
.sample-notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.sample-notification {
    background-color: #ff3b00;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 280px;
    max-width: 90%;
    text-align: left;
    font-size: 15px;

    /* Animatie eigenschappen */
    animation: toast-slide-in 0.4s ease-out forwards;
    opacity: 0;
}

/* Toevoegen van keyframes voor de animaties */
@keyframes toast-slide-in {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

div#go-to-samples-page {
    text-align: center;
    margin-top: 30px;
}