/* ==========================================================================
   Category Archive Product Grid
   Full-width, filterable, 3-per-row product listing (no carousel).
   ========================================================================== */

.capg-wrap {
	--capg-fg: #111;
	--capg-bar: #000;
	--capg-bar-fg: #fff;
	--capg-cols: 3;
	--capg-gap: 2px;          /* space between cards (near full-bleed) */
	--capg-edge: 16px;        /* inner text/filter edge spacing */
	--capg-radius: 0px;

	/* Full width, no outer margin/padding (edge-to-edge in Elementor). */
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	color: var(--capg-fg);
}

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

/* ==========================================================================
   Filter bar
   ========================================================================== */
.capg-filters {
	width: 100%;
	margin: 0;
	border-bottom: 1px solid #ececec;
}

.capg-filters-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px var(--capg-edge);
	flex-wrap: wrap;
}

.capg-filters-left {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.capg-filters-right {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-left: auto;
}

/* Dropdown (native <details>) --------------------------------------------- */
.capg-dropdown {
	position: relative;
}

.capg-dropdown > details > summary {
	list-style: none;
	cursor: pointer;
	padding: 8px 14px;
	font-size: 14px;
	letter-spacing: 0.3px;
	color: #333;
	user-select: none;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.capg-dropdown > details > summary::-webkit-details-marker { display: none; }
.capg-dropdown > details > summary::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 1.5px solid #999;
	border-bottom: 1.5px solid #999;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	margin-left: 2px;
}
.capg-dropdown > details[open] > summary::after { transform: rotate(-135deg); }
.capg-dropdown > details > summary:hover { color: #000; }

.capg-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #000;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.capg-dropdown-content {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 50;
	min-width: 210px;
	max-height: 320px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e6e6e6;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
	padding: 8px;
}

.capg-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	font-size: 14px;
	color: #333;
	cursor: pointer;
	border-radius: 4px;
}
.capg-option:hover { background: #f6f6f6; }
.capg-option input { margin: 0; cursor: pointer; }
.capg-option-label { flex: 1; }
.capg-option-count { color: #aaa; font-size: 12px; }
.capg-option-dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.2);
	box-shadow: inset 0 0 0 2px #fff;
	flex: 0 0 auto;
}

.capg-item-count {
	font-size: 14px;
	color: #666;
	white-space: nowrap;
}

.capg-clear-btn {
	font-size: 13px;
	color: #666;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.capg-clear-btn:hover { color: #000; }

.capg-apply-btn {
	background: #000;
	color: #fff;
	border: 1px solid #000;
	border-radius: 4px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.3px;
	padding: 10px 20px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.capg-apply-btn:hover { background: #fff; color: #000; }
.capg-apply-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.capg-demo-note {
	text-align: center;
	font-size: 13px;
	color: #888;
	margin: 14px var(--capg-edge);
}
.capg-empty {
	text-align: center;
	font-size: 15px;
	color: #777;
	padding: 60px var(--capg-edge);
}

/* ==========================================================================
   Grid (no carousel — simple responsive grid)
   ========================================================================== */
.capg-grid {
	display: grid;
	grid-template-columns: repeat(var(--capg-cols, 3), minmax(0, 1fr));
	gap: var(--capg-gap);
	width: 100%;
	margin: 0;
	padding: 0;
}

@media (max-width: 1024px) {
	.capg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.capg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Card -------------------------------------------------------------------- */
.capg-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding-bottom: 22px;
}

/* Media / image wrapper (hover magic) ------------------------------------- */
.capg-wrap .capg-media {
	position: relative;
	overflow: hidden;
	border-radius: var(--capg-radius);
	aspect-ratio: 3 / 4;
	background: #f2f2f2;
	width: 100%;
}

.capg-wrap .capg-media-link {
	display: block;
	width: 100%;
	height: 100%;
}

.capg-wrap .capg-img {
	position: absolute !important;
	inset: 0;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center top;
	margin: 0 !important;
	padding: 0 !important;
	display: block !important;
	transition: opacity 0.55s ease, transform 6s ease;
	backface-visibility: hidden;
}

.capg-wrap .capg-img--front { opacity: 1; z-index: 1; }
.capg-wrap .capg-img--back  { opacity: 0; z-index: 2; }

.capg-media:hover .capg-img--front { opacity: 0; }
.capg-media:hover .capg-img--back  { opacity: 1; transform: scale(1.04); }

/* "QUICK VIEW" button ----------------------------------------------------- */
.capg-wrap .capg-quick {
	position: absolute;
	z-index: 4;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) translateY(6px);
	background: #000000 !important;
	color: #ffffff !important;
	border: 1px solid #000000 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-family: "Lato", Arial, sans-serif;
	font-size: 14px !important;
	font-weight: 500;
	letter-spacing: 2px;
	padding: 12px 24px;
	white-space: nowrap;
	opacity: 0;
	cursor: pointer;
	pointer-events: none;
	transition: opacity 0.35s ease, transform 0.35s ease,
	            background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.capg-wrap .capg-media:hover .capg-quick {
	opacity: 1;
	transform: translate(-50%, -50%);
	pointer-events: auto;
}
.capg-wrap .capg-quick:hover,
.capg-wrap .capg-quick:focus {
	background: #ffffff !important;
	color: #000000 !important;
	border-color: #000000 !important;
	outline: none;
}

/* Sliding "ADD TO CART" bar ----------------------------------------------- */
.capg-wrap .capg-atc {
	position: absolute;
	z-index: 5;
	left: 0;
	right: 0;
	bottom: 0;
	height: 44px;
	transform: translateY(100%);
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
	            background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
	background: #000000 !important;
	color: #ffffff !important;
	border: 1px solid #000000 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	cursor: pointer;
	padding: 0 10px;
	margin: 0;
	width: auto;
	font-family: "Lato", Arial, sans-serif;
	font-size: 13px !important;
	font-weight: 500;
	letter-spacing: 1px;
	line-height: 1;
	text-align: center;
	text-transform: none !important;
}
.capg-wrap .capg-media:hover .capg-atc { transform: translateY(0); }
.capg-wrap .capg-atc:hover,
.capg-wrap .capg-atc:focus,
.capg-wrap .capg-atc:active {
	background: #ffffff !important;
	color: #000000 !important;
	border-color: #000000 !important;
	box-shadow: none !important;
	outline: none;
}
.capg-wrap .capg-atc:disabled { cursor: default; opacity: 0.9; }
.capg-wrap .capg-atc.is-added {
	background: #1f7a3d !important;
	border-color: #1f7a3d !important;
	color: #fff !important;
}

/* Below-image info -------------------------------------------------------- */
.capg-name {
	margin: 14px 0 6px;
	padding: 0 4px;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0.4px;
}
.capg-name a { color: var(--capg-fg); text-decoration: none; }

.capg-price {
	padding: 0 4px;
	font-size: 15px;
	color: #333;
}
.capg-price .capg-amount,
.capg-price .amount,
.capg-price .woocommerce-Price-amount {
	color: var(--capg-fg);
	font-weight: 500;
}

/* Colour swatches (revealed on hover) ------------------------------------- */
.capg-swatches {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	padding: 0 4px;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.35s ease, transform 0.35s ease;
	pointer-events: none;
}
.capg-card:hover .capg-swatches {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.capg-swatch {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.2);
	box-shadow: inset 0 0 0 2px #fff;
	cursor: pointer;
}

/* Touch devices: reveal overlays without hover ---------------------------- */
@media (hover: none) {
	.capg-wrap .capg-atc { transform: translateY(0); }
	.capg-wrap .capg-quick { display: none; }
	.capg-swatches { opacity: 1; transform: none; pointer-events: auto; }
}

/* ==========================================================================
   Quick View modal
   ========================================================================== */
.capg-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	font-family: "Lato", Arial, sans-serif;
}
.capg-modal.is-open { display: block; }

.capg-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.capg-modal-box {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(1100px, 92vw);
	max-height: 88vh;
	overflow: auto;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.capg-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	z-index: 3;
	width: 38px;
	height: 38px;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	font-size: 30px;
	line-height: 1;
	color: #333 !important;
	cursor: pointer;
	transition: color 0.2s ease;
}
.capg-modal-close:hover,
.capg-modal-close:focus,
.capg-modal-close:active {
	background: transparent !important;
	color: #000 !important;
	box-shadow: none !important;
	outline: none !important;
}

.capg-modal-loading {
	padding: 80px 20px;
	text-align: center;
	color: #888;
}

/* Quick View content ------------------------------------------------------ */
.capg-qv {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 34px;
	padding: 40px;
}

.capg-qv-gallery {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 16px;
	align-items: start;
}
.capg-qv-thumbs { display: flex; flex-direction: column; gap: 12px; }
.capg-qv-thumb {
	width: 72px;
	height: 92px;
	padding: 0;
	border: 1px solid #e2e2e2;
	background: #f6f6f6;
	cursor: pointer;
	overflow: hidden;
}
.capg-qv-thumb.is-active { border-color: #111; }
.capg-qv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.capg-qv-main { background: #f6f6f6; aspect-ratio: 3 / 4; overflow: hidden; }
.capg-qv-mainimg { width: 100%; height: 100%; object-fit: cover; display: block; }

.capg-qv-title {
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 500;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #111;
}
.capg-qv-price { font-size: 20px; color: #111; margin-bottom: 18px; }
.capg-qv-desc { font-size: 14px; line-height: 1.6; color: #555; margin-bottom: 22px; }

.capg-qv-attr { margin-bottom: 20px; }
.capg-qv-attr-name {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.5px;
	margin-bottom: 10px;
	color: #111;
}
.capg-qv-options { display: flex; flex-wrap: wrap; gap: 10px; }

.capg-qv-swatch {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.25);
	box-shadow: inset 0 0 0 3px #fff;
	cursor: pointer;
	padding: 0;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.capg-qv-swatch:hover,
.capg-qv-swatch.is-selected {
	box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px #111;
	transform: scale(1.05);
}

.capg-qv-pill {
	min-width: 46px;
	padding: 10px 16px;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 30px;
	font-size: 13px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.capg-qv-pill:hover,
.capg-qv-pill.is-selected { border-color: #111; background: #111; color: #fff; }

.capg-qv-atc {
	width: 100%;
	margin-top: 8px;
	height: 52px;
	background: #000 !important;
	color: #fff !important;
	border: 1px solid #000 !important;
	border-radius: 0 !important;
	font-family: "Lato", Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 2px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.capg-qv-atc:hover { background: #fff !important; color: #000 !important; }
.capg-qv-atc.is-added { background: #1f7a3d !important; border-color: #1f7a3d !important; color: #fff !important; }

.capg-qv-viewfull {
	display: inline-block;
	margin-top: 16px;
	font-size: 13px;
	color: #666;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 780px) {
	.capg-qv { grid-template-columns: 1fr; gap: 22px; padding: 46px 20px 24px; }
	.capg-qv-gallery { grid-template-columns: 60px 1fr; }
	.capg-qv-thumb { width: 60px; height: 76px; }
}
