/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
	padding: 1rem 0;
	background: var(--tfp-bg-alt);
	border-bottom: 1px solid var(--tfp-border);
}

.breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.5rem;
}

.breadcrumb-item {
	display: inline-flex;
	align-items: center;
	font-size: 0.875rem;
	color: var(--tfp-text-muted);
}

.breadcrumb-item:not(:last-child)::after {
	content: '›';
	margin: 0 0.5rem;
	color: var(--tfp-text-muted);
	opacity: 0.5;
}

.breadcrumb-item a {
	color: var(--tfp-primary);
	text-decoration: none;
	transition: color 0.2s;
}

.breadcrumb-item a:hover {
	color: var(--tfp-primary-dark);
	text-decoration: underline;
}

.breadcrumb-item:last-child {
	color: var(--tfp-text);
	font-weight: 500;
}

/* ============================================
   Sortable Tables
   ============================================ */
.sortable-table thead th {
	position: relative;
	user-select: none;
}

.sortable-table thead th[data-sort] {
	cursor: pointer;
	transition: background-color 0.2s;
}

.sortable-table thead th[data-sort]:hover {
	background-color: var(--tfp-bg-hover);
}

.sort-indicator {
	display: inline-block;
	margin-left: 0.25rem;
	font-size: 0.875rem;
	transition: opacity 0.2s;
}

/* ============================================
   Page Content Styling
   ============================================ */
.page-content {
	margin: var(--tfp-spacing-xl) 0;
}

.restaurant-intro {
	margin: var(--tfp-spacing-xl) 0;
	padding: var(--tfp-spacing-lg);
	background: var(--tfp-bg-alt);
	border-radius: var(--tfp-radius-md);
	border-left: 4px solid var(--tfp-primary);
	line-height: 1.8;
}

.restaurant-intro p {
	margin-bottom: var(--tfp-spacing-md);
	color: var(--tfp-text);
}

.restaurant-intro p:last-child {
	margin-bottom: 0;
}

.restaurant-tables-wrapper {
	margin: var(--tfp-spacing-xl) 0;
}

.restaurant-tables-wrapper table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--tfp-spacing-lg) 0;
	background: var(--tfp-bg);
	border-radius: var(--tfp-radius-md);
	overflow: hidden;
	box-shadow: var(--tfp-shadow-md);
}

.restaurant-tables-wrapper table thead {
	background: linear-gradient(135deg, var(--tfp-primary) 0%, var(--tfp-primary-dark) 100%);
	color: white;
}

.restaurant-tables-wrapper table thead th {
	padding: var(--tfp-spacing-md) var(--tfp-spacing-lg);
	text-align: left;
	font-weight: 600;
	font-size: 0.9375rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.restaurant-tables-wrapper table tbody tr {
	border-bottom: 1px solid var(--tfp-border);
	transition: background-color 0.2s;
}

.restaurant-tables-wrapper table tbody tr:hover {
	background: var(--tfp-bg-hover);
}

.restaurant-tables-wrapper table tbody tr:last-child {
	border-bottom: none;
}

.restaurant-tables-wrapper table tbody td {
	padding: var(--tfp-spacing-md) var(--tfp-spacing-lg);
	color: var(--tfp-text);
	font-size: 0.9375rem;
}

.restaurant-tables-wrapper table tbody td:last-child {
	font-weight: 600;
	color: var(--tfp-primary);
	font-size: 1.125rem;
}

.page-content .entry-header {
	margin-bottom: var(--tfp-spacing-xl);
}

.page-content .entry-title {
	font-size: 2.5rem;
	margin-bottom: var(--tfp-spacing-md);
}

.page-content .page-description {
	margin-top: var(--tfp-spacing-md);
	font-size: 1.125rem;
	color: var(--tfp-text-light);
	line-height: 1.7;
}

.page-content .price-update {
	margin-top: var(--tfp-spacing-sm);
	font-size: 0.9375rem;
	color: var(--tfp-text-muted);
}

/* ============================================
   Comparison Tables - Beautiful Styling
   ============================================ */
/* Apply to all tables in entry content for comparison pages */
.entry-content table,
.page-content table,
.entry-content table.csp-compare,
.comparison-table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--tfp-spacing-lg) 0;
	background: var(--tfp-bg);
	border-radius: var(--tfp-radius-md);
	overflow: hidden;
	box-shadow: var(--tfp-shadow-md);
}

.entry-content table thead,
.page-content table thead,
.entry-content table.csp-compare thead,
.comparison-table thead {
	background: linear-gradient(135deg, var(--tfp-primary) 0%, var(--tfp-primary-dark) 100%);
	color: #ffffff;
}

.entry-content table thead th,
.page-content table thead th,
.entry-content table.csp-compare thead th,
.comparison-table thead th {
	padding: 1rem 1.25rem;
	text-align: left;
	font-weight: 600;
	font-size: 0.9375rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.entry-content table.csp-compare thead th:nth-child(n+2),
.comparison-table thead th:nth-child(n+2) {
	text-align: right;
}

.entry-content table tbody,
.page-content table tbody,
.entry-content table.csp-compare tbody,
.comparison-table tbody {
	background: var(--tfp-bg);
}

.entry-content table tbody tr,
.page-content table tbody tr,
.entry-content table.csp-compare tbody tr,
.comparison-table tbody tr {
	border-bottom: 1px solid var(--tfp-border-light);
	transition: var(--tfp-transition);
}

.entry-content table.csp-compare tbody tr:last-child,
.comparison-table tbody tr:last-child {
	border-bottom: none;
}

.entry-content table.csp-compare tbody tr:nth-child(even),
.comparison-table tbody tr:nth-child(even) {
	background: var(--tfp-bg-alt);
}

.entry-content table.csp-compare tbody tr:hover,
.comparison-table tbody tr:hover {
	background: var(--tfp-bg-hover);
	transform: scale(1.01);
	box-shadow: var(--tfp-shadow-sm);
}

.entry-content table tbody td,
.page-content table tbody td,
.entry-content table.csp-compare tbody td,
.comparison-table tbody td {
	padding: 1rem 1.25rem;
	font-size: 0.9375rem;
	color: var(--tfp-text);
}

.entry-content table.csp-compare tbody td:first-child,
.comparison-table tbody td:first-child {
	font-weight: 600;
	color: var(--tfp-text);
}

.entry-content table.csp-compare tbody td:nth-child(n+2),
.comparison-table tbody td:nth-child(n+2) {
	text-align: right;
	font-weight: 600;
	font-size: 1rem;
	color: var(--tfp-primary);
}

/* Highlight cheaper price */
.entry-content table.csp-compare tbody td.is-better,
.comparison-table tbody td.is-better {
	background: rgba(22, 163, 74, 0.1) !important;
	color: var(--tfp-primary-dark);
	position: relative;
}

.entry-content table.csp-compare tbody td.is-better::after,
.comparison-table tbody td.is-better::after {
	content: '✓';
	position: absolute;
	right: 0.5rem;
	color: var(--tfp-primary);
	font-weight: 700;
}

.entry-content table.csp-compare tbody td.is-na,
.comparison-table tbody td.is-na {
	color: var(--tfp-text-muted);
	font-style: italic;
}

/* Auto-detect and highlight cheaper prices in comparison tables */
.entry-content table.csp-compare tbody tr td:nth-child(2),
.entry-content table.csp-compare tbody tr td:nth-child(3) {
	position: relative;
}

/* Add visual indicator for price differences */
.entry-content table.csp-compare tbody tr:hover td:nth-child(2),
.entry-content table.csp-compare tbody tr:hover td:nth-child(3) {
	background: rgba(22, 163, 74, 0.05);
}

/* Responsive tables */
@media (max-width: 767px) {
	.comparison-table-wrapper {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	.entry-content table.csp-compare,
	.comparison-table {
		min-width: 500px;
	}
	
	.entry-content table.csp-compare th,
	.entry-content table.csp-compare td,
	.comparison-table th,
	.comparison-table td {
		padding: 0.75rem 0.875rem;
		font-size: 0.875rem;
	}
}

/* ============================================
   Comparison Selector
   ============================================ */
.compare-selector {
	display: flex;
	align-items: flex-end;
	gap: var(--tfp-spacing-md);
	flex-wrap: wrap;
	margin: var(--tfp-spacing-xl) 0;
	padding: var(--tfp-spacing-lg);
	background: var(--tfp-bg-alt);
	border-radius: var(--tfp-radius-md);
	box-shadow: var(--tfp-shadow);
}

.compare-selector__item {
	flex: 1;
	min-width: 200px;
}

.compare-selector__item label {
	display: block;
	margin-bottom: var(--tfp-spacing-xs);
	font-weight: 600;
	color: var(--tfp-text);
	font-size: 0.875rem;
}

.restaurant-select {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--tfp-border);
	border-radius: var(--tfp-radius);
	background: var(--tfp-bg);
	color: var(--tfp-text);
	font-size: 1rem;
	transition: var(--tfp-transition);
}

.restaurant-select:focus {
	outline: none;
	border-color: var(--tfp-primary);
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.compare-selector__vs {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--tfp-primary);
	align-self: center;
	padding: 0 var(--tfp-spacing-sm);
}

#compareBtn {
	margin-top: var(--tfp-spacing-md);
}

#compareBtn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ============================================
   Comparison Results
   ============================================ */
.comparison-results {
	margin-top: var(--tfp-spacing-2xl);
}

.comparison-table-wrapper {
	margin-bottom: var(--tfp-spacing-xl);
}

.comparison-chart {
	margin-top: var(--tfp-spacing-xl);
	padding: var(--tfp-spacing-lg);
	background: var(--tfp-bg-alt);
	border-radius: var(--tfp-radius-md);
}

.comparison-chart h3 {
	margin-bottom: var(--tfp-spacing-md);
}

.chart-container {
	position: relative;
	height: 400px;
	margin: var(--tfp-spacing-md) 0;
}

/* ============================================
   Price Index Pages
   ============================================ */
.index-tabs {
	display: flex;
	gap: var(--tfp-spacing-sm);
	margin: var(--tfp-spacing-xl) 0;
	flex-wrap: wrap;
	border-bottom: 2px solid var(--tfp-border);
}

.index-tab {
	padding: 0.875rem 1.5rem;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	color: var(--tfp-text-muted);
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: var(--tfp-transition);
	margin-bottom: -2px;
}

.index-tab:hover {
	color: var(--tfp-primary);
	background: var(--tfp-bg-alt);
}

.index-tab.active {
	color: var(--tfp-primary);
	border-bottom-color: var(--tfp-primary);
}

.index-content {
	margin-top: var(--tfp-spacing-xl);
}

.index-panel {
	display: none;
}

.index-panel.active {
	display: block;
}

/* Chart container for ECharts */
.index-panel .chart-container {
	position: relative;
	height: 400px;
	width: 100%;
	margin: 20px 0;
	background: #fff;
	border: 1px solid #e6ecf2;
	border-radius: 8px;
	padding: 10px;
}

.index-panel .chart-container > div {
	width: 100% !important;
	height: 100% !important;
}

.index-panel h2 {
	margin-bottom: var(--tfp-spacing-lg);
	font-size: 1.75rem;
}

.index-table-wrapper {
	margin-top: var(--tfp-spacing-xl);
	overflow-x: auto;
}

.index-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--tfp-bg);
	border-radius: var(--tfp-radius-md);
	overflow: hidden;
	box-shadow: var(--tfp-shadow-md);
}

.index-table thead {
	background: linear-gradient(135deg, var(--tfp-primary) 0%, var(--tfp-primary-dark) 100%);
	color: #ffffff;
}

.index-table thead th {
	padding: 1rem 1.25rem;
	text-align: left;
	font-weight: 600;
	font-size: 0.9375rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.index-table tbody tr {
	border-bottom: 1px solid var(--tfp-border-light);
	transition: var(--tfp-transition);
}

.index-table tbody tr:hover {
	background: var(--tfp-bg-hover);
}

.index-table tbody td {
	padding: 1rem 1.25rem;
	font-size: 0.9375rem;
	color: var(--tfp-text);
}

.index-table tbody td:first-child {
	font-weight: 700;
	color: var(--tfp-primary);
	font-size: 1.125rem;
}

.index-table tbody td:nth-child(3) {
	font-weight: 600;
	color: var(--tfp-primary);
	font-size: 1.125rem;
}

/* ============================================
   Price Trend Section
   ============================================ */
.price-trend-section {
	margin: var(--tfp-spacing-2xl) 0;
	padding: var(--tfp-spacing-lg);
	background: var(--tfp-bg-alt);
	border-radius: var(--tfp-radius-md);
}

.price-trend-section h2 {
	margin-bottom: var(--tfp-spacing-md);
}

/* ============================================
   FAQ Section
   ============================================ */
.csp-faq {
	margin: var(--tfp-spacing-xl) 0;
	padding: var(--tfp-spacing-lg);
	background: var(--tfp-bg-alt);
	border-radius: var(--tfp-radius-md);
}

.csp-faq h3 {
	font-size: 1.125rem;
	margin: var(--tfp-spacing-md) 0 var(--tfp-spacing-xs);
	color: var(--tfp-text);
}

.csp-faq p {
	margin-bottom: var(--tfp-spacing-md);
	color: var(--tfp-text-muted);
}

/* ============================================
   Summary Block
   ============================================ */
.csp-summary {
	margin: var(--tfp-spacing-lg) 0;
	padding: var(--tfp-spacing-md);
	background: var(--tfp-bg-alt);
	border: 1px solid var(--tfp-border);
	border-radius: var(--tfp-radius-md);
}

.csp-summary ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.csp-summary li {
	padding: var(--tfp-spacing-xs) 0;
	color: var(--tfp-text);
}

/* ============================================
   Related Restaurants
   ============================================ */
.related-restaurants {
	margin-top: var(--tfp-spacing-2xl);
	padding-top: var(--tfp-spacing-xl);
	border-top: 1px solid var(--tfp-border);
}

.related-restaurants h3 {
	margin-bottom: var(--tfp-spacing-lg);
	font-size: 1.5rem;
}

/* ============================================
   Country Pages
   ============================================ */
.countries-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: var(--tfp-spacing-md);
	margin: var(--tfp-spacing-xl) 0;
}

.country-card {
	padding: var(--tfp-spacing-md);
	background: var(--tfp-bg);
	border: 1px solid var(--tfp-border);
	border-radius: var(--tfp-radius-md);
	transition: var(--tfp-transition);
	text-decoration: none;
	color: inherit;
	display: block;
	text-align: center;
}

.country-card:hover {
	box-shadow: var(--tfp-shadow-lg);
	transform: translateY(-2px);
	border-color: var(--tfp-primary);
}

.country-card h3 {
	margin: 0 0 var(--tfp-spacing-xs);
	font-size: 1.25rem;
	color: var(--tfp-text);
}

.country-card p {
	margin: 0;
	font-size: 0.875rem;
	color: var(--tfp-text-muted);
}

.country-restaurants {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: var(--tfp-spacing-md);
	margin: var(--tfp-spacing-xl) 0;
}

/* ============================================
   Restaurant Page Styling
   ============================================ */
.restaurant-page-header {
	margin: var(--tfp-spacing-xl) 0;
}

.restaurant-info-card {
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	border-radius: var(--tfp-radius-lg);
	padding: var(--tfp-spacing-lg);
	border-left: 4px solid var(--tfp-primary);
	box-shadow: var(--tfp-shadow);
}

.restaurant-meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tfp-spacing-md);
	align-items: center;
}

.restaurant-country,
.restaurant-updated {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: var(--tfp-bg);
	border-radius: var(--tfp-radius);
	font-size: 0.9375rem;
	color: var(--tfp-text);
}

.restaurant-country svg {
	color: var(--tfp-primary);
}

/* Menu Categories Tabs */
.menu-categories-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: var(--tfp-spacing-xl) 0 var(--tfp-spacing-lg);
	padding-bottom: var(--tfp-spacing-md);
	border-bottom: 2px solid var(--tfp-border);
}

.menu-category-tab {
	padding: 0.75rem 1.5rem;
	background: var(--tfp-bg-alt);
	border: 2px solid transparent;
	border-radius: var(--tfp-radius);
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--tfp-text);
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.menu-category-tab:hover {
	background: var(--tfp-bg-hover);
	border-color: var(--tfp-primary-light);
}

.menu-category-tab.active {
	background: var(--tfp-primary);
	color: white;
	border-color: var(--tfp-primary);
}

.menu-category-tab .item-count {
	font-size: 0.875rem;
	opacity: 0.8;
}

.menu-category-panel {
	display: none;
	animation: fadeIn 0.3s ease-in;
}

.menu-category-panel.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.category-title {
	font-size: 1.75rem;
	margin-bottom: var(--tfp-spacing-lg);
	color: var(--tfp-text);
	border-bottom: 2px solid var(--tfp-primary);
	padding-bottom: var(--tfp-spacing-sm);
}

.menu-items-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--tfp-spacing-lg);
	margin-bottom: var(--tfp-spacing-xl);
}

.menu-item-card {
	background: var(--tfp-bg);
	border: 1px solid var(--tfp-border);
	border-radius: var(--tfp-radius-md);
	padding: var(--tfp-spacing-lg);
	transition: all 0.3s;
	box-shadow: var(--tfp-shadow);
	position: relative;
	overflow: hidden;
}

.menu-item-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	background: var(--tfp-primary);
	transform: scaleY(0);
	transition: transform 0.3s;
}

.menu-item-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--tfp-shadow-lg);
	border-color: var(--tfp-primary);
}

.menu-item-card:hover::before {
	transform: scaleY(1);
}

.menu-item-header {
	margin-bottom: var(--tfp-spacing-md);
}

.menu-item-name {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--tfp-text);
	margin: 0;
	line-height: 1.4;
}

.menu-item-price {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: var(--tfp-spacing-md);
}

.price-main {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--tfp-primary);
}

.price-usd {
	font-size: 0.875rem;
	color: var(--tfp-text-muted);
}

.menu-item-actions {
	margin-top: var(--tfp-spacing-md);
}

.btn-track-click {
	padding: 0.5rem 1rem;
	background: var(--tfp-primary);
	color: white;
	border: none;
	border-radius: var(--tfp-radius);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	width: 100%;
}

.btn-track-click:hover {
	background: var(--tfp-primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.price-trend-chart-section {
	margin: var(--tfp-spacing-xl) 0;
	padding: var(--tfp-spacing-lg);
	background: var(--tfp-bg-alt);
	border-radius: var(--tfp-radius-lg);
	box-shadow: var(--tfp-shadow);
}

.price-trend-chart-section h3 {
	margin-top: 0;
	margin-bottom: var(--tfp-spacing-lg);
	color: var(--tfp-text);
}

.chart-container {
	position: relative;
	height: 400px;
	background: var(--tfp-bg);
	border-radius: var(--tfp-radius);
	padding: var(--tfp-spacing-md);
}

/* Responsive menu items */
@media (max-width: 768px) {
	.menu-items-grid {
		grid-template-columns: 1fr;
	}
	
	.menu-categories-tabs {
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
	}
	
	.menu-category-tab {
		white-space: nowrap;
		flex-shrink: 0;
	}
}

.country-restaurant-card {
	padding: var(--tfp-spacing-md);
	background: var(--tfp-bg);
	border: 1px solid var(--tfp-border);
	border-radius: var(--tfp-radius-md);
	transition: var(--tfp-transition);
	text-decoration: none;
	color: inherit;
	display: block;
}

.country-restaurant-card:hover {
	box-shadow: var(--tfp-shadow-lg);
	transform: translateY(-2px);
	border-color: var(--tfp-primary);
}

.country-restaurant-card h3 {
	margin: 0 0 var(--tfp-spacing-xs);
	font-size: 1.125rem;
}

.country-restaurant-card p {
	margin: 0;
	font-size: 0.875rem;
	color: var(--tfp-text-muted);
}

/* ============================================
   Interactive Map
   ============================================ */
.price-map-container {
	margin: var(--tfp-spacing-xl) 0;
	padding: var(--tfp-spacing-lg);
	background: var(--tfp-bg-alt);
	border-radius: var(--tfp-radius-md);
}

.price-map-container h2 {
	margin-bottom: var(--tfp-spacing-md);
}

#priceMap {
	width: 100%;
	height: 500px;
	border-radius: var(--tfp-radius);
}

/* ============================================
   Top Lists
   ============================================ */
.top-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--tfp-spacing-md);
	margin: var(--tfp-spacing-xl) 0;
}

.top-list-item {
	padding: var(--tfp-spacing-md);
	background: var(--tfp-bg);
	border: 1px solid var(--tfp-border);
	border-radius: var(--tfp-radius-md);
	display: flex;
	align-items: center;
	gap: var(--tfp-spacing-md);
}

.top-list-rank {
	font-size: 2rem;
	font-weight: 700;
	color: var(--tfp-primary);
	min-width: 60px;
	text-align: center;
}

.top-list-content {
	flex: 1;
}

.top-list-content h3 {
	margin: 0 0 var(--tfp-spacing-xs);
	font-size: 1.125rem;
}

.top-list-content p {
	margin: 0;
	font-size: 0.875rem;
	color: var(--tfp-text-muted);
}

