/* =========================================================
   AL NAQSHA — Lightweight Live Product Search
   Header + Mobile Bottom Navigation
   ========================================================= */

.aln-live-search{
	--aln-search-navy:#1d3949;
	--aln-search-text:#151515;
	--aln-search-muted:#7a746c;
	--aln-search-border:#ddd6ca;
	--aln-search-bg:#fffdf9;
	--aln-search-soft:#f5f1ea;

	position:relative;
	display:inline-flex;
	align-items:center;
	font-family:Arial,Helvetica,sans-serif;
	z-index:9999;
}

.aln-live-search *,
.aln-live-search *::before,
.aln-live-search *::after{
	box-sizing:border-box;
}

.aln-live-search__trigger{
	width:42px;
	height:42px;
	display:grid;
	place-items:center;
	padding:0;
	border:0;
	background:transparent;
	color:var(--aln-search-navy);
	cursor:pointer;
}

.aln-live-search__trigger svg{
	width:19px;
	height:19px;
	fill:none;
	stroke:currentColor;
	stroke-width:1.8;
	stroke-linecap:round;
}

.aln-live-search__trigger:hover,
.aln-live-search__trigger:focus-visible,
.aln-live-search__trigger[aria-expanded="true"]{
	background:transparent;
	color:var(--aln-search-navy);
}

.aln-live-search__trigger-label{
	display:none;
}

.aln-live-search__panel{
	position:absolute;
	top:calc(100% + 12px);
	right:0;
	width:min(430px,calc(100vw - 28px));
	background:var(--aln-search-bg);
	border:1px solid var(--aln-search-border);
	box-shadow:0 18px 50px rgba(29,57,73,.13);
	z-index:99999;
}

.aln-live-search__panel[hidden]{
	display:none!important;
}

.aln-live-search--header .aln-live-search__panel::before{
	content:"";
	position:absolute;
	top:-7px;
	right:16px;
	width:13px;
	height:13px;
	background:var(--aln-search-bg);
	border-left:1px solid var(--aln-search-border);
	border-top:1px solid var(--aln-search-border);
	transform:rotate(45deg);
}

.aln-live-search__field{
	position:relative;
	display:flex;
	align-items:center;
	min-height:56px;
	border-bottom:1px solid var(--aln-search-border);
	padding:0 48px 0 46px;
}

.aln-live-search__field > svg{
	position:absolute;
	left:17px;
	width:18px;
	height:18px;
	fill:none;
	stroke:var(--aln-search-muted);
	stroke-width:1.7;
	stroke-linecap:round;
}

.aln-live-search__field input{
	width:100%!important;
	height:54px!important;
	min-height:54px!important;
	margin:0!important;
	padding:0!important;
	border:0!important;
	outline:0!important;
	background:transparent!important;
	color:var(--aln-search-text)!important;
	box-shadow:none!important;
	font-size:14px!important;
	line-height:1!important;
	border-radius:0!important;
	-webkit-appearance:none;
}

.aln-live-search__field input::-webkit-search-cancel-button{
	display:none;
}

.aln-live-search__field input::placeholder{
	color:#989188;
}

.aln-live-search__clear{
	position:absolute;
	right:10px;
	width:34px;
	height:34px;
	padding:0!important;
	display:grid;
	place-items:center;
	border:0!important;
	background:transparent!important;
	color:var(--aln-search-muted)!important;
	font-size:22px!important;
	line-height:1!important;
	cursor:pointer;
}

.aln-live-search__clear:hover{
	color:var(--aln-search-navy)!important;
	background:transparent!important;
}

.aln-live-search__status{
	min-height:48px;
	display:flex;
	align-items:center;
	padding:12px 17px;
	color:var(--aln-search-muted);
	font-size:12px;
	line-height:1.45;
}

.aln-live-search__status:empty{
	display:none;
}

.aln-live-search__results{
	max-height:min(510px,70vh);
	overflow-y:auto;
	overscroll-behavior:contain;
	scrollbar-width:thin;
	scrollbar-color:#c9c1b5 transparent;
}

.aln-live-search__item{
	display:grid;
	grid-template-columns:70px minmax(0,1fr) auto;
	gap:14px;
	align-items:center;
	min-height:92px;
	padding:11px 16px;
	border-top:1px solid var(--aln-search-border);
	color:var(--aln-search-text)!important;
	text-decoration:none!important;
	background:var(--aln-search-bg);
	transition:background-color .16s ease;
}

.aln-live-search__item:hover,
.aln-live-search__item:focus-visible{
	background:var(--aln-search-soft);
	color:var(--aln-search-text)!important;
}

.aln-live-search__image{
	width:70px;
	height:70px;
	display:block;
	overflow:hidden;
	background:var(--aln-search-soft);
}

.aln-live-search__image img{
	width:100%;
	height:100%;
	display:block;
	object-fit:cover;
}

.aln-live-search__content{
	display:block;
	min-width:0;
}

.aln-live-search__name{
	display:block;
	margin:0 0 4px;
	color:var(--aln-search-text);
	font-family:Georgia,"Times New Roman",serif;
	font-size:16px;
	font-weight:400;
	line-height:1.2;
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
}

.aln-live-search__meta{
	display:block;
	margin-bottom:5px;
	color:var(--aln-search-muted);
	font-size:10px;
	line-height:1.3;
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
}

.aln-live-search__price{
	display:block;
	color:var(--aln-search-navy);
	font-size:12px;
	font-weight:700;
	line-height:1.3;
}

.aln-live-search__price .rug-price-pair{
	display:flex;
	gap:7px;
	align-items:baseline;
	flex-wrap:wrap;
}

.aln-live-search__price .rug-authoritative-omr{
	font-size:10px;
	color:var(--aln-search-muted);
	font-weight:400;
}

.aln-live-search__arrow{
	color:var(--aln-search-navy);
	font-size:17px;
}

.aln-live-search__all{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:20px;
	min-height:50px;
	padding:0 17px;
	border-top:1px solid var(--aln-search-border);
	background:var(--aln-search-navy);
	color:#fff!important;
	text-decoration:none!important;
	font-size:10px;
	font-weight:700;
	letter-spacing:.12em;
	text-transform:uppercase;
}

.aln-live-search__all:hover{
	background:#102b3a;
	color:#fff!important;
}

/* =========================================================
   MOBILE BOTTOM NAV SEARCH ITEM
   ========================================================= */

.aln-live-search--mobile-nav{
	display:block;
	width:100%;
	height:100%;
	min-height:64px;
	position:static;
}

.aln-live-search--mobile-nav .aln-live-search__trigger{
	width:100%;
	height:100%;
	min-height:64px;
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	gap:6px;
	padding:7px 8px;
	background:transparent!important;
	color:#1d3949!important;
	border:0!important;
	border-radius:0!important;
	box-shadow:none!important;
}

.aln-live-search--mobile-nav .aln-live-search__trigger svg{
	width:89px;
	height:24px;
	stroke-width:4;
	flex:0 0 15px;
}

.aln-live-search--mobile-nav .aln-live-search__trigger-label{
	display:block;
	color:inherit;
	font-size:15px;
	font-weight:600;
	line-height:1;
	letter-spacing:0;
	text-transform:none;
}

.aln-live-search--mobile-nav.is-open .aln-live-search__trigger,
.aln-live-search--mobile-nav .aln-live-search__trigger:hover,
.aln-live-search--mobile-nav .aln-live-search__trigger:focus-visible{
	color:#1d3949!important;
	background:#f5f1ea!important;
}

/* =========================================================
   ELEMENTOR MOBILE BOTTOM NAV
   Add class "aln-mobile-bottom-nav" to root footer container.
   ========================================================= */

@media(max-width:767px){
	.aln-mobile-bottom-nav{
		position:fixed!important;
		left:0!important;
		right:0!important;
		bottom:0!important;
		width:100%!important;
		min-height:68px;
		z-index:99990!important;
		background:#fffdf9!important;
		border-top:1px solid #ddd6ca;
		box-shadow:0 -8px 30px rgba(29,57,73,.08);
		padding-bottom:env(safe-area-inset-bottom);
	}

	.aln-mobile-bottom-nav > .e-con-inner,
	.aln-mobile-bottom-nav{
		gap:0!important;
	}

	.aln-mobile-bottom-nav .elementor-widget-icon-box{
		width:100%;
		height:100%;
		margin:0!important;
	}

	/* Make the Search shortcode occupy the exact same box as the Icon Box widgets. */
	.aln-mobile-bottom-nav .elementor-widget-shortcode{
		width:100%!important;
		height:100%!important;
		margin:0!important;
		align-self:stretch!important;
	}

	.aln-mobile-bottom-nav .elementor-widget-shortcode > .elementor-widget-container,
	.aln-mobile-bottom-nav .elementor-widget-shortcode .elementor-shortcode{
		width:100%!important;
		height:100%!important;
		display:block!important;
	}

	.aln-mobile-bottom-nav .elementor-widget-icon-box .elementor-widget-container{
		height:100%;
	}

	.aln-mobile-bottom-nav .elementor-icon-box-wrapper{
		min-height:64px;
		display:flex!important;
		flex-direction:column!important;
		align-items:center!important;
		justify-content:center!important;
		gap:5px!important;
		padding:7px 8px!important;
	}

	.aln-mobile-bottom-nav .elementor-icon-box-icon{
		margin:0!important;
		line-height:1!important;
	}

	.aln-mobile-bottom-nav .elementor-icon{
		color:#1d3949!important;
		border:0!important;
		background:transparent!important;
		padding:0!important;
		font-size:23px!important;
	}

	.aln-mobile-bottom-nav .elementor-icon-box-title{
		margin:0!important;
		color:#1d3949!important;
		font-size:12px!important;
		font-weight:600!important;
		line-height:1!important;
	}

	.aln-mobile-bottom-nav .elementor-icon-box-description{
		display:none!important;
	}

	.aln-mobile-bottom-nav .elementor-widget-icon-box:hover .elementor-icon-box-wrapper{
		background:#f5f1ea;
	}

	/* Prevent site content from being hidden under fixed nav. */
	body{
		padding-bottom:calc(68px + env(safe-area-inset-bottom));
	}

	/* Header search stays near the header. */
	.aln-live-search--header{
		position:static;
	}

	.aln-live-search--header .aln-live-search__panel{
		position:fixed;
		top:72px;
		left:14px;
		right:14px;
		bottom:auto;
		width:auto;
		max-width:none;
		z-index:999999;
	}

	.admin-bar .aln-live-search--header .aln-live-search__panel{
		top:104px;
	}

	.aln-live-search--header .aln-live-search__panel::before{
		display:none;
	}

	/* Mobile bottom nav search opens UPWARD above the bar. */
	.aln-live-search--mobile-nav .aln-live-search__panel{
		position:fixed;
		top:auto;
		left:12px;
		right:12px;
		bottom:calc(78px + env(safe-area-inset-bottom));
		width:auto;
		max-width:none;
		max-height:min(62vh,540px);
		z-index:999999;
		box-shadow:0 12px 45px rgba(29,57,73,.2);
	}

	.aln-live-search--mobile-nav .aln-live-search__results{
		max-height:calc(min(62vh,540px) - 105px);
	}

	.aln-live-search__item{
		grid-template-columns:62px minmax(0,1fr) auto;
		gap:11px;
		padding-left:12px;
		padding-right:12px;
	}

	.aln-live-search__image{
		width:62px;
		height:62px;
	}
}

/* Never show the dedicated mobile-nav trigger on larger screens. */
@media(min-width:768px){
	.aln-live-search--mobile-nav{
		display:none!important;
	}
}

@media (max-width: 767px) {

    body .aln-mobile-bottom-nav
    .aln-live-search--mobile-nav
    .aln-live-search__trigger > svg {
        width: 15px !important;
        height: 15px !important;

        flex: none !important;

        transform: scale(1.6) !important;
        transform-origin: center center !important;

        stroke-width: 3.6 !important;
    }

}

/* =========================================================
   ARABIC / RTL
   ========================================================= */
html[dir="rtl"] .aln-live-search{
	direction:rtl;
	text-align:right;
}
html[dir="rtl"] .aln-live-search--header .aln-live-search__panel{
	right:auto;
	left:0;
}
html[dir="rtl"] .aln-live-search--header .aln-live-search__panel::before{
	right:auto;
	left:16px;
	border-left:0;
	border-right:1px solid var(--aln-search-border);
	transform:rotate(-45deg);
}
html[dir="rtl"] .aln-live-search__field{
	padding:0 46px 0 48px;
}
html[dir="rtl"] .aln-live-search__field > svg{
	left:auto;
	right:17px;
}
html[dir="rtl"] .aln-live-search__clear{
	right:auto;
	left:10px;
}
