/* =====================================================
SHOP LAYOUT
===================================================== */

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
	justify-items: start;
}

.product-grid:has(.product-card:only-child) {
	justify-items: center;
}

.product-grid-2 {
	grid-template-columns: repeat(2, 1fr);
}

.product-grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
	.product-grid-2,
	.product-grid-3 {
		grid-template-columns: 1fr;
	}
}
.product-detail.sidebar {
	grid-template-columns: minmax(320px, 40%) 1fr;
}

@media (max-width: 768px) {
	.product-detail.sidebar {
		grid-template-columns: 1fr;
	}
}

.breadcrumbs {
	font-size: 0.85rem;
	margin-bottom: 1rem;
}

.breadcrumbs a {
	text-decoration: none;
}

.breadcrumbs a:hover {
	text-decoration: underline;
}

.vat-info {
    text-align: center;
    margin-top: 1rem;;
}

.vat-label {
    font-size: 0.8em;
    opacity: 0.6;
}


/* =====================================================
SHOP COMPONENTS
===================================================== */

/* Search */
.search-me {
	text-align: center;
	padding: 10px;
	position: relative;
}

.search-me input {
	width: 50%;
	padding: 0.45rem 0.5rem;
	border: 1px solid #ccc;
	background-color: #f1fafe; /* #e5f3fd; */
	border-radius: 4px;
	padding-left: 31px; /* room for icon */
}

.search-me .icon {
	position: absolute;
	left: calc(25% - 39px); /* aligns with 50% input */
	top: 1.1rem;
	pointer-events: none;
}


/* Buttons */
.btn {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	border: 1px solid currentColor;
	text-decoration: none;
	font-size: 0.9rem;
}

.btn:hover {
	background: rgba(0,0,0,0.05);
}

.ppBtn {
	border: none;
	border-radius: 999px;
	padding: 7px 22px;
	background-color: #ffd140;
	color: #000;
	font-weight: bold;
	transition: opacity 0.2s ease-in-out;
}

.ppBtn:hover {
	opacity: 0.7;
}

/* Disabled state must override all hover/opacity styles */
.ppBtn:disabled,
.ppBtn[disabled] {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.ppBtn:not(:disabled):hover {
	opacity: 0.7;
}

.ppBtnWrap { 
	padding: 10px;
	text-align: center;
}

/* Messages & stock */
.ship-msg {
	background-color: #ffc;
}

.ship-msg-uk {
	margin: 0 auto 10px auto;
	max-width: 220px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.checkout-btn.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.stock-note {
	font-size: 0.85em;
	color: #a00;
	margin-top: 4px;
	text-align: left
}

/* Spinner */
.spinner {
	width: 48px;
	height: 48px;
	border: 5px solid #e0e0e0;
	border-top-color: #333;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 24px auto;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

#status-message {
	margin: 0 auto;
	text-align: center;
	font-size: 1.2em;
	max-width: 400px;
}

/* Product card */
.product-card {
	border: 1px solid #e5e5e5;
	background: #f9f9f9;
	border-radius: 7px;
	padding: 1rem;
	width: 100%;
	max-width: 320px;
	display: flex;
	flex-direction: column;
}

.product-card .cluster {
	margin-top: auto;
}

.product-image {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	background: #f2f2f2;
	overflow: hidden;
	width: 100%;
	transition: opacity 0.15s ease, filter 0.15s ease;
	text-decoration: none;
}

.product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-image--empty {
	background: repeating-linear-gradient(
		45deg,
		#f2f2f2,
		#f2f2f2 10px,
		#e6e6e6 10px,
		#e6e6e6 20px
	);
}

.image-placeholder {
	font-size: 1.5rem;
	color: #666;
}

.product-image:hover {
	opacity: 0.85;
	filter: brightness(0.95);
}

.product-title {
	font-size: 1rem;
	line-height: 1.3;
}

.product-title a {
	text-decoration: none;
	color: inherit;
}

.product-title a:hover {
	text-decoration: underline;
}

.product-price {
	font-weight: 600;
}

.product-card.is-sold-out{
	opacity: 0.6;
}

.no-stock-note {
	color: #a00;
	font-weight: bold;
}

.product-badge {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Product detail */
.product-detail {
	align-items: start;
	background: #f9f9f9;
	border: 1px solid #e5e5e5;
	border-radius: 7px;
	padding: 1rem;
}

.product-media {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.product-summary {
	max-width: 60ch;
}

.product-summary h2 {
	margin-bottom: 0.5rem;
}

.product-summary button {
	margin-top: 1rem;
}

/* Gallery */
.product-gallery {
	max-width: 100%;
	margin-bottom: 20px;
}

.gallery-main {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	background: #f2f2f2;
	overflow: hidden;
	width: 100%;
}

.gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: zoom-in;
	transition: filter 0.15s ease;
}

.gallery-main:hover img {
	filter: brightness(0.95);
}

.gallery-thumbs {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
	flex-wrap: wrap;
}

.gallery-thumbs img {
	width: 64px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	cursor: pointer;
	opacity: 0.6;
	border: 1px solid #ddd;
	transition: opacity 0.15s ease, border-color 0.15s ease;
	flex: 0 0 auto;
}

.gallery-thumbs img.active {
	opacity: 1;
	border-color: currentColor;
}

@media (max-width: 600px) {
	.gallery-thumbs img {
		width: 72px;
	}
}

.image-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.image-lightbox img {
	max-width: 90%;
	max-height: 90%;
	user-select: none;
	touch-action: pan-y;
}

.lightbox-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,0.6);
	color: #fff;
	border: none;
	font-size: 40px;
	padding: 10px 14px;
	cursor: pointer;
	user-select: none;
}

.lightbox-arrow.left {
	left: 20px;
}

.lightbox-arrow.right {
	right: 20px;
}

.lightbox-arrow:hover {
	background: rgba(0,0,0,0.8);
}

/* ================================
   Sidebar Categories
   ================================ */

.sidebar aside {
	border-right: 1px solid #e5e5e5;
	padding-right: 1rem;
}

.sidebar aside ul {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.sidebar aside li {
	margin: 0;
}

.sidebar aside a {
	display: block;
	padding: 0.4rem 0.25rem 0.4rem 0.4rem;
	text-decoration: none;
	color: inherit;
	border-radius: 6px;
	background: rgba(0,0,0,0.03);
	margin: 3px 0;
}

.sidebar aside a:hover {
	background: rgba(0,0,0,0.05);
}

.sidebar aside a.active { /* renderNavItems */
	font-weight: 600;
	background: rgba(0,0,0,0.08);
}

/* Sidebar Category Indentation */
.sidebar aside ul ul {
	margin-left: 1rem;
	padding-left: 0.5rem;
	border-left: 1px solid #e5e5e5;
}

/* ================================
   Category Buttons
   ================================ */

.category-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0.5rem 0 1.5rem 0;
	justify-content: center;
}

.category-buttons li {
	margin: 0;
}

.category-buttons a {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid #ccc;
	border-radius: 999px;
	text-decoration: none;
	font-size: 1rem;
	text-align: center;
	color: inherit;
	background: rgba(0,0,0,0.08);
	background: #d70000;
	color: #fff;
	font-weight: 600;
}

.category-buttons a:hover {
	background: rgba(0,0,0,0.05);
	background: #000;
}

.subcategory-buttons a {
	/*font-size: 0.85rem;*/
	/*opacity: 0.85;*/
}

.category-buttons a.active {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

/* ================================
   Cart
   ================================ */

.cart table {
	border: 1px solid #e5e5e5;
	background: #fff;
}

.cart-table {
	border: 1px solid #e5e5e5;
	border-radius: 7px;
	overflow: hidden;
	background: #fff;
}

.cart-table table {
	border: none;
}


.cart th {
	background: #f9f9f9;
	font-weight: 600;
	font-size: 0.9rem;
}

.cart td,
.cart th {
	vertical-align: middle;
}

.cart td:nth-child(2),
.cart td:nth-child(4) {
	white-space: nowrap;
}

.cart td:nth-child(3) {
	width: 90px;
}

.cart td:nth-child(2),
.cart td:nth-child(4) {
	padding-inline: 0.5rem;
}

.cart td:nth-child(3) {
	padding-inline: 1.25rem;
}

.cart tr + tr {
	border-top: 1px solid #eee;
}

.cart input {
	border: 1px solid #ccc;
	background-color: #f1fafe; /* #e5f3fd; */
	border-radius: 4px;
}

.cart input[type="number"] {
	width: 70px;
	padding: 0.25rem;
}

.cart tr:last-of-type td { /* Totals row emphasis */
	background: #fafafa;
	border-top: 2px solid #ddd;
}

.cart-warning {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	border: 1px solid #d33;
	background: #fff5f5;
	color: #900;
	border-radius: 6px;
}

.updateText {
	text-align: center;
	margin: 20px auto 0 auto;
	color: #a00;
}

.cart-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin: 1rem 0;
}

@media (max-width: 600px) { /* Mobile safety (no horizontal scroll) */
	.cart table {
		font-size: 0.9rem;
	}
	.cart th:nth-child(5),
	.cart td:nth-child(5) {
		text-align: center;
	}
}

/* ================================
   Checkout layout
   ================================ */

.shipping-zone {
	display: grid;
	grid-template-columns: 0.4fr;
}
.shipping-zone select {
	width: 300px;
	padding: 0.45rem 0.5rem;
	border: 1px solid #ccc;
	background-color: #f1fafe; /* #e5f3fd; */
	border-radius: 4px;
}

.checkout {
	display: grid;
	grid-template-columns: 0.4fr 0.6fr;
	gap: 2rem;
	align-items: start;
}

@media (max-width: 768px) {
	.checkout {
		grid-template-columns: 1fr;
	}
}

.checkout label {
	display: block;
	font-size: 0.9rem;
}

.checkout input,
.checkout textarea,
.checkout select {
	width: 100%;
	padding: 0.45rem 0.5rem;
	border: 1px solid #ccc;
	background-color: #f1fafe; /* #e5f3fd; */
	border-radius: 4px;
}

.checkout p {
	margin-bottom: 1rem;
}

.checkout .delivery-box {
	border: 1px solid #e5e5e5;
	background: #f9f9f9;
	border-radius: 7px;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.checkout-table {
	border: 1px solid #e5e5e5;
	border-radius: 7px;
	overflow: hidden;
	background: #fff;
}

.checkout table {
	background: #fff;
	border-radius: 7px;
	overflow: hidden;
}

.checkout th {
	background: #f6f6f6;
	font-weight: 600;
	font-size: 0.9rem;
}

.checkout td,
.checkout th {
	padding: 0.5rem 0.75rem;
}

.checkout td:nth-child(2),
.checkout td:nth-child(3),
.checkout th:nth-child(2),
.checkout th:nth-child(3) {
	text-align: right;
	white-space: nowrap;
}

.checkout tr:last-of-type td {
	border-top: 2px solid #ddd;
	background: #fafafa;
	padding-block: 0.75rem;
}

tr.checkout-subtotal td {
	border-top: 1px solid #e5e5e5;
}

.checkout .ship-msg,
.checkout .ship-msg-uk {
	display: block;
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
	font-size: 0.9rem;
}

/* ================================
   Order Complete
   ================================ */

.order-complete {
	max-width: 800px;
	margin: 0 auto;
}

.order-complete h2 {
	margin-bottom: 0.5rem;
}

.order-complete h3 {
	margin-top: 2rem;
	margin-bottom: 0.5rem;
}

.order-ref {
	display: inline-block;
	padding: 0.4rem 0.75rem;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	background: #f9f9f9;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.order-complete .delivery-box {
	border: 1px solid #e5e5e5;
	border-radius: 7px;
	background: #f9f9f9;
	padding: 1rem;
	max-width: 360px;
}
