/**
 * ACCESFY Trending Products – Premium Black & White Theme
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ─── Variables ─── */
.accesfy-tp {
	--tp-bg: #000000;
	--tp-card: #111111;
	--tp-border: #1e1e1e;
	--tp-text: #ffffff;
	--tp-text-muted: #a1a1aa;
	--tp-accent: #f5f5f5;
	--tp-radius: 12px;
	--tp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--tp-ease: cubic-bezier(0.4, 0, 0.2, 1);
	--tp-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
	--tp-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.55);

	background: var(--tp-bg);
	color: var(--tp-text);
	padding: 48px 16px 56px;
	font-family: var(--tp-font);
}

.accesfy-tp *,
.accesfy-tp *::before,
.accesfy-tp *::after {
	box-sizing: border-box;
}

/* ─── Header ─── */
.accesfy-tp__header {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 32px;
	padding: 0 8px;
}

.accesfy-tp__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	margin: 0 0 8px;
	color: var(--tp-text);
}

.accesfy-tp__subtitle {
	font-size: 14px;
	font-weight: 400;
	color: var(--tp-text-muted);
	margin: 0;
	line-height: 1.5;
}

/* ─── Responsive Grid ─── */
.accesfy-tp__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	max-width: 1920px;
	margin: 0 auto;
}

@media (min-width: 768px) {
	.accesfy-tp { padding: 56px 24px 64px; }
	.accesfy-tp__grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
}

@media (min-width: 1024px) {
	.accesfy-tp__grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
}

@media (min-width: 1400px) {
	.accesfy-tp { padding: 64px 32px 72px; }
	.accesfy-tp__grid { grid-template-columns: repeat(6, 1fr); gap: 18px; }
}

@media (min-width: 1920px) {
	.accesfy-tp__grid { grid-template-columns: repeat(8, 1fr); gap: 20px; }
}

/* Reveal animation */
.accesfy-tp-reveal .accesfy-tp-card {
	opacity: 0;
	transform: translateY(20px);
}

.accesfy-tp-reveal.is-visible .accesfy-tp-card {
	animation: accesfyTpReveal 0.5s var(--tp-ease) forwards;
}

.accesfy-tp-reveal.is-visible .accesfy-tp-card:nth-child(1) { animation-delay: 0.03s; }
.accesfy-tp-reveal.is-visible .accesfy-tp-card:nth-child(2) { animation-delay: 0.06s; }
.accesfy-tp-reveal.is-visible .accesfy-tp-card:nth-child(3) { animation-delay: 0.09s; }
.accesfy-tp-reveal.is-visible .accesfy-tp-card:nth-child(4) { animation-delay: 0.12s; }
.accesfy-tp-reveal.is-visible .accesfy-tp-card:nth-child(5) { animation-delay: 0.15s; }
.accesfy-tp-reveal.is-visible .accesfy-tp-card:nth-child(6) { animation-delay: 0.18s; }
.accesfy-tp-reveal.is-visible .accesfy-tp-card:nth-child(7) { animation-delay: 0.21s; }
.accesfy-tp-reveal.is-visible .accesfy-tp-card:nth-child(8) { animation-delay: 0.24s; }
.accesfy-tp-reveal.is-visible .accesfy-tp-card:nth-child(n+9) { animation-delay: 0.27s; }

@keyframes accesfyTpReveal {
	to { opacity: 1; transform: translateY(0); }
}

/* ─── Product Card ─── */
.accesfy-tp-card {
	background: var(--tp-card);
	border: 1px solid var(--tp-border);
	border-radius: var(--tp-radius);
	overflow: hidden;
	transition: transform 0.4s var(--tp-ease), box-shadow 0.4s var(--tp-ease), border-color 0.3s ease;
	will-change: transform;
}

.accesfy-tp-card:hover,
.accesfy-tp-card.is-touched {
	transform: translateY(-4px);
	box-shadow: var(--tp-shadow-hover);
	border-color: #2a2a2a;
}

.accesfy-tp-card__media {
	position: relative;
	aspect-ratio: 3/4;
	overflow: hidden;
	background: #0a0a0a;
}

.accesfy-tp-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.65s var(--tp-ease);
}

.accesfy-tp-card:hover .accesfy-tp-card__image,
.accesfy-tp-card.is-touched .accesfy-tp-card__image {
	transform: scale(1.06);
}

.accesfy-tp-card__image-link {
	display: block;
	width: 100%;
	height: 100%;
}

/* Trending badge */
.accesfy-tp-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 8px;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid var(--tp-border);
	border-radius: 6px;
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--tp-accent);
}

/* Action icons */
.accesfy-tp-card__actions {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 6px;
	opacity: 0;
	transform: translateX(8px);
	transition: opacity 0.35s var(--tp-ease), transform 0.35s var(--tp-ease);
}

.accesfy-tp-card:hover .accesfy-tp-card__actions,
.accesfy-tp-card.is-touched .accesfy-tp-card__actions {
	opacity: 1;
	transform: translateX(0);
}

@media (max-width: 767px) {
	.accesfy-tp-card__actions {
		opacity: 1;
		transform: translateX(0);
	}
}

.accesfy-tp-card__action {
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(17, 17, 17, 0.75);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid var(--tp-border);
	border-radius: 8px;
	color: var(--tp-text);
	cursor: pointer;
	padding: 0;
	transition: all 0.25s var(--tp-ease);
}

.accesfy-tp-card__action:hover {
	border-color: var(--tp-accent);
	color: var(--tp-accent);
}

.accesfy-tp-card__wishlist.is-active {
	color: var(--tp-text);
	border-color: var(--tp-accent);
}

.accesfy-tp-card__wishlist.is-active .accesfy-tp-icon--heart {
	fill: var(--tp-text);
	stroke: var(--tp-text);
}

.accesfy-tp-card__wishlist.accesfy-tp-pulse {
	animation: accesfyTpPulse 0.4s var(--tp-ease);
}

@keyframes accesfyTpPulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.2); }
	100% { transform: scale(1); }
}

/* Card body */
.accesfy-tp-card__body {
	padding: 12px 12px 14px;
}

.accesfy-tp-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: var(--tp-text-muted);
	margin-bottom: 6px;
}

.accesfy-tp-card__rating svg {
	color: var(--tp-accent);
}

.accesfy-tp-card__name {
	display: -webkit-box;
	font-size: 13px;
	font-weight: 500;
	color: var(--tp-text);
	text-decoration: none;
	margin-bottom: 8px;
	line-height: 1.35;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	transition: color 0.2s ease;
}

.accesfy-tp-card__name:hover {
	color: var(--tp-accent);
}

.accesfy-tp-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.accesfy-tp-card__price {
	font-size: 13px;
	font-weight: 600;
	color: var(--tp-text);
}

.accesfy-tp-card__price del {
	color: var(--tp-text-muted);
	font-weight: 400;
	font-size: 11px;
}

.accesfy-tp-card__price ins {
	text-decoration: none;
}

/* Shopping bag button */
.accesfy-tp-card__bag {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--tp-border);
	border-radius: 8px;
	color: var(--tp-text);
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	transition: all 0.3s var(--tp-ease);
}

.accesfy-tp-card__bag:hover {
	background: var(--tp-accent);
	color: var(--tp-bg);
	border-color: var(--tp-accent);
}

.accesfy-tp-card__bag.is-added {
	background: var(--tp-accent);
	color: var(--tp-bg);
	border-color: var(--tp-accent);
	animation: accesfyTpBagPop 0.45s var(--tp-ease);
}

@keyframes accesfyTpBagPop {
	0% { transform: scale(1); }
	40% { transform: scale(1.15); }
	100% { transform: scale(1); }
}

/* ─── Header Wishlist Counter ─── */
.accesfy-tp-wishlist-header {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
	position: relative;
}

.accesfy-tp-wishlist-header__icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.accesfy-tp-wishlist-header__count {
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tp-text);
	color: var(--tp-bg);
	font-size: 10px;
	font-weight: 600;
	border-radius: 99px;
	transition: transform 0.3s var(--tp-ease);
}

.accesfy-tp-wishlist-header__count.is-empty {
	display: none;
}

.accesfy-tp-wishlist-header__count.is-bump {
	animation: accesfyTpBump 0.35s var(--tp-ease);
}

@keyframes accesfyTpBump {
	0% { transform: scale(1); }
	50% { transform: scale(1.25); }
	100% { transform: scale(1); }
}

/* ─── Quick View Modal ─── */
.accesfy-tp-qv {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s var(--tp-ease), visibility 0.35s;
}

.accesfy-tp-qv.is-open {
	opacity: 1;
	visibility: visible;
}

.accesfy-tp-qv__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.accesfy-tp-qv__sheet {
	position: relative;
	z-index: 1;
	width: 100%;
	max-height: 92vh;
	background: var(--tp-card);
	border: 1px solid var(--tp-border);
	border-radius: 16px 16px 0 0;
	display: flex;
	flex-direction: column;
	transform: translateY(100%);
	transition: transform 0.45s var(--tp-ease);
	overflow: hidden;
}

.accesfy-tp-qv.is-open .accesfy-tp-qv__sheet {
	transform: translateY(0);
}

.accesfy-tp-qv__header {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: rgba(17, 17, 17, 0.95);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--tp-border);
	flex-shrink: 0;
}

.accesfy-tp-qv__header-title {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.accesfy-tp-qv__close {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--tp-border);
	border-radius: 10px;
	color: var(--tp-text);
	cursor: pointer;
	padding: 0;
	transition: all 0.25s ease;
}

.accesfy-tp-qv__close:hover {
	border-color: var(--tp-accent);
	color: var(--tp-accent);
}

.accesfy-tp-qv__body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.accesfy-tp-qv__loading {
	text-align: center;
	padding: 60px 20px;
	color: var(--tp-text-muted);
}

body.accesfy-tp-qv-open {
	overflow: hidden;
}

/* Quick view content */
.accesfy-tp-qv__content {
	display: flex;
	flex-direction: column;
}

.accesfy-tp-qv__gallery-main {
	aspect-ratio: 1;
	background: #0a0a0a;
	overflow: hidden;
}

.accesfy-tp-qv__gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.accesfy-tp-qv__gallery-thumbs {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	overflow-x: auto;
	scrollbar-width: none;
}

.accesfy-tp-qv__gallery-thumbs::-webkit-scrollbar { display: none; }

.accesfy-tp-qv__thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 1px solid var(--tp-border);
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: transparent;
	opacity: 0.6;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.accesfy-tp-qv__thumb.is-active,
.accesfy-tp-qv__thumb:hover {
	opacity: 1;
	border-color: var(--tp-accent);
}

.accesfy-tp-qv__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.accesfy-tp-qv__info {
	padding: 20px 20px 32px;
}

.accesfy-tp-qv__category {
	font-size: 11px;
	color: var(--tp-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 8px;
}

.accesfy-tp-qv__category a {
	color: var(--tp-text-muted);
	text-decoration: none;
}

.accesfy-tp-qv__title {
	font-size: 1.35rem;
	font-weight: 600;
	margin: 0 0 10px;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.accesfy-tp-qv__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	margin-bottom: 10px;
	color: var(--tp-text-muted);
}

.accesfy-tp-qv__rating svg { color: var(--tp-accent); }

.accesfy-tp-qv__price {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 14px;
}

.accesfy-tp-qv__desc {
	font-size: 13px;
	line-height: 1.6;
	color: var(--tp-text-muted);
	margin: 0 0 20px;
}

.accesfy-tp-qv__field {
	margin-bottom: 16px;
}

.accesfy-tp-qv__field label {
	display: block;
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--tp-text-muted);
	margin-bottom: 8px;
}

.accesfy-tp-qv__field select {
	width: 100%;
	padding: 12px 14px;
	background: var(--tp-bg);
	border: 1px solid var(--tp-border);
	border-radius: 8px;
	color: var(--tp-text);
	font-family: var(--tp-font);
	font-size: 14px;
	appearance: none;
}

.accesfy-tp-qty-control {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--tp-border);
	border-radius: 8px;
	overflow: hidden;
}

.accesfy-tp-qty-btn {
	width: 40px;
	height: 40px;
	background: transparent;
	border: none;
	color: var(--tp-text);
	font-size: 18px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.accesfy-tp-qty-btn:hover {
	background: rgba(255, 255, 255, 0.06);
}

.accesfy-tp-qty-control input {
	width: 48px;
	height: 40px;
	text-align: center;
	background: transparent;
	border: none;
	border-left: 1px solid var(--tp-border);
	border-right: 1px solid var(--tp-border);
	color: var(--tp-text);
	font-size: 14px;
	font-family: var(--tp-font);
	-moz-appearance: textfield;
}

.accesfy-tp-qty-control input::-webkit-outer-spin-button,
.accesfy-tp-qty-control input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.accesfy-tp-qv__actions {
	display: flex;
	gap: 10px;
	margin-top: 8px;
}

.accesfy-tp-qv__add-bag {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 48px;
	padding: 0 20px;
	background: var(--tp-accent);
	color: var(--tp-bg);
	border: none;
	border-radius: 10px;
	font-family: var(--tp-font);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.accesfy-tp-qv__add-bag:hover {
	opacity: 0.9;
}

.accesfy-tp-qv__add-bag.is-added {
	animation: accesfyTpBagPop 0.45s var(--tp-ease);
}

.accesfy-tp-qv__wishlist {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
}

.accesfy-tp-qv__details-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 20px;
	font-size: 13px;
	color: var(--tp-text-muted);
	text-decoration: none;
	transition: color 0.2s ease;
}

.accesfy-tp-qv__details-link:hover {
	color: var(--tp-accent);
}

.accesfy-tp-qv__related {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--tp-border);
}

.accesfy-tp-qv__related-title {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 14px;
}

.accesfy-tp-qv__related-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.accesfy-tp-qv__related-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--tp-border);
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	text-align: left;
	color: var(--tp-text);
	transition: border-color 0.2s ease;
}

.accesfy-tp-qv__related-item:hover {
	border-color: var(--tp-accent);
}

.accesfy-tp-qv__related-item img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
}

.accesfy-tp-qv__related-item span {
	font-size: 11px;
	padding: 0 8px 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Desktop quick view – centered modal */
@media (min-width: 768px) {
	.accesfy-tp-qv {
		align-items: center;
		padding: 24px;
	}

	.accesfy-tp-qv__sheet {
		max-width: 900px;
		max-height: 88vh;
		border-radius: 16px;
		transform: translateY(24px) scale(0.97);
	}

	.accesfy-tp-qv.is-open .accesfy-tp-qv__sheet {
		transform: translateY(0) scale(1);
	}

	.accesfy-tp-qv__content {
		flex-direction: row;
	}

	.accesfy-tp-qv__gallery {
		flex: 0 0 48%;
		border-right: 1px solid var(--tp-border);
	}

	.accesfy-tp-qv__info {
		flex: 1;
		overflow-y: auto;
	}
}
