:root {
	--text: #000;
	--background: #fff;
	--accent: #ec5c39;
	--gutter: 3vw;
	--gallery-gap: 2.9vw;
	--font-body: 'Open Sans', Helvetica, Arial, sans-serif;
	--font-nav: 'Titillium Web', Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	color: var(--text);
	background: var(--background);
	font-family: var(--font-body);
	-webkit-font-smoothing: antialiased;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0.5rem;
	padding: 0.5rem 1rem;
	background: var(--background);
	color: var(--text);
	z-index: 10;
}

.skip-link:focus {
	left: 0.5rem;
}

/* Header */
.site-header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	padding: 0.8rem var(--gutter);
}

.logo img {
	width: clamp(120px, 13vw, 167px);
}

.site-nav {
	display: flex;
	gap: 1.1rem;
	font-family: var(--font-nav);
	font-size: clamp(1rem, 1.6vw, 1.3rem);
}

.site-nav a {
	color: var(--text);
	text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
	text-decoration: underline;
	text-underline-offset: 0.25em;
	text-decoration-thickness: 1px;
}

/* Intro */
.intro {
	padding: clamp(2rem, 6vw, 5.5rem) var(--gutter) clamp(2rem, 5vw, 4.5rem);
}

.intro p {
	max-width: 900px;
	margin: 0;
	font-size: clamp(1.4rem, 2.8vw, 2.25rem);
	font-weight: 500;
	line-height: 1.33;
}

.intro a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.intro a:hover {
	opacity: 0.8;
}

/* Gallery: two-column masonry, one column on small screens */
.gallery {
	columns: 2;
	column-gap: var(--gallery-gap);
	padding: 0 var(--gutter) clamp(3rem, 8vw, 6rem);
}

.gallery-item {
	margin: 0 0 var(--gallery-gap);
	break-inside: avoid;
}

.gallery-item img {
	width: 100%;
}

/* Applied by public/js/gallery.js, which places photos left-to-right */
.gallery.is-masonry {
	columns: auto;
	display: flex;
	align-items: flex-start;
	gap: var(--gallery-gap);
}

.gallery-column {
	flex: 1;
	min-width: 0;
}

/* Buttons */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85em 2em;
	border: 0;
	border-radius: 300px;
	background: var(--accent);
	color: #fff;
	font-family: var(--font-nav);
	font-size: 1.2rem;
	cursor: pointer;
}

.button:hover {
	opacity: 0.85;
}

.button:focus-visible {
	outline: 2px solid var(--text);
	outline-offset: 3px;
}

/* Centered intro text (shop, not-found page) */
.page-intro {
	padding: clamp(2rem, 4vw, 3.5rem) var(--gutter) 1.5rem;
	text-align: center;
}

.page-intro h1 {
	margin: 0 0 1rem;
	font-size: clamp(1.75rem, 2.8vw, 2.25rem);
	font-weight: 500;
}

.page-intro p {
	max-width: 720px;
	margin: 0 auto;
	font-size: 1.05rem;
	line-height: 1.6;
}

.page-intro a {
	color: var(--accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

/* Shop listing */
.category-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem 1.5rem;
	padding: 0 var(--gutter) 2rem;
	font-family: var(--font-nav);
	font-size: 1.1rem;
}

.category-nav a {
	color: var(--text);
	text-decoration: none;
}

.category-nav a:hover,
.category-nav a[aria-current='page'] {
	text-decoration: underline;
	text-underline-offset: 0.25em;
	text-decoration-thickness: 1px;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2.5rem 2vw;
	margin: 0;
	padding: 0 var(--gutter) clamp(3rem, 8vw, 6rem);
	list-style: none;
}

.product-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	color: inherit;
	text-align: center;
	text-decoration: none;
}

.product-card-photos {
	position: relative;
	display: block;
	width: 100%;
	margin-bottom: 0.6rem;
}

.product-card-photos img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

/* The product's second photo sits on top of the first, hidden until the card
   is hovered (or focused with the keyboard), then fades in like the old site. */
.product-card-hover-photo {
	position: absolute;
	inset: 0;
	height: 100%;
	opacity: 0;
	transition: opacity 1s;
}

@media (hover: hover) {
	.product-card:hover .product-card-hover-photo {
		opacity: 1;
	}
}

.product-card:focus-visible .product-card-hover-photo {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.product-card-hover-photo {
		transition: none;
	}
}

.product-card-name {
	font-size: 1.05rem;
	font-weight: 500;
}

.product-card-price {
	font-size: 0.9rem;
}

/* Product page */
.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 1.5rem var(--gutter) 1rem;
	font-size: 0.95rem;
}

.breadcrumb a {
	color: var(--text);
}

.product {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	align-items: start;
	gap: clamp(2rem, 5vw, 5rem);
	padding: 0.5rem var(--gutter) clamp(3rem, 8vw, 6rem);
}

.product-main-photo {
	width: 100%;
}

.product-thumbnails {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.product-thumbnails a {
	display: block;
	border: 2px solid transparent;
}

.product-thumbnails a[aria-current] {
	border-color: var(--text);
}

.product-thumbnails img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.product-details {
	position: sticky;
	top: 1.5rem;
}

.product-details h1 {
	margin: 0;
	font-size: clamp(1.75rem, 2.8vw, 2.25rem);
	font-weight: 500;
	line-height: 1.25;
}

.product-price {
	margin: 0.5rem 0 1.25rem;
	font-size: 1.5rem;
	font-weight: 500;
}

.product-details p {
	line-height: 1.65;
}

.product-option {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin: 1.5rem 0;
}

.product-option select {
	padding: 0.75rem 1rem;
	border: 1px solid #ccc;
	border-radius: 8px;
	background: var(--background);
	color: var(--text);
	font: inherit;
}

.product-contact {
	width: 100%;
	margin-top: 1rem;
}

/* Contact page */
.contact {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	align-items: start;
	gap: clamp(2rem, 6vw, 6rem);
	padding: clamp(2rem, 5vw, 4.5rem) var(--gutter) clamp(3rem, 8vw, 6rem);
}

.contact-intro h1 {
	margin: 0 0 1.25rem;
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 500;
	line-height: 1.25;
}

.contact-intro p {
	max-width: 32rem;
	margin: 0;
	line-height: 1.65;
}

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	font-family: var(--font-nav);
}

.form-name {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.form-name legend {
	margin-bottom: 0.5rem;
	padding: 0;
}

.form-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.form-label {
	font-size: 1.1rem;
}

.form-name .form-field .form-label {
	font-size: 0.95rem;
}

.form-required {
	color: #666;
	font-size: 0.85em;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 0.7rem 1.1rem;
	border: 1px solid #767676;
	border-radius: 27px;
	background: var(--background);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1rem;
}

.contact-form textarea {
	min-height: 9rem;
	border-radius: 20px;
	resize: vertical;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}

.contact-form .button {
	align-self: flex-start;
}

.form-notice {
	margin: 0;
	padding: 0.9rem 1.1rem;
	border-left: 4px solid var(--accent);
	background: #fdf1ed;
	font-family: var(--font-body);
}

.form-notice p,
.form-notice ul {
	margin: 0;
}

.form-notice ul {
	padding-left: 1.25rem;
}

.form-about {
	margin: 0;
	font-family: var(--font-body);
}

.form-about a {
	color: var(--accent);
}

/* Spam trap: kept off-screen rather than display: none, which some bots skip. */
.form-trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 1000px) {
	.product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 800px) {
	.product {
		grid-template-columns: minmax(0, 1fr);
	}

	.product-details {
		position: static;
	}

	.contact {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 480px) {
	.form-row {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 640px) {
	.product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2rem 16px;
	}

	:root {
		--gutter: 16px;
		--gallery-gap: 16px;
	}

	.site-header {
		grid-template-columns: auto 1fr;
	}

	.site-nav {
		justify-content: flex-end;
	}

	.gallery {
		columns: 1;
	}
}
