/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/* ── Rupture de stock ───────────────────────────────────────────────── */
.vvs-rupture-wrap {
	margin-top: 16px;
	padding: 20px;
	background: #fdf6f0;
	border-left: 4px solid #c0392b;
	border-radius: 4px;
}

.vvs-rupture-label {
	font-weight: 700;
	color: #c0392b;
	margin: 0 0 8px;
}

.vvs-rupture-intro {
	color: #555;
	font-size: 14px;
	margin: 0 0 16px;
}

.vvs-rupture-fields {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 12px;
}

.vvs-rupture-fields input,
.vvs-rupture-fields textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
}

.vvs-rupture-fields textarea {
	resize: vertical;
}

.vvs-rupture-submit {
	background: #333;
	color: #fff;
	border: none;
	padding: 10px 24px;
	border-radius: 4px;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.2s;
}

.vvs-rupture-submit:hover  { background: #555; }
.vvs-rupture-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.vvs-rupture-feedback { margin-top: 10px; font-size: 14px; }
.vvs-rupture-feedback.success { color: #1a7f37; }
.vvs-rupture-feedback.error   { color: #c0392b; }

/* ── Filtre AJAX — Layout sidebar ───────────────────────────────────── */
.vvs-filter-wrap { margin-bottom: 32px; }

/* Layout 30 / 70 */
.vvs-layout {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

.vvs-sidebar {
	width: 30%;
	flex-shrink: 0;
	position: sticky;
	top: 24px;
}

.vvs-main { flex: 1; min-width: 0; }

/* Sections sidebar */
.vvs-sidebar-section { margin-bottom: 24px; }


.vvs-sidebar-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #888;
	margin: 0 0 10px;
}

/* Barre de recherche */
.vvs-searchbar { position: relative; }

.vvs-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: #888;
	pointer-events: none;
}

.vvs-search-input {
	width: 100%;
	padding: 10px 36px 10px 38px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.2s;
}
.vvs-search-input:focus { border-color: #333; }

.vvs-search-clear {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
	color: #888;
	cursor: pointer;
	display: none;
	line-height: 1;
}
.vvs-search-clear:hover { color: #333; }

/* Filtre prix */
.vvs-price-range {
	display: flex;
	align-items: center;
	gap: 8px;
}

.vvs-price-range input {
	flex: 1;
	min-width: 0;
	padding: 9px 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.2s;
}
.vvs-price-range input:focus { border-color: #333; }
.vvs-price-range input::-webkit-outer-spin-button,
.vvs-price-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.vvs-price-sep { color: #aaa; font-size: 14px; flex-shrink: 0; }

/* Toggle En stock — style Tailwind */
.vvs-sidebar-toggle { margin-top: 8px; padding-top: 20px; border-top: 1px solid #f0f0f0; }

.vvs-toggle-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
}

.vvs-toggle-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.vvs-toggle-track {
	position: relative;
	width: 44px;
	height: 24px;
	background: #d1d5db;
	border-radius: 9999px;
	flex-shrink: 0;
	transition: background 0.2s;
}
.vvs-toggle-input:checked + .vvs-toggle-track { background: #1a7f37; }

.vvs-toggle-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
	transition: transform 0.2s;
}
.vvs-toggle-input:checked + .vvs-toggle-track .vvs-toggle-thumb { transform: translateX(20px); }

.vvs-toggle-text { font-size: 13px; color: #333; }

/* Boutons genres (nav catégories) */
.vvs-genre-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.vvs-filter-btn {
	padding: 4px 10px !important;
	border: 1px solid #333 !important;
	border-radius: 20px !important;
	background: transparent !important;
	font-size: 12px !important;
	font-weight: 400 !important;
	font-family: inherit !important;
	color: #333 !important;
	cursor: pointer !important;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap !important;
	text-decoration: none !important;
	line-height: 1.4 !important;
	display: inline-block !important;
}
.vvs-filter-btn:hover,
.vvs-filter-btn.active {
	background: #333 !important;
	color: #fff !important;
}
.vvs-filter-count { opacity: 0.6; font-size: 10px; }



/* Barre résultats */
.vvs-results-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	font-size: 13px;
	color: #777;
}

/* Spinner */
.vvs-spinner {
	display: none;
	width: 15px;
	height: 15px;
	border: 2px solid #ddd;
	border-top-color: #333;
	border-radius: 50%;
	animation: vvs-spin 0.7s linear infinite;
}
@keyframes vvs-spin { to { transform: rotate(360deg); } }

/* Grille produits — 3 colonnes fixes */
.vvs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	transition: opacity 0.2s;
}

/* Bouton Filtres mobile + overlay */
.vvs-filter-open {
	display: none;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid #333;
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	font-family: inherit;
	color: #333;
	cursor: pointer;
	margin-bottom: 16px;
}
.vvs-filter-open svg { width: 16px; height: 16px; flex-shrink: 0; }

.vvs-sidebar-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 999;
}

.vvs-sidebar-close {
	display: none;
	width: 100%;
	margin-bottom: 20px;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
}

/* Responsive ≤ 768 px */
@media (max-width: 768px) {
	.vvs-layout { display: block; }

	.vvs-filter-open { display: flex; }

	.vvs-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		width: 85%;
		max-width: 320px;
		height: 100%;
		overflow-y: auto;
		background: #fff;
		padding: 24px 20px;
		box-sizing: border-box;
		z-index: 1000;
		transform: translateX(-110%);
		transition: transform 0.28s ease;
	}
	.vvs-sidebar.open { transform: translateX(0); }
	.vvs-sidebar-overlay.open { display: block; }
	.vvs-sidebar-close { display: block; }
	.vvs-sidebar-sticky-close {
		position: sticky;
		top: 0;
		z-index: 2;
	}

	.vvs-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* Card produit */
.vvs-card {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.vvs-card-thumb { display: block; aspect-ratio: 1; overflow: hidden; }
.vvs-card-thumb .vvs-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s;
}
.vvs-card:hover .vvs-card-img { transform: scale(1.04); }

.vvs-card-body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.vvs-card-title {
	font-size: 13px;
	font-weight: 600;
	margin: 0;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vvs-card-title a { color: inherit; text-decoration: none; }
.vvs-card-title a:hover { text-decoration: underline; }

.vvs-card-price { font-size: 14px; font-weight: 700; margin-top: auto; }

.vvs-card .vvs-btn-voir {
	display: block;
	text-align: center;
	padding: 8px 12px;
	background: #333 !important;
	color: #fff !important;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 400;
	text-decoration: none !important;
	margin-top: 6px;
	transition: background 0.2s;
}
.vvs-card .vvs-btn-voir:hover { background: #555 !important; color: #fff !important; }

/* Pagination */
.vvs-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
	justify-content: center;
	margin-top: 28px;
}

.vvs-page-btn {
	background: none;
	border: none;
	padding: 4px 10px;
	font-size: 13px;
	font-weight: 400;
	font-family: inherit;
	color: #333;
	cursor: pointer;
	line-height: 1;
	transition: font-weight 0.1s;
}

.vvs-page-btn:hover { font-weight: 700; }
.vvs-page-btn.active { font-weight: 700; }
.vvs-page-btn:disabled { opacity: 0.25; cursor: default; }

.vvs-page-prev,
.vvs-page-next { font-size: 14px; padding: 4px 8px; }

.vvs-no-result { color: #888; font-style: italic; padding: 24px 0; }
