/* Ersağ Ürün Katalog — tam ekran görüntüleyici */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body,
html {
	margin: 0;
	padding: 0;
	height: 100%;
	width: 100%;
	overflow: hidden;
	background: #000;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.katalog-container {
	background-color: #1c1c1c;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
	background-attachment: fixed;
	width: 100%;
	height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	position: relative;
}

#flipbook {
	box-shadow: 0 30px 80px rgba(0, 0, 0, .8);
}

.page {
	background-color: #fff;
	background-size: 100% 100% !important;
	background-repeat: no-repeat !important;
	position: relative;
}

.page.loading {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 50 50"><path fill="%23bbb" d="M25 5a20 20 0 100 40 20 20 0 000-40zm0 6a14 14 0 110 28 14 14 0 010-28z" opacity=".25"/></svg>') !important;
	background-size: 40px 40px !important;
	background-position: center center !important;
}

.page-inner {
	width: 100%;
	height: 100%;
	position: relative;
}

.gradient-overlay {
	position: absolute;
	top: 0;
	width: 60px;
	height: 100%;
	pointer-events: none;
}

.page:nth-child(even) .gradient-overlay {
	right: 0;
	background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .25));
}

.page:nth-child(odd) .gradient-overlay {
	left: 0;
	background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .25));
}

/* -------- HOTSPOT -------- */
.hotspot-container {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transform: translate(-50%, -50%) !important;
	z-index: 1000;
}

.price-tag {
	display: block;
	background: rgba(0, 0, 0, .85);
	color: #fff;
	padding: 3px 12px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	border: 1px solid rgba(255, 255, 255, .3);
	backdrop-filter: blur(4px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
	margin-bottom: 6px;
}

.price-tag.out-of-stock {
	background: #555 !important;
	border: 1px solid #000;
}

.price-tag.has-promo {
	border: 1px solid #8e44ad !important;
	border-radius: 0 0 6px 6px !important;
}

.promo-badge {
	background: #8e44ad;
	color: #fff;
	font-size: 10px;
	font-weight: bold;
	padding: 3px 2px;
	display: block;
	text-align: center;
	border-radius: 6px 6px 0 0;
	text-transform: uppercase;
	border-bottom: 1px solid rgba(255, 255, 255, .2);
	white-space: nowrap;
	padding-left: 8px;
	padding-right: 8px;
}

.hotspot-actions {
	display: flex;
	flex-direction: row;
	gap: 6px;
	align-items: center;
}

.action-btn {
	border: 2px solid #fff;
	border-radius: 50px;
	color: #fff;
	padding: 8px 16px;
	font-size: 11px;
	font-weight: 800;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	box-shadow: 0 6px 15px rgba(0, 0, 0, .3);
	transition: all .2s ease;
}

.cart-btn {
	background: linear-gradient(135deg, #ff9d00 0%, #e67e22 100%);
}

.view-btn {
	background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.action-btn::after {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 50%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
	transform: skewX(-20deg);
	animation: shine 3s infinite;
}

@keyframes shine {
	0% { left: -100%; }
	20% { left: 150%; }
	100% { left: 150%; }
}

.action-btn:hover {
	transform: scale(1.05) translateY(-2px);
	box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
}

.stock-out-btn {
	background-color: #d32f2f !important;
	color: #fff !important;
	cursor: not-allowed !important;
	border: none;
	opacity: .9;
	width: 100%;
}

.added-success {
	animation: success-pulse .4s ease-out;
}

@keyframes success-pulse {
	0% { transform: translate(-50%, -50%) scale(1); }
	50% { transform: translate(-50%, -50%) scale(1.15); }
	100% { transform: translate(-50%, -50%) scale(1); }
}

/* -------- NAV / TOOLBAR -------- */
.side-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, .35);
	cursor: pointer;
	z-index: 1000;
}

.prev { left: 12px; }
.next { right: 12px; }

.fbToolBar {
	position: fixed;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10005;
	background: rgb(53, 92, 165);
	backdrop-filter: blur(5px);
	padding: 8px 18px;
	border-radius: 50px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, .2);
}

.toolbar-wrap {
	display: flex;
	align-items: center;
	gap: 14px;
}

.tb-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	transition: transform .2s ease;
}

.tb-btn:hover {
	transform: scale(1.12);
}

.tb-btn svg {
	width: 22px;
	height: 22px;
}

.page-input-wrap {
	color: #fff;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 4px;
}

#page-num {
	width: 46px;
	padding: 4px;
	border: 1px solid #4a6ea8;
	border-radius: 5px;
	text-align: center;
	font-weight: bold;
	outline: none;
	background: #fff;
	color: #222;
}

/* -------- KATEGORİ -------- */
.kategori-menu-container {
	position: absolute;
	top: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10002;
	width: 230px;
}

#kategori-select {
	width: 100%;
	padding: 10px 35px 10px 14px;
	border-radius: 25px;
	border: 2px solid #2ecc71;
	background: rgba(255, 255, 255, .96);
	font-weight: bold;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232ecc71' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: calc(100% - 15px) center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

#kategori-select:focus {
	border-color: #27ae60;
	box-shadow: 0 0 0 3px rgba(46, 204, 113, .2);
}

/* -------- SEPET -------- */
#katalog-toast {
	visibility: hidden;
	min-width: 250px;
	background-color: #2ecc71;
	color: #fff;
	text-align: center;
	border-radius: 10px;
	padding: 16px;
	position: fixed;
	z-index: 20000;
	left: 50%;
	top: 30px;
	transform: translateX(-50%);
	font-size: 14px;
	font-weight: 600;
}

#katalog-toast.show {
	visibility: visible;
	animation: fadein .5s, fadeout .5s 2.5s;
}

@keyframes fadein {
	from { top: 0; opacity: 0; }
	to { top: 30px; opacity: 1; }
}

@keyframes fadeout {
	from { top: 30px; opacity: 1; }
	to { top: 0; opacity: 0; }
}

.bottom-cart-container {
	position: fixed;
	bottom: 84px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10001;
}

.katalog-cart-status {
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(10px);
	padding: 8px 18px;
	border-radius: 50px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
	display: flex;
	align-items: center;
	border: 1px solid rgba(46, 204, 113, .4);
}

.cart-info {
	cursor: pointer;
	display: flex;
	align-items: center;
}

.cart-icon {
	font-size: 20px;
}

.cart-count {
	background: #e74c3c;
	color: #fff;
	font-size: 11px;
	min-width: 20px;
	height: 20px;
	border-radius: 50%;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-left: 8px;
	padding: 0 4px;
}

.cart-clear-btn {
	background: none;
	border: none;
	cursor: pointer;
	margin-left: 14px;
	font-size: 16px;
}

.go-to-cart {
	background: #2ecc71;
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	font-weight: bold;
	padding: 8px 18px;
	border-radius: 25px;
	margin-left: 10px;
}

.cart-dropdown {
	display: none;
	position: absolute;
	bottom: 62px;
	left: 50%;
	transform: translateX(-50%);
	width: 320px;
	background: #fff;
	border-radius: 15px;
	box-shadow: 0 5px 35px rgba(0, 0, 0, .3);
	border: 1px solid #eee;
	overflow: hidden;
}

.mini-cart-header {
	padding: 12px;
	background: #f8f9fa;
	border-bottom: 1px solid #eee;
	font-weight: bold;
	display: flex;
	justify-content: space-between;
}

.mini-cart-close {
	cursor: pointer;
	color: #ccc;
}

.mini-cart-list {
	max-height: 300px;
	overflow-y: auto;
	padding: 5px;
}

.mini-cart-item {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 8px 6px;
	border-bottom: 1px solid #f2f2f2;
}

.mini-cart-item img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
}

.mini-cart-item .mci-name {
	flex: 1 1 auto;
	font-size: 12px;
	line-height: 1.25;
}

.mini-cart-item .mci-price {
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.mini-cart-foot {
	display: flex;
	justify-content: space-between;
	padding: 10px 12px;
	font-weight: 700;
	background: #f8f9fa;
}

/* -------- ZOOM -------- */
#flipbook-viewport.zoomed {
	overflow: visible;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* -------- MOBİL -------- */
@media (max-width: 767px) {
	.desktop-only { display: none !important; }

	#flipbook-viewport {
		height: 306px !important;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.hotspot-container { transform: translate(-50%, -50%) scale(.85) !important; }

	.hotspot-actions {
		flex-direction: column !important;
		gap: 4px !important;
		width: 90px;
	}

	.action-btn {
		padding: 5px 10px !important;
		font-size: 9px !important;
		border-width: 1px !important;
		border-radius: 4px !important;
		width: 100%;
	}

	.action-btn::after { display: none !important; }

	.price-tag {
		font-size: 10px !important;
		padding: 2px 8px !important;
		margin-bottom: 4px !important;
	}

	.fbToolBar { bottom: 8px; padding: 6px 14px; }
	.toolbar-wrap { gap: 10px; }
	.cart-dropdown { width: 290px; }
}
