/* =============================================================
   Category Tiles Widget — Frontend Styles
   ============================================================= */

/* Wrapper */
.ctw-wrapper {
	width: 100%;
	box-sizing: border-box;
}

/* Header */
.ctw-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 8px;
}

.ctw-header__title {
	font-size: 1.6rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0;
	padding: 0;
	line-height: 1.2;
}

.ctw-header__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.95rem;
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none;
	transition: opacity 0.2s ease;
	white-space: nowrap;
}

.ctw-header__link:hover {
	opacity: 0.7;
}

.ctw-header__link svg {
	flex-shrink: 0;
}

/* Grid */
.ctw-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Tile */
.ctw-tile {
	display: block;
}

.ctw-tile a {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* Image wrap */
.ctw-tile__image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background-color: #f5f5f5;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ctw-tile__image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.35s ease;
}

.ctw-tile:hover .ctw-tile__image-wrap img {
	transform: scale(1.06);
}

/* Placeholder */
.ctw-tile__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background-color: #eeeeee;
}

/* Title */
.ctw-tile__title {
	font-size: 0.95rem;
	font-weight: 500;
	color: #1a1a1a;
	text-align: center;
	margin: 12px 0 0 0;
	padding: 0;
	line-height: 1.4;
	transition: color 0.2s ease;
}

/* Badge */
.ctw-tile__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	background-color: #e74c3c;
	color: #ffffff;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	pointer-events: none;
}

/* =============================================================
   Responsive
   ============================================================= */

@media screen and (max-width: 1024px) {
	.ctw-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media screen and (max-width: 767px) {
	.ctw-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.ctw-header__title {
		font-size: 1.25rem;
	}

	.ctw-tile__title {
		font-size: 0.85rem;
	}
}

@media screen and (max-width: 480px) {
	.ctw-grid {
		gap: 10px;
	}

	.ctw-header__link span {
		display: none;
	}
}
