/* ---------- Vidéos produits ---------- */
.cbv-videos { margin: 16px 0; clear: both; }
.cbv-videos--in-gallery { margin: 12px 0 0; }
.cbv-videos__title { font-weight: 600; font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.cbv-videos__list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }

.cbv-play-ico { display: inline-block; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }

.cbv-thumb {
	position: relative; flex: 0 0 auto; width: 92px; height: 130px; padding: 0; border: 0; border-radius: 10px;
	overflow: hidden; cursor: pointer; background: linear-gradient(135deg, #111 0%, #333 100%); color: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: transform .15s ease;
}
.cbv-thumb:hover, .cbv-thumb:focus-visible { transform: translateY(-2px); }
.cbv-thumb--youtube { width: 160px; height: 90px; background: linear-gradient(135deg, #c4302b, #7a1712); }
.cbv-thumb--instagram { background: linear-gradient(135deg, #feda75, #d62976 50%, #4f5bd5); }
.cbv-thumb--facebook { background: linear-gradient(135deg, #1877f2, #0b3d91); }
.cbv-thumb--tiktok { background: linear-gradient(135deg, #010101, #25f4ee 160%); }
.cbv-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.cbv-thumb__play {
	position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
	background: rgba(0,0,0,.55); box-shadow: 0 0 0 2px rgba(255,255,255,.85) inset;
}
.cbv-thumb__play::after {
	content: ""; position: absolute; top: 50%; left: 50%; margin: -7px 0 0 -4px;
	border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff;
}
.cbv-thumb__badge {
	position: absolute; left: 6px; bottom: 6px; font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 20px;
	background: rgba(0,0,0,.65); color: #fff; font-weight: 600;
}

/* Bouton "Vidéo" sur l'image principale */
.woocommerce-product-gallery { position: relative; }
.cbv-gallery-cta {
	position: absolute; left: 12px; top: 12px; z-index: 9; display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 12px; border: 0; border-radius: 30px; background: rgba(0,0,0,.75); color: #fff;
	font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.cbv-gallery-cta:hover { background: #000; }

/* Badge sur les vignettes du catalogue */
.products .product { position: relative; }
.cbv-loop-badge {
	position: absolute; right: 8px; top: 8px; z-index: 5; font-size: 11px; font-weight: 600; line-height: 1;
	padding: 4px 8px; border-radius: 20px; background: rgba(0,0,0,.75); color: #fff; pointer-events: none;
}

/* Popup */
.cbv-lock, .cbv-lock body { overflow: hidden; }
.cbv-modal { position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center; }
.cbv-modal.is-open { display: flex; }
.cbv-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); }
.cbv-modal__box { position: relative; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.cbv-modal__box.is-horizontal { width: min(92vw, 960px); aspect-ratio: 16 / 9; }
.cbv-modal__box.is-vertical { height: min(88vh, 760px); aspect-ratio: 9 / 16; max-width: 94vw; }
.cbv-modal__box.is-vertical.is-tiktok { aspect-ratio: 9 / 17; }
.cbv-modal__box.is-vertical.is-instagram { background: #fff; aspect-ratio: 9 / 15; }
.cbv-modal__frame, .cbv-modal__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.cbv-modal__close {
	position: absolute; right: 8px; top: 8px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%;
	background: rgba(0,0,0,.7); color: #fff; font-size: 24px; line-height: 36px; padding: 0; cursor: pointer;
}

/* ---------- Top vendeurs ---------- */
.cbv-top { margin: 24px 0; }
.cbv-top__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cbv-top__title { margin: 0; font-size: 22px; }
.cbv-top__sub { color: #777; font-size: 14px; margin: 4px 0 0; }
.cbv-top__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.cbv-top--carousel .cbv-top__grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.cbv-top--carousel .cbv-vcard { flex: 0 0 210px; scroll-snap-align: start; }

.cbv-vcard {
	position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid #eee; border-radius: 14px;
	overflow: hidden; text-decoration: none !important; color: inherit; transition: box-shadow .15s ease, transform .15s ease;
}
.cbv-vcard:hover { box-shadow: 0 6px 22px rgba(0,0,0,.09); transform: translateY(-2px); }
.cbv-vcard__banner { height: 78px; background: linear-gradient(135deg, #0a7d3b, #f2b705) center / cover no-repeat; }
.cbv-vcard__avatar {
	width: 64px; height: 64px; border-radius: 50%; border: 3px solid #fff; margin: -32px auto 0; overflow: hidden;
	background: #f3f3f3; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.cbv-vcard__avatar img { width: 100%; height: 100%; object-fit: cover; margin: 0; }
.cbv-vcard__body { padding: 8px 12px 14px; text-align: center; }
.cbv-vcard__name { font-weight: 700; font-size: 15px; margin: 4px 0 2px; line-height: 1.3; }
.cbv-vcard__rating { font-size: 13px; color: #e0a100; }
.cbv-vcard__rating span { color: #888; }
.cbv-vcard__stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #666; margin-top: 6px; }
.cbv-vcard__cta { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 30px; background: #111; color: #fff; }
.cbv-rank {
	position: absolute; left: 10px; top: 10px; z-index: 2; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 20px;
	background: #fff; color: #111; box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.cbv-rank--1 { background: #f2b705; }
.cbv-rank--2 { background: #d9d9d9; }
.cbv-rank--3 { background: #e3a06b; }
.cbv-pin { position: absolute; right: 10px; top: 10px; z-index: 2; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 20px; background: #0a7d3b; color: #fff; }

.cbv-store-badge {
	display: inline-flex; align-items: center; gap: 6px; margin: 6px 0; padding: 5px 12px; border-radius: 30px;
	background: #f2b705; color: #111; font-weight: 700; font-size: 13px;
}

/* Accueil : badge de rang sur les cartes boutique du thème */
.cbv-home-top .cb-storecard { position: relative; }
.cbv-home-top .cbv-rank { z-index: 3; }

/* Vignettes : photo du produit en fond si pas de miniature vidéo */
.cbv-thumb { background-size: cover; background-position: center; }
.cbv-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cbv-thumb--file { background-color: #111; }

/* Rangée « Produits en vidéo » (accueil, page boutique) */
.cbv-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; scrollbar-width: thin; }
.cbv-rail__item { flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cbv-thumb.cbv-thumb--rail { width: 150px; height: 266px; border-radius: 14px; }
.cbv-thumb--rail .cbv-thumb__play { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.cbv-thumb--rail::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.55)); pointer-events: none; }
.cbv-thumb--rail .cbv-thumb__badge { z-index: 1; }
.cbv-rail__meta { display: flex; flex-direction: column; gap: 2px; text-decoration: none !important; color: inherit; }
.cbv-rail__name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cbv-rail__price { font-size: 13px; font-weight: 700; }
.cbv-rail__price del { opacity: .6; font-weight: 400; margin-right: 4px; }
@media (min-width: 900px) {
	.cbv-rail__item { flex-basis: 180px; }
	.cbv-thumb.cbv-thumb--rail { width: 180px; height: 320px; }
}
.cbv-rail-section--store { margin: 8px 0 20px; }

/* Popup : vidéo + infos produit */
.cbv-modal__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; max-height: 96vh; }
.cbv-modal__box.is-vertical { height: min(80vh, 720px); }
.cbv-modal__frame video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.cbv-modal__box.is-file.is-vertical { aspect-ratio: 9 / 16; }
.cbv-modal__info {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(94vw, 420px);
	padding: 10px 12px; border-radius: 12px; background: #fff; color: #111;
}
.cbv-modal__info[hidden] { display: none; }
.cbv-modal__txt { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.cbv-modal__txt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.cbv-modal__go { flex: 0 0 auto; padding: 8px 14px; border-radius: 30px; background: #111; color: #fff !important; font-weight: 600; font-size: 13px; text-decoration: none !important; }

/* Prix sur demande */
.cbv-price-request { font-weight: 700; color: #0E6B4E; }
.cbv-wa-price {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0; padding: 12px 20px;
	border-radius: 10px; background: #25D366; color: #fff !important; font-weight: 700; font-size: 15px; text-decoration: none !important;
}
.cbv-wa-price:hover { background: #1ebe5b; }

/* Boutique de la semaine */
.cbv-spot__card {
	position: relative; overflow: hidden; border-radius: 18px; padding: 28px; margin-bottom: 18px; color: #fff;
	background: linear-gradient(100deg, rgba(8,18,14,.94) 0%, rgba(8,18,14,.82) 45%, rgba(8,18,14,.35) 100%), var(--cbv-spot-bg, linear-gradient(135deg,#0E6B4E,#0a4f3a)) center / cover no-repeat;
	display: grid; gap: 14px; align-content: start; min-height: 220px;
}
.cbv-spot__id { display: flex; align-items: center; gap: 14px; }
.cbv-spot__logo { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
.cbv-spot__logo img { width: 100%; height: 100%; object-fit: cover; }
.cbv-spot__name { font-size: 24px; font-weight: 800; line-height: 1.2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cbv-spot__meta { display: flex; gap: 12px; font-size: 14px; opacity: .85; margin-top: 4px; }
.cbv-spot__about { margin: 0; max-width: 560px; font-size: 15px; line-height: 1.5; opacity: .9; }
.cbv-spot__cta { justify-self: start; }
@media (max-width: 600px) { .cbv-spot__card { padding: 20px; } .cbv-spot__name { font-size: 20px; } }

/* Étiquette des arrivages */
#nouveautes .cb-card { position: relative; }
.cbv-new-tag { position: absolute; left: 10px; top: 10px; z-index: 3; max-width: calc(100% - 64px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 20px; background: #E3B23C; color: #111; pointer-events: none; }

/* Grilles de l'accueil : pleine largeur sur ordinateur, selon le nombre de produits */
@media (min-width: 901px) {
	.cbv-spot__products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.cbv-spot__products:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cbv-spot__products:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	#nouveautes .cb-rail--grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 901px) and (max-width: 1100px) {
	#nouveautes .cb-rail--grid:has(> :nth-child(5):last-child) > :nth-child(5) { display: none; }
}
