/*
 * Elementor Shop Products Page — mirrors the xsmokehub Products page
 * (Products.tsx): a filters row (search + sort), pill category tabs, a
 * responsive grid of product cards (image, badge, "View Product" overlay,
 * brand, name, short description, stars, price, Add to Cart) and client-side
 * pagination. The Elementor controls override these defaults via generated
 * CSS.
 */

/* ---- Wrapper ---- */
.espp-wrap {
	width: 100%;
}

/* ---- Filters row ---- */
.espp-filters {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-bottom: 32px;
}

.espp-search {
	position: relative;
	flex: 1;
	max-width: 384px;
	min-width: 220px;
}

.espp-search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: #888888;
	pointer-events: none;
	z-index: 1;
}

.espp-search-input {
	box-sizing: border-box;
	width: 100%;
	padding: 10px 16px 10px 42px;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	background-color: #ffffff;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #222222;
	transition: border-color 0.2s ease;
}

/* Keep the left padding clear of the search icon even when a theme styles
   all inputs with its own padding. */
.espp-search .espp-search-input {
	padding-left: 42px !important;
}

.espp-search-input::placeholder {
	color: #bbbbbb;
}

.espp-search-input:focus {
	outline: none;
	border-color: #222222;
}

.espp-sort {
	display: flex !important;
	align-items: center;
	flex-wrap: nowrap;
	gap: 8px;
	margin-left: auto;
}

.espp-sort-label {
	flex-shrink: 0;
	white-space: nowrap;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #888888;
}

.espp-sort select {
	width: auto;
	max-width: 100%;
	min-width: 0;
	flex-shrink: 1;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 10px 12px;
	background-color: #ffffff;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #222222;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.espp-sort select:focus {
	outline: none;
	border-color: #222222;
}

/* ---- Category tabs ---- */
.espp-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.espp-cat-btn {
	padding: 8px 16px;
	border: 1px solid #e5e5e5;
	border-radius: 999px;
	background-color: #ffffff;
	color: #666666;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Hover: white background + black text + #222 border, forced over any theme
   (Minimog) default button hover styles. */
.espp-cat-btn:hover,
.espp-cat-btn:focus-visible {
	background-color: #ffffff !important;
	border-color: #222222 !important;
	color: #222222 !important;
}

.espp-cat-btn.is-active {
	background-color: #222222;
	border-color: #222222;
	color: #ffffff;
}

/* ---- Count ---- */
.espp-count {
	margin: 0 0 24px;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #888888;
}

/* ---- Grid ---- */
.espp-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)); /* fallback; Elementor overrides */
	column-gap: 24px;
	row-gap: 24px;
}

/* ---- Product card: image on top, content below ---- */
.espp-product-card {
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	transition: box-shadow 0.3s ease;
}

.espp-product-card:hover {
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.espp-product-card.espp-hidden {
	display: none !important;
}

/* Card image: square, hover zoom, badge + "View Product" overlay. The image
   area is itself the product link, so it must be a block-level anchor. */
.espp-card-image {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-color: #f5f5f5;
	flex-shrink: 0;
	text-decoration: none;
}

.espp-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.espp-product-card:hover .espp-card-image img {
	transform: scale(1.05);
}

.espp-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	padding: 4px 10px;
	border-radius: 999px;
	background-color: #222222;
	color: #ffffff;
	font-family: 'Jost', sans-serif;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
}

.espp-view-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.4);
	color: #ffffff;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.05em;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.espp-product-card:hover .espp-view-overlay {
	opacity: 1;
}

/* Card body */
.espp-card-body {
	box-sizing: border-box;
	width: 100%;
	padding: 16px;
}

.espp-card-brand {
	margin: 0 0 4px;
	font-family: 'Jost', sans-serif;
	font-size: 10px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #888888;
}

.espp-card-title {
	margin: 0 0 4px;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #222222;
}

.espp-card-title a {
	color: inherit;
	text-decoration: none;
}

.espp-card-info {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 12px;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.625;
	color: #888888;
}

.espp-card-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 16px;
}

.espp-stars {
	display: inline-flex;
	gap: 2px;
}

.espp-card-rating span {
	font-family: 'Jost', sans-serif;
	font-size: 11px;
	font-weight: 400;
	line-height: 1;
	color: #888888;
}

.espp-card-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.espp-card-price {
	font-family: 'Jost', sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	color: #222222;
	white-space: nowrap;
}

/* Add to Cart */
.espp-add {
	display: inline-block;
	padding: 8px 16px;
	border: 0;
	border-radius: 10px;
	background-color: #222222;
	color: #ffffff;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.espp-add:hover {
	background-color: #000000;
	color: #ffffff;
}

.espp-add.is-added {
	background-color: #4caf50;
}

.espp-add.is-added:hover {
	background-color: #4caf50;
}

.espp-add-variable {
	background-color: #ffffff;
	border: 1px solid #e5e5e5;
	color: #222222;
}

.espp-add-variable:hover {
	background-color: #ffffff;
	border-color: #222222;
	color: #222222;
}

.espp-add-disabled {
	background-color: #e5e5e5;
	color: #888888;
	cursor: default;
}

.espp-add-disabled:hover {
	background-color: #e5e5e5;
	color: #888888;
}

/* ---- Empty state ---- */
.espp-empty {
	text-align: center;
	padding: 64px 0;
}

.espp-empty-emoji {
	margin: 0 0 12px;
	font-size: 36px;
	line-height: 1;
}

.espp-empty-text {
	margin: 0;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	color: #888888;
}

/* ---- Pagination ---- */
.espp-pagination {
	display: none;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 40px;
}

.espp-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	background-color: #ffffff;
	color: #666666;
	font-family: 'Jost', sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.espp-page-btn:hover {
	border-color: #222222;
	color: #222222;
}

.espp-page-btn.is-active {
	background-color: #222222;
	border-color: #222222;
	color: #ffffff;
}

.espp-page-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.espp-page-btn:disabled:hover {
	border-color: #e5e5e5;
	color: #666666;
}

.espp-page-prev,
.espp-page-next {
	font-size: 18px;
	padding: 0 10px;
}

/* ---- Responsive: tablet 2 columns, mobile 1 column ---- */
@media (max-width: 1024px) {
	.espp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	/*
	 * Two columns on phones (consistent with the home shop-grid). Slightly
	 * tighter gaps keep the narrower cards usable; card type/padding is left
	 * as-is.
	 */
	.espp-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		column-gap: 12px;
		row-gap: 16px;
	}

	/*
	 * Card footer stacks on mobile: price on its own line, Add to Cart full
	 * width underneath — a long price can no longer squeeze the button out of
	 * the shared row.
	 */
	.espp-card-bottom {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.espp-add {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 36px;
		box-sizing: border-box;
	}
}
