/* ============================================================
   ff-producten.css — Products grid + popup styles
   Loaded only on pages containing [ff_producten]
   ============================================================ */

/* === Filter bar === */

.ff-producten-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.ff-producten-filter-btn {
	padding: 14px 16px !important;
	border-radius: 100px;
	border: 1px solid #000 !important;
	background: transparent !important;
	color: #000 !important;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	transition: background 0.15s ease, color 0.15s ease;
}

.ff-producten-filter-btn.is-active {
	background: #000 !important;
	color: #fff !important;
}


/* === Grid === */

.ff-producten-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 8px;
	align-items: start;
	width: 100%;
}


/* === Cards === */

.ff-product-card {
	display: block;
	width: 100%;
	border: 0;
	border-radius: 6px;
	padding: 15px 10px 10px 10px !important;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: #000;
	white-space: normal !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ff-product-card.is-hidden { display: none !important; }

.ff-product-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

.ff-product-card:focus,
.ff-product-card:hover,
.ff-product-card:active,
.ff-product-card:focus-visible {
	color: #000 !important;
}

.ff-product-card-inner {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ff-product-card-title {
	margin: 0;
	font-size: 1.3rem;
	line-height: .9;
	word-break: break-word;
	hyphens: auto;
	white-space: normal !important;
}

.ff-product-card-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-wrap: wrap;
	font-size: 0.9rem;
}

.ff-product-card-price { font-weight: 600; }
.ff-product-card-unit  { font-size: .8em; }

.ff-product-card-labels { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }


/* === Popup overlay === */

.ff-product-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9990;
	background: rgba(0,0,0,0.45);
	justify-content: center;
	align-items: center;
	padding: 20px;
}

.ff-product-popup-overlay.is-open { display: flex !important; }


/* === Popup modal === */

.ff-product-popup {
	background: #fff;
	width: 100%;
	max-width: 500px;
	max-height: 85vh;
	border-radius: 12px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	outline: none;
	scrollbar-width: none;
}
.ff-product-popup::-webkit-scrollbar { display: none; }

.ff-product-popup-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 24px 8px;
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 1;
}

.ff-product-popup-title { margin: 0; line-height: 0.9; flex: 1; }

.ff-product-popup-close {
	background: transparent;
	border: 0;
	padding: 0 !important;
	cursor: pointer;
	flex-shrink: 0;
	line-height: 1;
}
.ff-product-popup-close:hover { background: transparent !important; opacity: 0.6; }

.ff-product-popup-image {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}

.ff-product-popup-body {
	padding: 16px 24px 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1;
}

.ff-product-popup-meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	flex-direction: column;
}

.ff-product-popup-short-desc { margin: 0; font-size: 0.95rem; flex: 1; }

.ff-product-popup-price {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	white-space: nowrap;
	flex-shrink: 0;
}

.ff-product-popup-where { display: flex; flex-wrap: wrap; gap: 0; }

.ff-product-popup-months {
	display: grid;
	grid-template-columns: repeat(6, auto);
	gap: 4px;
}

.ff-product-popup-months .month {
	padding: 6px 8px;
	min-width: 50px;
	margin: 0;
	font-size: 14px;
}

.ff-product-popup-content { font-size: 0.95rem; }
.ff-product-popup-content p:last-child { margin-block-end: 0; }

.ff-product-popup-pluktips,
.ff-product-popup-bewaartips {
	font-size: 0.95rem;
	padding: 20px;
	background: #f0f0f0;
}

.ff-product-popup-footer {
	display: flex;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid #e5e5e3;
	position: sticky;
	bottom: 0;
	background: #fff;
}

.ff-product-popup-footer .elementor-button { flex: 1; text-align: center; }

.ff-product-popup-close-btn { background: #f0f0f0 !important; color: #000 !important; border: 0 !important; }
.ff-product-popup-bekijk    { background: #000 !important;    color: #fff !important; }


/* === Detail labels (full mode / popup) === */

.ff-label-detail {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 100px;
	white-space: nowrap;
}

.ff-label-detail.ff-label-product-zelfpluk     { background: #d4f7e8; color: #1a7a42; }
.ff-label-detail.ff-label-product-in-de-winkel { background: #ddeeff; color: #1a4a8a; }
.ff-label-detail.ff-label-product-niet-plukken { background: #fde8e8; color: #8a1a1a; }


/* === Full mode === */

.ff-producten--full .ff-producten-grid {
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.ff-producten--full .ff-product-card {
	padding: 0 !important;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	text-align: left;
	background-color: #fff !important;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
}

.ff-producten--full h3.ff-product-card-title { margin-top: 16px; }

.ff-producten--full .ff-product-card-inner {
	padding: 12px 14px 14px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ff-producten--full .ff-product-card-meta {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: auto;
}

.ff-product-card-image {
	width: 100%;
	height: 160px;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
}

.ff-product-card-shortdesc {
	margin: 4px 0 8px;
	font-size: 0.80rem;
	line-height: 1.2;
	color: #000;
	flex: 1;
	white-space: normal !important;
}


/* === Unavailable mode === */

button.ff-product-card--unavailable {
	display: flex;
	flex-direction: row;
	padding: 8px !important;
	gap: 8px;
	background: #f0f0f0 !important;
}

.ff-product-card--unavailable {
	padding: 0 !important;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	text-align: left;
}

.ff-product-card--unavailable h3.ff-product-card-title { font-size: 1.4rem; }

.ff-product-card--unavailable .ff-product-card-image {
	width: 80px;
	height: 80px !important;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
	border-radius: 4px !important;
	opacity: 0.5;
}

.ff-product-card-image--placeholder {
	background-color: #e4e4e0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

.ff-product-card-vanaf {
	font-size: 0.8rem;
	opacity: 0.7;
	margin-top: 4px;
	white-space: normal !important;
}


/* === Responsive === */

@media (max-width: 767px) {
	.ff-product-popup-overlay { padding: 0; align-items: flex-end; }
	.ff-product-popup { max-width: 100%; max-height: 90vh; border-radius: 12px 12px 0 0; }
	.ff-producten-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
