/*
 * Shared drag-carousel system — homepage [mr_products_carousel] (Trending)
 * and [mr_arrivals] (New Arrivals) both render this same markup/CSS.
 * @package log-core
 */

.pc-section { padding: 90px 0; overflow: visible; }
.pc-section .wrap { overflow: visible; }
.pc-section.bg-blush { background: var(--paper); }
.pc-section.bg-white { background: var(--white); }

.pc-head-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; flex-wrap: wrap; gap: 16px; }
.pc-head-left { display: flex; flex-direction: column; gap: 6px; }
.pc-head-right { display: flex; align-items: center; gap: 12px; }

/* ── Base product card (also used stand-alone by shop pages) ── */
.prod-card { background: var(--white); border-radius: var(--r-md); overflow: hidden; box-shadow: 0 4px 24px -4px rgba(8, 29, 80, .08), 0 1px 4px rgba(8, 29, 80, .04); text-decoration: none; color: inherit; display: block; cursor: pointer; transition: box-shadow .3s var(--ease); }
.prod-card:hover { box-shadow: 0 8px 40px -8px rgba(8, 29, 80, .13), 0 2px 8px rgba(8, 29, 80, .05); }
.prod-visual { position: relative; background: var(--sage-100); overflow: hidden; }
.prod-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prod-body { padding: 20px; }
.p-name { font-size: 18px; font-weight: 700; color: var(--ink-900); line-height: 1.35; min-height: 20px; }
.p-price { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--sage-800); }
.select-btn { display: block; margin-top: 16px; width: 100%; text-align: center; padding: 12px; border-radius: var(--r-pill); background: var(--paper); border: 1.5px solid var(--line); color: var(--plum-800); text-decoration: none; font-weight: 700; font-size: 13.5px; transition: all .25s var(--ease); }
.select-btn:hover, .select-btn.sage:hover { background: var(--plum-800); border-color: var(--plum-800); color: #fff; }

/* ── Nav arrow buttons (neumorphic) ── */
.carousel-nav-btn {
	width: 46px; height: 46px; border-radius: 50%; border: none;
	background: linear-gradient(145deg, #fff 0%, var(--paper) 55%, var(--sage-100) 100%);
	color: var(--ink-700);
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0; position: relative; overflow: hidden;
	box-shadow: 5px 5px 12px rgba(140, 158, 200, .45), -3px -3px 8px rgba(255, 255, 255, 1), inset 0 1.5px 0 rgba(255, 255, 255, 1), inset 0 -1px 0 rgba(140, 158, 200, .25);
	transition: box-shadow .22s ease, transform .18s var(--ease);
}

.carousel-nav-btn svg { width: 17px; height: 17px; stroke: var(--plum-800); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.carousel-nav-btn:hover:not(:disabled) {
	box-shadow: 7px 7px 16px rgba(130, 150, 195, .5), -4px -4px 10px rgba(255, 255, 255, 1), inset 0 1.5px 0 rgba(255, 255, 255, 1), inset 0 -1px 0 rgba(130, 150, 195, .3);
	transform: translateY(-3px) scale(1.08);
}

.carousel-nav-btn:hover:not(:disabled) svg { stroke: var(--plum-700); }
.carousel-nav-btn:disabled { opacity: .38; cursor: not-allowed; }

/* ── Carousel track ── */
.pc-carousel-outer { overflow: clip; padding: 40px 20px; margin: -40px -20px; clip-path: inset(-80px 0px -80px 0px); }

.pc-carousel-track { display: flex; align-items: stretch; gap: 24px; transition: transform .45s var(--ease); will-change: transform; cursor: grab; user-select: none; }
.pc-carousel-track:active { cursor: grabbing; }

.pc-slide { flex: 0 0 calc((100% - 3*24px) / 4); min-width: 0; display: flex; }

@media (max-width: 1200px) { .pc-slide { flex: 0 0 calc((100% - 2*24px) / 3); } }
@media (max-width: 900px)  { .pc-slide { flex: 0 0 calc((100% - 1*24px) / 2); } }
@media (max-width: 480px)  { .pc-slide { flex: 0 0 calc(100% - 48px); } }

.pc-slide .prod-card { width: 100%; border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.pc-slide .prod-card .prod-body { display: flex; flex-direction: column; flex: 1; }
.pc-slide .prod-card .select-btn { margin-top: auto; padding-top: 14px; }
.pc-slide .prod-card .p-price { margin-top: 10px; margin-bottom: 14px; }

.pc-slide .prod-visual { height: 220px; font-size: 56px; display: flex; align-items: center; justify-content: center; position: relative; }
@media (max-width: 480px) { .pc-slide .prod-visual { height: 170px; font-size: 40px; } }

.prod-badge-new { position: absolute; top: 14px; left: 14px; background: #10b981; color: #fff; font-size: 10.5px; font-weight: 800; padding: 4px 12px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .06em; z-index: 2; }
.prod-badge-hot { position: absolute; top: 14px; left: 14px; background: linear-gradient(135deg, var(--sage-600), #ef4444); color: #fff; font-size: 10.5px; font-weight: 800; padding: 4px 12px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .06em; z-index: 2; }

.p-stars { display: flex; gap: 2px; margin-top: 8px; align-items: center; }
.p-stars .icon { width: 12px; height: 12px; fill: #fbbf24; stroke: none; }
.p-stars .icon.star--muted { opacity: .3; }
.p-stars-count { font-size: 11px; color: var(--ink-400); font-weight: 600; margin-left: 4px; }

/* Matches website_reference/homepage_5.html exactly: .pc-section keeps
   its 90px padding down to 380px (only .pc-head-row stacks at 480px),
   dropping to 60px below 380px alongside the tighter .pc-slide width. */
@media (max-width: 480px) {
	.pc-head-row { flex-direction: column; align-items: flex-start; }
	.pc-head-right { width: 100%; justify-content: space-between; }
}

@media (max-width: 380px) {
	.pc-section { padding: 60px 0; }
	.pc-slide { flex: 0 0 calc(100% - 32px); }
}
