/* ==========================================================================
   Cubive Sports — UI/UX Polish
   Focus states, product card motion, toast notifications, skeleton
   loading, and empty-state styling.
   ========================================================================== */

/* ---------- Global focus-visible (keyboard navigation) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--cubive-accent);
	outline-offset: 2px;
	border-radius: 2px;
}
/* Mouse/touch users don't see a focus ring on click, only keyboard users do. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
	outline: none;
}

/* ---------- Product card hover polish (shop grid, related, wishlist) ---------- */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
	overflow: hidden;
	display: block;
	border-radius: var(--cubive-radius) var(--cubive-radius) 0 0;
}
.woocommerce ul.products li.product img {
	transition: transform 0.35s ease;
}
.woocommerce ul.products li.product:hover img {
	transform: scale(1.05);
}
.post-card-thumb { overflow: hidden; display: block; }
.post-card img { transition: transform 0.35s ease; }
.post-card:hover img { transform: scale(1.05); }

/* ---------- Skeleton loading state (Quick View, wishlist while fetching) ---------- */
@keyframes cubiveSkeletonShimmer {
	0%   { background-position: -200px 0; }
	100% { background-position: calc(200px + 100%) 0; }
}
.cubive-skeleton {
	background: linear-gradient( 90deg, var(--cubive-bg-alt) 25%, #e8e8e8 37%, var(--cubive-bg-alt) 63% );
	background-size: 400px 100%;
	animation: cubiveSkeletonShimmer 1.4s ease infinite;
	border-radius: var(--cubive-radius);
}
.cubive-quickview-skeleton {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
}
.cubive-quickview-skeleton-image {
	aspect-ratio: 1/1;
}
.cubive-quickview-skeleton-lines > span {
	display: block;
	height: 16px;
	margin-bottom: 12px;
}
.cubive-quickview-skeleton-lines > span:nth-child(1) { width: 70%; height: 24px; margin-bottom: 18px; }
.cubive-quickview-skeleton-lines > span:nth-child(2) { width: 40%; height: 28px; margin-bottom: 22px; }
.cubive-quickview-skeleton-lines > span:nth-child(3) { width: 100%; }
.cubive-quickview-skeleton-lines > span:nth-child(4) { width: 90%; }
.cubive-quickview-skeleton-lines > span:nth-child(5) { width: 55%; }

@media (max-width: 700px) {
	.cubive-quickview-skeleton { grid-template-columns: 1fr; }
}

/* ---------- Toast notifications ---------- */
.cubive-toast-region {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 400;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
	pointer-events: none;
}
.cubive-toast {
	background: var(--cubive-primary);
	color: #fff;
	font-size: 0.88rem;
	font-weight: 600;
	padding: 12px 20px;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.18);
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}
.cubive-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}
.cubive-toast-icon { display: inline-flex; flex-shrink: 0; }

@media (max-width: 480px) {
	.cubive-toast-region { top: 12px; width: calc(100% - 32px); }
	.cubive-toast { white-space: normal; text-align: center; width: 100%; justify-content: center; }
}

/* ---------- Empty states (cart, wishlist, search, shop-with-no-results) ---------- */
.cubive-empty-state {
	text-align: center;
	padding: 56px 24px;
	color: var(--cubive-text-muted);
}
.cubive-empty-state-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 18px;
	color: var(--cubive-border);
}
.cubive-empty-state-icon svg { width: 100%; height: 100%; }
.cubive-empty-state p {
	font-size: 1rem;
	margin: 0 0 20px;
}
.cubive-empty-state .button { margin-top: 4px; }

/* WooCommerce's own empty-cart block, lightly restyled to match */
.woocommerce-cart .cart-empty {
	text-align: center;
	padding: 40px 24px !important;
	background: var(--cubive-bg-alt);
	border-radius: var(--cubive-radius);
	border-left: none !important;
}
.woocommerce-cart .wc-empty-cart-message .button { margin-top: 12px; }
