/* ==========================================================================
   Galleria De Rings: New Arrivals (home page)
   
   - Desktop/Laptop: Editorial split layout. Warm off-white panel on the left
     (eyebrow "Just in", Cormorant Garamond heading, line of text, "View all jewellery"
     pill button, and slider arrows) beside a sideways slider of 3 product cards in view.
   - Mobile: Clean centered editorial heading ("New Arrivals", matching Gifting Under Budget)
     with a strict 2x2 grid of 4 product cards below it and a centered "View all jewellery" button.
   - Cards: assets/css/product-card.css. Desktop arrows: assets/js/new-arrivals.js.
   - Colours: navy #0B132A, white #ffffff, warm off-white #F7F5F1, gold #B8945A.
   ========================================================================== */

.arrivals {
	--arrivals-gap: clamp(14px, 1.6vw, 24px);
	--arrivals-per-view: 3;

	padding: clamp(32px, 4vw, 64px) 0 clamp(40px, 5vw, 72px);
	background: var(--g-white, #ffffff);
	color: var(--g-navy, #0B132A);
	width: 100%;
	position: relative;
	box-sizing: border-box;
}

.arrivals__inner {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) minmax(0, 2.8fr);
	gap: var(--arrivals-gap);
	align-items: stretch;
	padding: 0 clamp(16px, 2.5vw, 40px);
	max-width: 1440px;
	margin: 0 auto;
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Mobile-only Header & Footer (Hidden by default on Desktop/Laptop)
   -------------------------------------------------------------------------- */
.arrivals__mobile-header {
	display: none;
}

.arrivals__mobile-footer {
	display: none;
}

/* --------------------------------------------------------------------------
   Desktop Panel (Eyebrow, Title, Description, View All, Arrows)
   -------------------------------------------------------------------------- */
.arrivals__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: clamp(26px, 2.8vw, 40px);
	overflow: hidden;
	border-radius: 22px;
	background: var(--g-cream, #F7F5F1);
}

/* Faint gold ring motif in the corner */
.arrivals__panel::after {
	content: "";
	position: absolute;
	right: -70px;
	bottom: -70px;
	width: 220px;
	height: 220px;
	border: 1px solid rgba(184, 148, 90, 0.35);
	border-radius: 50%;
	box-shadow: 0 0 0 18px rgba(184, 148, 90, 0.06);
	pointer-events: none;
}

.arrivals__eyebrow {
	margin: 0 0 10px;
	font-family: var(--g-font-body, "Source Sans 3", sans-serif);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: #b8945a;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.arrivals__title {
	margin: 0;
	font-family: var(--g-font-heading, "Cormorant Garamond", serif);
	font-size: clamp(34px, 3.4vw, 50px);
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.01em;
	color: var(--g-navy, #0B132A);
}

/* Short gold rule under the title */
.arrivals__title::after {
	content: "";
	display: block;
	width: 40px;
	height: 1px;
	margin-top: 18px;
	background: #b8945a;
}

.arrivals__text {
	max-width: 26ch;
	margin: 16px 0 0;
	font-family: var(--g-font-body, "Source Sans 3", sans-serif);
	font-size: 15px;
	line-height: 1.55;
	color: rgba(11, 19, 42, 0.72);
}

.arrivals__actions {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	margin-top: auto;
	padding-top: 28px;
}

.arrivals__all {
	display: inline-flex;
	align-items: center;
	padding: 12px 24px;
	border-radius: 999px;
	background: var(--g-navy, #0B132A);
	color: #ffffff;
	font-family: var(--g-font-body, "Source Sans 3", sans-serif);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.arrivals__all:hover,
.arrivals__all:focus-visible {
	background: #1c2847;
	color: #ffffff;
}

.arrivals__arrows {
	display: flex;
	gap: 10px;
}

.arrivals__arrow {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--g-navy, #0B132A);
	border-radius: 50%;
	background: transparent;
	color: var(--g-navy, #0B132A);
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.arrivals__arrow .icon {
	width: 18px;
	height: 18px;
}

.arrivals__arrow:hover,
.arrivals__arrow:focus-visible {
	background: var(--g-navy, #0B132A);
	color: #ffffff;
}

.arrivals__arrow:disabled {
	opacity: 0.25;
	background: transparent;
	color: var(--g-navy, #0B132A);
	cursor: default;
}

/* Everything fits: no arrows needed */
.arrivals.is-static .arrivals__arrows {
	display: none;
}

/* --------------------------------------------------------------------------
   Slider Track (Desktop: Sideways Slider with 3 per view)
   -------------------------------------------------------------------------- */
.arrivals__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--arrivals-per-view) - 1) * var(--arrivals-gap)) / var(--arrivals-per-view));
	gap: var(--arrivals-gap);
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.arrivals__track::-webkit-scrollbar {
	display: none;
}

.arrivals__item {
	min-width: 0;
	margin: 0;
	scroll-snap-align: start;
}

/* --------------------------------------------------------------------------
   Tablet View: 2 cards in view beside the panel
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) and (min-width: 769px) {
	.arrivals {
		--arrivals-per-view: 2;
	}

	.arrivals__inner {
		grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
	}
}

/* --------------------------------------------------------------------------
   Mobile View (<= 768px):
   - Centered heading matching Gifting Under Budget & Shop by Category
   - Side panel is hidden
   - 4 products in strict 2x2 grid view
   - Centered "View all jewellery" button below
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.arrivals {
		padding: clamp(28px, 4vw, 42px) 0 clamp(32px, 5vw, 48px);
	}

	/* Hide desktop panel on mobile */
	.arrivals__panel {
		display: none !important;
	}

	/* Show mobile centered header */
	.arrivals__mobile-header {
		display: block;
		text-align: center;
		margin-bottom: clamp(16px, 3vw, 24px);
		padding: 0 16px;
	}

	.arrivals__mobile-title {
		margin: 0;
		font-family: var(--g-font-heading, "Cormorant Garamond", serif);
		font-size: clamp(26px, 6vw, 36px);
		font-weight: 400;
		line-height: 1.1;
		letter-spacing: -0.01em;
		text-align: center;
		color: var(--g-navy, #0B132A);
	}

	.arrivals__inner {
		display: block;
		padding: 0 clamp(12px, 3.5vw, 24px);
		max-width: 100%;
	}

	/* Strict 2x2 grid view on mobile */
	.arrivals__track {
		display: grid !important;
		grid-auto-flow: row !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: clamp(10px, 2.5vw, 16px) !important;
		overflow: visible !important;
		scroll-snap-type: none !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.arrivals__item {
		scroll-snap-align: none !important;
		width: 100% !important;
	}

	/* Only show 4 products in mobile 2x2 grid */
	.arrivals__item:nth-child(n+5) {
		display: none !important;
	}

	/* Mobile bottom button */
	.arrivals__mobile-footer {
		display: flex;
		justify-content: center;
		margin-top: clamp(20px, 3.5vw, 30px);
		padding: 0 16px;
	}

	.arrivals__mobile-all {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		padding: 12px 28px;
		border-radius: 999px;
		background: var(--g-navy, #0B132A);
		color: #ffffff;
		font-family: var(--g-font-body, "Source Sans 3", sans-serif);
		font-size: 14px;
		font-weight: 600;
		text-decoration: none;
		transition: background-color 0.25s ease, transform 0.25s ease;
		box-shadow: 0 4px 14px rgba(11, 19, 42, 0.12);
	}

	.arrivals__mobile-all:hover,
	.arrivals__mobile-all:focus-visible {
		background: #1c2847;
		color: #ffffff;
	}
}

@media (max-width: 440px) {
	.arrivals__inner {
		padding: 0 10px;
	}

	.arrivals__track {
		gap: 8px !important;
	}

	.arrivals__mobile-title {
		font-size: clamp(24px, 6.5vw, 28px);
		margin-bottom: 16px;
	}

	.arrivals__mobile-all {
		padding: 10px 22px;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.arrivals__track {
		scroll-behavior: auto;
	}

	.arrivals__all,
	.arrivals__arrow,
	.arrivals__mobile-all {
		transition: none !important;
		transform: none !important;
	}
}
