.btn-layout {
	background-color: #003461;
	color: #ffffff;
	border: 1px solid #003461;
	border-radius: 5px;
	font-weight: 500;
	font-size: 18px;
	cursor: pointer;
	max-width: 45px;
	width: 100%;
	height: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	-webkit-transition: all .3s;
	-moz-transition: all .3s;
	-ms-transition: all .3s;
	-o-transition: all .3s;
	transition: all .3s;
}

.btn-layout:hover {
	background-color: #ffffff;
	color: #003461;
	border: 1px solid #003461;
	-webkit-transition: all .3s;
	-moz-transition: all .3s;
	-ms-transition: all .3s;
	-o-transition: all .3s;
	transition: all .3s;
}

#ERADataTable:not(.advanced-view):not(.grid-view) tbody tr td > i.fa-map-marker-alt {
	display:none;
}

#ERADataTable:not(.advanced-view):not(.grid-view) .img-thumbnail {
    /* padding: .25rem; */
    background-color: var(--bs-body-bg);
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    max-width: 100%;
    height: 100%;
    width: 100%;
    max-height: 150px;
    /* min-height: 140px; */
    min-width: 140px;
    object-fit: contain;
    object-position: center;
}

.table>:not(caption):not(.advanced-view):not(.grid-view)>*>* {
    min-width: 0;
}

/* Grid view styles for ERADataTable */
.table.grid-view {
	width: 100% !important;
}

.table.grid-view thead {
	display: none;
}

.table.grid-view tbody {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	/* equal height cards */
	gap: 1rem;
	padding: 0 0 3rem;
	background-color: #ffffff;
}

.table.grid-view tbody tr {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	/* padding: .75rem; */
	background-color: #ececec;
	border: none;
	border-radius: 4px;
	box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
	transition: all 0.3s ease;
}

.table.grid-view:not(.advanced-view) tbody tr:hover {
	cursor: pointer;
	background-color: #ffffff;
	box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px 0px;
	transition: all 0.3s ease;
}

.table.grid-view:not(.advanced-view) tbody tr:hover>* {
	--bs-table-accent-bg: transparent;
	background-color: transparent;
}

.table.grid-view tbody td {
	display: block;
	border-top: 0;
	padding: 0px 10px !important;
	border-bottom-width: 0;
	margin-bottom: 10px;
}

.table.grid-view tbody td:nth-child(4) {
	display: none;
}

.table.grid-view tbody td:nth-child(5) a {
	font-size: 16px;
	font-weight: 500;
	color: #003461 !important;
}

.table.grid-view tbody td:nth-child(5) span {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 5px;
	font-size: 14px;
	font-weight: 400;
	color: #003461 !important;
}

.table.grid-view tbody td:nth-child(6) a {
	font-size: 16px;
	font-weight: 500;
	color: #003461 !important;
}

.table.grid-view tbody td:nth-child(6) span {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 5px;
	font-size: 14px;
	font-weight: 400;
	color: #003461 !important;
}

.table.grid-view tbody td:nth-child(7) a {
	background-color: #003461;
	font-size: 16px;
	font-weight: 400;
	color: #ffffff !important;
	border: 1px solid #003461;
	transition: all 0.3s ease;
}

.table.grid-view tbody td:nth-child(7) a:hover {
	background-color: #ffffff;
	color: #003461 !important;
	border: 1px solid #003461;
	transition: all 0.3s ease;
}

.table.grid-view tbody td:nth-child(8) a {
	background-color: #003461;
	font-size: 16px;
	font-weight: 400;
	color: #ffffff !important;
	border: 1px solid #003461;
	transition: all 0.3s ease;
}

.table.grid-view tbody td:nth-child(8) a:hover {
	background-color: #ffffff;
	color: #003461 !important;
	border: 1px solid #003461;
	transition: all 0.3s ease;
}

.table.grid-view:not(.advanced-view) tbody tr td:nth-child(1) {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 0;
	margin-bottom: .35rem;
	background-color: #ffffff;
	/* box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .2); */
	max-height: 150px;
}

.table.grid-view:not(.advanced-view) tbody tr td:nth-child(1) a {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	max-height: 150px;
	overflow: hidden;
	position: relative;
	height: 100%;
	width: 100%;
	max-width: 100%;
}

.table.grid-view:not(.advanced-view) tbody tr td:nth-child(1) a img {
	object-fit: contain;
	max-width: 100%;
	height: auto;
	max-height: 150px;
	object-position: center;
	padding: 0;
	background-color: #ffffff;
	border: none;
	border-radius: 0;
}

.table.grid-view:not(.advanced-view) tbody td p {
	color: #003461 !important;
	font-weight: 600;
	font-size: 16px;
	margin-bottom: 5px !important;
	text-align: left;
}

.table.grid-view:not(.advanced-view) tbody td a {
	width: 100%;
	text-align: left;
	justify-content: flex-start !important;
	align-items: center;
	font-weight: 500;
	font-size: 14px;
	gap: 5px;
}

.table.grid-view:not(.advanced-view) tbody tr td:last-child a {
	text-align: center;
	justify-content: center !important;
}

@media (max-width: 1200px) {
	.table.grid-view:not(.advanced-view) tbody {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.table.grid-view:not(.advanced-view) tbody {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575px) {
	.table.grid-view:not(.advanced-view) tbody {
		grid-template-columns: 1fr;
	}
}


/* Advanced view styles for ERADataTable */

.table.advanced-view>:not(caption)>*>* {
	background-color: none;
	border-bottom-width: 0;
	box-shadow: none;
	min-width: 0;
}

.table.advanced-view {
	background-color: transparent !important;
	border-bottom-width: 0;
	box-shadow: none;
	min-width: 0;
	width: 100% !important;
	max-width: 100% !important;
	position: relative;
	display: flex;
	/* border: 1px solid #000; */
	flex-direction: column;
}

.table.advanced-view thead {
	display: none;
}

.table.advanced-view tbody {
	display: block;
	width: auto;
	padding: 0;
	margin: 0;
	background-color: #ffffff;
}

.table.advanced-view tbody tr {
	display: block;
	width: auto;
	margin-bottom: 20px;
}

.table.advanced-view tbody tr:hover>* {
	--bs-table-accent-bg: #ffffff;
	background-color: #ffffff;
}

/* .table.advanced-view tbody tr:hover {
	background-color: #ffffff;
	border: 1px solid #dee2e6;
	transform: translateY(-2px);
	box-shadow: rgba(0, 0, 0, 0.18) 0px 5px 18px;
} */

/* Main td wrapper in advanced-view */
.table.advanced-view tbody tr td {
	display: block;
	padding: 0 !important;
	text-align: left;
	/* width: 100%; */
	border: none;
	background-color: transparent;
}

.table.advanced-view tbody tr td .compamy-logo .logo-block {
	position: relative;
	width: 100%;
	height: 100%;
	max-height: 200px;
	max-width: 200px;
	padding: 10px;
	background: #fff;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	/* margin: 0 auto; */
	overflow: hidden;
	box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

@media (max-width: 768px) {
	.table.advanced-view tbody tr td .compamy-logo .logo-block {
		max-height: 150px;
		max-width: 150px;
		min-height: 150px;
		min-width: 150px;
	}
}

.table.advanced-view tbody tr td .compamy-logo .logo-block img {
	padding: 0 !important;
	background-color: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	max-width: 100%;
	height: auto;
	object-fit: contain;
	width: 100%;
	height: 100%;
	position: relative;
	object-position: center;
}

.table.advanced-view tbody tr td .company-info div:nth-child(1) a p {
	font-size: 20px;
	font-weight: 600;
	color: #003461 !important;
}

.table.advanced-view tbody tr td .company-info div:nth-child(2) a {
	font-size: 16px;
	font-weight: 400;
	color: #003461 !important;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.table.advanced-view tbody tr td .company-info div:last-child a {
	display: none !important;
}

.table.advanced-view tbody tr td .company-info,
.table.advanced-view tbody tr td .company-info a {
	text-align: left;
	justify-content: flex-start !important;
}

.table.advanced-view tbody tr td .company-stats .card {
	width: auto;
	display: flex;
	max-width: 200px;
	justify-content: center;
	align-items: center;
	margin-left: auto;
	padding: 0;
	gap: 12px;
	height: 100%;
}

@media (max-width: 768px) {
	.table.advanced-view tbody tr td .company-stats .card {
		max-width: 100%;
	}
}

.table.advanced-view tbody tr td .company-stats .card div {
	width: 100%;
	height: 100%;
	display: block;
}

.table.advanced-view tbody tr td .company-stats .card div a {
	background-color: #ffffff;
	padding: 12px;
	margin-bottom: 12px;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	color: #022652 !important;
	font-size: 22px;
	font-weight: 500;
}

@media (max-width: 768px) {
	.table.advanced-view tbody tr td .company-stats .card div a {
		padding: 3px;
		font-size: 18px;
	}
}

.table.advanced-view tbody tr td .company-stats .card div a .salon-text {
	display: block !important;
	font-size: 16px;
	font-weight: 400;
	color: #003461;
}

.table.advanced-view tbody tr td .company-stats .card div a .stand-text {
	display: block !important;
	font-size: 16px;
	font-weight: 400;
	color: #003461;
}

@media (max-width: 768px) {
	.table.advanced-view tbody tr td .company-stats .card div a .salon-text {
		font-size: 14px;
	}
	.table.advanced-view tbody tr td .company-stats .card div a .stand-text {
		font-size: 14px;
	}
}

.table.advanced-view tbody tr td .btn-container {
	display: none;
}

/* Advanced view - show previously hidden company info */
.table.advanced-view tbody td div {
	text-align: inherit !important;
	justify-content: inherit !important;
}

.table.advanced-view tbody td .btn {
	width: 100%;
}

.table.advanced-view .company-description,
.table.advanced-view .company-product-categories,
.table.advanced-view .company-products,
.table.advanced-view .company-documents,
.table.advanced-view .company-data {
	display: block;
	margin-top: 16px;
	/* padding: 0; */
}


.table.advanced-view .company-description:not(.d-none) {
	color: #003461;
	font-weight: 500;
	font-size: 14px;
	line-height: 1.6;
	text-align: left !important;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-line-clamp: 3;
	text-overflow: ellipsis;
	/* height: 100%; */
	line-height: 1.6em;
	max-height: calc(1.6em * 3);
}

/* Add border-bottom to company-description only if company-product-categories is visible */
.table.advanced-view .company-data .title-categories {
	border-top: 1px solid #dee2e6;
	padding-top: 16px;
	font-weight: 500;
	font-size: 16px;
}

@media (max-width: 768px) {
	.table.advanced-view .company-data:has(.company-product-categories:not(.d-none)) .company-description:not(.d-none) {
		padding: 0px 0px 16px;
	}
}

.table.advanced-view .company-product-categories:not(.d-none) {
	color: #003461;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.6;
	text-align: left !important;
	padding-bottom: 16px;
	border-bottom: none;
}

@media (max-width: 768px) {
	.table.advanced-view .company-product-categories:not(.d-none) {
		padding: 0px 0px 16px;
	}
}

.table.advanced-view .company-products {
	margin-top: 20px;
}

.table.advanced-view .company-products .row {
	margin: 0 -8px;
}

.table.advanced-view .company-products .card {
	height: 100%;
	border: 1px solid #dee2e6;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table.advanced-view .company-products .card:hover {
	/* transform: translateY(-4px); */
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.table.advanced-view .company-documents {
	margin-top: 16px;
}

/* Company-data positioning after company-stats */
.table.advanced-view .company-data {
	width: 100%;
	margin-top: 0px;
	/* padding: 20px; */
	background-color: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.table.advanced-view .advanced-top {
	border-radius: 12px;
	box-shadow: rgba(99, 99, 99, 0.15) 0px 2px 8px;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	width: 100%;
}

.table.advanced-view .advanced-top:hover {
	background-color: #ffffff;
	border: 1px solid #dee2e6;
	transform: translateY(-2px);
	box-shadow: rgba(0, 0, 0, 0.18) 0px 5px 18px;
} */

.table.advanced-view .advanced-top .company-data {
	/* flex-basis: 100%; */
	order: 999;
	/* padding: 0;
	margin: 0; */
	border: 0;
	box-shadow: none;
	/* width: 100%; */
}

@media (max-width: 768px) {
	.table.advanced-view .advanced-top .company-data > .container:not(.company-product-categories) {
		padding: 0px;
	}
}

.table.advanced-view .advanced-top .card {
	background-color: #eeeeee;
	border: none;
	padding: 20px;
}

/* Company data content styles - applies to all divs with content */
.table.advanced-view .company-data div.has-content {
	display: block !important;
	padding: 16px;
	margin-top: 12px;
	background-color: #f8f9fa;
	/* border-left: 4px solid #003461; */
	border-radius: 6px;
	color: #333;
	font-size: 14px;
	line-height: 1.6;
}

.table.advanced-view .company-data div.empty-content {
	display: none !important;
}

/* Specific styles for different content types */
/* .table.advanced-view .company-data .company-description.has-content {
	border-left-color: #003461;
}

.table.advanced-view .company-data .company-product-categories.has-content {
	border-left-color: #28a745;
}

.table.advanced-view .company-data .company-products.has-content {
	border-left-color: #ffc107;
	padding: 20px;
}

.table.advanced-view .company-data .company-documents.has-content {
	border-left-color: #dc3545;
} */

/* Prevent nested divs from inheriting parent spacing */
.table.advanced-view .company-data div.has-content>div {
	margin-top: 0;
	padding: 0;
	background-color: transparent;
	border: none;
}

/* First level divs only get the special styling */
.table.advanced-view .company-data>div.has-content {
	margin-top: 12px;
}

.table.advanced-view .company-data>div.has-content:first-child {
	margin-top: 0;
}

/* Bootstrap Tabs Styling for company-data */
.table.advanced-view .company-data .nav-pills {
	/* background-color: #ffffff; */
	/* padding: 8px; */
	/* border-radius: 8px; */
	/* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); */
	/* margin-bottom: 20px; */
	display: flex;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	flex-wrap: nowrap;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.table.advanced-view .company-data .nav-pills .nav-item {
	margin: 0;
}

@media (max-width: 768px) {
	.table.advanced-view .company-data .nav-pills {
		overflow-x: visible;
		/* overflow-y: visible; */
		flex-wrap: wrap;
		-webkit-overflow-scrolling: auto;
		scrollbar-width: none;
		flex-wrap: nowrap;
	}

	.table.advanced-view .company-data .nav-pills .nav-item {
	    width: 100%;
		display: flex;
		flex-wrap: nowrap;
		white-space: nowrap;
		justify-content: center;
		align-items: center;
	}
}

.table.advanced-view .company-data .nav-pills .nav-link {
	color: #003461;
	background-color: transparent;
	border: 2px solid transparent;
	padding: 10px 20px;
	border-radius: 6px;
	font-weight: 500;
	font-size: 14px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

.table.advanced-view .company-data .nav-pills .nav-link:hover {
	background-color: #f8f9fa;
	border-color: #003461;
	color: #003461;
}

.table.advanced-view .company-data .nav-pills .nav-link.active {
	background-color: #003461;
	color: #ffffff;
	border-color: #003461;
	box-shadow: 0 2px 8px rgba(0, 52, 97, 0.3);
}

.table.advanced-view .company-data .nav-pills .nav-link i {
	font-size: 16px;
}

.table.advanced-view .company-data .tab-content {
	background-color: transparent;
	padding: 0;
	border-radius: 8px;
}

.table.advanced-view .company-data .tab-pane {
	animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Hide empty tabs */
.table.advanced-view .company-data .nav-pills .nav-item:has(.nav-link[data-empty="true"]) {
	display: none;
}

/* Responsive tabs */
@media (max-width: 768px) {
	.table.advanced-view .company-data .nav-pills {
		/* flex-direction: column; */
		gap: 4px;
	}

	.table.advanced-view .company-data .nav-pills .nav-link {
		width: 100%;
		text-align: center;
		justify-content: center;
	}
}

/* Tab content specific styling */
.table.advanced-view .company-data .tab-pane .row {
	margin: 0 -8px;
}

.table.advanced-view .company-data .tab-pane .card {
	margin-bottom: 16px;
}


/* Swiper Styles for Products and Documents */
.table.advanced-view .swiper.company-products,
.table.advanced-view .swiper.company-documents {
	width: 100%;
	height: auto;
	padding: 0;
	margin: 0;
	position: relative;
	z-index: 0;
}

.table.advanced-view .swiper.company-products .card .PS_Desc {
	display: none;
}

@media (max-width: 768px) {
	.table.advanced-view .swiper.company-products,
	.table.advanced-view .swiper.company-documents {
		padding: 10px 0;
	}
}

.table.advanced-view .swiper.company-products .swiper-wrapper,
.table.advanced-view .swiper.company-documents .swiper-wrapper {
	align-items: stretch;
	z-index: 0;
}

.table.advanced-view .swiper.company-products .swiper-slide,
.table.advanced-view .swiper.company-documents .swiper-slide {
	height: auto;
	display: flex;
	flex-direction: column;
}

/* Card styling inside swiper slides */
.table.advanced-view .swiper-slide .card {
	height: 100%;
	border: 1px solid #dee2e6;
	border-radius: 10px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	background-color: #ffffff;
	padding: 0;
	position: relative;
}

.table.advanced-view .swiper-slide .card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.table.advanced-view .swiper-slide .card img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	object-position: center;
}

.table.advanced-view .swiper-slide .card-body {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 100% !important;
}

.table.advanced-view .swiper-slide .card-title {
	font-size: 14px;
	font-weight: 600;
	color: #003461;
	margin-bottom: 0;
}

.table.advanced-view .swiper-slide .card-text {
	display: none;
	font-size: 13px;
	color: #6c757d;
	margin-bottom: 8px;
}

/* Swiper Navigation Buttons */
.table.advanced-view .swiper-button-next,
.table.advanced-view .swiper-button-prev {
	justify-content: center !important;
	display: flex !important;
	align-items: center !important;
	background-image:none;
	color: #003461;
	width: 40px;
	height: 40px;
	background-color: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.table.advanced-view .swiper-button-prev:after {
	content: "\f053";
	font-family: 'Font Awesome 6 Pro';
	font-size: 20px;
	font-weight: bold;
}

.table.advanced-view .swiper-button-next:after {
	content: "\f054";
	font-family: 'Font Awesome 6 Pro';
	font-size: 20px;
	font-weight: bold;
}

.table.advanced-view .swiper-button-next:hover,
.table.advanced-view .swiper-button-prev:hover {
	background-color: #003461;
	color: #ffffff;
}

/* Fancybox caption styles */
.fancybox-caption-title {
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
	margin-bottom: 8px;
	line-height: 1.4;
}

.fancybox-caption-description {
	font-size: 14px;
	color: #ffffff;
	line-height: 1.6;
	margin-top: 4px;
}