/* =========================================================================
   Shop Archive
   ========================================================================= */

.handh-shop-archive {
	background: #fff;
	padding-bottom: 60px;
}

.handh-shop-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---- Breadcrumbs ---- */

.handh-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 16px 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--global-palette5, #4a5568);
}

.handh-breadcrumbs__link {
	color: var(--global-palette5, #4a5568);
	text-decoration: none;
	transition: color 0.2s;
}

.handh-breadcrumbs__link:hover {
	color: var(--global-palette1, #99aa9d);
}

.handh-breadcrumbs__sep {
	color: #ccc;
	margin: 0 2px;
}

.handh-breadcrumbs__current {
	color: var(--global-palette3, #1a2c4e);
	font-weight: 500;
}

/* ---- Archive header ---- */

.handh-shop-header {
	padding: 8px 0 14px;
}

.handh-shop-title {
	font-size: 32px;
	font-weight: 300;
	line-height: 1.2;
	color: var(--global-palette3, #1a2c4e);
	margin: 0 0 8px;
}

.handh-shop-description {
	max-width: 800px;
}

.handh-shop-description p {
	font-size: 15px;
	line-height: 1.6;
	color: var(--global-palette5, #4a5568);
	margin: 0;
}

/* ---- Category carousel ---- */

.handh-cat-carousel {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 32px;
	position: relative;
}

.handh-cat-carousel__arrow {
	flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #1a2c4e;
    background: #1a2c4e;
    display: flex;
    padding: 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--global-palette3, #1a2c4e);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
	color: #fff !important;
}

.handh-cat-carousel__arrow:hover {
	border-color: var(--global-palette1, #99aa9d);
	background: var(--global-palette1, #99aa9d);
	color: #fff;
}
.handh-cat-carousel__prev{
	position: absolute;
    left: -16px;
}
.handh-cat-carousel__next{
	position: absolute;
	right: -16px;
}
.handh-cat-carousel__arrow:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.handh-cat-carousel__track {
	flex: 1;
	overflow: hidden;
}

.handh-cat-carousel__slides {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.handh-cat-carousel__slides::-webkit-scrollbar {
	display: none;
}

.handh-cat-card {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: calc(25% - 12px);
	flex: 0 0 calc(25% - 12px);
	scroll-snap-align: start;
	padding: 16px;
	border: 1px solid #eee;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.handh-cat-card:hover {
	border-color: var(--global-palette1, #99aa9d);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.handh-cat-card__image {
	width: 72px;
	height: 72px;
	flex-shrink: 0;
	border-radius: 6px;
	overflow: hidden;
	background: #f8f8f8;
}

.handh-cat-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.handh-cat-card__name {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: var(--global-palette3, #1a2c4e);
	margin-bottom: 2px;
}

.handh-cat-card__count {
	font-size: 13px;
	color: var(--global-palette5, #4a5568);
}

/* ---- Layout (sidebar + content) ---- */

.handh-shop-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 32px;
	align-items: start;
}

/* ---- Sidebar ---- */

.handh-shop-sidebar {
	position: sticky;
	top: 20px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	scrollbar-width: thin;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 20px;
	background: #fff;
	will-change: transform;
}

.handh-shop-sidebar__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #eee;
}

.handh-shop-sidebar__title {
	font-size: 18px;
	font-weight: 600;
	color: var(--global-palette3, #1a2c4e);
	margin: 0;
}

.handh-shop-sidebar__close {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--global-palette5, #4a5568);
	padding: 4px;
}

.handh-shop-sidebar__overlay {
	display: none;
}

/* ---- Filters ---- */

.handh-filters__clear {
	display: block;
	width: 100%;
	padding: 8px 12px;
	margin-bottom: 16px;
	font-size: 13px;
	font-weight: 500;
	color: var(--global-palette1, #99aa9d);
	background: none;
	border: 1px solid var(--global-palette1, #99aa9d);
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.handh-filters__clear:hover {
	background: var(--global-palette1, #99aa9d);
	color: #fff;
}

.handh-filter-group {
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 12px;
	margin-bottom: 12px;
}

.handh-filter-group:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.handh-filter-group__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 6px 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--global-palette3, #1a2c4e) !important;
	background: none;
	box-shadow: none !important;
	border: none;
	cursor: pointer;
	text-align: left;
	background: none !important;
}

.handh-filter-group__chevron {
	transition: transform 0.25s;
	flex-shrink: 0;
}

.handh-filter-group__toggle[aria-expanded="false"] .handh-filter-group__chevron {
	transform: rotate(-90deg);
}

.handh-filter-group__body {
	padding-top: 8px;
}

.handh-filter-group__toggle[aria-expanded="false"] + .handh-filter-group__body {
	display: none;
}

.handh-filter-check {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 0;
	cursor: pointer;
	font-size: 14px;
	color: var(--global-palette4, #1a2c4e);
}

.handh-filter-check input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.handh-filter-check__box {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	border: 1.5px solid #ccc;
	border-radius: 3px;
	position: relative;
	transition: border-color 0.2s, background 0.2s;
}

.handh-filter-check input:checked + .handh-filter-check__box {
	background: var(--global-palette1, #99aa9d);
	border-color: var(--global-palette1, #99aa9d);
}

.handh-filter-check input:checked + .handh-filter-check__box::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 5px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.handh-filter-check input:focus-visible + .handh-filter-check__box {
	box-shadow: 0 0 0 2px rgba(153, 170, 157, 0.4);
}

.handh-filter-check__label {
	line-height: 1.3;
}

.handh-filter-price {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 4px;
}

.handh-filter-price__field {
	display: flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 0 8px;
	flex: 1;
}

.handh-filter-price__currency {
	color: #999;
	font-size: 14px;
	margin-right: 4px;
}

.handh-filter-price__field input {
	border: none;
	outline: none;
	width: 100%;
	padding: 7px 0;
	font-size: 14px;
	background: transparent;
}

.handh-filter-price__sep {
	color: #bbb;
	flex-shrink: 0;
}

.handh-filter-price__go {
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	background: var(--global-palette1, #99aa9d);
	border: none;
	border-radius: 6px;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s;
}

.handh-filter-price__go:hover {
	background: var(--global-palette6, #85a18c);
}

/* ---- Toolbar ---- */

.handh-toolbar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 0;
	margin-bottom: 16px;
	border-bottom: 1px solid #eee;
	flex-wrap: wrap;
}

.handh-toolbar__filter-btn {
	display: none;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	color: var(--global-palette3, #1a2c4e);
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s;
}

.handh-toolbar__filter-btn:hover {
	background: #eee;
}

.handh-toolbar__count {
	font-size: 14px;
	color: var(--global-palette5, #4a5568);
	margin-right: auto;
}

.handh-toolbar__sort-select {
	padding: 8px 32px 8px 12px;
	font-size: 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	color: var(--global-palette3, #1a2c4e);
}

.handh-toolbar__view {
	display: flex;
	gap: 4px;
}

.handh-toolbar__view-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	padding: 0;
	color: #999;
	transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.handh-toolbar__view-btn.is-active,
.handh-toolbar__view-btn:hover {
	color: var(--global-palette3, #1a2c4e);
	border-color: var(--global-palette3, #1a2c4e);
	background: #f8f8f8;
}

/* ---- Product loop: Grid ---- */

.handh-product-loop--grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

/* ---- Product loop: List ---- */

.handh-product-loop--list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.handh-product-loop--list .handh-pc__link {
	flex-direction: row;
	align-items: flex-start;
}

.handh-product-loop--list .handh-pc__image-wrap {
	width: 220px;
	flex-shrink: 0;
}

.handh-product-loop--list .handh-pc__info {
	padding: 16px 20px;
}

.handh-product-loop--list .handh-pc__title {
	font-size: 17px;
}

.handh-product-loop--list .handh-pc__desc {
	display: block;
}

.handh-product-loop--list .handh-pc__actions {
	padding: 0 20px 16px;
	max-width: 220px;
}

/* ---- Product card ---- */

.handh-pc {
	display: flex;
	flex-direction: column;
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.25s, border-color 0.25s;
	background: #fff;
	contain: style;
}

.handh-pc:hover {
	border-color: #ddd;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.handh-pc__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	text-decoration: none;
	color: inherit;
}

.handh-pc__image-wrap {
	position: relative;
	background: #fafafa;
	padding: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
}

.handh-pc__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.handh-pc__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #fff;
	background: #c0392b;
	border-radius: 4px;
}

.handh-pc__info {
	padding: 14px 16px 18px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.handh-pc__brand {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--global-palette5, #4a5568);
	margin-bottom: 4px;
}

.handh-pc__title {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--global-palette3, #1a2c4e);
	margin: 0 0 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	line-clamp: 2;
	overflow: hidden;
}

.handh-pc__desc {
	display: none;
	font-size: 13px;
	line-height: 1.5;
	color: var(--global-palette5, #4a5568);
	margin-bottom: 10px;
}

.handh-pc__rating {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 8px;
}

.handh-pc__rating .star-rating {
	font-size: 13px;
}

.handh-pc__rating-count {
	font-size: 12px;
	color: #999;
}

.handh-pc__price {
	margin-top: auto;
}

.handh-pc__price .woocommerce-Price-amount {
	font-size: 18px;
	font-weight: 600;
	color: var(--global-palette3, #1a2c4e);
}

.handh-pc__price del {
	font-size: 14px;
	color: #999;
	font-weight: 400;
}

.handh-pc__price ins {
	text-decoration: none;
}

.handh-pc__price del + ins .woocommerce-Price-amount {
	color: #c0392b;
}

/* ---- Product card: actions ---- */

.handh-pc__actions {
	padding: 0 16px 16px;
}

.handh-pc__atc,
.handh-pc__options {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	box-sizing: border-box;
}

.handh-pc__atc,
.handh-pc__options {
	position: relative;
	color: #fff;
	background: var(--global-palette3, #1a2c4e);
	border: 1px solid var(--global-palette3, #1a2c4e);
}

.handh-pc__atc:hover,
.handh-pc__options:hover {
	background: var(--global-palette4, #1a2c4e);
	border-color: var(--global-palette4, #1a2c4e);
}

.handh-pc__atc-icon {
	display: none;
}

.handh-pc__atc.is-loading {
	pointer-events: none;
	opacity: 0.7;
}

.handh-pc__atc.is-loading .handh-pc__atc-label {
	visibility: hidden;
}

.handh-pc__atc-spinner {
	display: none;
}

.handh-pc__atc.is-loading .handh-pc__atc-spinner {
	display: block;
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: handh-spin 0.6s linear infinite;
}

.handh-pc__atc.is-added {
	background: var(--global-palette11, #13612e);
	border-color: var(--global-palette11, #13612e);
	color: #fff;
}

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

/* ---- Pagination ---- */

.handh-pagination {
	padding: 32px 0 0;
}

.handh-pagination__list {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.handh-pagination__item a,
.handh-pagination__item span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	font-size: 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	text-decoration: none;
	color: var(--global-palette3, #1a2c4e);
	background: #fff;
	transition: background 0.2s, border-color 0.2s;
}

.handh-pagination__item a:hover {
	border-color: var(--global-palette1, #99aa9d);
	background: rgba(153, 170, 157, 0.08);
}

.handh-pagination__item span.current {
	background: var(--global-palette1, #99aa9d);
	border-color: var(--global-palette1, #99aa9d);
	color: #fff;
	font-weight: 600;
}

.handh-pagination__item .dots {
	border: none;
	background: none;
	color: #999;
}

/* ---- Empty state ---- */

.handh-shop-empty {
	text-align: center;
	padding: 80px 20px;
	color: var(--global-palette5, #4a5568);
}

.handh-shop-empty svg {
	margin-bottom: 16px;
}

.handh-shop-empty p {
	font-size: 16px;
	margin: 0;
}

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

@media (max-width: 1024px) {
	.handh-product-loop--grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.handh-cat-card {
		min-width: calc(33.333% - 11px);
		flex: 0 0 calc(33.333% - 11px);
	}

	.handh-shop-layout {
		grid-template-columns: 240px 1fr;
		gap: 24px;
	}
}

@media (max-width: 768px) {
	.handh-shop-layout {
		grid-template-columns: 1fr;
	}

	.handh-shop-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 320px;
		max-width: 85vw;
		max-height: none;
		z-index: 9999;
		border: none;
		border-radius: 0;
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		overflow-y: auto;
	}

	.handh-shop-sidebar.is-open {
		transform: translateX(0);
	}

	.handh-shop-sidebar__close {
		display: flex;
	}

	.handh-shop-sidebar__overlay {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		z-index: 9998;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s;
	}

	.handh-shop-sidebar__overlay.is-visible {
		display: block;
		opacity: 1;
		pointer-events: auto;
	}

	.handh-toolbar__filter-btn {
		display: flex;
	}

	.handh-cat-card {
		min-width: calc(50% - 8px);
		flex: 0 0 calc(50% - 8px);
	}

	.handh-product-loop--list .handh-pc__image-wrap {
		width: 160px;
	}

	.handh-shop-title {
		font-size: 26px;
	}
}

@media (max-width: 560px) {
	.handh-product-loop--grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.handh-pc__info {
		padding: 10px 12px 14px;
	}

	.handh-pc__title {
		font-size: 13px;
	}

	.handh-pc__price .woocommerce-Price-amount {
		font-size: 15px;
	}

	.handh-pc__image-wrap {
		padding: 12px;
	}

	.handh-toolbar__count {
		display: none;
	}

	.handh-cat-card {
		min-width: calc(75% - 8px);
		flex: 0 0 calc(75% - 8px);
	}

	.handh-product-loop--list .handh-pc__link {
		flex-direction: column;
	}

	.handh-product-loop--list .handh-pc__image-wrap {
		width: 100%;
	}

	.handh-shop-container {
		padding: 0 16px;
	}
}
