/*
 * Layout: cart pill, checkout bar, hero, collection grid, lifestyle photo,
 * product card. XD references: desktop 1920, mobile 375.
 */

/* ---- Cart pill (store pages) ------------------------------------------- */

/* XD: 74x33 at (287,11) on mobile; 133x40 at (1719,39) on desktop. */
.cart-pill {
	position: fixed;
	top: 11px;
	right: 14px;
	z-index: var(--z-cart-pill);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.25em;
	min-width: 74px;
	height: 33px;
	padding: 0 var(--space-3);
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--color-action);
	color: var(--color-action-text);
	font-size: var(--text-12);
	font-weight: var(--weight-bold);
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color var(--duration-fast) var(--ease-out);
}

.cart-pill:hover {
	background: var(--color-action-hover);
}

.cart-pill:focus-visible {
	outline-color: var(--color-action-text);
	outline-offset: -4px;
}

@media (min-width: 768px) {
	.cart-pill {
		top: 39px;
		right: clamp(14px, 3.542vw, 68px);
		min-width: 133px;
		height: var(--control-height);
	}
}

/* ---- Checkout bar (checkout, cart, account) ----------------------------- */

.checkout-bar {
	background: var(--color-checkout-bar);
}

.checkout-bar__link {
	display: block;
}

.checkout-bar__image {
	width: 100%;
	height: auto;
}

/* ---- Hero --------------------------------------------------------------- */

.hero {
	background: var(--color-bg);
}

.hero__image {
	width: 100%;
	height: auto;
}

/* ---- Collection --------------------------------------------------------- */

/*
 * Heading baseline at hero+53px, cards 40px below it (desktop); 25px and
 * 33px on mobile.
 */
.collection {
	padding-bottom: 37px;
}

.collection:focus {
	outline: none;
}

.collection__title {
	max-width: calc(var(--content-max) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 25px var(--gutter) 33px;
	font-size: var(--text-18);
	line-height: 20px;
}

.collection__empty {
	padding: 0 var(--gutter);
	text-align: center;
}

/*
 * Flex + wrap + center instead of CSS grid: an incomplete row centers itself
 * (the 3 cards after the lifestyle photo) with no nth-child math.
 */
.collection__grid {
	--columns: 1;

	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--grid-row-gap) var(--grid-gap);
	max-width: calc(var(--content-max) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 0 var(--gutter);
	list-style: none;
}

/* Support contact line under the grid (OCEANSFIJ0-21): centered, site red. */
.collection__contact {
	max-width: calc(var(--content-max) + 2 * var(--gutter));
	margin: 40px auto 0;
	padding: 0 var(--gutter);
	font-size: var(--text-12);
	line-height: var(--leading-body);
	text-align: center;
	color: var(--color-text);
}

.collection__contact a {
	overflow-wrap: anywhere;
	text-decoration: underline;
}

.collection__contact a:hover {
	color: var(--color-action-hover);
}

/* The site footer carries the page-end spacing when it follows the contact line. */
.collection:has(> .collection__contact) {
	padding-bottom: 0;
}

@media (min-width: 768px) {
	.collection__contact {
		margin-top: 50px;
		font-size: var(--text-16);
	}

	.collection__title {
		padding-top: 35px;
		padding-bottom: 34px;
		font-size: var(--text-24);
		line-height: var(--leading-tight);
	}

	.collection__grid {
		--columns: 2;
	}
}

@media (min-width: 1100px) {
	.collection__grid {
		--columns: 4;
	}
}

/* ---- Lifestyle photo ---------------------------------------------------- */

.lifestyle {
	margin: var(--section-gap) 0;
	background: var(--color-placeholder);
}

.lifestyle__image {
	width: 100%;
	height: auto;
}

/* ---- Card --------------------------------------------------------------- */

/*
 * Desktop 422 wide: 422x322 image + 131px info box. Mobile 337 wide:
 * 337x291 image + 131px info box. 1px #E4E4E4 lines, square corners.
 */
.card {
	display: flex;
	flex-direction: column;
	width: calc((100% - (var(--columns) - 1) * var(--grid-gap)) / var(--columns));
	max-width: var(--card-max);
	border: var(--border-width) solid var(--color-border);
	background: var(--color-surface);
}

.card__media {
	position: relative;
	aspect-ratio: 337 / 291;
	overflow: hidden;
	border-bottom: var(--border-width) solid var(--color-border);
	background: var(--color-placeholder);
}

.card__image,
.card__placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* "Harvest Complete" overlay: the 67% grey veil and the type are baked in. */
.card__harvest,
.card__harvest img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 14px 15px 15px;
}

.card__name {
	font-size: var(--text-12);
	line-height: var(--leading-snug);
}

.card__price {
	margin: 6px 0 15px;
	font-size: var(--text-18);
	font-weight: var(--weight-bold);
	line-height: var(--leading-snug);
}

.card__price del {
	font-weight: var(--weight-book);
	opacity: 0.7;
}

.card__price ins {
	text-decoration: none;
}

/* Bottom-aligns the button across a row of cards. */
.card__button {
	margin-top: auto;
}

@media (min-width: 768px) {
	.card__media {
		aspect-ratio: 422 / 322;
	}

	.card__body {
		padding-inline: 22px;
	}
}

/* ---- Site footer (OCEANSFIJ0-29) ---------------------------------------- */

/*
 * One centered line of oceanspray.com links on every page. Type matches
 * .collection__contact (12px, 16px from 768px) so on the home page it reads
 * as the next line under "Questions? Reach out...".
 */
.site-footer {
	padding: 8px var(--gutter) 37px;
	font-size: var(--text-12);
	line-height: var(--leading-body);
	text-align: center;
	color: var(--color-text);
}

.site-footer__nav {
	max-width: var(--content-max);
	margin: 0 auto;
}

.site-footer__link {
	color: var(--color-text);
	text-decoration: underline;
	white-space: nowrap;
}

.site-footer__link:hover {
	color: var(--color-action-hover);
}

.site-footer__link:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

@media (min-width: 768px) {
	.site-footer {
		padding-top: 10px;
		font-size: var(--text-16);
	}
}
