/* =========================================================
   Product Catalog — frontend styles
   Most visual properties are overridable from each Elementor
   widget's Style tab. These are sensible defaults.
   ========================================================= */

.pc-empty {
	padding: 24px;
	text-align: center;
	color: #888;
	background: #f8f8f8;
	border: 1px dashed #ddd;
}

/* ------- GALLERY ------- */
.pc-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.pc-gallery__item {
	display: block;
	flex: 1 1 100%;
	max-width: 100%;
	overflow: hidden;
}
.pc-gallery img,
.pc-gallery__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

/* 1 image: full bleed, centered */
.pc-gallery--single .pc-gallery__item {
	flex: 1 1 100%;
	max-width: 1000px;
	margin: 0 auto;
}

/* 2 images: split 50/50, both prominent */
.pc-gallery--pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.pc-gallery--pair .pc-gallery__item {
	flex: initial;
	max-width: none;
}

/* 3+ : masonry layout via CSS columns. Images render at their natural aspect
   ratio and stack tightly with no whitespace below shorter ones.
   column-count is set per-device by the widget's responsive Grid Columns control. */
.pc-gallery--grid {
	display: block;
	column-count: 3; /* default; overridden by the responsive widget control */
}
.pc-gallery--grid .pc-gallery__item {
	display: block;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	flex: initial;
	max-width: none;
	width: 100%;
	margin-bottom: 16px; /* overridden by the responsive Gap control */
}

/* 3+ : main image + thumbnail strip */
.pc-gallery--main-thumbs {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}
.pc-gallery--main-thumbs .pc-gallery__main {
	width: 100%;
}
.pc-gallery--main-thumbs .pc-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.pc-gallery__thumb {
	border: 2px solid transparent;
	background: none;
	padding: 0;
	cursor: pointer;
	width: 84px;
	height: 84px;
	overflow: hidden;
	transition: border-color .15s ease;
}
.pc-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.pc-gallery__thumb.is-active,
.pc-gallery__thumb:hover {
	border-color: currentColor;
}

@media (max-width: 700px) {
	.pc-gallery--pair { grid-template-columns: 1fr; }
	/* .pc-gallery--grid mobile column count is controlled per-device by the
	   Elementor responsive "Grid Columns" widget control. */
}

/* ------- PRIMARY IMAGE (standalone widget) ------- */
.pc-primary-image {
	display: flex;
	width: 100%;
}
.pc-primary-image__inner {
	display: block;
	max-width: 100%;
	overflow: hidden;
}
.pc-primary-image__inner a {
	display: block;
}
.pc-primary-image__inner img,
.pc-primary-image__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
}

/* ------- TITLE ------- */
.pc-title {
	margin: 0;
	letter-spacing: 0.02em;
	line-height: 1.15;
}

/* ------- SPEC TABLE (dimensions / carton) ------- */
.pc-spec {
	background: #fff;
	overflow: hidden;
}
.pc-spec__header {
	background: #9c9c9c;
	color: #fff;
	padding: 16px 24px;
	font-size: 18px;
	font-weight: 500;
}
.pc-spec__body {
	padding: 32px 24px;
}
.pc-spec__grid {
	display: grid;
	/* --pc-spec-cols is set by the widget's Columns control (when a value is chosen).
	   --pc-spec-cols-auto is set inline by PHP to the field count (one column per field).
	   The control wins when set; otherwise we fall back to the field count, then to 3. */
	grid-template-columns: repeat(var(--pc-spec-cols, var(--pc-spec-cols-auto, 3)), minmax(0, 1fr));
	gap: 24px;
}
.pc-spec__cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}
.pc-spec__label {
	font-weight: 700;
	font-size: 18px;
	color: #111;
}
.pc-spec__value {
	font-size: 16px;
	color: #222;
}
.pc-spec__empty {
	color: #888;
	font-style: italic;
}

/* Responsive columns are controlled by the --pc-spec-cols CSS variable,
   which Elementor's responsive Columns control overrides per breakpoint. */

/* ------- BACK TO CATALOG BUTTON ------- */
.pc-back-wrap {
	display: flex;
	justify-content: flex-end;
}
.pc-back {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 14px 28px;
	color: #e63a3a;
	background: #fff;
	border: 2px solid #e63a3a;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	letter-spacing: 0.05em;
	line-height: 1;
	transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.pc-back:hover {
	color: #fff;
	background: #e63a3a;
}
.pc-back__arrow {
	font-size: 0.9em;
	line-height: 1;
}

/* ------- CATEGORY GRID (masonry via CSS columns) ------- */
.pc-cat-grid {
	column-count: var(--pc-cols, 3);
	column-gap: 24px;
	/* CSS columns require a block container; cards are children. */
}
.pc-card {
	display: block;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	margin: 0 0 24px;
	text-decoration: none;
	color: inherit;
	background: #fff;
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}
.pc-card:hover {
	transform: translateY(-2px);
}
.pc-card__image {
	background: #f5f5f5;
	width: 100%;
	overflow: hidden;
	/* No fixed height — image renders at natural aspect ratio. */
}
.pc-card__image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}
.pc-card__noimage {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: repeating-linear-gradient(45deg, #eee, #eee 10px, #f5f5f5 10px, #f5f5f5 20px);
}
.pc-card__body {
	padding: 16px 20px 20px;
}
.pc-card__title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
}

@media (max-width: 1024px) {
	.pc-cat-grid { column-count: var(--pc-cols-t, 2); }
}
@media (max-width: 600px) {
	.pc-cat-grid { column-count: var(--pc-cols-m, 1); }
}
