/* Global Box Sizing */
* {
	box-sizing: border-box;
}

/* Dimension label overlay for room sides */
.dimension-label {
	position: absolute;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #333;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 11px;
	font-weight: normal;
	color: #333;
	pointer-events: none;
	z-index: 10;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	font-family: Verdana, sans-serif;
}

.room-row-flex.room-name-row {
	margin-bottom: 10px;
}

.room-name-label {
	margin-right: 8px;
	font-size: 12px;
	font-weight: normal;
	/* Fixed width for alignment */
	display: inline-block;
	width: 70px;
}

/* Room Name input and Save button row */
.room-name-input {
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 12px;
	flex: 1;
	min-width: 0;
	background: #fff;
	color: #333;
	font-family: Verdana, sans-serif;
	transition: border 0.2s;
}

.room-name-input:focus {
	border-color: #555;
	outline: none;
}

.save-btn {
	background: #fff;
	border: 1px solid #bbb;
	border-radius: 4px;
	height: 30px;
	width: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s, border 0.2s;
	padding: 0;
	margin-left: 8px;
}

.save-btn:hover {
	background: #f0f0f0;
	border-color: #999;
}

.save-btn .material-icons {
	font-size: 18px;
	color: #333;
}

/* Header Controls Grid */
.header-controls {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px 15px;
	margin: 0 10px;
}

/* Dynamic resize for small panel widths */
@container leftpanel (max-width: 280px) {
	.header-controls {
		gap: 4px 4px;
	}
}

/* Retain dirty indicator style */
.dirty-indicator {
	color: #d9534f;
	font-size: 16px;
	line-height: 1;
}

.control-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	padding: 4px;
	width: 28px;
	height: 28px;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 4px;
	font-size: 12px;
	cursor: pointer;
	font-family: Verdana, sans-serif;
	color: #333;
	transition: all 0.2s;
}

.control-btn:hover {
	background: #e9e9e9;
	border-color: #999;
}

.control-btn .material-icons {
	font-size: 16px;
}

/* Room/Area panel row flex layout */
.room-row-flex {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
}

.wall-height-input,
.wall-width-input {
	text-align: center;
	width: 50px;
	margin-left: 6px;
	padding: 4px;
	font-size: 12px;
	border: 1px solid #ccc;
	background: #fff;
	color: #333;
	border-radius: 3px;
	font-family: Verdana, sans-serif;
}


/* Horizontal layout for Furniture Group and Items panels */
#parentIconsContainer,
#childIconsContainer {
	display: flex;
	flex-direction: row;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: flex-start;
}

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
	background-color: #ffffff;
	font-family: Verdana, sans-serif;
	font-size: 12px;
	color: #333333;
}

/* Force light theme override */
@media (prefers-color-scheme: dark) {

	html,
	body {
		background-color: #ffffff;
		color: #333333;
	}
}

/* Main container with flexbox layout */
.main-container {
	display: flex;
	height: 100%;
	width: 100%;
	overflow: hidden;
	background-color: #ffffff;
}

/* Left Panel */
.left-panel {
	/* Default width sized to hold four 70px menu buttons + gaps and padding */
	width: 360px;
	min-width: 200px;
	max-width: 600px;
	flex: 0 0 auto;
	background: #ffffff;
	border-right: 1px solid #e0e0e0;
	display: flex;
	flex-direction: column;
	box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
	transition: margin-left 0.3s ease;
	z-index: 100;
	overflow: hidden;
	position: relative;
	container-type: inline-size;
	container-name: leftpanel;
}

/* Ensure Split Wrapper fills remaining vertical space */
.panel-split-wrapper {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
}

.panels-scroll-container {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	min-height: 0;
	padding-bottom: 20px;
}

.left-panel.hidden {
	display: none;
	width: 0;
	min-width: 0;
	visibility: hidden;
	box-shadow: none;
}

.left-panel.hidden .panel-resize-handle {
	display: none;
}

.panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 10px;
	border-bottom: 1px solid #f0f0f0;
	background: #ffffff;
	flex-shrink: 0;
}

.header-branding {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 60px;
}

/* Logo in panel header */
.panel-logo {
	height: 48px;
	width: auto;
	display: block;
	margin-bottom: 2px;
	transition: height 0.2s ease;
}

@container leftpanel (max-width: 250px) {
	.panel-logo {
		height: 32px;
	}
}

.toggle-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: #333;
	transition: color 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.toggle-btn:hover {
	color: #000;
	background: #f5f5f5;
	border-radius: 50%;
}

.toggle-btn .material-icons {
	font-size: 20px;
}

.menu-container {
	flex: 1;
	padding: 8px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 0;
}

/* Parent menu (slightly larger) */
.menu-parent {
	width: 68px;
	height: 68px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	padding: 6px;
	transition: all 0.18s;
	color: #333;
}


.menu-parent.active {
	background: #f0f0f0;
	border-color: #333;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.mode-btn {
	background: #444;
	/* Darker distinct background */
	color: #fff;
	width: auto;
	/* Allow auto width for text labels if needed, or keep square */
	padding: 0 10px;
	font-size: 14px;
	border-radius: 4px;
	/* Distinct shape */
}

.mode-btn.active {
	background: #007bff;
	/* Primary color */
	color: white;
}

.mode-separator {
	width: 2px;
	height: 40px;
	background-color: #888;
	margin: 0 10px;
	align-self: center;
}

.menu-parent .material-icons {
	font-size: 24px;
	margin-bottom: 4px;
	color: #333;
}

/* Submenu container shown below parent button */
.submenu-container {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 6px 4px 12px 4px;
}

/* Parent grid (responsive: adjusts columns based on available width) */
.parent-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
	gap: 8px;
	align-items: start;
	/* Distinguish parent grid visually */
	background: #2f2d2d;
	/* linear-gradient(180deg, #2f2d2d, #191818); */
	border: 1px solid #ddd;
	padding: 10px;
	border-radius: 10px;
	box-shadow: inset 0 1px 0 rgba(81, 78, 78, 0.6);
}

/* Submenu panel placed below the parent grid */
.submenu-panel {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 6px 4px 12px 4px;
	background: transparent;
}

.submenu-item {
	width: 56px;
	height: 56px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 6px;
	cursor: pointer;
	padding: 4px;
	transition: transform 0.12s, box-shadow 0.12s;
	color: #333;
}

.submenu-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	border-color: #ccc;
}

.submenu-item .material-icons {
	font-size: 20px;
	margin-bottom: 2px;
	color: #333;
}

.menu-item {
	width: 68px;
	height: 68px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	border: 1px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	padding: 6px;
	transition: all 0.2s;
	position: relative;
	color: #333;
}

.menu-item:hover {
	background: #fafafa;
	border-color: #aaa;
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.menu-item:active {
	background: #f0f0f0;
	transform: translateY(0);
}

.menu-item .material-icons {
	font-size: 28px;
	color: #333;
	margin-bottom: 4px;
}

.menu-item-label {
	font-size: 12px;
	color: #333;
	text-align: center;
	line-height: 1.2;
	font-family: Verdana, sans-serif;
}

.panel-resize-handle {
	position: absolute;
	right: -5px;
	top: 0;
	width: 10px;
	height: 100%;
	cursor: col-resize;
	background: transparent;
	transition: background 0.2s;
}

.panel-resize-handle:hover {
	background: rgba(0, 0, 0, 0.05);
}

/* Main content area */
.main-content {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	position: relative;
	background: #ffffff;
	/* White background */
	overflow: hidden;
	color: #333;
}

/* Scroll Wrapper */
#canvas-scroll-container {
	width: 100%;
	flex: 1;
	/* Take remaining space */
	min-height: 0;
	/* Important for flex items */
	overflow: auto;
	position: relative;
	background: #ffffff;
}

/* Hamburger button */
.hamburger-btn {
	position: absolute;
	top: 5px;
	/* Center in 40px header */
	left: 12px;
	z-index: 105;
	background: #ffffff;
	border: 1px solid #ddd;
	padding: 4px;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.hamburger-btn:hover {
	background: #f9f9f9;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.hamburger-btn .material-icons {
	font-size: 20px;
	color: #333;
	/* Dark icon */
}

.hamburger-btn.hidden {
	display: none;
}

/* The 3D app container */
#app {
	width: 2500px;
	height: 2000px;
	background: #ffffff;
	overflow: hidden;
}



/* Collapsible Panel */
/* Label below logo */
.logo-subtitle {
	font-size: 12px;
	color: #444;
	margin-top: 0;
	margin-bottom: 0;
	text-align: center;
	font-family: Verdana, sans-serif;
	font-weight: bold;
	line-height: 1.1;
}

/* Main Tabs Layout */
.main-tabs-header {
	display: flex;
	border-bottom: 1px solid #ddd;
	background: #f9f9f9;
}

.main-tab-btn {
	flex: 1;
	padding: 8px 4px;
	background: #eee;
	border: none;
	border-bottom: 2px solid transparent;
	color: #666;
	cursor: pointer;
	text-align: center;
	transition: all 0.2s;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.main-tab-btn .material-icons {
	font-size: 20px;
}

.main-tab-btn .tab-label {
	font-size: 12px;
	line-height: 1;
}

.main-tab-btn:hover {
	color: #333;
	background: #e0e0e0;
}

.main-tab-btn.active {
	color: #000080;
	font-weight: bold;
	border-bottom: 2px solid #000080;
}

/* Furniture Tab Adjustments */
.furniture-section-title {
	display: none;
}

#parentIconsContainer {
	background: #eee;
	border-radius: 4px;
	margin-bottom: 10px;
}

#parentIconsContainer,
#childIconsContainer {
	display: grid;
	grid-template-columns: repeat(auto-fill, 45px);
	justify-content: start;
	gap: 6px;
	padding: 10px;
}

.menu-parent,
.submenu-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 2px;
	cursor: pointer;
	transition: all 0.2s;
	aspect-ratio: 1;
	width: 100%;
	height: auto;
}

.menu-parent:hover,
.submenu-item:hover {
	background: #f0f0f0;
	border-color: #aaa;
}



.menu-parent.active,
.submenu-item.active {
	border-color: #000080;
	background: #e8eaf6;
	color: #000080;
}

.menu-item-label {
	font-size: 12px;
	text-align: center;
	line-height: 1.1;
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	width: 100%;
}

.main-tabs-content-container {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	min-height: 0;
	padding: 0;
	background: #fff;
	position: relative;
}

.main-tab-content {
	display: none;
	padding: 10px;
}

#panel-customer,
#panel-room {
	padding: 5px !important;
}

.main-tab-content.active {
	display: block;
}

/* Furniture Section Styling */
.furniture-section {
	margin-bottom: 15px;
}

.furniture-section-title {
	font-size: 12px;
	font-weight: bold;
	color: #555;
	margin-bottom: 8px;
	padding-bottom: 4px;
	border-bottom: 1px solid #eee;
	text-transform: uppercase;
}

/* Panel Split 70/30 Layout */
.panel-split-wrapper {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.top-panel-container {
	flex: 8 8 0%;
	/* 80% */
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
}

.bottom-panel-container {
	flex: 2 2 0%;
	/* 20% */
	display: flex;
	flex-direction: column;
	border-top: 2px solid #ddd;
	min-height: 0;
	background: #fff;
}

.panel-split-wrapper .top-panel-container,
.panel-split-wrapper .bottom-panel-container {
	transition: flex 0.3s ease;
}

.panel-split-wrapper.price-expanded .top-panel-container {
	display: none !important;
}

.panel-split-wrapper.price-expanded .bottom-panel-container {
	flex: 1 !important;
}

.bottom-panel-header {
	padding: 4px 10px;
	background: #f0f0f0;
	/* font-weight: bold; Removed to prevent inheritance */
	font-size: 12px;
	border-bottom: 1px solid #ddd;
	color: #333;
	display: flex;
	justify-content: center;
	/* Center main content (Title) */
	align-items: center;
	position: relative;
	/* For absolute positioning of switch/button */
	min-height: 30px;
	/* Ensure consistent height */
	box-sizing: border-box;
}

#lblPricePanelTitle {
	flex: 1;
	text-align: center;
	/* Ensure it takes full available width to center text properly */
}

/* Absolute positioning for controls */
.bottom-panel-header .switch {
	position: absolute;
	left: 10px;
	margin-right: 0 !important;
}

.bottom-panel-header .toggle-btn {
	position: absolute;
	right: 4px;
	/* Move slightly closer to edge */
	top: 50%;
	transform: translateY(-50%);
}

.price-col-price {
	font-weight: normal !important;
	/* Force Remove bold */
	text-align: right;
	padding-right: 10px;
}

.bottom-panel-content {
	flex: 1;
	overflow-y: auto;
}

/* App Title Bar in Main Content */
.app-title-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #fff;
	padding: 8px 16px;
	border-bottom: 1px solid #e0e0e0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	z-index: 101;
	/* Above canvas but below left panel if overlapping */
	height: 40px;
	/* Fixed height */
	box-sizing: border-box;
}

.app-title-info {
	font-weight: bold;
	font-size: 14px;
	color: #333;
	display: flex;
	align-items: center;
	gap: 5px;
	margin-left: 40px;
	/* Space for hamburger button */
}

.close-project-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: #666;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	border-radius: 50%;
	transition: background 0.2s, color 0.2s;
}

.close-project-btn:hover {
	background: #ffebee;
	color: #d32f2f;
}

.close-project-btn .material-icons {
	font-size: 20px;
}


/* Floating View Controls */
.view-controls {
	position: absolute;
	bottom: 20px;
	left: 20px;
	display: flex;
	gap: 10px;
	z-index: 100;
	pointer-events: auto;
}

.view-btn {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid #ddd;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	transition: all 0.2s;
	color: #333;
}

.view-btn:hover {
	background: #f5f5f5;
	color: #000;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.view-btn.active {
	background: #4a90e2;
	color: #ffffff;
	border-color: #357abd;
	box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.view-btn.active .material-icons {
	color: #ffffff;
}


.view-btn .material-icons {
	font-size: 24px;
}

.view-separator {
	width: 2px;
	height: 40px;
	background-color: #ccc;
	margin: 0 8px;
	align-self: center;
}

/* Context Menu */
.context-menu {
	display: none;
	position: absolute;
	background: white;
	border: 1px solid #ccc;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	z-index: 9999;
	/* Boost z-index */
	/* Boost z-index */
	min-width: 200px;
	border-radius: 4px;
	padding: 5px 0;
}

.ctx-item {
	padding: 8px 15px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 10px;
}

.ctx-item:hover {
	background-color: #f0f0f0;
	color: #000;
}

/* Custom Icon for Buttons */
.custom-icon {
	width: 24px;
	height: 24px;
	object-fit: contain;
	display: block;
}

/* Tabs Styles */
.tabs-container {
	margin-top: 10px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
}

.tabs-header {
	display: flex;
	background-color: #f5f5f5;
	border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
	flex: 1;
	padding: 8px 10px;
	border: none;
	background: none;
	cursor: pointer;
	font-size: 12px;
	font-weight: normal;
	color: #666;
	transition: all 0.2s;
	font-family: Verdana, sans-serif;
	outline: none;
}

.tab-btn:hover {
	background-color: #ececec;
	color: #333;
}

.tab-btn.active {
	background-color: #ffffff;
	color: #333;
	font-weight: bold;
	border-bottom: 2px solid #4a90e2;
	/* Blue underline identifier */
}

.tabs-content {
	background-color: #ffffff;
	padding: 10px;
	min-height: 50px;
}

.tab-pane {
	display: none;
}

.tab-pane.active {
	display: block;
	animation: fadeIn 0.2s;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/* Custom Cursor for Orbit/Front View */
.cursor-orbit {
	cursor: url("images/orbitcur_32.png") 16 16, default;
}

/* --- Floating Furniture Toolbar (Formerly Modal) --- */
#furniturePopup {
	display: none;
	position: fixed;
	z-index: 2000;
	left: 20px;
	/* Default position */
	top: 80px;
	width: auto;
	height: auto;
	pointer-events: none;
	/* Allow clicking through the container if it covers screen, though here we remove the cover */
}

/* reused class name for compatibility with JS, but restyled */
.modal-content {
	background-color: #fefefe;
	margin: 0;
	/* No margin auto */
	padding: 15px;
	border: 1px solid #ccc;
	width: 400px;
	/* Slightly smaller */
	max-width: 90vw;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: auto;
	/* Re-enable clicks on the box */
}

/* Header handle for dragging */
#popupCategoryTitle {
	margin: 0;
	padding: 8px;
	border-bottom: 1px solid #eee;
	text-align: center;
	color: #333;
	cursor: move;
	/* Indicate draggable */
	background: #f1f1f1;
	border-radius: 4px 4px 0 0;
	user-select: none;
}

.close-modal {
	color: #aaa;
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
	color: #000;
	text-decoration: none;
	cursor: pointer;
}

#popupCategoryTitle {
	margin: 0;
	padding-bottom: 5px;
	border-bottom: 1px solid #eee;
	text-align: center;
	color: #333;
}

/* Preview Area */
.popup-preview-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	height: 250px;
}

.popup-preview-image-wrapper {
	flex: 1;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #eee;
	padding: 10px;
	position: relative;
}

#popupPreviewImg {
	max-width: 100%;
	max-height: 200px;
	object-fit: contain;
	margin-bottom: 10px;
}

.popup-item-name {
	font-weight: bold;
	color: #555;
}

.nav-btn {
	background: #eee;
	border: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	cursor: pointer;
	font-weight: bold;
	color: #555;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nav-btn:hover {
	background: #ddd;
	color: #000;
}

/* Controls */
.popup-controls {
	text-align: center;
}

.btn-primary {
	background-color: #4CAF50;
	/* Green */
	border: none;
	color: white;
	padding: 10px 24px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 14px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
}

.btn-primary:hover {
	background-color: #45a049;
}

/* Thumbnails */
.popup-slider-container {
	overflow-x: auto;
	padding: 5px 0;
	border-top: 1px solid #eee;
}

.popup-thumbnails {
	display: flex;
	gap: 10px;
	padding: 5px;
}

.popup-thumbnail {
	width: 60px;
	height: 60px;
	border: 2px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.7;
	transition: api 0.2s;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.popup-thumbnail img {
	max-width: 100%;
	max-height: 100%;
}

.popup-thumbnail:hover {
	opacity: 1;
	border-color: #ccc;
}

.popup-thumbnail.active {
	opacity: 1;
	border-color: #4CAF50;
	box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* Bottom Toolbar Separator */
/* Bottom Toolbar Separator Removed (Duplicate) */

/* Price Panel Grid Styles */
.price-grid-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

.price-grid-header {
	background-color: #f9f9f9;
	border-bottom: 1px solid #ddd;
	font-weight: bold;
	color: #555;
	text-align: left;
}

.price-grid-header th {
	padding: 6px 4px;
	position: sticky;
	top: 0;
	background: #f9f9f9;
	/* Ensure sticky header hides content */
	z-index: 1;
}

.price-grid-row {
	border-bottom: 1px solid #eee;
}

.price-grid-row:last-child {
	border-bottom: none;
}

.price-grid-row td {
	padding: 6px 4px;
	vertical-align: middle;
}

/* Columns */
.price-col-check {
	width: 24px;
	text-align: center;
}

.price-col-code {
	width: 80px;
	color: #000080;
}

.price-col-name {
	width: auto;
	text-align: left;
}

.price-col-price {
	width: 60px;
	text-align: right;
	font-weight: bold;
}

/* Total Display */
.price-total-bold {
	font-weight: bold;
	margin-left: 10px;
	color: #000;
}

.price-checkbox {
	cursor: pointer;
}

/* --- Toggle Switch Styles --- */
.switch {
	display: inline-block;
	height: 20px;
	position: relative;
	width: 34px;
}

.switch input {
	display: none;
}

.slider {
	background-color: #ccc;
	bottom: 0;
	cursor: pointer;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
	transition: .4s;
}

.slider:before {
	background-color: #fff;
	bottom: 3px;
	content: '';
	height: 14px;
	left: 3px;
	position: absolute;
	transition: .4s;
	width: 14px;
}

input:checked+.slider {
	background-color: #2196F3;
}

input:checked+.slider:before {
	transform: translateX(14px);
}

.slider.round {
	border-radius: 20px;
}

.slider.round:before {
	border-radius: 50%;
}

/* --- Price Panel Off State --- */
.price-panel-off .bottom-panel-content {
	display: none !important;
}

.price-panel-off .bottom-panel-header {
	border-bottom: none;
}

.price-panel-off #lblPricePanelTitle {
	display: none;
}

.price-panel-off #btnTogglePrice {
	opacity: 0.3;
	pointer-events: none;
}

/* Context Menu */
.context-menu {
	display: none;
	position: absolute;
	z-index: 1000;
	background: #fff;
	border: 1px solid #ccc;
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	padding: 5px 0;
	min-width: 150px;
	font-family: Verdana, sans-serif;
	font-size: 13px;
}

.context-menu-item {
	padding: 8px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	color: #333;
	transition: background 0.1s;
}

.context-menu-item:hover {
	background-color: #f0f0f0;
}

.context-menu-item .material-icons {
	font-size: 18px;
	color: #555;
}

.context-menu-separator {
	height: 1px;
	background: #eee;
	margin: 4px 0;
}

/* Scroll Fix Overrides */
.main-tabs-content-container {
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
}

.main-tab-content.active {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	overflow: hidden !important;
}

.tabs-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	margin-top: 10px;
}

.tabs-content {
	flex: 1;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border: 1px solid #ddd;
	border-top: none;
}

/* End of File */

/* Images Tab Styling */
.images-toolbar {
	display: flex;
	padding: 10px;
	background: #f9f9f9;
	border-bottom: 1px solid #ddd;
	align-items: center;
}

.action-btn {
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 6px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #444;
	transition: all 0.2s;
}

.action-btn:hover {
	background: #ffebee;
	border-color: #d32f2f;
	color: #d32f2f;
}

.images-grid {
	display: grid;
	grid-template-columns: 1fr;
	/* Single column */
	grid-auto-rows: min-content;
	/* Sizing */
	gap: 15px;
	padding: 10px;
	overflow-y: auto;
	flex: 1;
	/* Ensure it takes available space */
	min-height: 0;
	/* Critical for nested flex scrolling */
}

/* Floating Delete Button */
.fab-delete {
	position: absolute;
	bottom: 20px;
	left: 20px;
	width: 50px;
	height: 50px;
	background-color: #fff;
	/* White Background */
	border-radius: 50%;
	border: none;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.fab-delete:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
	background-color: #fce4ec;
}

.fab-delete .material-icons {
	font-size: 24px;
	color: #d32f2f;
	/* Red Icon */
}

.image-card {
	position: relative;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	cursor: zoom-in;
	transition: all 0.2s;
}

.image-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Selected style removed per user request (Checkbox only) */
/*.image-card.selected {
	border-color: #007bff;
	box-shadow: 0 0 0 2px #007bff;
}*/

.image-thumb {
	width: 100%;
	height: 250px;
	/* Fixed height as requested */
	object-fit: cover;
	display: block;
}

.image-meta {
	padding: 6px;
	font-size: 10px;
	color: #666;
	display: flex;
	justify-content: space-between;
}

.image-check {
	appearance: none;
	-webkit-appearance: none;
	position: absolute;
	top: 8px;
	right: 8px;
	width: 20px;
	height: 20px;
	background-color: rgba(255, 255, 255, 0.7);
	border: 2px solid #666;
	border-radius: 50%;
	cursor: pointer;
	z-index: 10;
	display: grid;
	place-content: center;
	transition: all 0.2s;
}

.image-check::before {
	content: "";
	width: 10px;
	height: 6px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg) translate(1px, -1px);
	opacity: 0;
	transition: opacity 0.2s;
}

.image-check:checked {
	background-color: #007bff;
	border-color: #007bff;
}

.image-check:checked::before {
	opacity: 1;
}

/* Floating WhatsApp Button */
.fab-whatsapp {
	position: absolute;
	bottom: 20px;
	right: 20px;
	width: 50px;
	height: 50px;
	background-color: #25D366;
	border-radius: 50%;
	border: none;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, box-shadow 0.2s;
}

.fab-whatsapp:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}


/* --- Image Gallery Modal --- */
.image-gallery-modal {
	display: none;
	/* Hidden by default */
	position: fixed;
	z-index: 3000;
	/* Higher than furniture popup */
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(50, 50, 50, 0.95);
	/* Gray overlay */
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.image-gallery-modal .close-gallery {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #f1f1f1;
	font-size: 30px;
	/* Smaller */
	font-weight: normal;
	/* Normal weight */
	transition: 0.3s;
	cursor: pointer;
	z-index: 3010;
}

.image-gallery-modal .close-gallery:hover,
.image-gallery-modal .close-gallery:focus {
	color: #fff;
	text-decoration: none;
	cursor: pointer;
}

.gallery-content {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	width: 100%;
	overflow: hidden;
}

.gallery-main-image {
	max-width: 90%;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.gallery-controls {
	position: absolute;
	top: 50%;
	width: 100%;
	display: flex;
	justify-content: space-between;
	transform: translateY(-50%);
	pointer-events: none;
	/* Allow clicks through empty space */
}

.gallery-nav-btn {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	padding: 10px;
	cursor: pointer;
	pointer-events: auto;
	/* Re-enable clicks */
	transition: background 0.3s;
	border-radius: 50%;
	margin: 0 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery-nav-btn:hover {
	background: rgba(255, 255, 255, 0.4);
}

.gallery-nav-btn .material-icons {
	font-size: 36px;
}

.gallery-top-right {
	position: absolute;
	top: 20px;
	right: 80px;
	/* Left of close button */
	display: flex;
	align-items: center;
	gap: 15px;
	/* background: rgba(0, 0, 0, 0.5);  Removed background for cleaner look if requested, but keeping for contrast? User asked for gray overlay, maybe transparent top bar is better? Keeping existing for now. */
	background: rgba(0, 0, 0, 0.5);
	padding: 8px 15px;
	border-radius: 20px;
}

.gallery-select-label {
	color: white;
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	user-select: none;
}

/* Custom Round Checkbox */
.gallery-select-label input {
	appearance: none;
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	display: grid;
	place-content: center;
	transition: all 0.2s;
	background-color: transparent;
}

.gallery-select-label input::before {
	content: "";
	width: 12px;
	height: 7px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg) translate(1px, -1px) scale(0);
	transition: transform 0.2s;
}

.gallery-select-label input:checked {
	background-color: #007bff;
	border-color: #007bff;
}

.gallery-select-label input:checked::before {
	transform: rotate(-45deg) translate(1px, -1px) scale(1);
}

.gallery-action-btn {
	background: none;
	border: none;
	color: white;
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.gallery-action-btn:hover {
	color: #ddd;
}

.gallery-slider-container {
	height: 100px;
	width: 100%;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	justify-content: center;
	padding: 10px 0;
}

.gallery-slider {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding: 0 20px;
	align-items: center;
	scroll-behavior: smooth;
	max-width: 90%;
}

.gallery-thumb {
	height: 70px;
	width: 100px;
	object-fit: cover;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.6;
	transition: all 0.2s;
	border: 2px solid transparent;
}

.gallery-thumb:hover {
	opacity: 1;
}

.gallery-thumb.active {
	opacity: 1;
	border-color: #007bff;
	transform: scale(1.05);
}