/**
 * Mohanna WooCommerce Category Showcase - Frontend Styles
 * Independent namespace: .mohanna-category-showcase
 *
 * @package Mohanna_Category_Showcase
 */

:root {
	--mohanna-primary-accent: #8c6d3b;
	--mohanna-border-default: #111111;
}

/* =========================================
   CONTAINER & SHOWCASE BASE
   ========================================= */

.mohanna-category-showcase {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	margin: 24px 0;
	padding: 0;
	background: transparent;
	clear: both;
}

.mohanna-category-showcase *,
.mohanna-category-showcase *::before,
.mohanna-category-showcase *::after {
	box-sizing: border-box;
}

/* Alignment rules */
.mohanna-category-showcase.mohanna-align-center .mohanna-category-track {
	justify-content: center !important;
}

.mohanna-category-showcase.mohanna-align-left .mohanna-category-track {
	justify-content: flex-start !important;
}

.mohanna-category-showcase.mohanna-align-right .mohanna-category-track {
	justify-content: flex-end !important;
}

/* =========================================
   GRID MODE (CENTERED & COMPACT GAPS)
   ========================================= */

.mohanna-is-grid .mohanna-category-wrapper {
	width: 100%;
	display: flex;
	justify-content: center;
}

.mohanna-is-grid .mohanna-category-track {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mohanna-gap-d, var(--mohanna-gap, 24px));
	align-items: flex-start;
	justify-content: center;
	width: auto;
	max-width: 100%;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.mohanna-is-grid .mohanna-category-item {
	flex: 0 0 auto;
	width: var(--mohanna-img-size-d, 155px);
	max-width: var(--mohanna-img-size-d, 155px);
	min-width: 0;
	text-align: center;
	margin: 0;
	padding: 0;
}

/* =========================================
   CATEGORY LINK & ITEM
   ========================================= */

.mohanna-category-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none !important;
	color: inherit !important;
	outline: none;
	width: 100%;
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
}

.mohanna-category-link:focus-visible {
	outline: 2px solid var(--mohanna-primary-accent);
	outline-offset: 4px;
	border-radius: 8px;
}

/* =========================================
   IMAGE WRAPPER & GEOMETRY
   ========================================= */

.mohanna-category-image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--mohanna-img-size-d, 155px);
	height: var(--mohanna-img-size-d, 155px);
	aspect-ratio: 1 / 1 !important;
	flex: 0 0 var(--mohanna-img-size-d, 155px);
	border-radius: var(--mohanna-border-radius, 50%) !important;
	overflow: hidden !important;
	margin: 0 auto !important;
	padding: 0 !important;
	background: #ffffff;
	border: var(--mohanna-border-width, 1px) solid var(--mohanna-border-color, var(--mohanna-border-default)) !important;
	transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease, box-shadow 0.3s ease;
	position: relative;
	box-sizing: border-box !important;
}

.mohanna-category-image {
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1 !important;
	border-radius: inherit;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mohanna-category-image img,
.mohanna-category-img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: 1 / 1 !important;
	object-fit: cover !important;
	border-radius: inherit !important;
	margin: 0 !important;
	padding: 0 !important;
	transform: none !important;
	transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
	border: none !important;
	box-shadow: none !important;
	background: #fdfdfc;
}

/* Placeholder SVG */
.mohanna-placeholder-svg {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: inherit;
	background: #faf8f5;
}

.mohanna-placeholder-svg svg {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: inherit;
}

/* =========================================
   HOVER EFFECTS
   ========================================= */

.mohanna-hover-enabled .mohanna-category-link:hover .mohanna-category-image-wrap {
	transform: scale(1.04);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.mohanna-hover-enabled .mohanna-category-link:hover .mohanna-category-name {
	color: #000000;
}

/* =========================================
   CATEGORY NAME & CONTENT
   ========================================= */

.mohanna-category-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: var(--mohanna-name-gap-d, var(--mohanna-name-gap, 12px));
	padding: 0 4px;
	text-align: var(--mohanna-text-align, center);
}

.mohanna-category-name {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	font-size: var(--mohanna-font-size-d, 15px);
	font-weight: var(--mohanna-font-weight, 500);
	color: var(--mohanna-name-color, #222222);
	line-height: 1.35;
	text-align: var(--mohanna-text-align, center);
	letter-spacing: 0.01em;
	transition: color 0.3s ease;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.mohanna-category-count {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	font-weight: 400;
	color: #7d7d7d;
	letter-spacing: 0.02em;
	text-align: var(--mohanna-text-align, center);
}

/* =========================================
   CAROUSEL MODE
   ========================================= */

.mohanna-is-carousel {
	user-select: none;
	touch-action: pan-y;
}

.mohanna-is-carousel .mohanna-category-wrapper {
	overflow: hidden;
	width: 100%;
	position: relative;
	cursor: grab;
	padding: 4px 0;
	display: block;
}

.mohanna-is-carousel .mohanna-category-wrapper.is-dragging {
	cursor: grabbing;
}

.mohanna-is-carousel .mohanna-category-track {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--mohanna-gap-d, var(--mohanna-gap, 24px));
	align-items: flex-start;
	justify-content: flex-start;
	margin: 0;
	padding: 0;
	list-style: none;
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
	will-change: transform;
	width: max-content;
}

.mohanna-is-carousel.mohanna-align-center .mohanna-category-track.is-centered {
	margin: 0 auto;
}

.mohanna-is-carousel .mohanna-category-track.no-transition {
	transition: none !important;
}

.mohanna-is-carousel .mohanna-category-item {
	flex: 0 0 auto;
	width: var(--mohanna-img-size-d, 155px);
	max-width: var(--mohanna-img-size-d, 155px);
	min-width: 0;
	text-align: center;
	margin: 0;
	padding: 0;
}

/* Carousel Navigation Arrows */
.mohanna-carousel-arrow {
	position: absolute;
	top: calc(var(--mohanna-img-size-d, 155px) / 2);
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid var(--mohanna-border-color, #222222);
	color: #111111;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 5;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
	transition: all 0.25s ease;
	outline: none;
	padding: 0;
}

.mohanna-carousel-arrow:hover {
	background: #111111;
	border-color: #111111;
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.mohanna-carousel-arrow:focus-visible {
	outline: 2px solid var(--mohanna-primary-accent);
}

.mohanna-carousel-arrow.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
}

.mohanna-carousel-prev {
	left: -15px;
}

.mohanna-carousel-next {
	right: -15px;
}

/* Carousel Pagination Dots */
.mohanna-carousel-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
	width: 100%;
}

.mohanna-carousel-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.25);
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	transition: all 0.3s ease;
	outline: none;
}

.mohanna-carousel-dot:hover {
	background: rgba(0, 0, 0, 0.6);
}

.mohanna-carousel-dot.is-active {
	background: #111111;
	width: 22px;
	border-radius: 6px;
}

/* =========================================
   RESPONSIVE: TABLET (max-width: 1024px)
   ========================================= */

@media (max-width: 1024px) {

	.mohanna-category-track {
		gap: var(--mohanna-gap-t, 18px) !important;
	}

	.mohanna-category-content {
		margin-top: var(--mohanna-name-gap-t, 10px);
	}

	.mohanna-category-image-wrap {
		width: var(--mohanna-img-size-t, 135px);
		height: var(--mohanna-img-size-t, 135px);
		flex-basis: var(--mohanna-img-size-t, 135px);
	}

	.mohanna-is-grid .mohanna-category-item,
	.mohanna-is-carousel .mohanna-category-item {
		width: var(--mohanna-img-size-t, 135px);
		max-width: var(--mohanna-img-size-t, 135px);
	}

	.mohanna-category-name {
		font-size: var(--mohanna-font-size-t, 14px);
	}

	.mohanna-carousel-arrow {
		top: calc(var(--mohanna-img-size-t, 135px) / 2);
		left: 0;
	}

	.mohanna-carousel-next {
		right: 0;
		left: auto;
	}
}

/* =========================================
   RESPONSIVE: MOBILE (max-width: 767px)
   ========================================= */

@media (max-width: 767px) {

	.mohanna-category-track {
		gap: var(--mohanna-gap-m, 12px) !important;
	}

	.mohanna-category-content {
		margin-top: var(--mohanna-name-gap-m, 8px);
	}

	.mohanna-category-image-wrap {
		width: var(--mohanna-img-size-m, 105px);
		height: var(--mohanna-img-size-m, 105px);
		flex-basis: var(--mohanna-img-size-m, 105px);
	}

	.mohanna-is-grid .mohanna-category-item,
	.mohanna-is-carousel .mohanna-category-item {
		width: var(--mohanna-img-size-m, 105px);
		max-width: var(--mohanna-img-size-m, 105px);
	}

	.mohanna-category-name {
		font-size: var(--mohanna-font-size-m, 13px);
	}

	.mohanna-carousel-arrow {
		top: calc(var(--mohanna-img-size-m, 105px) / 2);
		width: 32px;
		height: 32px;
	}
}
