/* Global Styles */
:root {
	--primary-color: #0583cf;
	--secondary-color: #6C757D;
	--success-color: #198754;
	--info-color: #0DCAF0;
	--warning-color: #FFC107;
	--danger-color: #DC3545;
	--light-color: #F8F9FA;
	--dark-color: #212529;
	--primary-hover: #046ba8;
	--bs-primary: #0583cf;
	--bs-primary-rgb: 5, 131, 207;
	--bs-link-color: #0583cf;
	--bs-link-hover-color: #046ba8;
}

.bg-primary {
	background-color: var(--primary-color) !important;
}
.btn-primary {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
	background-color: var(--primary-hover);
	border-color: var(--primary-hover);
}
.btn-outline-primary {
	color: var(--primary-color);
	border-color: var(--primary-color);
}
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	color: #333;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
}

/* Login/Register Page */
.login-container, .register-container, .forgot-password-container {
	min-height: calc(100vh - 76px);
	display: flex;
	align-items: center;
	background-color: #f5f5f5;
	padding: 2rem 0;
}

.nora-logo {
	width: 200px;
	margin-bottom: 1rem;
}

.login-form-container, .register-form-container, .forgot-password-form-container {
	margin: 2rem 0;
}

/* Navbar */
.navbar {
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
	display: flex;
	align-items: center;
	font-weight: 600;
}

.navbar-brand img {
	margin-right: 0.5rem;
}

/* Category Cards */
.category-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
	overflow: hidden;
	border: none;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.category-card img {
	height: 200px;
	object-fit: cover;
}

.category-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 100%);
	z-index: 1;
}

.category-card .card-body {
	position: relative;
	z-index: 2;
	background-color: white;
}

.category-icon {
	font-size: 1.5rem;
	color: var(--primary-color);
}

/* Product Cards */
.product-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
	border: 1px solid #e9e9e9;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
}

.product-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.product-card img {
	height: 200px;
	object-fit: cover;
}

.price {
	font-weight: 600;
	font-size: 1.1rem;
	color: var(--primary-color);
}

/* Ribbon Badges */
.ribbon {
	position: absolute;
	right: -5px;
	top: -5px;
	z-index: 2;
	overflow: hidden;
	width: 120px;
	height: 120px;
	text-align: right;
}

.ribbon span {
	font-size: 10px;
	font-weight: bold;
	color: #FFF;
	text-transform: uppercase;
	text-align: center;
	line-height: 20px;
	transform: rotate(45deg);
	-webkit-transform: rotate(45deg);
	width: 120px;
	display: block;
	background: linear-gradient(#0D6EFD 0%, #0b5ed7 100%);
	box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
	position: absolute;
	top: 28px;
	right: -26px;
}

.ribbon span::before {
	content: "";
	position: absolute;
	left: 0px;
	top: 100%;
	z-index: -1;
	border-left: 3px solid #0b5ed7;
	border-right: 3px solid transparent;
	border-bottom: 3px solid transparent;
	border-top: 3px solid #0b5ed7;
}

.ribbon span::after {
	content: "";
	position: absolute;
	right: 0px;
	top: 100%;
	z-index: -1;
	border-left: 3px solid transparent;
	border-right: 3px solid #0b5ed7;
	border-bottom: 3px solid transparent;
	border-top: 3px solid #0b5ed7;
}

/* Special Order Ribbon */
.ribbon.special-order span {
	background: linear-gradient(#FFC107 0%, #e0a800 100%);
	color: #333;
}

.ribbon.special-order span::before {
	border-left: 3px solid #e0a800;
	border-top: 3px solid #e0a800;
}

.ribbon.special-order span::after {
	border-right: 3px solid #e0a800;
	border-top: 3px solid #e0a800;
}

.special-order-badge {
	background-color: rgba(255, 193, 7, 0.1);
	border-left: 3px solid var(--warning-color);
	padding: 8px 12px;
	border-radius: 4px;
	color: #856404;
	font-size: 0.85rem;
}

.unavailable-badge {
	background-color: rgba(220, 53, 69, 0.1); /* Light red background */
	border-left: 3px solid var(--danger-color, #dc3545); /* Red border */
	padding: 8px 12px;
	border-radius: 4px;
	color: #721c24; /* Darker red text for better contrast */
	font-size: 0.85rem;
}

/* Cart */
.cart-item-image {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
}

.special-order-row {
	background-color: rgba(255, 193, 7, 0.05);
}

/* Footer */
.footer {
	margin-top: auto;
}

/* Breadcrumb */
		.breadcrumb-container {
			background-color: #f8f9fa;
			padding: 0.5rem 1rem;
			border-bottom: 1px solid #e9ecef;
		}
.breadcrumb {
	margin-bottom: 0;
}

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

.breadcrumb-item a:hover {
	text-decoration: underline;
}

/* Order Status */
.badge {
	padding: 0.55em 0.75em;
}

/* Product quantity input */
.input-group-sm {
	max-width: 120px;
}

.input-group-sm .form-control {
	text-align: center;
}

.input-group-sm .input-group-text {
	background-color: var(--light-color);
	font-weight: 500;
}

/* Add to cart button */
.add-to-cart-btn {
	font-weight: 500;
	transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
	background-color: var(--primary-hover);
}

/* Filter sidebar */
.offcanvas {
	max-width: 350px;
}

/* Form elements */
.form-check-input:checked {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}

/* Pagination */
.pagination .page-item.active .page-link {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}

.pagination .page-link {
	color: var(--primary-color);
}

.pagination .page-link:hover {
	background-color: var(--light-color);
	color: var(--primary-hover);
}

/* Order timeline */
.list-group-item.active {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}

/* Modal */
.modal-header {
	background-color: var(--primary-color);
	color: white;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
	.category-card img {
		height: 160px;
	}
	
	.product-card img {
		height: 180px;
	}
	
	.cart-item-image {
		width: 50px;
		height: 50px;
	}
	
	.ribbon span {
		font-size: 9px;
		line-height: 18px;
	}
}

@media (max-width: 575.98px) {
	.login-container, .register-container, .forgot-password-container {
		padding: 1rem 0;
	}
	
	h2 {
		font-size: 1.75rem;
	}
	
	.navbar-brand {
		font-size: 1.1rem;
	}
	
	.navbar-brand img {
		height: 35px;
	}
	
	.product-card img {
		height: 160px;
	}
	
	.ribbon {
		width: 100px;
		height: 100px;
	}
	
	.ribbon span {
		width: 100px;
		font-size: 8px;
		line-height: 16px;
		top: 22px;
		right: -22px;
	}
}

/* Profile Settings Page */
.profile-image-container {
	position: relative;
	width: 120px;
	height: 120px;
}

.profile-image-container img {
	object-fit: cover;
	width: 100%;
	height: 100%;
}

.profile-image-overlay {
	position: absolute;
	bottom: 0;
	right: 0;
	background-color: rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: all 0.2s ease;
}

.profile-image-overlay:hover {
	background-color: rgba(255, 255, 255, 1);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Settings Tabs */
.list-group-item {
	border-color: #e9e9e9;
}

.list-group-item.active {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}

.list-group-item i {
	width: 20px;
	text-align: center;
}

/* Form styling */
.form-text {
	color: #6c757d;
	font-size: 0.85rem;
}

/* Alert styling */
.alert {
	border-radius: 4px;
}

.alert i {
	font-size: 1.1rem;
}


/* Checkout Progress Bar */
.checkout-progress {
	margin-bottom: 2rem;
}

.checkout-step {
	position: relative;
}

.checkout-step:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 30px;
	right: -50%;
	width: 100%;
	height: 2px;
	background-color: #e9ecef;
	z-index: 0;
}

.step-icon {
	width: 60px;
	height: 60px;
	margin: 0 auto 10px;
	background-color: #f8f9fa;
	border: 2px solid #e9ecef;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	color: #6c757d;
	position: relative;
	z-index: 1;
}

.step-title {
	font-size: 0.9rem;
	color: #6c757d;
	font-weight: 500;
}

.checkout-step.active .step-icon {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
	color: white;
}

.checkout-step.active .step-title {
	color: var(--primary-color);
	font-weight: 600;
}

.checkout-step.completed .step-icon {
	background-color: var(--success-color);
	border-color: var(--success-color);
	color: white;
}

.checkout-step.completed .step-title {
	color: var(--success-color);
}

.checkout-step.completed::after {
	background-color: var(--success-color);
}

/* Order Summary Card */
.order-summary-card {
	position: sticky;
	top: 20px;
}

/* Payment Details */
.payment-details {
	padding: 15px;
	background-color: #f8f9fa;
	border-radius: 4px;
	margin-left: 25px;
}

/* Form Elements */
.form-control:read-only {
	background-color: #f8f9fa;
}

/* Modal */
.modal-header.bg-success .btn-close {
	color: white;
}

@media (max-width: 767.98px) {
	.checkout-step:not(:last-child)::after {
		top: 25px;
	}
	
	.step-icon {
		width: 50px;
		height: 50px;
		font-size: 1.2rem;
	}
	
	.step-title {
		font-size: 0.8rem;
	}
}

/** order confirmation page **/

/* Order Success Banner */
.order-success-banner {
	padding: 2rem;
	background-color: #f8f9fa;
	border-radius: 8px;
	margin-bottom: 2rem;
}

.success-icon {
	font-size: 4rem;
	color: var(--success-color);
	display: inline-block;
}

.order-info {
	background-color: white;
	border-radius: 6px;
	padding: 0.75rem;
	display: inline-block;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.order-label {
	font-weight: 600;
	color: #6c757d;
	margin-right: 0.5rem;
}

.order-value {
	font-weight: 600;
	color: var(--primary-color);
}

/* Order Timeline */
.order-timeline {
	position: relative;
	padding-left: 50px;
}

.order-timeline::before {
	content: '';
	position: absolute;
	top: 0;
	left: 20px;
	height: 100%;
	width: 2px;
	background-color: #e9ecef;
}

.timeline-item {
	position: relative;
	margin-bottom: 1.5rem;
}

.timeline-item:last-child {
	margin-bottom: 0;
}

.timeline-icon {
	position: absolute;
	left: -50px;
	top: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #f8f9fa;
	border: 2px solid #e9ecef;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	color: #6c757d;
	z-index: 1;
}

.timeline-item.active .timeline-icon {
	background-color: var(--success-color);
	border-color: var(--success-color);
	color: white;
}

.timeline-content {
	padding-bottom: 1rem;
}

.timeline-item:last-child .timeline-content {
	padding-bottom: 0;
}

/* Chat Styling */
.chat-container {
	height: 300px;
	display: flex;
	flex-direction: column;
}

.chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
	background-color: #f8f9fa;
	border-radius: 4px;
}

.message {
	margin-bottom: 1rem;
	max-width: 75%;
}

.system-message {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	max-width: 90%;
	background-color: #e9ecef;
	border-radius: 8px;
	padding: 0.5rem 1rem;
}

.message-content p {
	margin-bottom: 0.25rem;
}

.message-time {
	font-size: 0.75rem;
	color: #6c757d;
	text-align: right;
}

/* Related Products */
.related-product-title {
	border-bottom: 2px solid #e9ecef;
	padding-bottom: 0.5rem;
	margin-bottom: 1.5rem;
}

@media print {
	.navbar, .breadcrumb, .checkout-progress, 
	.card-header, footer, .btn, 
	.related-products, .accordion {
		display: none !important;
	}
	
	.card {
		border: none !important;
		box-shadow: none !important;
	}
	
	.card-body {
		padding: 0 !important;
	}
	
	.container {
		max-width: 100% !important;
		width: 100% !important;
	}
}

@media (max-width: 767.98px) {
	.success-icon {
		font-size: 3rem;
	}
	
	.timeline-icon {
		width: 30px;
		height: 30px;
		font-size: 1rem;
		left: -40px;
	}
	
	.order-timeline {
		padding-left: 40px;
	}
	
	.order-timeline::before {
		left: 15px;
	}
	
	.chat-container {
		height: 250px;
	}
}

/* product details page 2 */

/* Product Gallery */
.main-image-container {
	position: relative;
	background-color: #f8f9fa;
	border-radius: 0.25rem;
	overflow: hidden;
}

.main-product-image {
	width: 100%;
	object-fit: cover;
	aspect-ratio: 4/3;
}

.image-badges {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.thumbnail-gallery img {
	width: 100%;
	height: 70px;
	object-fit: cover;
	cursor: pointer;
	opacity: 0.7;
	transition: all 0.2s ease;
}

.thumbnail-gallery img:hover {
	opacity: 1;
}

.thumbnail-gallery img.active {
	opacity: 1;
	border: 2px solid var(--primary-color);
}

/* Product Info */
.product-info-section {
	padding-bottom: 1rem;
	border-bottom: 1px solid #e9e9e9;
}

.price-value {
	color: var(--primary-color);
}

.price-unit {
	color: #6c757d;
	font-size: 1rem;
}

.volume-pricing {
	margin-top: 0.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.product-order-section {
	padding-top: 1rem;
}

.quantity-btn {
	padding: 0.375rem 0.75rem;
}

/* Product Meta */
.product-meta {
	font-size: 0.875rem;
	color: #6c757d;
}

/* Tab Content */
.nav-tabs .nav-link {
	color: #495057;
}

.nav-tabs .nav-link.active {
	color: var(--primary-color);
	font-weight: 500;
}

.quality-section h5 {
	font-size: 1rem;
}

/* Ribbon */
.ribbon {
	position: absolute;
	top: 20px;
	left: -5px;
	z-index: 1;
}

.ribbon span {
	position: relative;
	display: block;
	text-align: center;
	background: var(--warning-color);
	color: #212529;
	font-size: 0.75rem;
	line-height: 1.5;
	padding: 5px 8px;
	width: 90px;
	font-weight: 600;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ribbon span:before,
.ribbon span:after {
	position: absolute;
	content: "";
}

.ribbon span:before {
	height: 6px;
	width: 6px;
	left: -6px;
	top: 0;
	background: var(--warning-color);
}

.ribbon span:after {
	height: 6px;
	width: 5px;
	left: -5px;
	bottom: 0;
	background: #a68104;
}

@media (max-width: 767.98px) {
	.thumbnail-gallery img {
		height: 50px;
	}
	
	.volume-pricing {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.product-info-section {
		padding-bottom: 0.75rem;
		margin-bottom: 0.75rem;
	}
	
	.nav-tabs .nav-link {
		padding: 0.5rem 0.75rem;
		font-size: 0.875rem;
	}
}

/* Added special order badge styling */
.special-order {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
}

/* product details */

/* Product Page */
.product-info h1 {
	font-size: 2rem;
	font-weight: 600;
}

.product-price .fw-bold {
	color: var(--primary-color);
}

.product-description ul {
	padding-left: 1.2rem;
}

.input-group .form-control {
	text-align: center;
}

.shipping-info {
	color: #6c757d;
	font-size: 0.9rem;
}

.shipping-info p {
	margin-bottom: 0.5rem;
}

/* Tab styling */
.nav-tabs .nav-link {
	color: #495057;
}

.nav-tabs .nav-link.active {
	color: var(--primary-color);
	font-weight: 500;
}

/* Similar products */
.card {
	transition: all 0.2s ease;
}

.card:hover {
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

@media (max-width: 767.98px) {
	.product-info h1 {
		font-size: 1.75rem;
	}
}


/* Notification container */
.notification-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Notification styles */
.notification {
	padding: 10px 15px;
	border-radius: 5px;
	font-size: 14px;
	color: #fff;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	animation: fadeIn 0.3s ease-out;
}

.notification.success {
	background-color: #28a745; /* Green */
}

.notification.error {
	background-color: #dc3545; /* Red */
}

/* Fade-in animation */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

	.search-container {
		position: relative;
	}
	
	.search-results {
		position: absolute;
		width: 100%;
		max-height: 400px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch; /* Enable smooth scrolling on mobile */
		z-index: 1000;
		background: white;
		border: 1px solid rgba(0,0,0,.125);
		border-radius: 0.25rem;
		box-shadow: 0 4px 6px rgba(0,0,0,.1);
		display: none;
		margin-top: 5px;
	}
	
	.search-result-item {
		padding: 10px 15px;
		border-bottom: 1px solid rgba(0,0,0,.075);
		cursor: pointer;
		transition: background-color 0.2s;
	}
	
	.search-result-item:hover {
		background-color: rgba(0,0,0,.05);
	}
	
	.search-result-item .product-name {
		font-weight: bold;
	}
	
	.search-result-item .product-description {
		font-size: 0.875rem;
		color: #6c757d;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	
	.search-result-item .match-percentage {
		font-size: 0.75rem;
		color: #28a745;
	}
	
	.highlighted {
		background-color: rgba(255, 255, 0, 0.3);
		padding: 0 2px;
		border-radius: 2px;
	}
	
	/* Responsive adjustments */
	@media (max-width: 767.98px) {
		.search-container {
			margin-top: 1rem;
		}
	}

/* System Notification Banner */
.system-notification {
	border-radius: 0;
	border: none;
	border-bottom: 2px solid rgba(0, 0, 0, 0.1);
	padding: 0.75rem 0;
}

.system-notification.alert-warning {
	background-color: #fff3cd;
	border-bottom-color: #ffc107;
}

.system-notification.alert-danger {
	background-color: #f8d7da;
	border-bottom-color: #dc3545;
}

.system-notification.alert-info {
	background-color: #cfe2ff;
	border-bottom-color: #0dcaf0;
}

.system-notification.alert-success {
	background-color: #d1e7dd;
	border-bottom-color: #198754;
}
