/* ================================================================
   Unified product cards — stickly / StickerHub (Soft UI Edition)
   ================================================================ */

/* ── Product grid ── */
.stickly-products-grid,
.sh-products-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 1024px) {
	.stickly-products-grid,
	.sh-products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.25rem;
	}
}

@media (max-width: 520px) {
	.stickly-products-grid,
	.sh-products-grid {
		grid-template-columns: 1fr;
	}
}

/* WooCommerce shop grid */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	float: none !important;
}

@media (max-width: 1100px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: 1fr;
	}
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	clear: none !important;
}

.woocommerce ul.products li.product .sh-product-card,
.woocommerce-page ul.products li.product .sh-product-card {
	height: 100%;
}

/* ── Card ── */
.sh-product-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--stickly-radius-lg, 20px);
	border: 1px solid var(--stickly-border, #e8ecf2);
	overflow: hidden;
	transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.sh-product-card:hover {
	border-color: rgba(123, 97, 255, 0.25);
	transform: translateY(-4px);
	box-shadow: 0 12px 24px -10px rgba(123, 97, 255, 0.15);
}

/* Media */
.sh-product-card__media {
	position: relative;
	display: block;
	text-decoration: none;
	background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 50%, #f8fafc 100%);
}

.sh-product-card__img-wrap {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.sh-product-card__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sh-product-card:hover .sh-product-card__img-wrap img {
	transform: scale(1.05);
}

.sh-product-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 200px;
	font-size: 3rem;
}

.sh-product-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	padding: 5px 10px;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--stickly-gradient, linear-gradient(135deg, #7B61FF 0%, #5B8DEF 100%));
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(123, 97, 255, 0.25);
}

/* Body */
.sh-product-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.25rem;
	gap: 0.375rem;
}

.sh-product-card__cat {
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--stickly-primary, #7b61ff);
}

.sh-product-card__title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sh-product-card__title a {
	color: var(--stickly-text, #1a1d26);
	text-decoration: none;
	transition: color 0.15s ease;
}

.sh-product-card__title a:hover {
	color: var(--stickly-primary, #7b61ff);
}

.sh-product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: auto;
	padding-top: 0.75rem;
}

.sh-product-card__price {
	font-size: 1.0625rem;
	font-weight: 800;
	color: var(--stickly-text, #1a1d26);
	line-height: 1.2;
}

.sh-product-card__price del {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--stickly-muted, #9ca3af);
}

.sh-product-card__price ins {
	text-decoration: none;
	color: var(--stickly-primary, #7b61ff);
}

.sh-product-card__btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.625rem 1.25rem;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #fff;
	background: var(--stickly-primary, #7b61ff);
	border-radius: 12px;
	text-decoration: none;
	border: none;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	white-space: nowrap;
}

.sh-product-card__btn:hover {
	background: var(--stickly-primary-dark, #6246ea);
	color: #fff;
	transform: scale(1.03);
	box-shadow: 0 4px 12px rgba(123, 97, 255, 0.2);
}

.sh-product-card__btn:active {
	transform: scale(0.98);
}

.added_to_cart {
	display: none !important;
}

/* ── Shop section layout ── */
.stickly-shop-section {
	padding: 3rem 0;
}

.shop-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 2rem;
	margin-top: 2rem;
}

.filter-card {
	background: #fff;
	border-radius: var(--stickly-radius-lg, 20px);
	padding: 1.5rem;
	border: 1px solid var(--stickly-border, #e8ecf2);
	position: sticky;
	top: 90px;
}

.filter-title {
	font-size: 1.125rem;
	font-weight: 800;
	margin: 0 0 1.25rem;
	color: var(--stickly-text, #1a1d26);
}

.filter-group {
	margin-bottom: 1.25rem;
}

.filter-group label {
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--stickly-muted, #9ca3af);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	display: block;
	margin-bottom: 0.5rem;
}

.st-select {
	width: 100%;
	height: 44px;
	border-radius: 12px;
	border: 1px solid var(--stickly-border, #e8ecf2);
	background: var(--stickly-bg, #f8f9fb);
	padding: 0 0.875rem;
	font-weight: 600;
	font-size: 0.875rem;
	cursor: pointer;
	color: var(--stickly-text, #1a1d26);
}

.price-labels {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

#price-display {
	color: var(--stickly-primary, #7b61ff);
	font-weight: 800;
	font-size: 0.875rem;
}

.st-range {
	width: 100%;
	accent-color: var(--stickly-primary, #7b61ff);
	margin-top: 0.5rem;
}

.shop-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.shop-toolbar h2 {
	font-size: 1.375rem;
	font-weight: 800;
	margin: 0;
	color: var(--stickly-text, #1a1d26);
}

.st-loader {
	width: 20px;
	height: 20px;
	border: 2px solid var(--stickly-border, #e8ecf2);
	border-top-color: var(--stickly-primary, #7b61ff);
	border-radius: 50%;
	animation: sh-spin 0.7s linear infinite;
	display: none;
}

@keyframes sh-spin {
	to { transform: rotate(360deg); }
}

.no-products {
	text-align: center;
	padding: 3rem 1.5rem;
	background: #fff;
	border-radius: 20px;
	border: 1px solid var(--stickly-border, #e8ecf2);
	font-weight: 600;
	color: var(--stickly-muted, #9ca3af);
}

.stickly-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 2.5rem;
}

.page-btn {
	min-width: 40px;
	height: 40px;
	border-radius: 10px;
	border: 1px solid var(--stickly-border, #e8ecf2);
	background: #fff;
	font-weight: 700;
	font-size: 0.875rem;
	cursor: pointer;
	color: var(--stickly-muted, #6b7280);
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.page-btn:hover {
	border-color: var(--stickly-primary, #7b61ff);
	color: var(--stickly-primary, #7b61ff);
}

.page-btn.is-active {
	background: var(--stickly-primary, #7b61ff);
	color: #fff;
	border-color: var(--stickly-primary, #7b61ff);
}

@media (max-width: 1024px) {
	.shop-layout {
		grid-template-columns: 1fr;
	}

	.filter-card {
		position: static;
	}
}

@media (max-width: 640px) {
	.stickly-shop-section {
		padding: 1.5rem 0 2.5rem;
	}

	.shop-layout {
		gap: 1rem;
		margin-top: 1rem;
	}

	.sh-product-card__footer {
		flex-wrap: wrap;
	}

	.sh-product-card__btn {
		width: 100%;
		padding: 0.625rem;
	}
}

/* WooCommerce loop wrapper — card inside handles visuals */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	overflow: visible !important;
}

.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
	transform: none !important;
	box-shadow: none !important;
}

/* ── Testimonials mobile ── */
.stickly-testimonial__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 768px) {
	.stickly-testimonial__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.stickly-testimonial__card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem !important;
}

@media (min-width: 640px) {
	.stickly-testimonial__card {
		flex-direction: row;
		align-items: flex-start;
	}
}

/* ── Hero mobile ── */
.stickly-hero__grid--home {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
}

@media (min-width: 768px) {
	.stickly-hero__grid--home {
		grid-template-columns: 1fr 1fr;
		gap: 2.5rem;
	}
}

/* ── Categories row ── */
.stickly-categories__scroll {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	padding-bottom: 0.75rem;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.stickly-categories__scroll::-webkit-scrollbar {
	display: none;
}

.stickly-cat-pill {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	min-width: 88px;
	text-decoration: none;
}

.stickly-cat-pill__icon {
	width: 68px;
	height: 68px;
	background: #f1f5f9;
	border: 1px solid var(--stickly-border, #e8ecf2);
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.75rem;
	transition: border-color 0.2s, transform 0.2s;
}

.stickly-cat-pill:hover .stickly-cat-pill__icon {
	border-color: var(--stickly-primary, #7b61ff);
	transform: translateY(-2px);
}

.stickly-cat-pill__label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: #1e293b;
	text-align: center;
}

/* ── Footer responsive ── */
@media (max-width: 1024px) {
	.footer-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 2rem !important;
	}
}

@media (max-width: 640px) {
	.footer-grid {
		grid-template-columns: 1fr !important;
	}

	.footer-bottom {
		flex-direction: column;
		text-align: center;
		gap: 1rem;
	}

	.stickly-footer {
		padding: 3rem 0 2rem !important;
		margin-top: 3rem !important;
	}

	.newsletter-form {
		flex-direction: column;
	}

	.newsletter-btn {
		width: 100% !important;
	}
}

/* ── Blog post cards (index.php) ── */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

@media (max-width: 1024px) {
	.posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.posts-grid {
		grid-template-columns: 1fr;
	}
}

.post-card {
	background: #fff;
	border-radius: 20px;
	border: 1px solid var(--stickly-border, #e8ecf2);
	overflow: hidden;
	transition: border-color 0.2s, transform 0.2s;
}

.post-card:hover {
	border-color: rgba(123, 97, 255, 0.35);
	transform: translateY(-3px);
}

.post-card__thumb img {
	width: 100%;
	aspect-ratio: 16/10;
	object-fit: cover;
}

.post-card__body {
	padding: 1.25rem;
}

/* ── WooCommerce archive header ── */
.woo-archive-header {
	margin-bottom: 1.5rem;
}

.woo-archive-header__breadcrumbs {
	font-size: 0.8125rem;
	color: var(--stickly-muted, #9ca3af);
	margin-bottom: 0.75rem;
}

.woo-archive-header__breadcrumbs a {
	color: var(--stickly-muted, #9ca3af);
	text-decoration: none;
}

.woo-archive-header__breadcrumbs a:hover {
	color: var(--stickly-primary, #7b61ff);
}

.woo-archive-header__title {
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 800;
	color: var(--stickly-text, #1a1d26);
	margin: 0;
}

.woo-archive-header__desc {
	margin-top: 0.75rem;
	color: #6b7280;
	font-size: 0.9375rem;
	line-height: 1.6;
}

.woo-archive-toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 1.25rem;
}

.woo-archive-toolbar .woocommerce-ordering select {
	border: 1px solid var(--stickly-border, #e8ecf2);
	border-radius: 12px;
	padding: 0.5rem 2rem 0.5rem 0.875rem;
	font-weight: 600;
	font-size: 0.875rem;
	background: #fff;
}

/* Скрыть дубли WC в цикле, если хуки всё же сработали */
.woocommerce ul.products li.product > a.woocommerce-loop-product__link,
.woocommerce ul.products li.product > .button,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price {
	display: none !important;
}

/* ── Single product pages ── */
.stickly-wrapper {
	background: #fff;
	padding: 1.25rem 0 4rem;
}

.stickly-container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

.st-grid {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 1.875rem;
	align-items: start;
}

.st-card {
	background: #fff;
	border-radius: 20px;
	padding: 1.5rem;
	border: 1px solid #f0f2f5;
	margin-bottom: 1.25rem;
}

.st-card--gallery {
	padding: 0.625rem;
}

.st-gallery-main {
	background: var(--stickly-bg, #f8f9fb);
	border-radius: 18px;
	padding: 2rem;
	text-align: center;
	position: relative;
	min-height: 320px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.st-gallery-main img {
	max-width: 100%;
	height: auto;
}

.st-badge {
	position: absolute;
	top: 1rem;
	left: 1rem;
	background: var(--stickly-primary, #7b61ff);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 800;
	padding: 4px 10px;
	border-radius: 8px;
}

.st-title {
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 0.75rem;
}

.st-rating {
	font-size: 0.875rem;
	color: #71767b;
	margin-bottom: 1rem;
}

.st-rating-star {
	color: #ffb800;
}

.st-price-tag {
	background: #e6f9f1;
	color: #10b981;
	display: inline-block;
	padding: 0.5rem 1rem;
	border-radius: 12px;
	font-size: 1.375rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.st-product-note,
.st-ai-hint {
	font-size: 0.875rem;
	color: #71767b;
	margin-bottom: 1.25rem;
}

.st-btn-primary {
	background: var(--stickly-primary, #7b61ff);
	color: #fff !important;
	border: none;
	padding: 1rem;
	border-radius: 16px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	display: block;
	width: 100%;
	text-decoration: none;
	transition: background 0.15s;
}

.st-btn-primary:hover:not(:disabled) {
	background: var(--stickly-primary-dark, #6246ea);
}

.st-btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.st-tabs-header {
	display: flex;
	gap: 1.25rem;
	border-bottom: 1px solid #f0f2f5;
	margin-bottom: 1.25rem;
	flex-wrap: wrap;
}

.st-tab-trigger {
	padding-bottom: 0.75rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #71767b;
	cursor: pointer;
	border: none;
	background: none;
}

.st-tab-trigger.active {
	color: var(--stickly-primary, #7b61ff);
	border-bottom: 2px solid var(--stickly-primary, #7b61ff);
}

.st-tab-content {
	display: none;
	font-size: 0.9375rem;
	color: #4a4d50;
	line-height: 1.7;
}

.st-tab-content.active {
	display: block;
}

.st-specs-row {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	margin-top: 1rem;
}

.st-spec-label {
	font-size: 0.75rem;
	color: #71767b;
}

.st-spec-val {
	font-size: 0.875rem;
	font-weight: 700;
}

.st-features {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	padding-top: 1.25rem;
	border-top: 1px solid #f0f2f5;
	margin-top: 1.25rem;
}

.st-feat-item {
	text-align: center;
	font-size: 0.6875rem;
	color: #71767b;
}

.st-feat-item i {
	font-size: 1.5rem;
	display: block;
	margin-bottom: 0.5rem;
	font-style: normal;
}

.st-trust {
	background: var(--stickly-bg, #f8f9fb);
	padding: 1rem;
	border-radius: 16px;
	margin-top: 1.25rem;
	display: flex;
	gap: 0.625rem;
	font-size: 0.75rem;
}

.st-trust span {
	display: block;
	color: #999;
	margin-top: 2px;
}

/* AI product page */
.st-ai-label {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--stickly-primary, #7b61ff);
	background: #f5f3ff;
	padding: 4px 10px;
	border-radius: 8px;
	margin-bottom: 0.75rem;
}

.ai-upload-box {
	margin: 1.25rem 0;
	padding: 1.25rem;
	border: 2px dashed #c4b5fd;
	border-radius: 16px;
	background: #faf5ff;
}

.ai-upload-box__title {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 700;
}

.ai-upload-box__text {
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	color: #6b7280;
}

.ai-upload-box__drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 1.5rem;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--stickly-border, #e8ecf2);
	cursor: pointer;
	text-align: center;
}

.ai-upload-box__drop input {
	display: none;
}

.ai-upload-box__drop-icon {
	font-size: 2rem;
}

.ai-upload-box__drop-text {
	font-size: 0.875rem;
	font-weight: 600;
	color: #4b5563;
}

.ai-upload-preview img {
	max-width: 120px;
	border-radius: 12px;
	margin-top: 1rem;
}

.ai-upload-status {
	margin-top: 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.ai-upload-status--loading { color: var(--stickly-primary, #7b61ff); }
.ai-upload-status--ok { color: #10b981; }
.ai-upload-status--err { color: #dc2626; }

@media (max-width: 850px) {
	.st-grid {
		grid-template-columns: 1fr;
	}

	.st-sidebar {
		order: -1;
	}
}