/**
 * Grafline – WooCommerce Styles
 * Enhanced with better product card design, hover states, and visual polish.
 */

/* ============================================
   CATEGORY FILTER PILLS - Enhanced
   ============================================ */

.grafline-category-filter {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-xs);
	justify-content: center;
	margin-bottom: var(--spacing-xl);
}

.grafline-filter-pill {
	display: inline-block;
	padding: 0.5rem 1.25rem;
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--grafline-text);
	background: var(--grafline-bg-light);
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-full);
	text-decoration: none;
	transition: all 0.3s var(--ease-out-smooth);
	box-shadow: var(--shadow-xs);
}

.grafline-filter-pill:hover {
	background: var(--grafline-primary-light);
	border-color: var(--grafline-primary);
	color: var(--grafline-primary);
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.grafline-filter-pill.is-active {
	background: var(--grafline-primary);
	border-color: var(--grafline-primary);
	color: #fff;
	box-shadow: 0 4px 12px rgba(255, 42, 19, 0.3);
}

/* ============================================
   PRODUCT GRID
   ============================================ */

.grafline-product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--spacing-lg);
}

@media (max-width: 960px) {
	.grafline-product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ============================================
   PRODUCT CARD - Enhanced with elevation
   ============================================ */

.grafline-product-card {
	background: var(--grafline-bg);
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-2xl);
	overflow: hidden;
	transition: all 0.4s var(--ease-out-smooth);
	display: flex;
	flex-direction: column;
	box-shadow: var(--shadow-sm);
	position: relative;
}

.grafline-product-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--grafline-primary), var(--grafline-primary-dark));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.4s var(--ease-out-smooth);
}

.grafline-product-card:hover::before {
	transform: scaleX(1);
}

.grafline-product-card:hover {
	transform: translateY(-6px) scale(1.01);
	box-shadow: var(--shadow-2xl);
	border-color: rgba(255, 42, 19, 0.2);
}

/* Media block: badges + carousel (class __image kept for legacy selectors) */
.grafline-product-card__media.grafline-product-card__image {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--grafline-bg-light);
	position: relative;
	/* In a column flex card, do not let the image strip shrink to 0 (breaks carousel / shows blank). */
	flex-shrink: 0;
	width: 100%;
	align-self: stretch;
}

.grafline-product-card__carousel {
	position: absolute;
	inset: 0;
}

.grafline-product-card__scroller {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	width: 100%;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	touch-action: pan-x pinch-zoom;
}

.grafline-product-card__scroller::-webkit-scrollbar {
	display: none;
}

.grafline-product-card__slide {
	flex: 0 0 100%;
	min-width: 100%;
	max-width: 100%;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	box-sizing: border-box;
}

.grafline-product-card__slide-link {
	display: block;
	width: 100%;
	height: 100%;
	line-height: 0;
}

.grafline-product-card__slide img,
.grafline-product-card__slide .grafline-product-card__slide-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.5s var(--ease-out-smooth);
}

@media (hover: hover) and (pointer: fine) {
	.grafline-product-card:hover .grafline-product-card__slide img,
	.grafline-product-card:hover .grafline-product-card__slide .grafline-product-card__slide-img {
		transform: scale(1.06);
	}
}

/* Prev / next — outside scroll area, do not capture swipe */
.grafline-product-card__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	width: 34px;
	height: 34px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: var(--radius-full);
	background: rgba(255, 255, 255, 0.94);
	color: #111827;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	transition: opacity 0.2s, transform 0.2s var(--ease-out-smooth), background 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.grafline-product-card__nav:hover:not(:disabled) {
	background: #fff;
	transform: translateY(-50%) scale(1.05);
}

.grafline-product-card__nav:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.grafline-product-card__nav--prev {
	left: 8px;
}

.grafline-product-card__nav--next {
	right: 8px;
}

.grafline-product-card__nav::before {
	content: '';
	display: block;
	width: 7px;
	height: 7px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	flex-shrink: 0;
}

.grafline-product-card__nav--prev::before {
	transform: rotate(45deg);
	margin-left: 3px;
}

.grafline-product-card__nav--next::before {
	transform: rotate(-135deg);
	margin-right: 3px;
}

.grafline-product-card__info {
	padding: var(--spacing-md) var(--spacing-md) 1.125rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.grafline-product-card__title {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s var(--ease-out-smooth);
}

.grafline-product-card__title:hover {
	color: var(--grafline-primary);
}

.grafline-product-card__title h3 {
	font-size: var(--font-size-base);
	font-weight: 600;
	margin: 0 0 0.5rem;
	line-height: 1.4;
}

.grafline-product-card__price {
	font-size: var(--font-size-lg);
	font-weight: 700;
	color: var(--grafline-primary);
	margin-bottom: var(--spacing-md);
}

.grafline-product-card__price del {
	color: var(--grafline-text-light);
	font-weight: 400;
	font-size: var(--font-size-sm);
	margin-right: 0.5rem;
}

.grafline-product-card__price ins {
	text-decoration: none;
}

.grafline-product-card__action {
	margin-top: auto;
}

.grafline-product-card__btn {
	width: 100%;
	font-size: var(--font-size-sm) !important;
	padding: 0.75rem 1rem !important;
	border-radius: var(--radius-full) !important;
	transition: all 0.3s var(--ease-out-smooth) !important;
}

.grafline-product-card__btn:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg) !important;
}

/* ============================================
   SINGLE PRODUCT - Enhanced layout (photo-first, better UX)
   ============================================ */

/* Page shell: flat, no heavy “bubble” cards */
.grafline-single-product {
	background: var(--grafline-bg);
}

.grafline-single-product__container {
	max-width: min(1320px, 100% - 1.5rem);
	margin-left: auto;
	margin-right: auto;
}

/* Hero: open layout — no outer card */
.grafline-product-hero {
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin-bottom: var(--spacing-lg);
}

.grafline-product-after {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-lg);
	margin-bottom: var(--spacing-xl);
}

/* WooCommerce tabs & upsells sit inside #product grid — span full width below gallery + summary */
.grafline-single-product .product.grafline-product-layout > .woocommerce-tabs,
.grafline-single-product .product.grafline-product-layout > section.up-sells.upsells {
	grid-column: 1 / -1;
	width: 100%;
	max-width: 100%;
}

.grafline-single-product .product.grafline-product-layout > .woocommerce-tabs {
	margin-top: var(--spacing-xl);
	padding-top: var(--spacing-lg);
	border-top: 1px solid var(--grafline-border);
}

/* Tabs: underline style (no pill boxes) */
.grafline-single-product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0 0 var(--spacing-md);
	padding: 0;
	list-style: none;
	background: transparent;
	border-radius: 0;
	border: none;
	border-bottom: 1px solid var(--grafline-border);
}

.grafline-single-product .woocommerce-tabs ul.tabs::before {
	display: none;
}

.grafline-single-product .woocommerce-tabs ul.tabs li {
	margin: 0 0 -1px 0;
	padding: 0;
	border: none;
	background: transparent;
}

.grafline-single-product .woocommerce-tabs ul.tabs li a {
	display: inline-block;
	padding: 0.65rem 1.1rem;
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--grafline-text-light);
	text-decoration: none;
	border-radius: 0;
	border-bottom: 2px solid transparent;
	transition: color 0.2s var(--ease-out-smooth), border-color 0.2s;
}

.grafline-single-product .woocommerce-tabs ul.tabs li a:hover {
	color: var(--grafline-text);
}

.grafline-single-product .woocommerce-tabs ul.tabs li.active a,
.grafline-single-product .woocommerce-tabs ul.tabs li.active a:hover {
	color: var(--grafline-text);
	background: transparent;
	box-shadow: none;
	border-bottom-color: var(--grafline-primary);
}

.grafline-single-product .woocommerce-tabs .woocommerce-Tabs-panel,
.grafline-single-product .woocommerce-tabs .panel {
	margin: 0;
	padding: var(--spacing-lg) 0;
	background: transparent;
	border: none;
	border-radius: 0;
	line-height: 1.75;
	font-size: var(--font-size-base);
}

.grafline-single-product .woocommerce-tabs .woocommerce-Tabs-panel h2 {
	font-size: var(--font-size-lg);
	margin-top: 0;
	margin-bottom: var(--spacing-sm);
}

/* Upsells inside hero */
.grafline-single-product .product.grafline-product-layout > section.up-sells.upsells {
	margin-top: var(--spacing-lg);
	padding-top: var(--spacing-lg);
	border-top: 1px solid var(--grafline-border);
}

.grafline-single-product .product.grafline-product-layout > section.up-sells.upsells > h2 {
	font-size: var(--font-size-xl);
	margin-bottom: var(--spacing-md);
}

/* Summary: flat column (no inner card bubble) */
.grafline-single-product .summary.entry-summary {
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	gap: var(--spacing-sm);
}

@media (min-width: 1025px) {
	.grafline-single-product .summary.entry-summary {
		padding-left: 0.25rem;
	}
}

.grafline-single-product .summary .product_meta {
	font-size: var(--font-size-sm);
	color: var(--grafline-text-light);
	padding-top: var(--spacing-md);
	margin-top: var(--spacing-md);
	border-top: 1px solid var(--grafline-border);
	line-height: 1.6;
}

.grafline-single-product .summary .product_meta a {
	color: var(--grafline-primary-dark);
	font-weight: 500;
	text-decoration: none;
}

.grafline-single-product .summary .product_meta a:hover {
	text-decoration: underline;
}

.grafline-single-product .summary .woocommerce-product-rating {
	margin-bottom: var(--spacing-sm);
}

/* Gallery + summary: wider gallery column for larger photos */
.grafline-single-product .product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(1.25rem, 3vw, 2.5rem);
	align-items: start;
	padding: 0;
}

@media (min-width: 1200px) {
	.grafline-single-product .product {
		grid-template-columns: minmax(0, 1.42fr) minmax(340px, 1fr);
		gap: clamp(1.5rem, 4vw, 3.5rem);
	}
}

@media (max-width: 1024px) {
	.grafline-single-product .product {
		grid-template-columns: 1fr;
		gap: var(--spacing-lg);
	}
}

@media (max-width: 768px) {
	.grafline-single-product .product {
		grid-template-columns: 1fr;
		gap: var(--spacing-md);
		padding: var(--spacing-lg) 0;
	}
}

/* Gallery: large main image + horizontal thumb strip */
.grafline-single-product .woocommerce-product-gallery,
.grafline-single-product div.product div.images {
	overflow: visible !important;
	max-height: none !important;
}

.grafline-single-product .woocommerce-product-gallery:not(.flexslider) {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-sm);
	border-radius: var(--radius-lg);
	box-shadow: none;
	background: var(--grafline-bg-light);
	border: none;
}

/* FlexSlider: one row — main stage only; arrows overlay; no thumbnail strip */
.grafline-single-product .woocommerce-product-gallery.flexslider {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: 'gallery-stage';
	grid-template-rows: auto;
	gap: 0;
	border-radius: var(--radius-lg);
	box-shadow: none;
	background: var(--grafline-bg-light);
	border: none;
	position: relative;
	width: 100%;
}

.grafline-single-product .woocommerce-product-gallery.flexslider .flex-viewport {
	grid-area: gallery-stage;
	width: 100%;
	min-width: 0;
}

/* Hide FlexSlider pager / thumbnails (carousel uses ‹ › on main image only) */
.grafline-single-product .woocommerce-product-gallery .flex-control-nav,
.grafline-single-product .woocommerce-product-gallery ol.flex-control-thumbs {
	display: none !important;
}

.grafline-single-product .woocommerce-product-gallery__wrapper {
	display: flex;
	flex-direction: column;
	position: relative;
	width: 100%;
	background: var(--grafline-bg);
	overflow: visible;
}

/* Main image / FlexSlider viewport — min size so area never collapses (WC JS sets height from slide) */
.grafline-single-product .woocommerce-product-gallery__wrapper > *:first-child {
	width: 100%;
	flex: 0 0 auto;
	position: relative;
	background: var(--grafline-bg);
	border-radius: var(--radius-lg);
	overflow: hidden;
	min-height: clamp(280px, 48vw, 430px);
	max-height: none;
}

@media (min-width: 1024px) {
	.grafline-single-product .woocommerce-product-gallery__wrapper > *:first-child {
		min-height: clamp(360px, 38vw, 500px);
	}
}

/* Hide zoom trigger (magnifying glass) – zoom disabled for cleaner look */
.grafline-single-product .woocommerce-product-gallery__trigger {
	display: none !important;
}

/* When first child is the image div (no slider), center the img */
.grafline-single-product .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: var(--spacing-md);
}

/* FlexSlider viewport: keep slides in normal flow so .height() in WC gallery JS is non-zero */
.grafline-single-product .woocommerce-product-gallery__wrapper > .flex-viewport {
	position: relative;
	width: 100%;
	min-height: clamp(280px, 48vw, 430px);
	overflow: hidden;
}

@media (min-width: 1024px) {
	.grafline-single-product .woocommerce-product-gallery__wrapper > .flex-viewport {
		min-height: clamp(360px, 38vw, 500px);
	}
}

/* Do NOT use position:absolute on slides — it makes slide height 0 and breaks the main image + thumbs */
.grafline-single-product .woocommerce-product-gallery__wrapper .flex-viewport .woocommerce-product-gallery__image {
	position: relative !important;
	inset: auto !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: var(--spacing-md);
	min-height: 200px;
}

.grafline-single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image a,
.grafline-single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img {
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.grafline-single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img {
	max-height: min(70vh, 620px);
}

/*
 * Main stage: keep slide images visible. FlexSlider moves slides horizontally; hiding via opacity
 * (common in WC themes) can leave a blank viewport if .flex-active-slide is wrong during init.
 */
.grafline-single-product .woocommerce-product-gallery .flex-viewport .slides > li .woocommerce-product-gallery__image img {
	opacity: 1 !important;
	visibility: visible !important;
}

/* FlexSlider direction arrows (enabled via woocommerce_single_product_carousel_options) */
.grafline-single-product .woocommerce-product-gallery ul.flex-direction-nav {
	grid-area: gallery-stage;
	align-self: stretch;
	position: relative;
	z-index: 6;
	width: 100%;
	min-height: 0;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	pointer-events: none;
}

.grafline-single-product .woocommerce-product-gallery .flex-direction-nav li {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	list-style: none;
	pointer-events: auto;
}

.grafline-single-product .woocommerce-product-gallery .flex-direction-nav .flex-nav-prev {
	left: 6px;
}

.grafline-single-product .woocommerce-product-gallery .flex-direction-nav .flex-nav-next {
	right: 6px;
}

.grafline-single-product .woocommerce-product-gallery .flex-direction-nav a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-full);
	background: rgba(255, 255, 255, 0.94);
	color: #111827;
	font-size: 1.5rem;
	line-height: 1;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(0, 0, 0, 0.06);
	transition: background 0.2s, color 0.2s, transform 0.15s;
	text-indent: 0;
	opacity: 1;
}

.grafline-single-product .woocommerce-product-gallery .flex-direction-nav a:hover {
	background: var(--grafline-primary);
	color: #fff;
	border-color: var(--grafline-primary);
}

.grafline-single-product .woocommerce-product-gallery .flex-direction-nav .flex-disabled {
	opacity: 0.35;
	pointer-events: none;
}

/* Single-image products (FlexSlider off): keep first gallery cell visible */
.grafline-single-product .woocommerce-product-gallery:not(.flexslider) .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child {
	display: flex !important;
}

/* Summary column: clear hierarchy and spacing */
.grafline-single-product .summary {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding-top: 0;
	min-width: 0; /* allow grid child to shrink without overflow clipping oddly */
	width: 100%;
}

/* Configurator: at 900px it uses a row (main + 320px sidebar). Narrow summary broke that layout.
   Keep stacked layout inside product summary until viewport is wide enough for both columns. */
.grafline-single-product .summary .grafline-configurator {
	max-width: 100%;
	width: 100%;
	margin-left: 0;
	margin-right: 0;
}

@media (max-width: 1279px) {
	.grafline-single-product .summary .grafline-configurator .gcfg-layout {
		flex-direction: column;
	}

	.grafline-single-product .summary .grafline-configurator .gcfg-sidebar {
		width: 100%;
		max-width: none;
		flex-shrink: 1;
		position: static;
		top: auto;
	}
}

.grafline-single-product .summary .product_title {
	font-size: clamp(1.35rem, 2.5vw, 1.85rem);
	margin: 0 0 var(--spacing-xs);
	letter-spacing: -0.03em;
	line-height: 1.2;
	color: var(--grafline-text);
	font-weight: 800;
}

.grafline-single-product .summary .price {
	font-size: clamp(1.2rem, 2vw, 1.65rem);
	font-weight: 700;
	color: var(--grafline-primary-dark);
	margin-bottom: var(--spacing-md);
	letter-spacing: -0.02em;
}

.grafline-single-product .summary .woocommerce-product-details__short-description {
	color: var(--grafline-text);
	margin-bottom: var(--spacing-lg);
	line-height: 1.65;
	font-size: var(--font-size-base);
	opacity: 0.92;
}

/* Cart form: qty + favorites on one row, add-to-cart full width below with more air */
.grafline-single-product .cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 1.5rem;
	row-gap: 1.75rem;
	margin-bottom: var(--spacing-lg);
}

.grafline-single-product form.cart > .variations,
.grafline-single-product form.cart .variations {
	flex: 1 1 100%;
	width: 100%;
}

/* Variation table + selects: always obvious; MidOcean uses Color + Size custom attributes */
.grafline-single-product table.variations {
	width: 100%;
	margin: 0 0 var(--spacing-md);
	border-collapse: collapse;
}

.grafline-single-product table.variations th.label {
	width: 30%;
	max-width: 10rem;
	padding: 0.5rem 0.75rem 0.5rem 0;
	vertical-align: middle;
	font-weight: 600;
	font-size: var(--font-size-sm);
	text-align: left;
	color: var(--grafline-text);
}

.grafline-single-product table.variations td.value {
	padding: 0.5rem 0;
	vertical-align: middle;
}

.grafline-single-product table.variations select {
	min-width: min(100%, 16rem);
	min-height: 44px;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	font-size: max(16px, var(--font-size-base));
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-lg);
	background-color: var(--grafline-bg);
	color: var(--grafline-text);
}

.grafline-single-product table.variations select:focus {
	border-color: var(--grafline-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 42, 19, 0.12);
}

/* Color swatches + size pills (synced via variation-autofill.js) */
.grafline-single-product .grafline-color-swatches,
.grafline-single-product .grafline-variation-pills {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0.5rem 0 var(--spacing-md);
}

.grafline-single-product .grafline-color-swatches__label,
.grafline-single-product .grafline-variation-pills__label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--grafline-text);
}

.grafline-single-product .grafline-color-swatches__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.grafline-single-product .grafline-color-swatch {
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid #e5e5e5;
	transition: transform 0.15s, box-shadow 0.15s;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.grafline-single-product .grafline-color-swatch:hover {
	transform: scale(1.08);
}

.grafline-single-product .grafline-color-swatch.is-active {
	box-shadow: 0 0 0 2px #d42a2a, 0 2px 8px rgba(212, 42, 42, 0.25);
}

.grafline-single-product .grafline-color-swatch[data-palette='black'] {
	background: #1a1a1a;
}

.grafline-single-product .grafline-color-swatch[data-palette='white'] {
	background: #fff;
}

.grafline-single-product .grafline-color-swatch[data-palette='red'] {
	background: #d42a2a;
}

.grafline-single-product .grafline-color-swatch[data-palette='blue'] {
	background: #1e3a8a;
}

.grafline-single-product .grafline-color-swatch[data-palette='green'] {
	background: #22c55e;
}

.grafline-single-product .grafline-color-swatch[data-palette='yellow'] {
	background: #fbbf24;
}

.grafline-single-product .grafline-color-swatch[data-palette='gray'] {
	background: #9ca3af;
}

.grafline-single-product .grafline-color-swatch[data-palette='orange'] {
	background: #ea580c;
}

.grafline-single-product .grafline-color-swatch[data-palette='custom'] {
	background: linear-gradient(135deg, #e5e5e5 0%, #b3b3b3 100%);
}

.grafline-single-product .grafline-variation-pills__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.grafline-single-product .grafline-variation-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0.35rem 0.85rem;
	font-size: var(--font-size-sm);
	font-weight: 600;
	cursor: pointer;
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-full);
	background: var(--grafline-bg);
	color: var(--grafline-text);
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.grafline-single-product .grafline-variation-pill:hover {
	border-color: var(--grafline-primary);
}

.grafline-single-product .grafline-variation-pill.is-active {
	border-color: var(--grafline-primary);
	background: var(--grafline-primary-light);
	box-shadow: 0 0 0 2px rgba(255, 42, 19, 0.2);
}

.grafline-single-product .cart .single_variation_wrap {
	flex: 1 1 100%;
	width: 100%;
}

.grafline-single-product .cart .woocommerce-variation-add-to-cart.variations_button {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 1.5rem;
	row-gap: 1.75rem;
	width: 100%;
}

.grafline-single-product .cart .quantity {
	margin: 0;
	flex: 0 0 auto;
}

.grafline-single-product .cart .grafline-wishlist-btn--inline {
	flex-shrink: 0;
	align-self: center;
}

.grafline-single-product .cart .single_add_to_cart_button {
	flex: 1 1 100%;
	min-width: 0;
	width: 100%;
	margin-top: 0.25rem;
}

/* Sticky summary on desktop so price and form stay in view */
@media (min-width: 1025px) {
	.grafline-single-product .summary {
		position: sticky;
		top: calc(12px + 60px);
	}
}

.grafline-single-product .single_add_to_cart_button {
	background: var(--grafline-primary) !important;
	color: #fff !important;
	border: none !important;
	border-radius: var(--radius-full) !important;
	padding: 1rem 2rem !important;
	font-size: var(--font-size-lg) !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: all 0.3s var(--ease-out-smooth);
	box-shadow: var(--shadow-md);
}

.grafline-single-product .single_add_to_cart_button:hover {
	background: var(--grafline-primary-dark) !important;
	transform: translateY(-2px);
	box-shadow: var(--shadow-xl);
}

.grafline-single-product .single_add_to_cart_button:active {
	transform: translateY(0);
	box-shadow: var(--shadow-sm);
}

/* Quantity input - enhanced */
.grafline-single-product .quantity input[type="number"] {
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-lg);
	padding: 0.75rem;
	font-size: var(--font-size-base);
	width: 80px;
	text-align: center;
	transition: all 0.2s var(--ease-out-smooth);
}

.grafline-single-product .quantity input[type="number"]:focus {
	border-color: var(--grafline-primary);
	box-shadow: 0 0 0 3px rgba(255, 42, 19, 0.1);
	outline: none;
}

/* Inline notices in summary (e.g. connection error) – subtle so they don’t dominate */
.grafline-single-product .summary .woocommerce-error,
.grafline-single-product .summary .woocommerce-info {
	font-size: var(--font-size-sm);
	margin-bottom: var(--spacing-sm);
	padding: 0.5rem 0.75rem;
	border-radius: var(--radius-md);
}

.grafline-single-product .summary .woocommerce-error {
	background: var(--grafline-primary-light);
	color: var(--grafline-primary-dark);
	border: 1px solid rgba(255, 42, 19, 0.2);
}

/* Payment / secondary buttons below Add to cart – visually secondary */
.grafline-single-product .summary .wc-block-components-product-button,
.grafline-single-product .summary .payment-buttons {
	margin-top: 0.5rem;
}

.grafline-single-product .summary .payment-buttons .button {
	opacity: 0.92;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.grafline-breadcrumb {
	padding: var(--spacing-md) 0;
	font-size: var(--font-size-sm);
	color: var(--grafline-text-light);
}

.grafline-breadcrumb a {
	color: var(--grafline-text-light);
	transition: color 0.2s var(--ease-out-smooth);
}

.grafline-breadcrumb a:hover {
	color: var(--grafline-primary);
}

.grafline-breadcrumb span[aria-hidden],
.grafline-breadcrumb__sep {
	margin: 0 0.5rem;
	opacity: 0.45;
	font-weight: 300;
}

/* Product page: compact trail above hero */
.grafline-breadcrumb--product {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding: 0.5rem 0 1rem;
	margin-bottom: 0;
	font-size: var(--font-size-xs);
}

.grafline-breadcrumb--product a {
	padding: 0.2rem 0.5rem;
	margin: 0 -0.25rem;
	border-radius: var(--radius-md);
}

.grafline-breadcrumb--product a:hover {
	background: rgba(255, 42, 19, 0.06);
	color: var(--grafline-primary);
}

.grafline-breadcrumb__current {
	color: var(--grafline-text);
	font-weight: 600;
	max-width: 100%;
	line-height: 1.35;
}

/* ============================================
   RELATED PRODUCTS – Carousel (max 10 in query)
   Full-bleed section; inner padding matches page gutters + safe areas.
   ============================================ */

.grafline-single-product .related.products.grafline-related-carousel {
	--related-gap: var(--spacing-md);
	--related-per-view: 4;
	--related-pad-inline: max(0.75rem, env(safe-area-inset-left, 0px));
	--related-pad-inline-end: max(0.75rem, env(safe-area-inset-right, 0px));
	--related-inner-width: calc(100vw - var(--related-pad-inline) - var(--related-pad-inline-end));
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	box-sizing: border-box;
	margin-top: var(--spacing-2xl);
	padding-top: var(--spacing-xl);
	padding-bottom: var(--spacing-md);
	padding-right: var(--related-pad-inline-end);
	padding-left: var(--related-pad-inline);
	border-top: 1px solid var(--grafline-border);
}

@media (max-width: 900px) {
	.grafline-single-product .related.products.grafline-related-carousel {
		--related-per-view: 3;
	}
}

@media (max-width: 640px) {
	.grafline-single-product .related.products.grafline-related-carousel {
		--related-per-view: 2;
		--related-gap: var(--spacing-sm);
		margin-top: var(--spacing-xl);
		padding-top: var(--spacing-lg);
	}
}

/* Narrow phones: show ~1.2 cards so the next slide peeks (signals horizontal scroll). */
@media (max-width: 520px) {
	.grafline-single-product .related.products.grafline-related-carousel {
		--related-per-view: 1.2;
		--related-gap: 0.65rem;
	}

	.grafline-single-product .grafline-related-carousel__head {
		gap: var(--spacing-sm);
		margin-bottom: var(--spacing-md);
	}

	.grafline-single-product .grafline-related-carousel__arrow {
		width: 40px;
		height: 40px;
		min-width: 40px;
		min-height: 40px;
		font-size: 1.35rem;
	}
}

@media (max-width: 380px) {
	.grafline-single-product .related.products.grafline-related-carousel {
		--related-per-view: 1.12;
		--related-gap: 0.5rem;
	}
}

.grafline-single-product .grafline-related-carousel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-md);
	flex-wrap: nowrap;
	margin-bottom: var(--spacing-lg);
	min-width: 0;
}

.grafline-single-product .related.products.grafline-related-carousel h2 {
	font-size: clamp(1.05rem, 3.2vw, 1.35rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex: 1;
	min-width: 0;
}

.grafline-single-product .related.products.grafline-related-carousel h2::before {
	content: '';
	width: 4px;
	height: 1.15em;
	border-radius: 2px;
	background: linear-gradient(180deg, var(--grafline-primary), var(--grafline-primary-dark));
	flex-shrink: 0;
}

.grafline-single-product .grafline-related-carousel__arrows {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex-shrink: 0;
}

.grafline-single-product .grafline-related-carousel:not(.is-scrollable) .grafline-related-carousel__arrows {
	display: none;
}

.grafline-single-product .grafline-related-carousel__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: var(--radius-full);
	background: rgba(255, 255, 255, 0.96);
	color: #111827;
	font-size: 1.5rem;
	line-height: 1;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	transition: background 0.2s, color 0.2s, opacity 0.2s, border-color 0.2s;
}

.grafline-single-product .grafline-related-carousel__arrow:hover:not(:disabled) {
	background: var(--grafline-primary);
	color: #fff;
	border-color: var(--grafline-primary);
}

.grafline-single-product .grafline-related-carousel__arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* Track scrolls horizontally; each card width from container (viewport) */
.grafline-single-product .grafline-related-carousel__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	width: 100%;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 0;
	scroll-padding-right: var(--related-pad-inline-end);
	overscroll-behavior-x: contain;
	touch-action: pan-x;
	scrollbar-width: thin;
	scrollbar-color: var(--grafline-border) transparent;
	padding-bottom: 6px;
	container-type: inline-size;
	container-name: related-carousel;
}

.grafline-single-product .grafline-related-carousel__viewport::-webkit-scrollbar {
	height: 6px;
}

.grafline-single-product .grafline-related-carousel__viewport::-webkit-scrollbar-thumb {
	background: var(--grafline-border);
	border-radius: 3px;
}

.grafline-single-product .related.products.grafline-related-carousel ul.products {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: var(--related-gap);
	list-style: none;
	margin: 0;
	padding: 0;
	clear: none;
	width: max-content;
	min-width: 100%;
}

/* Theme outputs <article class="product …"> directly under ul.products (no <li>) */
.grafline-single-product .related.products.grafline-related-carousel ul.products > .product {
	float: none;
	width: auto !important;
	min-width: 0;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	scroll-snap-align: start;
	flex: 0 0 calc((100cqw - (var(--related-per-view) - 1) * var(--related-gap)) / var(--related-per-view));
	max-width: calc((100cqw - (var(--related-per-view) - 1) * var(--related-gap)) / var(--related-per-view));
}

@supports not (width: 1cqw) {
	.grafline-single-product .related.products.grafline-related-carousel ul.products > .product {
		flex: 0 0 calc(
			(var(--related-inner-width) - (var(--related-per-view) - 1) * var(--related-gap)) / var(--related-per-view)
		);
		max-width: calc(
			(var(--related-inner-width) - (var(--related-per-view) - 1) * var(--related-gap)) / var(--related-per-view)
		);
	}
}

/* Compact card: constrain image height so section stays short */
.grafline-single-product .related.products .product .woocommerce-loop-product__link,
.grafline-single-product .related.products .product a img {
	display: block;
	width: 100%;
}

.grafline-single-product .related.products .product .attachment-woocommerce_thumbnail,
.grafline-single-product .related.products .product .woocommerce-loop-product__link img {
	width: 100%;
	height: auto;
	max-height: 180px;
	object-fit: contain;
	object-position: center;
	background: var(--grafline-bg-light);
	border-radius: var(--radius-lg);
}

.grafline-single-product .related.products .product .woocommerce-loop-product__title {
	font-size: var(--font-size-sm);
	line-height: 1.3;
	margin: var(--spacing-xs) 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.grafline-single-product .related.products .product .price {
	font-size: var(--font-size-sm);
	margin-bottom: var(--spacing-xs);
}

.grafline-single-product .related.products .product .button {
	font-size: var(--font-size-xs);
	padding: 0.5rem 0.75rem;
}

/* Theme product cards in related section: compact but visible image area */
.grafline-single-product .related.products .grafline-product-card__media.grafline-product-card__image {
	aspect-ratio: 1;
	width: 100%;
	flex-shrink: 0;
	max-height: 200px;
	min-height: 120px;
	overflow: hidden;
	background: var(--grafline-bg-light);
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.grafline-single-product .related.products .grafline-product-card__slide img,
.grafline-single-product .related.products .grafline-product-card__slide .grafline-product-card__slide-img {
	object-fit: contain;
	max-height: 200px;
}

.grafline-single-product .related.products .grafline-product-card__nav {
	width: 28px;
	height: 28px;
}

.grafline-single-product .related.products .grafline-product-card__nav--prev {
	left: 4px;
}

.grafline-single-product .related.products .grafline-product-card__nav--next {
	right: 4px;
}

.grafline-single-product .related.products .grafline-product-card__title h3,
.grafline-single-product .related.products .grafline-product-card__title {
	font-size: var(--font-size-sm);
	line-height: 1.3;
	-webkit-line-clamp: 2;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.grafline-single-product .related.products .grafline-product-card__excerpt {
	display: none;
}

.grafline-single-product .related.products .grafline-product-card__btn {
	font-size: var(--font-size-xs);
	padding: 0.5rem 0.75rem;
	width: 100% !important;
	box-sizing: border-box;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.grafline-single-product .related.products .grafline-product-card {
	height: auto;
	min-height: 0;
}

/* ============================================
   NO PRODUCTS
   ============================================ */

.grafline-no-products {
	text-align: center;
	padding: var(--spacing-2xl) var(--spacing-sm);
}

.grafline-no-products p {
	font-size: var(--font-size-lg);
	color: var(--grafline-text-light);
	margin-bottom: var(--spacing-lg);
}

/* ============================================
   CART & CHECKOUT - Enhanced
   ============================================ */

.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
	padding: var(--spacing-xl) 0;
}

/* Cart page positioning polish (block + classic) */
body.woocommerce-cart main#main-content {
	padding-top: clamp(1.25rem, 2.5vw, 2.25rem) !important;
}
body.woocommerce-cart .woocommerce,
body.woocommerce-cart .wc-block-cart,
body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-cart .wp-block-woocommerce-filled-cart-block,
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
	max-width: min(1200px, 100%);
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}
body.woocommerce-cart .entry-content > .wp-block-woocommerce-cart {
	padding-left: clamp(0.75rem, 2vw, 1.25rem);
	padding-right: clamp(0.75rem, 2vw, 1.25rem);
}
body.woocommerce-cart .wc-block-cart__empty-cart__title,
body.woocommerce-cart .wc-block-cart__empty-cart__description,
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
	text-align: center;
}

/* WooCommerce block cart – prevent sidebar / totals clipping off viewport */
body.woocommerce-cart .entry-content,
body.woocommerce-cart .site-content,
body.woocommerce-cart #main-content,
body.woocommerce-cart .content-area {
	overflow-x: hidden;
	max-width: 100%;
}

.wp-block-woocommerce-cart,
.wc-block-cart {
	max-width: 100%;
	box-sizing: border-box;
}

.wc-block-components-sidebar-layout {
	max-width: 100%;
	box-sizing: border-box;
	gap: 0;
}

.wc-block-components-sidebar-layout .wc-block-components-main,
.wc-block-components-sidebar-layout .wc-block-components-sidebar {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
}

/* Desktop: keep two columns inside viewport (Woo % widths + padding can exceed 100%) */
@media (min-width: 783px) {
	.woocommerce-cart .wc-block-components-sidebar-layout {
		flex-wrap: nowrap !important;
	}
	.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-main {
		width: 62% !important;
		max-width: 62% !important;
		padding-right: 2% !important;
		flex: 1 1 62% !important;
	}
	.woocommerce-cart .wc-block-components-sidebar-layout .wc-block-components-sidebar {
		width: 36% !important;
		max-width: 36% !important;
		padding-left: 0 !important;
		flex: 0 1 36% !important;
	}
}

.wc-block-cart__sidebar,
.wc-block-components-sidebar .components-card,
.wp-block-woocommerce-cart-totals-block {
	max-width: 100%;
	box-sizing: border-box;
}

.wc-block-cart .wc-block-cart__submit-button,
.wc-block-components-button.wc-block-cart__submit-button {
	max-width: 100%;
	box-sizing: border-box;
}

.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons > div,
.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons > li {
	max-width: 100%;
}

/* Totals card polish */
.wc-block-cart .wc-block-components-sidebar .components-card {
	border-radius: var(--radius-xl);
	border: 1px solid var(--grafline-border, #e8e8e8);
	box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.06));
	padding: 0.25rem 0;
}

.wc-block-cart .wc-block-cart__totals-title {
	padding-left: 1rem !important;
	padding-right: 1rem !important;
}

/* Classic shortcode cart – keep totals column inside viewport */
.woocommerce-cart .cart-collaterals {
	max-width: 100%;
	box-sizing: border-box;
}
@media (min-width: 769px) {
	.woocommerce-cart .cart-collaterals {
		width: min(100%, 400px) !important;
	}
}

/* Cart table styling */
.woocommerce table.shop_table {
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-xl);
	overflow: hidden;
	border-collapse: separate;
	box-shadow: var(--shadow-sm);
}

.woocommerce table.shop_table th {
	background: var(--grafline-bg-light);
	font-weight: 600;
	padding: var(--spacing-md);
	border-bottom: 1px solid var(--grafline-border);
}

.woocommerce table.shop_table td {
	padding: var(--spacing-md);
	border-bottom: 1px solid var(--grafline-border);
	vertical-align: middle;
}

/* Checkout form - enhanced */
.woocommerce form .form-row label {
	font-weight: 600;
	font-size: var(--font-size-sm);
	margin-bottom: var(--spacing-xs);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-lg);
	padding: 0.875rem;
	font-size: var(--font-size-base);
	transition: all 0.2s var(--ease-out-smooth);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	border-color: var(--grafline-primary);
	box-shadow: 0 0 0 3px rgba(255, 42, 19, 0.1);
	outline: none;
}

/* Place order button - enhanced */
.woocommerce #place_order {
	background: var(--grafline-primary) !important;
	color: #fff !important;
	border: none !important;
	border-radius: var(--radius-full) !important;
	padding: 1rem 2rem !important;
	font-size: var(--font-size-lg) !important;
	font-weight: 600 !important;
	width: 100%;
	cursor: pointer;
	transition: all 0.3s var(--ease-out-smooth);
	box-shadow: var(--shadow-md);
}

.woocommerce #place_order:hover {
	background: var(--grafline-primary-dark) !important;
	transform: translateY(-2px);
	box-shadow: var(--shadow-xl);
}

.woocommerce #place_order:active {
	transform: translateY(0);
}

/* ============================================
   WC NOTICES - Enhanced (icon + text layout)
   ============================================ */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
	border-radius: var(--radius-lg);
	margin-bottom: 1.5rem;
	position: relative;
	list-style: none;
	border: 1px solid transparent;
	outline: none;
	/* Enough left padding so text doesn’t overlap the ::before icon */
	padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 3.25rem;
}

/* Ensure ::before icon is positioned and doesn’t overlap text */
.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before {
	position: absolute;
	left: 1rem;
	top: 1rem;
	width: 1.25em;
	height: 1.25em;
	line-height: 1.25;
	text-align: center;
	margin: 0;
}

.woocommerce-message {
	border-top-color: #10b981 !important;
	background: #d1fae5;
	border-color: rgba(16, 185, 129, 0.3);
}

.woocommerce-message::before {
	color: #059669;
}

.woocommerce-error {
	border-top-color: #ef4444 !important;
	background: #fee2e2;
	border-color: rgba(239, 68, 68, 0.3);
}

.woocommerce-error::before {
	color: #dc2626;
}

.woocommerce-info {
	border-top-color: var(--grafline-primary) !important;
	background: var(--grafline-primary-light);
	border-color: rgba(255, 42, 19, 0.2);
}

.woocommerce-info::before {
	color: var(--grafline-primary);
}

/* ============================================
   WC PAGINATION - Enhanced
   ============================================ */

.woocommerce nav.woocommerce-pagination {
	margin-top: var(--spacing-xl);
	text-align: center;
}

.woocommerce nav.woocommerce-pagination ul {
	border: none;
	display: inline-flex;
	gap: var(--spacing-xs);
}

.woocommerce nav.woocommerce-pagination ul li {
	border: none;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-lg);
	font-weight: 600;
	border: 1px solid var(--grafline-border);
	background: var(--grafline-bg);
	color: var(--grafline-text);
	text-decoration: none;
	transition: all 0.2s var(--ease-out-smooth);
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
	background: var(--grafline-primary-light);
	border-color: var(--grafline-primary);
	color: var(--grafline-primary);
	transform: translateY(-2px);
	box-shadow: var(--shadow-sm);
}

.woocommerce nav.woocommerce-pagination ul li span.current {
	background: var(--grafline-primary);
	border-color: var(--grafline-primary);
	color: #fff;
	box-shadow: 0 4px 12px rgba(255, 42, 19, 0.3);
}

/* ============================================
   HIDE WC DEFAULT ELEMENTS WE REPLACE
   ============================================ */

.woocommerce-result-count,
.woocommerce-ordering {
	display: none;
}

/* ============================================
   SHOP LAYOUT (sidebar + content)
   ============================================ */

.grafline-shop-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: var(--spacing-xl);
	align-items: start;
}

/* Let grid children shrink correctly; prevents squeezed product column. */
.grafline-shop-layout > * {
	min-width: 0;
}

.grafline-shop-content {
	min-width: 0;
	width: 100%;
}

@media (max-width: 960px) {
	.grafline-shop-layout {
		grid-template-columns: 1fr;
	}

	.grafline-shop-sidebar {
		display: none;
	}
}

/* ============================================
   SIDEBAR WIDGETS - Enhanced
   ============================================ */

.grafline-sidebar-widget {
	margin-bottom: var(--spacing-lg);
	background: var(--grafline-bg);
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-xl);
	padding: var(--spacing-md);
	box-shadow: var(--shadow-xs);
}

.grafline-sidebar-widget__title {
	font-size: var(--font-size-base);
	font-weight: 700;
	margin-bottom: var(--spacing-sm);
	padding-bottom: var(--spacing-xs);
	border-bottom: 2px solid var(--grafline-primary);
}

/* Category tree */
.grafline-category-tree {
	list-style: none;
	margin: 0;
	padding: 0;
}

.grafline-category-tree__item {
	margin-bottom: 2px;
}

.grafline-category-tree a {
	display: flex;
	justify-content: space-between;
	padding: 0.5rem 0.75rem;
	font-size: var(--font-size-sm);
	color: var(--grafline-text);
	border-radius: var(--radius-lg);
	transition: all 0.2s var(--ease-out-smooth);
}

.grafline-category-tree a:hover,
.grafline-category-tree .is-active > a {
	background: var(--grafline-primary-light);
	color: var(--grafline-primary);
	transform: translateX(2px);
}

.grafline-category-tree .count {
	color: var(--grafline-text-light);
	font-size: var(--font-size-sm);
}

.grafline-category-tree__sub {
	list-style: none;
	margin: 0;
	padding-left: var(--spacing-sm);
}

.grafline-category-tree__sub a {
	font-size: 0.8rem;
	padding: 0.35rem 0.75rem;
}

/* Price filter - enhanced */
.grafline-price-filter__inputs {
	display: flex;
	gap: var(--spacing-xs);
	align-items: center;
	margin-bottom: var(--spacing-sm);
}

.grafline-price-filter__inputs input {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-lg);
	font-size: var(--font-size-sm);
	transition: all 0.2s var(--ease-out-smooth);
}

.grafline-price-filter__inputs input:focus {
	border-color: var(--grafline-primary);
	box-shadow: 0 0 0 3px rgba(255, 42, 19, 0.1);
	outline: none;
}

.grafline-price-filter .btn {
	width: 100%;
	padding: 0.5rem;
	font-size: var(--font-size-sm);
}

/* Shop sidebar search */
.grafline-shop-search {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-sm);
}
.grafline-shop-search__input {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-lg);
	font-size: var(--font-size-sm);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.grafline-shop-search__input:focus {
	border-color: var(--grafline-primary);
	box-shadow: 0 0 0 3px rgba(255, 42, 19, 0.1);
	outline: none;
}
.grafline-shop-search .btn {
	width: 100%;
	padding: 0.5rem;
	font-size: var(--font-size-sm);
}

/* ============================================
   SHOP TOOLBAR (sort + count)
   ============================================ */

.grafline-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--spacing-md);
	margin-bottom: var(--spacing-lg);
	padding-bottom: var(--spacing-sm);
	border-bottom: 1px solid var(--grafline-border);
}

.grafline-shop-toolbar__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--spacing-md);
}

.grafline-shop-toolbar__sort,
.grafline-shop-toolbar__per-page {
	display: flex;
	align-items: center;
	gap: var(--spacing-xs);
}

.grafline-shop-toolbar__sort label,
.grafline-shop-toolbar__per-page label {
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--grafline-text-light);
}

.grafline-shop-toolbar__select {
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--grafline-border);
	border-radius: var(--radius-lg);
	font-size: var(--font-size-sm);
	background: var(--grafline-bg);
	transition: all 0.2s var(--ease-out-smooth);
	min-width: 10rem;
}

.grafline-shop-toolbar__select:focus {
	border-color: var(--grafline-primary);
	box-shadow: 0 0 0 3px rgba(255, 42, 19, 0.1);
	outline: none;
}

.grafline-shop-toolbar__per-page .grafline-shop-toolbar__select {
	min-width: 5rem;
}

.grafline-shop-toolbar__count {
	font-size: var(--font-size-sm);
	color: var(--grafline-text-light);
}

/* Keep product cards readable and stop ultra-narrow columns. */
.grafline-product-grid {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	align-items: stretch;
}

.grafline-product-grid > .product,
.grafline-product-grid > .grafline-product-card {
	width: auto !important;
	min-width: 0;
	float: none !important;
	margin: 0 !important;
}

@media (max-width: 1280px) {
	.grafline-shop-layout {
		grid-template-columns: 220px 1fr;
	}
}

/* ============================================
   FILTER PILL COUNT
   ============================================ */

.grafline-filter-pill__count {
	font-size: 0.7rem;
	opacity: 0.7;
	margin-left: 0.25rem;
}

/* ============================================
   PRODUCT CARD BADGES - Enhanced
   ============================================ */

.grafline-product-card__source {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 2;
	padding: 0.25rem 0.7rem;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: var(--grafline-secondary);
	color: #fff;
	border-radius: var(--radius-full);
	backdrop-filter: blur(8px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.grafline-product-card__sale {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	padding: 0.25rem 0.7rem;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	background: var(--grafline-primary);
	color: #fff;
	border-radius: var(--radius-full);
	box-shadow: 0 2px 8px rgba(255, 42, 19, 0.3);
}

.grafline-product-card__excerpt {
	font-size: var(--font-size-sm);
	color: var(--grafline-text-light);
	line-height: 1.6;
	margin: 0 0 var(--spacing-sm);
}

/* ============================================
   VOLUME PRICING TABLE - Enhanced
   ============================================ */

.grafline-volume-pricing {
	margin-top: 0;
	padding: var(--spacing-lg);
	background: var(--grafline-bg);
	border-radius: var(--radius-2xl);
	border: 1px solid var(--grafline-border);
	box-shadow: var(--shadow-md);
}

.grafline-volume-pricing h3 {
	margin: 0 0 var(--spacing-md);
	font-size: var(--font-size-lg);
	font-weight: 700;
	letter-spacing: -0.02em;
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.grafline-volume-pricing h3::before {
	content: '';
	width: 4px;
	height: 1.1em;
	border-radius: 2px;
	background: linear-gradient(180deg, var(--grafline-primary), var(--grafline-primary-dark));
	flex-shrink: 0;
}

.grafline-volume-pricing__table {
	width: 100%;
	border-collapse: collapse;
}

.grafline-volume-pricing__table th {
	text-align: left;
	padding: 0.85rem 1rem;
	font-size: var(--font-size-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--grafline-text-light);
	border-bottom: 2px solid var(--grafline-border);
	background: var(--grafline-bg-light);
}

.grafline-volume-pricing__table td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--grafline-border);
	font-size: var(--font-size-base);
}

.grafline-volume-pricing__table tbody tr:hover td {
	background: var(--grafline-bg-light);
}

.grafline-volume-pricing__table tr:last-child td {
	border-bottom: none;
}

/* ============================================
   PRINT SPECIFICATIONS - Enhanced
   ============================================ */

.grafline-print-specs {
	margin-top: 0;
}

.grafline-print-specs h3 {
	margin: 0 0 var(--spacing-md);
	font-size: var(--font-size-lg);
	font-weight: 700;
	letter-spacing: -0.02em;
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.grafline-print-specs h3::before {
	content: '';
	width: 4px;
	height: 1.1em;
	border-radius: 2px;
	background: linear-gradient(180deg, var(--grafline-primary), var(--grafline-primary-dark));
	flex-shrink: 0;
}

.grafline-print-specs__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: var(--spacing-md);
}

.grafline-print-specs__item {
	padding: var(--spacing-md);
	background: var(--grafline-bg-light);
	border-radius: var(--radius-xl);
	border: 1px solid var(--grafline-border);
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	transition: all 0.3s var(--ease-out-smooth);
}

.grafline-print-specs__item:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
	border-color: var(--grafline-primary);
}

.grafline-print-specs__item strong {
	font-size: var(--font-size-base);
}

.grafline-print-specs__item span {
	font-size: var(--font-size-sm);
	color: var(--grafline-text-light);
}

.grafline-print-specs__size {
	font-weight: 600;
	color: var(--grafline-primary) !important;
}

/* ============================================
   QUOTE REQUEST BOX - Enhanced
   ============================================ */

.grafline-quote-request {
	margin-top: 0;
}

.grafline-quote-request__box {
	padding: clamp(1.25rem, 4vw, 2rem);
	background: linear-gradient(135deg, var(--grafline-primary-light) 0%, var(--grafline-bg) 55%);
	border: 1px solid rgba(255, 42, 19, 0.18);
	border-radius: var(--radius-2xl);
	text-align: center;
	transition: all 0.3s var(--ease-out-smooth);
	box-shadow: var(--shadow-sm);
}

.grafline-quote-request__box:hover {
	border-color: var(--grafline-primary);
	box-shadow: var(--shadow-lg);
	transform: translateY(-2px);
}

.grafline-quote-request__box h3 {
	margin-bottom: var(--spacing-xs);
}

.grafline-quote-request__box p {
	color: var(--grafline-text-light);
	margin-bottom: var(--spacing-md);
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.7;
}

/* ============================================
   WOOCOMMERCE - COMPREHENSIVE RESPONSIVE
   ============================================ */

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
	.grafline-product-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--spacing-md);
	}
	
	.grafline-shop-layout {
		grid-template-columns: 240px 1fr;
		gap: var(--spacing-lg);
	}
	
	.grafline-single-product .product {
		gap: var(--spacing-lg);
	}
}

/* Mobile: < 768px - CRITICAL FIXES */
@media (max-width: 768px) {
	/* CATEGORY FILTERS - Stack pills */
	.grafline-category-filter {
		gap: 0.5rem;
		margin-bottom: var(--spacing-lg);
	}

	.grafline-filter-pill {
		padding: 0.5rem 1rem;
		font-size: 0.75rem;
		min-height: 40px;
	}
	
	/* PRODUCT GRID — 2 cols by default; 3 cols from ~480px up to tablet */
	.grafline-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5rem;
	}

	@media (min-width: 480px) {
		.grafline-product-grid {
			grid-template-columns: repeat(3, minmax(0, 1fr));
			gap: 0.55rem;
		}
	}

	/* PRODUCT CARD */
	.grafline-product-card {
		border-radius: var(--radius-lg);
	}

	@media (hover: none) {
		.grafline-product-card:hover {
			transform: none;
			box-shadow: var(--shadow-sm);
		}
	}
	
	.grafline-product-card__info {
		padding: 0.5rem 0.55rem 0.65rem;
	}
	
	.grafline-product-card__title h3 {
		font-size: 0.78rem;
		line-height: 1.3;
		margin: 0 0 0.35rem;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	
	.grafline-product-card__price {
		font-size: 0.82rem;
		margin-bottom: 0.35rem;
	}
	
	.grafline-product-card__price del {
		font-size: 0.75rem;
	}
	
	.grafline-product-card__excerpt {
		font-size: 0.68rem;
		line-height: 1.35;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		margin-bottom: 0.35rem;
	}
	
	.grafline-product-card__btn {
		font-size: 0.75rem !important;
		padding: 0.625rem 0.875rem !important;
		min-height: 44px;
	}
	
	.grafline-product-card__source,
	.grafline-product-card__sale {
		padding: 0.25rem 0.6rem;
		font-size: 0.6rem;
		top: 0.5rem;
	}
	
	.grafline-product-card__source {
		left: 0.5rem;
	}
	
	.grafline-product-card__sale {
		right: 0.5rem;
	}

	/* Carousel arrows: smaller + inset so they don’t bleed past card edges */
	.grafline-product-card__nav {
		width: 26px;
		height: 26px;
	}

	.grafline-product-card__nav--prev {
		left: 2px;
	}

	.grafline-product-card__nav--next {
		right: 2px;
	}

	.grafline-product-card .grafline-wishlist-btn {
		top: 6px;
		right: 6px;
		width: 32px;
		height: 32px;
		min-width: 32px;
		min-height: 32px;
	}

	.grafline-product-card .grafline-wishlist-btn .grafline-wishlist-btn__svg {
		width: 17px;
		height: 17px;
	}

	.grafline-product-card:has(.grafline-product-card__sale) .grafline-wishlist-btn {
		top: 2.65rem;
	}
	
	/* SINGLE PRODUCT - Stack layout */
	.grafline-single-product .product {
		grid-template-columns: 1fr;
		gap: var(--spacing-md);
		padding: 0;
	}

	.grafline-single-product .grafline-product-hero {
		padding: var(--spacing-md);
		border-radius: var(--radius-xl);
	}

	.grafline-single-product .summary.entry-summary {
		padding: var(--spacing-md);
	}
	
	.grafline-single-product .summary .product_title {
		font-size: var(--font-size-2xl);
		margin-bottom: var(--spacing-xs);
	}
	
	.grafline-single-product .summary .price {
		font-size: var(--font-size-xl);
		margin-bottom: var(--spacing-sm);
	}
	
	.grafline-single-product .summary .woocommerce-product-details__short-description {
		font-size: var(--font-size-sm);
		margin-bottom: var(--spacing-md);
	}
	
	.grafline-single-product .single_add_to_cart_button {
		padding: 0.875rem 1.5rem !important;
		font-size: var(--font-size-base) !important;
		min-height: 48px;
	}
	
	.grafline-single-product .quantity input[type=number] {
		padding: 0.625rem;
		font-size: max(16px, 1rem);
		width: 4.5rem;
		min-height: 48px;
		box-sizing: border-box;
	}

	.grafline-single-product form.cart {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: var(--spacing-sm);
	}

	.grafline-single-product form.cart .quantity {
		margin: 0;
	}

	.grafline-single-product form.cart .single_add_to_cart_button {
		width: 100%;
	}

	/* Cart / checkout: wide tables scroll horizontally instead of breaking layout */
	.woocommerce-cart .woocommerce-cart-form,
	.woocommerce-checkout #order_review,
	.woocommerce-page .woocommerce-order-details {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
	}

	.woocommerce-cart .woocommerce-cart-form table.shop_table,
	.woocommerce-checkout #order_review table.shop_table {
		min-width: 520px;
	}

	.woocommerce .woocommerce-checkout .col2-set .form-row-first,
	.woocommerce .woocommerce-checkout .col2-set .form-row-last,
	.woocommerce-page .woocommerce-billing-fields .form-row,
	.woocommerce-page .woocommerce-shipping-fields .form-row {
		width: 100% !important;
		float: none !important;
	}

	.woocommerce-message,
	.woocommerce-error,
	.woocommerce-info {
		font-size: var(--font-size-sm);
		line-height: 1.5;
		word-break: break-word;
	}
	
	/* BREADCRUMB */
	.grafline-breadcrumb {
		padding: var(--spacing-xs) 0;
		font-size: 0.75rem;
	}
	
	.grafline-breadcrumb span[aria-hidden] {
		margin: 0 0.25rem;
	}
	
	/* NO PRODUCTS */
	.grafline-no-products {
		padding: var(--spacing-xl) 1rem;
	}
	
	.grafline-no-products p {
		font-size: var(--font-size-base);
		margin-bottom: var(--spacing-md);
	}
	
	/* SHOP LAYOUT - Hide sidebar, show filters differently */
	.grafline-shop-layout {
		grid-template-columns: 1fr;
	}

	.grafline-shop-sidebar {
		display: none;
	}
	
	/* SIDEBAR WIDGETS */
	.grafline-sidebar-widget {
		margin-bottom: var(--spacing-md);
		padding: var(--spacing-sm);
	}
	
	.grafline-sidebar-widget__title {
		font-size: var(--font-size-sm);
		margin-bottom: var(--spacing-xs);
	}
	
	.grafline-category-tree a {
		padding: 0.5rem;
		font-size: 0.75rem;
	}
	
	.grafline-price-filter__inputs input {
		padding: 0.5rem;
		font-size: 0.75rem;
	}
	
	/* SHOP TOOLBAR */
	.grafline-shop-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: var(--spacing-xs);
		margin-bottom: var(--spacing-md);
		padding-bottom: var(--spacing-sm);
	}
	
	.grafline-shop-toolbar__controls {
		flex-direction: column;
		align-items: stretch;
		gap: var(--spacing-sm);
	}
	
	.grafline-shop-toolbar__sort,
	.grafline-shop-toolbar__per-page {
		width: 100%;
	}
	
	.grafline-shop-toolbar__sort label,
	.grafline-shop-toolbar__per-page label {
		font-size: 0.75rem;
	}
	
	.grafline-shop-toolbar__select {
		flex: 1;
		width: 100%;
		min-width: 0;
		padding: 0.5rem;
		font-size: 0.75rem;
	}
	
	.grafline-shop-toolbar__count {
		font-size: 0.75rem;
		text-align: center;
	}
	
	/* CART & CHECKOUT */
	.woocommerce-cart .woocommerce,
	.woocommerce-checkout .woocommerce {
		padding: var(--spacing-lg) 0;
	}
	
	/* Prevent horizontal overflow on phone: allow table to scroll */
	.woocommerce-cart form.woocommerce-cart-form,
	.woocommerce-checkout .woocommerce-checkout-review-order {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	.woocommerce table.shop_table {
		font-size: var(--font-size-sm);
	}
	
	.woocommerce table.shop_table th,
	.woocommerce table.shop_table td {
		padding: var(--spacing-xs);
	}
	
	.woocommerce form .form-row input.input-text,
	.woocommerce form .form-row textarea,
	.woocommerce form .form-row select {
		padding: 0.75rem;
		font-size: var(--font-size-sm);
		min-height: 44px;
	}
	
	.woocommerce #place_order {
		padding: 0.875rem 1.5rem !important;
		font-size: var(--font-size-base) !important;
		min-height: 48px;
	}
	
	/* WC NOTICES */
	.woocommerce-message,
	.woocommerce-error,
	.woocommerce-info {
		padding: var(--spacing-sm);
		font-size: var(--font-size-sm);
	}
	
	/* WC PAGINATION */
	.woocommerce nav.woocommerce-pagination {
		margin-top: var(--spacing-lg);
	}
	
	.woocommerce nav.woocommerce-pagination ul {
		gap: 0.25rem;
	}
	
	.woocommerce nav.woocommerce-pagination ul li a,
	.woocommerce nav.woocommerce-pagination ul li span {
		width: 36px;
		height: 36px;
		font-size: var(--font-size-sm);
	}
	
	/* VOLUME PRICING */
	.grafline-volume-pricing {
		margin-top: var(--spacing-lg);
		padding: var(--spacing-md);
	}
	
	.grafline-volume-pricing h3 {
		font-size: var(--font-size-base);
		margin-bottom: var(--spacing-sm);
	}
	
	.grafline-volume-pricing__table {
		font-size: var(--font-size-sm);
	}
	
	.grafline-volume-pricing__table th,
	.grafline-volume-pricing__table td {
		padding: 0.5rem;
		font-size: 0.75rem;
	}
	
	/* PRINT SPECS */
	.grafline-print-specs {
		margin-top: var(--spacing-md);
	}
	
	.grafline-print-specs h3 {
		font-size: var(--font-size-base);
		margin-bottom: var(--spacing-sm);
	}
	
	.grafline-print-specs__grid {
		grid-template-columns: 1fr;
		gap: var(--spacing-sm);
	}
	
	.grafline-print-specs__item {
		padding: var(--spacing-sm);
	}
	
	.grafline-print-specs__item strong {
		font-size: var(--font-size-sm);
	}
	
	.grafline-print-specs__item span {
		font-size: 0.75rem;
	}
	
	/* QUOTE REQUEST */
	.grafline-quote-request {
		margin-top: var(--spacing-lg);
	}
	
	.grafline-quote-request__box {
		padding: var(--spacing-md);
	}
	
	.grafline-quote-request__box h3 {
		font-size: var(--font-size-base);
		margin-bottom: var(--spacing-xs);
	}
	
	.grafline-quote-request__box p {
		font-size: var(--font-size-sm);
		margin-bottom: var(--spacing-sm);
	}
}

/* Touch devices: disable hover transforms on product cards for smooth scrolling */
@media (max-width: 1024px) {
	.grafline-product-card {
		transition: none;
	}
	.grafline-product-card:hover {
		transform: none;
		box-shadow: var(--shadow-md);
	}
	.grafline-product-card::before {
		display: none;
	}
	.grafline-product-card__slide img,
	.grafline-product-card__slide .grafline-product-card__slide-img {
		transition: none;
	}
	.grafline-product-card:hover .grafline-product-card__slide img,
	.grafline-product-card:hover .grafline-product-card__slide .grafline-product-card__slide-img {
		transform: none;
	}
}

/* Small mobile: < 480px */
@media (max-width: 480px) {
	.grafline-filter-pill {
		padding: 0.5rem 0.875rem;
		font-size: 0.7rem;
	}
	
	.grafline-product-card__info {
		padding: 0.75rem;
	}
	
	.grafline-single-product .summary .product_title {
		font-size: var(--font-size-xl);
	}
	
	.grafline-single-product .summary .price {
		font-size: var(--font-size-lg);
	}
	
	.grafline-volume-pricing,
	.grafline-print-specs,
	.grafline-quote-request__box {
		padding: var(--spacing-sm);
	}
	
	.grafline-volume-pricing__table th,
	.grafline-volume-pricing__table td {
		padding: 0.375rem;
		font-size: 0.7rem;
	}
}

/* Improve touch targets on all devices */
@media (max-width: 768px) {
	.grafline-filter-pill,
	.grafline-product-card__btn,
	.single_add_to_cart_button,
	.woocommerce #place_order,
	.woocommerce nav.woocommerce-pagination ul li a,
	.woocommerce nav.woocommerce-pagination ul li span {
		min-height: 44px;
	}
}

/* ============================================
   FIX: Configurator product page layout
   Gallery visibility, height containment, and
   configurator layout when inside product summary.
   ============================================ */

/* 1. Force gallery visible — WC sets opacity:0 inline and relies on
      FlexSlider JS to flip it to 1. When the slider fails to init the
      gallery stays invisible. */
.grafline-single-product .woocommerce-product-gallery {
	opacity: 1 !important;
}

/* 2. Before FlexSlider runs, hide stacked direct images (avoid 2000px+ column).
      After .flexslider is applied to the gallery, slides live inside .flex-viewport — this selector no longer matches. */
.grafline-single-product .woocommerce-product-gallery:not(.flexslider) .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) {
	display: none;
}
/* If FlexSlider never runs, keep a single main image — never stack full gallery cells (was confusing “second image below”). */
.grafline-single-product .woocommerce-product-gallery.grafline-gallery-fallback .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) {
	display: none !important;
}
.grafline-single-product .woocommerce-product-gallery.grafline-gallery-fallback .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child {
	display: flex !important;
}
/* FlexSlider may leave duplicate .woocommerce-product-gallery__image nodes as siblings — keep hidden
   (showing them stacked the page and broke layout / clipped thumbs). */
.grafline-single-product .woocommerce-product-gallery__wrapper > .flex-viewport ~ .woocommerce-product-gallery__image {
	display: none !important;
}

/* 3. Make the gallery sticky instead of the summary — the configurator
      in the summary is much taller than the viewport so sticky on it
      doesn't work. The gallery is short and benefits from sticking. */
@media (min-width: 1025px) {
	.grafline-single-product .summary {
		position: static;
		top: auto;
	}
	/* Sticky gallery was clipping thumbs when column max-height / overflow interacted with flexslider */
	.grafline-single-product .woocommerce-product-gallery {
		position: relative;
		top: auto;
		align-self: start;
		max-height: none;
		overflow: visible;
	}
}

/* 4. Force configurator to single-column layout inside the product
      summary. The summary column is ~50% viewport width (~700px at
      1440px) which is too narrow for the configurator's 900px+ row
      layout (main + 320px sidebar). Keep everything stacked. */
.grafline-single-product .summary .grafline-configurator .gcfg-layout {
	flex-direction: column !important;
}
.grafline-single-product .summary .grafline-configurator .gcfg-sidebar {
	width: 100% !important;
	max-width: none !important;
	position: static !important;
	top: auto !important;
}

/* 5. Hide the default WooCommerce cart form on configurator products —
      the configurator has its own AJAX add-to-cart. */
.grafline-single-product .summary .grafline-configurator ~ form.cart {
	display: none !important;
}
.grafline-single-product .summary .grafline-configurator ~ .wcpay-express-checkout-wrapper {
	display: none !important;
}
/* Also hide the separate pricing container that duplicates info */
.grafline-single-product .summary #grafline-pricing-container {
	display: none !important;
}

/* 6. Hide the standalone "Request Quote" button below the WC form —
      the configurator already has its own quote CTA. */
.grafline-single-product .summary .grafline-configurator ~ .grafline-quote-request {
	display: none;
}

/* ============================================
   MIDOCEAN: fallback CTA when price / ATC missing
   ============================================ */

.grafline-midocean-cta {
	margin: var(--spacing-md) 0 var(--spacing-lg);
	padding: var(--spacing-md);
	background: var(--grafline-bg-light);
	border-radius: var(--radius-lg);
	border: 1px solid var(--grafline-border);
}

.grafline-midocean-cta__title {
	font-size: var(--font-size-lg);
	font-weight: 700;
	margin: 0 0 var(--spacing-xs);
	color: var(--grafline-text);
}

.grafline-midocean-cta__text {
	margin: 0 0 var(--spacing-md);
	color: var(--grafline-text-light);
	font-size: var(--font-size-sm);
	line-height: 1.6;
}

.grafline-midocean-cta .btn {
	margin-right: 0.5rem;
	margin-bottom: 0.5rem;
}

.grafline-midocean-cta__hint {
	display: block;
	margin-top: var(--spacing-sm);
	font-size: var(--font-size-xs);
	color: var(--grafline-text-light);
}

/* ============================================================================
   GRA-22 ADDITIONS: Product Gallery, Search, Filters
   ============================================================================ */

/* Product Gallery with Thumbnail Navigation */
.grafline-product-gallery {
    position: relative;
}

.grafline-product-gallery__main {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--grafline-bg-light);
}

.grafline-product-gallery__main img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.grafline-product-gallery__main:hover img {
    transform: scale(1.05);
}

/* Thumbnail strip */
.grafline-product-gallery__thumbs {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.grafline-product-gallery__thumbs::-webkit-scrollbar {
    height: 4px;
}

.grafline-product-gallery__thumbs::-webkit-scrollbar-track {
    background: var(--grafline-bg-light);
    border-radius: 2px;
}

.grafline-product-gallery__thumbs::-webkit-scrollbar-thumb {
    background: var(--grafline-primary);
    border-radius: 2px;
}

.grafline-product-gallery__thumb {
    flex: 0 0 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    scroll-snap-align: start;
    transition: all 0.2s ease;
}

.grafline-product-gallery__thumb:hover,
.grafline-product-gallery__thumb.is-active {
    border-color: var(--grafline-primary);
    transform: translateY(-2px);
}

.grafline-product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image zoom overlay */
.grafline-product-gallery__zoom {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.grafline-product-gallery__main:hover .grafline-product-gallery__zoom {
    opacity: 1;
}

/* Search enhancements */
.grafline-search-form {
    position: relative;
    max-width: 500px;
}

.grafline-search-form__input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    border: 2px solid var(--grafline-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    transition: all 0.2s ease;
}

.grafline-search-form__input:focus {
    outline: none;
    border-color: var(--grafline-primary);
    box-shadow: 0 0 0 4px rgba(255, 42, 19, 0.1);
}

.grafline-search-form__btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--grafline-primary);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.grafline-search-form__btn:hover {
    background: var(--grafline-primary-dark);
    transform: translateY(-50%) scale(1.05);
}

/* Enhanced category filter with sub-sections */
.grafline-filter-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.grafline-filter-tree__item {
    border-bottom: 1px solid var(--grafline-border);
}

.grafline-filter-tree__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--grafline-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.grafline-filter-tree__link:hover {
    color: var(--grafline-primary);
}

.grafline-filter-tree__count {
    font-size: var(--font-size-xs);
    color: var(--grafline-text-light);
    background: var(--grafline-bg-light);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
}

.grafline-filter-tree__children {
    list-style: none;
    padding-left: 1rem;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.grafline-filter-tree__item.is-expanded > .grafline-filter-tree__children {
    max-height: 500px;
}

.grafline-filter-tree__toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: transform 0.2s ease;
}

.grafline-filter-tree__item.is-expanded > .grafline-filter-tree__link .grafline-filter-tree__toggle {
    transform: rotate(180deg);
}

/* Delivery options styling */
.grafline-delivery-options {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--grafline-bg-light);
    border-radius: var(--radius-lg);
}

.grafline-delivery-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 2px solid var(--grafline-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.grafline-delivery-option:hover,
.grafline-delivery-option.is-selected {
    border-color: var(--grafline-primary);
    background: var(--grafline-primary-light);
}

.grafline-delivery-option__radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--grafline-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.grafline-delivery-option.is-selected .grafline-delivery-option__radio {
    border-color: var(--grafline-primary);
    background: var(--grafline-primary);
}

.grafline-delivery-option__radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.grafline-delivery-option.is-selected .grafline-delivery-option__radio::after {
    opacity: 1;
    transform: scale(1);
}

.grafline-delivery-option__label {
    flex: 1;
    font-weight: 500;
}

.grafline-delivery-option__price {
    font-weight: 700;
    color: var(--grafline-primary);
}

.grafline-delivery-option__desc {
    font-size: var(--font-size-sm);
    color: var(--grafline-text-light);
}

