/**
 * Frontend Stylesheet for Asır Et Kebap Menü Plugin
 * Developer: Yıldız Digital (June 2026)
 */

/* Root Wrapper */
.asiret-menu-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1e1d23;
}

/* Category Headers */
.asiret-menu-category-section {
	margin-bottom: 50px;
}

.asiret-menu-category-title {
	font-size: 26px;
	font-weight: 700;
	color: #1e1d23;
	margin: 0 0 30px 0;
	padding: 0;
	position: relative;
	display: flex;
	align-items: center;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.asiret-menu-category-title span {
	background: #ffffff;
	padding-right: 20px;
	position: relative;
	z-index: 2;
}

.asiret-menu-category-title::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #cfa670 0%, #bd935c 100%);
	z-index: 1;
	border-radius: 2px;
}

/* Grid Layouts */
.asiret-menu-products-grid {
	display: grid;
	gap: 30px;
}

/* Columns Config based on shortcode attribute */
.cols-2 .asiret-menu-products-grid {
	grid-template-columns: repeat(2, 1fr);
}

.cols-3 .asiret-menu-products-grid {
	grid-template-columns: repeat(3, 1fr);
}

.cols-4 .asiret-menu-products-grid {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
	.cols-3 .asiret-menu-products-grid,
	.cols-4 .asiret-menu-products-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.asiret-menu-category-title {
		font-size: 22px;
	}
}

@media (max-width: 600px) {
	.cols-2 .asiret-menu-products-grid,
	.cols-3 .asiret-menu-products-grid,
	.cols-4 .asiret-menu-products-grid {
		grid-template-columns: 1fr;
	}
	.asiret-menu-category-title {
		font-size: 20px;
	}
}

/* Product Card */
.asiret-menu-product-card {
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
	border: 1px solid #f1f5f9;
	transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.asiret-menu-product-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 30px rgba(30, 29, 35, 0.08);
	border-color: #e2e8f0;
}

/* Image Wrap & Zoom Hover Effect */
.asiret-menu-product-image-wrap {
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background-color: #f8fafc;
	position: relative;
}

.asiret-menu-product-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
	display: block;
}

.asiret-menu-product-card:hover .asiret-menu-product-image-wrap img {
	transform: scale(1.08);
}

/* Product Details */
.asiret-menu-product-info {
	padding: 20px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.asiret-menu-product-title {
	font-size: 17px;
	font-weight: 700;
	color: #1e1d23;
	margin: 0 0 6px 0;
	padding: 0;
	line-height: 1.3;
	transition: color 0.2s ease;
}

.asiret-menu-product-card:hover .asiret-menu-product-title {
	color: #cfa670;
}

/* Product Description / Grammage styling */
.asiret-menu-product-desc {
	font-size: 13px;
	color: #64748b;
	margin: 0 0 14px 0;
	padding: 0;
	line-height: 1.4;
	font-weight: 400;
}

/* Price List Styling (Dashed rows) */
.asiret-menu-product-prices {
	border-top: 1px solid #f1f5f9;
	padding-top: 12px;
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.asiret-menu-price-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	line-height: 1.4;
}

.asiret-menu-portion-label {
	font-weight: 500;
	color: #64748b;
	white-space: nowrap;
}

.asiret-menu-price-separator {
	flex-grow: 1;
	height: 1px;
	border-bottom: 1px dotted #cbd5e1;
	margin: 0 12px;
	align-self: flex-end;
	margin-bottom: 4px;
}

.asiret-menu-price-value {
	font-weight: 700;
	color: #b45309;
	white-space: nowrap;
	font-size: 14px;
}

/* Empty State Notice */
.asiret-menu-empty {
	text-align: center;
	padding: 40px;
	color: #64748b;
	font-style: italic;
	border: 1px dashed #e2e8f0;
	border-radius: 12px;
}

/* Sticky Category Navigation Bar with Glassmorphism */
.asiret-menu-category-nav {
	position: sticky;
	top: 80px; /* Adjust top according to header height */
	z-index: 999;
	background: var(--asiret-nav-bg, rgba(18, 18, 20, 0.85));
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--asiret-border, #f1f5f9);
	padding: 12px 0;
	margin-bottom: 30px;
	transition: top 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Left & Right fading scroll indicators */
.asiret-menu-category-nav::before,
.asiret-menu-category-nav::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 40px;
	pointer-events: none;
	z-index: 1000;
	transition: opacity 0.3s ease;
	opacity: 0; /* Default hidden, shown on mobile or when scrolling */
}

.asiret-menu-category-nav::before {
	left: 0;
	background: linear-gradient(to right, var(--asiret-bg, #121214) 0%, rgba(18, 18, 20, 0) 100%);
}

.asiret-menu-category-nav::after {
	right: 0;
	background: linear-gradient(to left, var(--asiret-bg, #121214) 0%, rgba(18, 18, 20, 0) 100%);
}

/* Adjust top when header shrinks on scroll */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
	.site-header ~ #menu-section .asiret-menu-category-nav {
		top: 60px;
	}
}

/* Fallback top for scrolled header */
.site-header.scrolled ~ #menu-section .asiret-menu-category-nav {
	top: 60px;
}

/* On standard WordPress sites where there is an admin bar */
#wpadminbar ~ .asiret-menu-category-nav {
	top: calc(80px + 32px);
}
#wpadminbar ~ .site-header.scrolled ~ #menu-section .asiret-menu-category-nav {
	top: calc(60px + 32px);
}

.asiret-category-nav-scroll {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 6px 30px;
	scrollbar-width: none; /* Hide scrollbar for Firefox */
	-ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
	justify-content: center;
	scroll-behavior: smooth;
}

/* Hide scrollbar for Chrome/Safari */
.asiret-category-nav-scroll::-webkit-scrollbar {
	display: none;
}

@media (max-width: 768px) {
	.asiret-menu-category-nav {
		top: 70px; /* Header initial on mobile */
		padding: 10px 0;
	}
	.asiret-category-nav-scroll {
		justify-content: flex-start;
	}
	/* Show scroll shadows on mobile */
	.asiret-menu-category-nav::before,
	.asiret-menu-category-nav::after {
		opacity: 1;
	}
}

/* Premium Pill buttons with Glassmorphism */
.asiret-category-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--asiret-border, rgba(255, 255, 255, 0.08));
	border-radius: 30px;
	font-size: 13px;
	font-weight: 600;
	color: var(--asiret-text-muted, #9ca3af);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	white-space: nowrap;
	cursor: pointer;
}

/* In light theme, make inactive pills slightly darker for contrast */
html.light-theme .asiret-category-pill {
	background: rgba(0, 0, 0, 0.03);
	border-color: rgba(0, 0, 0, 0.06);
	color: var(--asiret-text-muted, #64748b);
}

.asiret-category-pill:hover {
	border-color: var(--asiret-primary, #cfa670);
	color: var(--asiret-primary, #cfa670);
	background: rgba(207, 166, 112, 0.08);
	transform: translateY(-2px);
}

.asiret-category-pill.active {
	background: var(--asiret-primary, #cfa670);
	border-color: var(--asiret-primary, #cfa670);
	color: #121214 !important; /* Force high contrast dark text on gold button */
	box-shadow: 0 4px 15px rgba(207, 166, 112, 0.4);
	transform: translateY(-2px) scale(1.03);
}
