/* v2.177: shop sections of the home page (inc/home-shop.php). */
.vsp {
	display: flex; flex-direction: column; gap: 18px;
	padding: 18px; border-radius: var(--pm-r, 16px); background: var(--vb-surface, #fff); color: var(--vb-txt);
	border: 1px solid var(--pm-line, rgba(15, 23, 42, .07)); box-shadow: var(--pm-sh, 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .06));
}
.vsp a { text-decoration: none; }
.vsp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.vsp-h { margin: 0; font-size: var(--pm-head, 22px); font-weight: 700; color: var(--vb-txt); }
.vsp-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #16a34a; white-space: nowrap; }
.vsp-all i { font-size: 10px; }
.vsp-all:hover { color: #15803d; }

/* ---------- Banner (our own design) ---------- */
.vsp-banner {
	--vsp-c: #e11d2a;
	position: relative; display: flex; align-items: center; gap: 16px; min-height: 150px; padding: 22px 86px 22px 30px; overflow: hidden;
	border-radius: var(--pm-r-sm, 12px); color: #fff; isolation: isolate;
	background:
		radial-gradient(circle at 78% 50%, rgba(255, 255, 255, .28) 0 18%, transparent 19%),
		radial-gradient(circle at 92% 10%, rgba(255, 255, 255, .16) 0 14%, transparent 15%),
		linear-gradient(110deg, var(--vsp-c) 0%, color-mix(in srgb, var(--vsp-c) 72%, #000) 100%);
	background-color: var(--vsp-c);
}
.vsp-banner::before { /* fine diagonal stripes for depth */
	content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12;
	background: repeating-linear-gradient(135deg, #fff 0 2px, transparent 2px 22px);
}
.vsp-banner-txt { display: flex; flex-direction: column; gap: 4px; flex: 1 1 50%; min-width: 0; }
.vsp-banner-small { align-self: flex-start; padding: 4px 12px; border-radius: 6px; background: #111827; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transform: rotate(-2deg); }
.vsp-banner-big { font-size: clamp(28px, 4.2vw, 52px); font-weight: 900; line-height: 1; letter-spacing: -.02em; color: #ffe14d; text-transform: uppercase; text-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.vsp-banner-text { font-size: clamp(14px, 1.4vw, 18px); font-weight: 600; opacity: .95; }
.vsp-banner-pics { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 0; }
.vsp-banner-pic { display: grid; place-items: center; width: 130px; height: 130px; margin-left: -18px; border-radius: 50%; background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); overflow: hidden; border: 4px solid rgba(255, 255, 255, .7); }
.vsp-banner-pic img { width: 82%; height: 82%; object-fit: contain; }
.vsp-banner-pic-2 { width: 150px; height: 150px; z-index: 1; }
.vsp-banner-go { position: absolute; right: 24px; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: #ffd60a; color: #b91c1c; font-size: 18px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.vsp-banner:hover .vsp-banner-go { transform: translateX(4px); }
.vsp-banner.is-own { padding: 0; min-height: 0; background: none; }
.vsp-banner.is-own::before { display: none; }
.vsp-banner.is-own img { display: block; width: 100%; height: auto; border-radius: inherit; }

/* ---------- Category tiles on a pastel stage ---------- */
.vsp-cats { --t1: #e9f6d8; --t2: #d3ecb4; --t3: #c3e29b; }
.vsp-pal-blue { --t1: #e3f0ff; --t2: #c9e0ff; --t3: #b2d1fb; }
.vsp-pal-peach { --t1: #ffeadd; --t2: #fdd5bd; --t3: #f8c3a3; }
.vsp-tiles { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 4px; list-style: none; margin: 0; }
.vsp-tiles::-webkit-scrollbar { display: none; }
.vsp-tile {
	position: relative; flex: 0 0 auto; width: 176px; aspect-ratio: 3 / 4; scroll-snap-align: start; overflow: hidden;
	border-radius: var(--pm-r-sm, 12px); background: linear-gradient(180deg, var(--t1) 0%, var(--t2) 100%); color: #111827;
	transition: transform .25s ease, box-shadow .25s ease;
}
.vsp-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(15, 23, 42, .14); color: #111827; }
.vsp-tile-name { position: absolute; z-index: 3; left: 14px; right: 12px; top: 14px; font-size: 16px; font-weight: 800; line-height: 1.2; }
.vsp-tile::before { /* the arch behind the product */
	content: ""; position: absolute; z-index: 0; left: 50%; bottom: 16%; width: 58%; height: 50%; transform: translateX(-50%);
	border-radius: 999px 999px 0 0; background: rgba(255, 255, 255, .45); border: 2px solid rgba(255, 255, 255, .7); border-bottom: 0;
}
.vsp-stage { position: absolute; z-index: 1; left: 8%; right: 8%; bottom: 6%; height: 16%; border-radius: 50%; background: linear-gradient(180deg, #fff 0%, var(--t3) 100%); box-shadow: 0 6px 12px rgba(0, 0, 0, .08); }
.vsp-tile-img { position: absolute; z-index: 2; left: 50%; bottom: 13%; width: 74%; height: 52%; transform: translateX(-50%); object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .18)); mix-blend-mode: multiply; transition: transform .3s ease; }
.vsp-tile:hover .vsp-tile-img { transform: translateX(-50%) scale(1.06); }

/* ---------- Product cards ---------- */
.vsp-card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid #e9edf2; border-radius: var(--pm-r-sm, 12px); background: var(--vb-surface, #fff); transition: box-shadow .2s ease, transform .2s ease; list-style: none; }
.vsp-card:hover { box-shadow: 0 10px 24px rgba(15, 23, 42, .12); transform: translateY(-2px); }
.vsp-card-a { display: flex; flex-direction: column; flex: 1 1 auto; color: var(--vb-txt); }
.vsp-card-a:hover { color: var(--vb-txt); }
.vsp-card-pic { display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 14px; border-radius: var(--pm-r-sm, 12px) var(--pm-r-sm, 12px) 0 0; background: #fff; overflow: hidden; }
.vsp-card-img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.vsp-card:hover .vsp-card-img { transform: scale(1.05); }
.vsp-off { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 6px; background: #16a34a; color: #fff; font-size: 12px; font-weight: 800; }
.vsp-card-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 14px; }
.vsp-co { align-self: flex-start; max-width: 100%; padding: 2px 8px; border-radius: 6px; background: #eef7ee; color: #166534; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsp-name { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.vsp-price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-right: 34px; }
.vsp-price { padding: 3px 9px; border-radius: 7px; background: #ffd60a; color: #111; font-size: 14px; font-weight: 800; }
.vsp-price.is-ask { background: #eef2f6; color: #475569; font-size: 12.5px; font-weight: 700; }
.vsp-was { font-size: 12.5px; color: #94a3b8; }
.vsp-add { position: absolute; right: 10px; bottom: 12px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #16a34a; color: #fff; font-size: 14px; box-shadow: 0 2px 6px rgba(22, 163, 74, .35); }
.vsp-add:hover { background: #15803d; color: #fff; }

/* Deal of the day: 4 x 2 + a tall store panel. */
.vsp-deal { display: grid; grid-template-columns: 1fr; gap: 14px; }
.vsp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; }
.vsp-side {
	position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 260px; padding: 22px; overflow: hidden;
	border-radius: var(--pm-r-sm, 12px); color: #0f172a;
	background: radial-gradient(circle at 70% 75%, #ffffff 0 30%, transparent 31%), linear-gradient(180deg, #eef2f7 0%, #dfe6ee 100%);
}
.vsp-side-t { position: relative; z-index: 1; font-size: 26px; font-weight: 800; line-height: 1.1; text-align: right; }
.vsp-side-btn { position: relative; z-index: 1; align-self: flex-end; padding: 8px 16px; border-radius: 999px; background: #0f172a; color: #fff; font-size: 13px; font-weight: 700; }
.vsp-side-img { position: absolute; left: 8%; right: 8%; bottom: 6%; width: 84%; height: 58%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .2)); mix-blend-mode: multiply; transition: transform .35s ease; }
.vsp-side:hover .vsp-side-img { transform: scale(1.05); }
.vsp-side:hover { color: #0f172a; }

/* Explore more categories: a picture grid. */
.vsp-bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; gap: 10px; }
.vsp-bt { position: relative; overflow: hidden; border-radius: var(--pm-r-sm, 12px); background: #f1f5f9; color: #fff; isolation: isolate; }
.vsp-bt-img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.vsp-bt::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 45%); }
.vsp-bt:hover .vsp-bt-img { transform: scale(1.06); }
.vsp-bt-name { position: absolute; left: 14px; top: 12px; right: 48px; font-size: 16px; font-weight: 800; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.vsp-bt-go { position: absolute; right: 10px; top: 10px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .25); backdrop-filter: blur(4px); font-size: 11px; }
.vsp-bt-1 { grid-row: span 2; }

/* Best sellers row. */
.vsp-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0; padding: 2px 2px 6px; }
.vsp-row::-webkit-scrollbar { display: none; }
.vsp-row > .vsp-card { flex: 0 0 auto; width: 46vw; max-width: 210px; scroll-snap-align: start; }

/* Arrows inside these rows (same look as the other rows). */
.vsp .vbh-scroll { position: relative; }
.vsp .vbh-prev { left: -8px; }
.vsp .vbh-next { right: -8px; }

/* ---------- Bigger screens ---------- */
@media (min-width: 700px) {
	.vsp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.vsp-bento { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 190px; }
	.vsp-bt-1 { grid-row: span 2; }
	.vsp-bento-5 .vsp-bt-2 { grid-column: span 2; }
	.vsp-bento-5 .vsp-bt-5 { grid-column: span 3; }
	.vsp-tile { width: 190px; }
}
@media (min-width: 1100px) {
	.vsp { padding: 22px 24px; }
	.vsp-deal.has-side { grid-template-columns: minmax(0, 1fr) 280px; }
	.vsp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.vsp-side { min-height: 0; }
	.vsp-bento { grid-template-columns: 1.1fr 1fr 1fr 1.1fr; grid-auto-rows: 200px; }
	.vsp-bento-5 .vsp-bt-1 { grid-row: span 2; }
	.vsp-bento-5 .vsp-bt-2 { grid-column: span 2; }
	.vsp-bento-5 .vsp-bt-5 { grid-column: 4 / span 1; grid-row: 1 / span 2; }
	.vsp-tiles .vsp-tile { flex: 1 0 180px; max-width: 240px; }
	.vsp-row > .vsp-card { width: 210px; }
	.vsp-banner { min-height: 170px; padding-left: 40px; }
}
@media (max-width: 699px) {
	.vsp { padding: 14px; gap: 14px; }
	.vsp-banner { min-height: 0; padding: 18px 64px 18px 18px; }
	.vsp-banner-pics { display: none; }
	.vsp-banner-go { right: 14px; width: 40px; height: 40px; margin-top: -20px; font-size: 15px; }
	.vsp-tile { width: 40vw; max-width: 170px; }
	.vsp-tile-name { font-size: 14px; left: 10px; top: 10px; }
	.vsp-side { min-height: 220px; }
	.vsp-side-t { font-size: 22px; }
	.vsp-bento { grid-auto-rows: 140px; }
	.vsp-bt-name { font-size: 14px; }
	.vsp-name { font-size: 13px; }
	.vsp-price { font-size: 13px; }
}
@media (hover: none) {
	.vsp-tile:hover, .vsp-card:hover { transform: none; box-shadow: none; }
	.vsp-tile:hover .vsp-tile-img { transform: translateX(-50%); }
	.vsp-card:hover .vsp-card-img, .vsp-bt:hover .vsp-bt-img, .vsp-side:hover .vsp-side-img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.vsp-tile, .vsp-card, .vsp-card-img, .vsp-tile-img, .vsp-bt-img, .vsp-side-img, .vsp-banner-go { transition: none; }
}

/* Dark mode: the cards keep white picture areas (product photos are on white). */
html.dark .vsp-card { border-color: #2f3640; }
html.dark .vsp-co { background: rgba(22, 163, 74, .18); color: #86efac; }
html.dark .vsp-price.is-ask { background: #2b3138; color: #cbd5e1; }
html.dark .vsp-tile, html.dark .vsp-tile:hover { color: #111827; }
.vsp-price.is-ask { white-space: nowrap; }
@media (max-width: 699px) {
	.vsp-grid > .vsp-card:nth-child(n+7) { display: none; } /* 6 deals on phones: shorter page. */
	.vsp-price.is-ask { font-size: 11.5px; padding: 3px 7px; }
}
/* v2.181: a small photo is never stretched. */
.vsp-card-img.is-small, .vsp-tile-img.is-small { width: auto; height: auto; margin: auto; }
.vsp-tile-img.is-small { left: 50%; bottom: 14%; }
.vsp-bt.is-small { background: linear-gradient(160deg, #eef4fb 0%, #dfe9f5 100%); color: #0f172a; }
.vsp-bt.is-small::after { background: none; }
.vsp-bt.is-small .vsp-bt-img { inset: 22% 14% 8%; width: auto; height: auto; max-width: 72%; max-height: 70%; object-fit: contain; mix-blend-mode: multiply; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .15)); }
.vsp-bt.is-small .vsp-bt-name { text-shadow: none; }
.vsp-bt.is-small .vsp-bt-go { background: rgba(15, 23, 42, .08); color: #0f172a; }
/* Sharper drawing of product photos (no extra blur from the shadow filter on small screens). */
.vsp-tile-img, .vsp-side-img { image-rendering: auto; }
