/**
 * Darkroom Print Shop — front-end styles.
 * All classes prefixed drps-. No framework, no external assets.
 * Must not break a stock theme (Twenty Twenty-Five) or Darkroom.
 */

.drps-listing,
.drps-product {
	--drps-gap: 1rem;
	--drps-border: 1px solid rgba(0, 0, 0, 0.15);
	--drps-muted: #666;
	--drps-accent: inherit;
	box-sizing: border-box;
}

.drps-listing *,
.drps-product * {
	box-sizing: border-box;
}

/* ---------- Listing ---------- */

.drps-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--drps-gap);
}

.drps-grid-item {
	margin: 0;
}

.drps-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: var(--drps-border);
	border-radius: 6px;
	overflow: hidden;
	background: transparent;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.drps-card:hover,
.drps-card:focus {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.drps-card-image {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.05);
}

.drps-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.drps-card-title {
	display: block;
	padding: 0.6rem 0.75rem 0;
	font-weight: 600;
}

.drps-card-price {
	display: block;
	padding: 0.2rem 0.75rem 0.75rem;
	color: var(--drps-muted);
	font-size: 0.9em;
}

.drps-inline-product {
	margin-top: 1rem;
}

/* ---------- Single product ---------- */

.drps-product {
	display: flex;
	flex-direction: column;
	gap: var(--drps-gap);
	margin: 1.5rem 0;
}

@media (min-width: 640px) {
	.drps-product {
		flex-direction: row;
		align-items: flex-start;
	}

	.drps-product-media {
		flex: 0 0 40%;
		max-width: 40%;
	}

	.drps-product-body {
		flex: 1 1 auto;
	}
}

.drps-product-media img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.drps-product-title {
	margin: 0 0 0.75rem;
	font-size: 1.4em;
}

/* Horizontal scroll wrapper keeps the price table readable at phone width. */
.drps-price-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: var(--drps-gap);
}

.drps-price-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.drps-price-table th,
.drps-price-table td {
	border: var(--drps-border);
	padding: 0.5rem 0.65rem;
	text-align: center;
	white-space: nowrap;
}

.drps-price-table thead th {
	font-weight: 600;
	background: rgba(0, 0, 0, 0.04);
}

.drps-price-table tbody th {
	text-align: left;
	font-weight: 500;
}

.drps-size-dims {
	display: block;
	font-size: 0.8em;
	color: var(--drps-muted);
	font-weight: 400;
}

/* ---------- Enquiry form ---------- */

.drps-enquiry-form {
	margin-top: var(--drps-gap);
	padding-top: var(--drps-gap);
	border-top: var(--drps-border);
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

@media (min-width: 480px) {
	.drps-enquiry-form {
		grid-template-columns: 1fr 1fr;
	}

	.drps-field-full,
	.drps-live-total,
	.drps-enquiry-form h3,
	.drps-enquiry-form > p:last-child {
		grid-column: 1 / -1;
	}
}

.drps-enquiry-form h3 {
	margin: 0;
	font-size: 1.1em;
}

.drps-field {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.drps-field label {
	font-size: 0.9em;
}

.drps-field input,
.drps-field select,
.drps-field textarea {
	width: 100%;
	font: inherit;
	padding: 0.4rem;
	border: var(--drps-border);
	border-radius: 4px;
	background: transparent;
	color: inherit;
}

.drps-live-total {
	margin: 0;
	font-size: 1em;
}

.drps-submit {
	font: inherit;
	cursor: pointer;
	padding: 0.55rem 1.2rem;
	border: var(--drps-border);
	border-radius: 4px;
	background: transparent;
	color: inherit;
}

.drps-submit:hover,
.drps-submit:focus {
	background: rgba(0, 0, 0, 0.06);
}

/* Honeypot: visually hidden but present in the DOM. */
.drps-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ---------- Messages ---------- */

.drps-success,
.drps-error {
	margin: 0 0 0.75rem;
	padding: 0.65rem 0.85rem;
	border-radius: 4px;
	font-size: 0.95em;
}

.drps-success {
	background: #e6f4ea;
	color: #1a5c2e;
}

.drps-error {
	background: #fdecea;
	color: #8a1c10;
}

.drps-empty {
	color: var(--drps-muted);
	font-style: italic;
}

/* ---------- Settings page tip jar ---------- */

.drps-tip-jar {
	margin-top: 1.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid #ddd;
	font-size: 0.9em;
}

.drps-tip-jar a {
	color: #2271b1;
	text-decoration: none;
}

.drps-tip-jar a:hover {
	text-decoration: underline;
}