/* =========================================================
   Nautica Web Shop — Catalog / Product Slider Frontend
   ========================================================= */

/* ── Section ─────────────────────────────────────────────── */
.nws-catalog-section {
	width: 100%;
	max-width: 1300px;
	margin: 48px auto;
	box-sizing: border-box;
	padding: 0 16px;
}

.nws-catalog-inner {
	width: 100%;
}

/* ── Header (title + nav arrows) ─────────────────────────── */
.nws-catalog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
	gap: 16px;
}

.nws-catalog-title {
	margin: 0;
	font-size: 26px;
	font-weight: 800;
	color: #0a2540;
	letter-spacing: -.3px;
	line-height: 1.2;
}

.nws-catalog-nav {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.nws-catalog-arrow {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid #dde1e7;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color .2s, background .2s, box-shadow .2s;
	padding: 0;
}
.nws-catalog-arrow svg {
	width: 18px;
	height: 18px;
	color: #0a2540;
	transition: color .2s;
}
.nws-catalog-arrow:hover:not(:disabled) {
	border-color: #19b4e3;
	background: #19b4e3;
	box-shadow: 0 4px 12px rgba(25,180,227,.35);
}
.nws-catalog-arrow:hover:not(:disabled) svg {
	color: #fff;
}
.nws-catalog-arrow:disabled {
	opacity: .38;
	cursor: default;
}

/* ── Slider track ─────────────────────────────────────────── */
.nws-catalog-slider {
	overflow: hidden;
	position: relative;
	cursor: grab;
	user-select: none;
}

.nws-catalog-slider.is-dragging {
	cursor: grabbing;
}

.nws-catalog-slider.is-dragging .nws-catalog-track {
	transition: none;
}

.nws-catalog-track {
	display: flex;
	gap: 20px;
	transition: transform .45s cubic-bezier(.25, .46, .45, .94);
	will-change: transform;
	align-items: stretch;
}

/* ── Dots ────────────────────────────────────────────────── */
.nws-catalog-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 24px;
}
.nws-catalog-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background: #dde1e7;
	cursor: pointer;
	padding: 0;
	transition: background .2s, transform .2s;
}
.nws-catalog-dot.is-active {
	background: #19b4e3;
	transform: scale(1.3);
}

/* =========================================================
   PRODUCT CARD
   ========================================================= */

.nws-product-card {
	/* Width set by JS via CSS variable, fallback to 25% */
	flex: 0 0 calc(25% - 15px);
	min-width: 0;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid #eaecf0;
	box-shadow: 0 2px 12px rgba(10, 37, 64, .06);
	display: flex;
	flex-direction: column;
	transition: transform .25s ease, box-shadow .25s ease;
}
.nws-product-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 32px rgba(10, 37, 64, .13);
}

/* ── Image wrap ──────────────────────────────────────────── */
.nws-product-card__img-wrap {
	position: relative;
	display: block;
	overflow: hidden;
	background: #f4f6f9;
	aspect-ratio: 1 / 1;
	flex-shrink: 0;
}

.nws-product-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s cubic-bezier(.25, .46, .45, .94);
}
.nws-product-card:hover .nws-product-card__img {
	transform: scale(1.07);
}

/* ── Hover overlay ───────────────────────────────────────── */
.nws-product-card__hover-overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 37, 64, .45);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .25s ease;
}
.nws-product-card:hover .nws-product-card__hover-overlay {
	opacity: 1;
}
.nws-product-card__hover-overlay span {
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .4px;
	border: 2px solid rgba(255,255,255,.8);
	padding: 8px 20px;
	border-radius: 6px;
	background: rgba(255,255,255,.1);
	backdrop-filter: blur(4px);
}

/* ── Badges ──────────────────────────────────────────────── */
.nws-product-card__badges {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	z-index: 2;
}
.nws-product-badge {
	font-size: 11px;
	font-weight: 800;
	padding: 3px 9px;
	border-radius: 20px;
	letter-spacing: .3px;
	width: fit-content;
}
.nws-product-badge--sale   { background: #e74c3c; color: #fff; }
.nws-product-badge--new    { background: #19b4e3; color: #fff; }
.nws-product-badge--coupon {
	background: #fff;
	color: #dc2626;
	border: 1.5px solid #dc2626;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: monospace;
	font-weight: 700;
	letter-spacing: .5px;
}

/* ── Body ────────────────────────────────────────────────── */
.nws-product-card__body {
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.nws-product-card__cat {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: #19b4e3;
}

.nws-product-card__name {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #0a2540;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.nws-product-card__name a {
	color: inherit;
	text-decoration: none;
}
.nws-product-card__name a:hover { color: #19b4e3; }

/* ── Rating ──────────────────────────────────────────────── */
.nws-product-card__rating {
	display: flex;
	align-items: center;
	gap: 4px;
}
.nws-stars { line-height: 1; }
.nws-star { font-size: 14px; }
.nws-star--full  { color: #f39c12; }
.nws-star--half  { color: #f39c12; opacity: .6; }
.nws-star--empty { color: #dde1e7; }
.nws-product-card__rating-count {
	font-size: 11px;
	color: #6b7a8d;
}

/* ── Price ───────────────────────────────────────────────── */
.nws-product-card__price {
	margin-top: auto;
	text-align: right;
}
.nws-product-card__price .price {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 6px;
	flex-wrap: wrap;
}
.nws-product-card__price .woocommerce-Price-amount,
.nws-product-card__price ins .woocommerce-Price-amount {
	font-size: 16px !important;
	font-weight: 400 !important;
	color: #0a2540 !important;
	text-decoration: none !important;
}
.nws-product-card__price del {
	text-decoration: none !important;
}
.nws-product-card__price del .woocommerce-Price-amount {
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #9aa5b1 !important;
	text-decoration: line-through !important;
	text-decoration-color: #b0bac8 !important;
	text-decoration-thickness: 1.5px !important;
}
.nws-product-card__price ins { text-decoration: none !important; }

/* ── Add to cart button ──────────────────────────────────── */
.nws-product-card__btn {
	all: unset;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	padding: 12px 18px;
	background: #0a2540;
	color: #fff;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .2px;
	cursor: pointer;
	text-align: center;
	transition: background .2s, box-shadow .2s, transform .15s;
	box-sizing: border-box;
	width: 100%;
	text-decoration: none;
}
.nws-product-card__btn:hover {
	background: #19b4e3;
	box-shadow: 0 6px 18px rgba(25,180,227,.35);
	transform: translateY(-1px);
	color: #fff;
}
.nws-product-card__btn:active {
	transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
	.nws-product-card { flex: 0 0 calc(33.333% - 14px); }
}
@media (max-width: 760px) {
	.nws-catalog-title { font-size: 20px; }
	.nws-product-card { flex: 0 0 calc(50% - 10px); }
}
@media (max-width: 480px) {
	.nws-catalog-header { margin-bottom: 20px; }
}

/* ── Mobile: CSS scroll-snap (niente JS transform) ───────── */
@media (max-width: 767px) {
	/* Rimuove il padding destro dal contenitore per mostrare il peek */
	.nws-catalog-section {
		padding-right: 0;
	}

	/* Slider diventa scrollabile con snap */
	.nws-catalog-slider {
		overflow-x: scroll;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		cursor: default;
		scrollbar-width: none;
	}
	.nws-catalog-slider::-webkit-scrollbar {
		display: none;
	}

	/* Track: niente transform JS, padding destro per mostrare peek */
	.nws-catalog-track {
		transform: none !important;
		gap: 14px;
		padding-left: 16px;
		padding-right: 16px;
	}

	/* Ogni card: larghezza ~82vw per mostrare lo spigolo della successiva */
	.nws-product-card {
		flex: 0 0 82vw !important;
		width: 82vw !important;
		scroll-snap-align: start;
	}

	/* Nascondi frecce su mobile: si usa il drag/swipe */
	.nws-catalog-nav {
		display: none;
	}
}
