/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Font Display Swap - Prevent FOIT (Flash of Invisible Text) */
/* Override third-party font-face rules to ensure swap behavior */

/* Bootstrap Icons */
@font-face {
	font-family: 'bootstrap-icons';
	font-display: swap;
	src: url("../libs/bootstrap-icons/font/fonts/bootstrap-icons.woff2") format("woff2"),
		url("../libs/bootstrap-icons/font/fonts/bootstrap-icons.woff") format("woff");
}

/* Feather Icons */
@font-face {
	font-family: 'feather';
	font-display: swap;
	src: url("../libs/feather-webfont/dist/fonts/feather-icons.woff2") format("woff2"),
		url("../libs/feather-webfont/dist/fonts/feather-icons.woff") format("woff");
}

/* Slick Carousel Font */
@font-face {
	font-family: 'slick';
	font-display: swap;
	src: url("../libs/slick-carousel/slick/fonts/slick.woff") format("woff"),
		url("../libs/slick-carousel/slick/fonts/slick.ttf") format("truetype");
}


/* ============================================
   PRODUCT DETAIL GALLERY
   ============================================ */

/* Product detail gallery tweaks */
.product div.zoom {
	height: clamp(260px, 55vw, 480px);
	background-size: contain;
	background-repeat: no-repeat;
	background-color: #fff;
	background-position: center center;
	transition: background-size .25s ease, background-position .15s ease;
}

.product div.zoom:hover {
	background-size: 160%;
}

@media (min-width: 992px) {
	.product div.zoom {
		height: clamp(320px, 45vw, 440px);
	}
}

.product div.zoom img {
	height: 100%;
	width: 100%;
	object-fit: contain;
}

/* Product card layout normalization */
.card-product {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.card-product .card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.card-product .d-grid.mt-4 {
	margin-top: auto;
}

.card-product h2.fs-6 {
	min-height: 2.75rem;
	overflow: hidden;
	display: -webkit-box;
	line-clamp: 2;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

@media (max-width: 575.98px) {
	.card-product h2.fs-6 {
		min-height: 2.4rem;
	}
}

.card-product .btn-action.favorite-toggle {
	border: 0;
}

/* Header logo styling - prevent header from growing when logo scales */
.navbar.py-lg-5 {
	padding-top: 2rem !important;
	padding-bottom: 2rem !important;
}

.navbar-brand {
	display: flex;
	align-items: center;
	height: 40px;
	overflow: visible;
}

.navbar-brand img {
	max-height: 70px !important;
	width: auto;
	position: relative;
	top: 0;
}

@media (max-width: 991.98px) {
	.navbar.py-lg-5 {
		padding-top: 1rem !important;
		padding-bottom: 0 !important;
	}

	.navbar-brand {
		height: 35px;
	}

	.navbar-brand img {
		max-height: 40px !important;
	}
}

/* About page content styling for rich text editor content */
.about-content {
	line-height: 1.8;
}

.about-content p {
	margin-bottom: 1rem;
}

.about-content p:last-child {
	margin-bottom: 0;
}

.about-content h1,
.about-content h2,
.about-content h3,
.about-content h4,
.about-content h5,
.about-content h6 {
	margin-top: 1.5rem;
	margin-bottom: 1rem;
	font-weight: 600;
}

.about-content h1:first-child,
.about-content h2:first-child,
.about-content h3:first-child,
.about-content h4:first-child,
.about-content h5:first-child,
.about-content h6:first-child {
	margin-top: 0;
}

.about-content ul,
.about-content ol {
	margin-bottom: 1rem;
	padding-left: 1.5rem;
}

.about-content li {
	margin-bottom: 0.5rem;
}

.about-content strong,
.about-content b {
	font-weight: 600;
}

.about-content em,
.about-content i {
	font-style: italic;
}

.about-content a {
	color: #0d6efd;
	text-decoration: underline;
}

.about-content a:hover {
	color: #0a58ca;
}

.about-content blockquote {
	border-left: 4px solid #dee2e6;
	padding-left: 1rem;
	margin: 1.5rem 0;
	font-style: italic;
	color: #6c757d;
}

.about-content img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 1rem 0;
}

.about-content table {
	width: 100%;
	margin-bottom: 1rem;
	border-collapse: collapse;
}

.about-content table th,
.about-content table td {
	padding: 0.5rem;
	border: 1px solid #dee2e6;
}

.about-content table th {
	background-color: #f8f9fa;
	font-weight: 600;
}

/* Hero slider fixed height */
.hero-slider .slick-slide>div {
	min-height: 500px;
	height: 500px;
}

.hero-slider .slick-slide>div {
	min-height: 400px;
	height: 400px;
}


/* Mobile Accordion Logic */
.transition-transform {
	transition: transform 0.2s ease-in-out;
}

a[aria-expanded="true"] .accordion-arrow {
	transform: rotate(90deg);
}

/* Mobile Quick Discovery Grid Dominance */
.grid-card-dominant {
	background-color: #f0f2f5 !important;
	/* Slightly darker than light */
	border: 1px solid #dee2e6 !important;
}

.grid-card-dominant span {
	font-weight: 700 !important;
	/* Bolder text */
	color: #212529 !important;
	/* Darker black */
	font-size: 0.8rem !important;
}

/* Mobile UI Polish Utilities */

/* 2-line clamp for product names */
.line-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: 3rem;
	/* Optional: reserve space for 2 lines to avoid jumping, or let it collapse */
}

/* Larger touch area for inputs/buttons on mobile */
.touch-target-lg {
	min-width: 44px;
	min-height: 44px;
	padding: 0px 10px !important;
	/* Adjust padding as needed */
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	/* Larger text for +/- */
}

/* Neutral Accordion Headers in Checkout */
.accordion-button.neutral-header:not(.collapsed) {
	background-color: #f8f9fa;
	/* Light gray instead of strong blue/green */
	color: #212529;
	box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
}

.accordion-button.neutral-header:focus {
	box-shadow: none;
	/* Remove focus ring if desired, or keep default */
	border-color: rgba(0, 0, 0, .125);
}

/* Make sure active state still looks actionable but not overwhelming */
.accordion-button.neutral-header:not(.collapsed)::after {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Checkout specific adjustments */
@media (max-width: 575.98px) {

	/* Taller buttons on mobile */
	.btn-mobile-lg {
		padding-top: 0.75rem;
		padding-bottom: 0.75rem;
		font-size: 1.1rem;
	}
}

/* Sticky Checkout Bar Mobile */
:root {
	--mobile-nav-offset: 0px;
	--checkout-sticky-height: 80px;
}

@media (max-width: 991.98px) {
	:root {
		--mobile-nav-offset: 60px;
		/* Aligns with _MobileNavigation height */
	}
}

.checkout-sticky {
	position: fixed;
	bottom: var(--mobile-nav-offset);
	left: 0;
	right: 0;
	background-color: #fff;
	border-top: 1px solid #dee2e6;
	padding: 1rem 0;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
	z-index: 1020;
	/* Above content, below most modals/offcanvas */
	transition: bottom 0.3s ease;
}

/* Add padding to bottom of page when sticky bar is present */
.pb-mobile-sticky {
	padding-bottom: 0;
}

@media (max-width: 575.98px) {
	.pb-mobile-sticky {
		padding-bottom: calc(var(--checkout-sticky-height) + var(--mobile-nav-offset));
	}
}

/* Feature Section Redesign Utilities */

/* Hover Lift Effect */
.hover-scale {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
	transform: translateY(-5px);
	box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

/* Icon Circle Container */
.feature-icon-circle {
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 1.5rem;
}

/* Soft Background Utilities */
.bg-soft-primary {
	background-color: rgba(13, 110, 253, 0.1);
	/* Bootstrap Primary with opacity */
	color: #0d6efd;
}

.bg-soft-success {
	background-color: rgba(25, 135, 84, 0.1);
	/* Bootstrap Success with opacity */
	color: #198754;
}

/* Product Detail Sticky Action Bar - Mobile Only */
:root {
	--product-sticky-height: 70px;
}

@media (max-width: 767.98px) {

	/* Sticky bar at bottom on mobile */
	.product-action-bar-mobile {
		position: fixed;
		bottom: var(--mobile-nav-offset, 0px);
		left: 0;
		right: 0;
		background-color: #fff;
		border-top: 1px solid #dee2e6;
		padding: 0.75rem 1rem;
		box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
		z-index: 1020;
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
	}

	/* Hide the inline action bar on mobile */
	.product-action-bar-desktop {
		display: none !important;
	}

	/* Add bottom padding to prevent content overlap */
	.product-detail-content {
		padding-bottom: calc(var(--product-sticky-height) + var(--mobile-nav-offset, 0px) + 20px);
	}

	/* Quantity input styling for mobile sticky bar */
	.product-action-bar-mobile .input-spinner {
		flex-shrink: 0;
	}

	.product-action-bar-mobile .input-spinner input[type="number"] {
		width: 40px;
		text-align: center;
	}

	/* Add to basket button takes remaining space */
	.product-action-bar-mobile .btn-primary {
		flex: 1;
		padding: 0.625rem 1rem;
	}

	/* Favorite button compact */
	.product-action-bar-mobile .favorite-toggle {
		flex-shrink: 0;
		padding: 0.625rem 0.75rem;
	}
}

/* Desktop: Show inline bar, hide mobile sticky */
@media (min-width: 768px) {
	.product-action-bar-desktop {
		display: flex !important;
	}

	.product-action-bar-mobile {
		display: none !important;
	}
}

/* Basket Page Quantity Spinner - Compact Styling */
.basket-quantity-spinner {
	max-width: 100px;
	display: flex !important;
	align-items: center !important;
	flex-wrap: nowrap;
}

.basket-quantity-spinner .button-minus,
.basket-quantity-spinner .button-plus {
	min-width: 28px;
	max-width: 28px;
	height: 28px;
	padding: 0;
	font-size: 0.875rem;
	line-height: 28px;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 4px;
	flex-shrink: 0;
}

.basket-quantity-spinner .quantity-field {
	width: 36px;
	max-width: 36px;
	height: 28px;
	text-align: center;
	font-size: 0.875rem;
	padding: 0;
	border-radius: 4px;
	flex-shrink: 0;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

@media (max-width: 575.98px) {
	.basket-quantity-spinner {
		max-width: 90px;
	}

	.basket-quantity-spinner .button-minus,
	.basket-quantity-spinner .button-plus {
		min-width: 26px;
		max-width: 26px;
		height: 26px;
		font-size: 0.8rem;
		line-height: 26px;
	}

	.basket-quantity-spinner .quantity-field {
		width: 30px;
		max-width: 30px;
		height: 26px;
		font-size: 0.8rem;
		line-height: 26px;
	}
}

/* Basket page - remove min-height from product names for tighter layout */
.list-group-item .line-clamp-2 {
	min-height: auto;
	margin-top: 0.5rem;
}