/*
 * "Native mobil uygulama" hissi veren genel kabuk stilleri:
 *   - Alt sekme cubugu (bottom tab bar)
 *   - Dokunma geri bildirimi (basili tutunca hafif kuculme)
 *   - iOS "safe area" (centik/home indicator) bosluklari
 *   - Mevcut sticky sepet cubugunun (plugin) alt sekme cubugunun
 *     USTUNE binmesi icin konum duzeltmesi
 */

html {
	-webkit-tap-highlight-color: transparent;
}

/* ==================== Alt Sekme Çubuğu (Bottom Tab Bar) ==================== */
.pv-tabbar {
	display: none;
}

@media (max-width: 768px) {
	.pv-tabbar {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9995;
		background: var(--pv-white);
		border-top: 1px solid var(--pv-border);
		box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.pv-tabbar-item {
		flex: 1 1 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		padding: 8px 4px 6px;
		min-height: 54px;
		text-decoration: none;
		color: var(--pv-muted, #9a8f86);
		transition: color 0.15s ease, transform 0.15s ease;
	}

	.pv-tabbar-item:active {
		transform: scale(0.92);
	}

	.pv-tabbar-item.is-active {
		color: var(--pv-red);
	}

	.pv-tabbar-icon {
		font-size: 1.3rem;
		line-height: 1;
		position: relative;
	}

	.pv-tabbar-icon-cart {
		display: inline-flex;
	}

	.pv-tabbar-badge {
		position: absolute;
		top: -6px;
		right: -10px;
		background: var(--pv-red);
		color: var(--pv-white);
		font-size: 0.62rem;
		font-weight: 800;
		min-width: 16px;
		height: 16px;
		border-radius: 8px;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0 4px;
	}

	.pv-tabbar-badge[hidden] {
		display: none;
	}

	.pv-tabbar-label {
		font-family: var(--pv-font-body);
		font-size: 0.68rem;
		font-weight: 700;
	}

	/* Sayfa icerigi alt sekme cubugunun arkasinda kalmasin. */
	body {
		padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
	}

	/* Plugin'in sticky sepet cubugu, alt sekme cubugunun UZERINE
	   (yukarisina) binsin, ustune degil. */
	.pv-cart-bar-wrap {
		bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
	}
}

/* ==================== Genel dokunma geri bildirimi ==================== */
@media (max-width: 768px) {
	.pv-btn:active,
	.pv-product-card-add:active,
	.pv-category-card:active,
	.pv-branch-card:active {
		transform: scale(0.97);
	}
}

/* ==================== Mağaza arama barı ==================== */
.pv-shop-search {
	position: relative;
	margin: 4px 0 14px;
}

.pv-shop-search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1rem;
	opacity: 0.6;
	pointer-events: none;
}

.pv-shop-search-input {
	width: 100%;
	padding: 13px 16px 13px 40px;
	border-radius: var(--pv-radius-pill);
	border: 1px solid var(--pv-border);
	background: var(--pv-white);
	font-family: var(--pv-font-body);
	font-size: 0.95rem;
	color: var(--pv-dark);
	box-shadow: var(--pv-shadow-sm);
}

.pv-shop-search-input:focus {
	outline: none;
	border-color: var(--pv-red);
}

.pv-shop-search-clear {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: none;
	background: var(--pv-cream);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
}

.pv-shop-search.has-query .pv-shop-search-clear {
	display: flex;
}

.pv-shop-search-empty {
	display: none;
	text-align: center;
	padding: 48px 16px;
	color: var(--pv-muted, #9a8f86);
	font-family: var(--pv-font-body);
}

.pv-shop-search-empty.is-visible {
	display: block;
}

/* Arama sirasinda eslesmeyen urun karti / bos kategori bolumu gizlenir. */
.pv-product-card[hidden],
.pv-section[hidden] {
	display: none !important;
}
