/* WebCharge Category Accordion
   Ουδέτερο styling: κληρονομεί fonts/χρώματα από το Woodmart. */

.wcca-accordion {
	--wcca-accent: var(--wd-primary-color, #f0a500);
	--wcca-line: rgba(0, 0, 0, .09);
	--wcca-muted: rgba(0, 0, 0, .45);
	font-size: 14px;
	line-height: 1.4;
}

/* Τίτλος κύριας κατηγορίας - το "είσαι εδώ" του widget */
a.wcca-widget-title,
.wcca-widget-title {
	display: block;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: .02em;
	text-decoration: none;
	color: inherit;
	padding-bottom: 14px;
	margin-bottom: 10px;
	border-bottom: 3px solid var(--wcca-accent);
}

a.wcca-widget-title:hover {
	color: var(--wcca-accent);
}

.wcca-accordion ul.wcca-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcca-item {
	border-bottom: 1px solid var(--wcca-line);
}

.wcca-level-2 > .wcca-item:last-child,
.wcca-level-3 > .wcca-item:last-child {
	border-bottom: 0;
}

.wcca-row {
	display: flex;
	align-items: stretch;
	gap: 4px;
}

.wcca-link {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 2px;
	color: inherit;
	text-decoration: none;
}

.wcca-link:hover .wcca-name,
.wcca-item.is-active > .wcca-row > .wcca-link .wcca-name {
	color: var(--wcca-accent);
}

.wcca-item.is-active > .wcca-row > .wcca-link .wcca-name {
	font-weight: 700;
}

.wcca-count {
	flex: 0 0 auto;
	align-self: center;
	font-size: 12px;
	color: var(--wcca-muted);
}

/* Κουμπί "Δες τα όλα" -> πάει στη σελίδα της κατηγορίας.
   Εμφανίζεται σε hover και στην ενεργή κατηγορία, ώστε το sidebar
   να μένει καθαρό. Για να φαίνεται πάντα, σβήσε τις δύο γραμμές
   opacity/pointer-events από το .wcca-all παρακάτω. */
.wcca-all {
	flex: 0 0 auto;
	align-self: center;
	margin-left: 6px;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: .03em;
	white-space: nowrap;
	text-decoration: none;
	color: var(--wcca-accent);
	border: 1px solid currentColor;
	border-radius: 3px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .15s ease, background-color .15s ease, color .15s ease;
}

.wcca-row:hover > .wcca-all,
.wcca-item.is-active > .wcca-row > .wcca-all,
.wcca-all:focus-visible {
	opacity: 1;
	pointer-events: auto;
}

.wcca-all:hover {
	background: var(--wcca-accent);
	color: #fff;
}

/* Σε touch συσκευές δεν υπάρχει hover - πάντα ορατό. */
@media (hover: none) {
	.wcca-all {
		opacity: 1;
		pointer-events: auto;
	}
}

/* Επίπεδα */
.wcca-level-1 > .wcca-item > .wcca-row > .wcca-link {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.wcca-children {
	display: none;
	padding-left: 14px;
	border-left: 2px solid var(--wcca-line);
	margin: 0 0 8px 2px;
}

.wcca-level-2 .wcca-link {
	padding: 7px 2px;
}

.wcca-level-3 .wcca-link {
	padding: 6px 2px;
	font-size: 13px;
	color: var(--wcca-muted);
}

/* Βελάκι */
.wcca-toggle {
	flex: 0 0 auto;
	width: 30px;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	position: relative;
	color: inherit;
}

.wcca-toggle::before,
.wcca-toggle::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 2px;
	background: currentColor;
	transform: translate(-50%, -50%);
	transition: transform .2s ease, opacity .2s ease;
}

.wcca-toggle::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.wcca-item.is-open > .wcca-row > .wcca-toggle::after {
	transform: translate(-50%, -50%) rotate(0deg);
	opacity: 0;
}

.wcca-toggle:focus-visible {
	outline: 2px solid var(--wcca-accent);
	outline-offset: 2px;
}

/* --------------------------------------------------------------
   Στήλες προϊόντων
   Το Woodmart ορίζει δικές του στήλες, οπότε τις ξαναγράφουμε εδώ.
   - Woodmart 7+ : CSS variables --wd-col-lg / md / sm
   - Παλιότερο flex markup (.products.columns-N) : fallback με width
   -------------------------------------------------------------- */

.wcca-cols-2 ul.products { --wd-col-lg: 2; --wd-col-md: 2; --wd-col-sm: 2; }
.wcca-cols-3 ul.products { --wd-col-lg: 3; --wd-col-md: 3; --wd-col-sm: 2; }
.wcca-cols-4 ul.products { --wd-col-lg: 4; --wd-col-md: 3; --wd-col-sm: 2; }
.wcca-cols-5 ul.products { --wd-col-lg: 5; --wd-col-md: 3; --wd-col-sm: 2; }
.wcca-cols-6 ul.products { --wd-col-lg: 6; --wd-col-md: 3; --wd-col-sm: 2; }

@media (min-width: 1025px) {
	.wcca-cols-2 ul.products:not(.wd-grid-g) > .product { width: 50%    !important; max-width: 50%    !important; flex: 0 0 50%    !important; }
	.wcca-cols-3 ul.products:not(.wd-grid-g) > .product { width: 33.333%!important; max-width: 33.333%!important; flex: 0 0 33.333%!important; }
	.wcca-cols-4 ul.products:not(.wd-grid-g) > .product { width: 25%    !important; max-width: 25%    !important; flex: 0 0 25%    !important; }
	.wcca-cols-5 ul.products:not(.wd-grid-g) > .product { width: 20%    !important; max-width: 20%    !important; flex: 0 0 20%    !important; }
	.wcca-cols-6 ul.products:not(.wd-grid-g) > .product { width: 16.666%!important; max-width: 16.666%!important; flex: 0 0 16.666%!important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
	.wcca-grid ul.products:not(.wd-grid-g) > .product { width: 33.333%!important; max-width: 33.333%!important; flex: 0 0 33.333%!important; }
}

@media (max-width: 768px) {
	.wcca-grid ul.products:not(.wd-grid-g) > .product { width: 50%!important; max-width: 50%!important; flex: 0 0 50%!important; }
}

/* Περιοχή προϊόντων */
.wcca-products {
	position: relative;
	min-height: 200px;
}

.wcca-products.wcca-is-loading {
	opacity: .35;
	pointer-events: none;
	transition: opacity .15s ease;
}

.wcca-products.wcca-is-loading::after {
	content: "";
	position: absolute;
	top: 60px;
	left: 50%;
	width: 34px;
	height: 34px;
	margin-left: -17px;
	border: 3px solid var(--wd-primary-color, #f0a500);
	border-top-color: transparent;
	border-radius: 50%;
	animation: wcca-spin .7s linear infinite;
}

@keyframes wcca-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.wcca-products.wcca-is-loading::after { animation-duration: 2s; }
}

.wcca-empty {
	padding: 30px 0;
	opacity: .6;
}
