/* ==========================================================================
   Azan Store Kit
   Uses the brand tokens already defined by the theme, with fallbacks so the
   kit still looks right if it is ever activated on another theme.
   ========================================================================== */

.azan-fab,
.azan-hero,
.azan-search-panel,
.azan-card__media {
	--sk-accent: var(--azan-accent, #F7941E);
	--sk-accent-dark: var(--azan-accent-dark, #E07E08);
	--sk-ink: var(--azan-ink, #123A56);
	--sk-muted: var(--azan-muted, #5F7C8E);
	--sk-line: var(--azan-line, #EBE4DC);
	--sk-cream: var(--azan-surface, #FFF7EE);
	--sk-radius: var(--azan-radius-md, 16px);
	--sk-pill: var(--azan-radius-pill, 999px);
	--sk-font: var(--azan-font-body, "Nunito Sans", system-ui, sans-serif);
	--sk-head: var(--azan-font-head, "Fredoka", sans-serif);
}

/* --------------------------------------------------------------------------
   Floating stack
   Bottom right, stacked upward, clear of mobile browser chrome.
   -------------------------------------------------------------------------- */

.azan-fab {
	position: fixed;
	right: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-end;
	pointer-events: none;
}

.azan-fab__btn {
	pointer-events: auto;
	width: 48px;
	height: 48px;
	border-radius: var(--sk-pill);
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	color: #FFFFFF;
	box-shadow: 0 6px 18px rgba(18, 58, 86, 0.18);
	transition: transform 0.18s ease, background-color 0.18s ease, opacity 0.25s ease;
	position: relative;
	text-decoration: none;
}

.azan-fab__btn svg {
	width: 24px;
	height: 24px;
	display: block;
}

.azan-fab__btn:hover,
.azan-fab__btn:focus-visible {
	transform: translateY(-2px);
	color: #FFFFFF;
}

.azan-fab__btn--whatsapp { background-color: #25D366; }
.azan-fab__btn--whatsapp:hover { background-color: #1FBE5A; }

.azan-fab__btn--messenger { background-color: #0084FF; }
.azan-fab__btn--messenger:hover { background-color: #0072DB; }

.azan-fab__btn--top {
	background-color: #FFFFFF;
	color: var(--sk-ink);
	border: 1px solid var(--sk-line);
	opacity: 0;
	transform: translateY(8px);
}

.azan-fab__btn--top.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.azan-fab__btn--top:hover {
	background-color: var(--sk-accent);
	border-color: var(--sk-accent);
	color: #FFFFFF;
}

.azan-fab__tip {
	position: absolute;
	right: calc(100% + 10px);
	white-space: nowrap;
	background: var(--sk-ink);
	color: #FFFFFF;
	font-family: var(--sk-font);
	font-size: 12px;
	font-weight: 700;
	padding: 6px 10px;
	border-radius: 8px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease;
}

.azan-fab__btn:hover .azan-fab__tip {
	opacity: 1;
}

@media (max-width: 767px) {
	.azan-fab {
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		gap: 8px;
	}

	.azan-fab__btn {
		width: 44px;
		height: 44px;
	}

	.azan-fab__btn svg {
		width: 22px;
		height: 22px;
	}

	/* Tooltips are noise on touch devices. */
	.azan-fab__tip {
		display: none;
	}
}

/* Give WooCommerce's sticky add to cart room to breathe. */
body.single-product .azan-fab {
	bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
	body.single-product .azan-fab {
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	}
}

/* --------------------------------------------------------------------------
   Product page contact row
   -------------------------------------------------------------------------- */

.azan-product-contact {
	margin: 22px 0 6px;
	padding-top: 18px;
	border-top: 1px solid var(--azan-line, #EBE4DC);
}

.azan-product-contact__label {
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 14px;
	font-weight: 700;
	color: var(--azan-ink, #123A56);
	margin: 0 0 10px;
}

.azan-product-contact__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.azan-contact-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border-radius: var(--azan-radius-pill, 999px);
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 14px;
	font-weight: 700;
	color: #FFFFFF !important;
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.azan-contact-btn svg {
	width: 18px;
	height: 18px;
	flex: none;
}

.azan-contact-btn--whatsapp { background-color: #25D366; }
.azan-contact-btn--whatsapp:hover { background-color: #1FBE5A; }
.azan-contact-btn--messenger { background-color: #0084FF; }
.azan-contact-btn--messenger:hover { background-color: #0072DB; }

@media (max-width: 480px) {
	.azan-contact-btn {
		flex: 1 1 100%;
		justify-content: center;
	}
}

/* --------------------------------------------------------------------------
   Live search dropdown
   -------------------------------------------------------------------------- */

.azan-search-host {
	position: relative;
}

.azan-search-panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 9995;
	background: #FFFFFF;
	border: 1px solid var(--azan-line, #EBE4DC);
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(18, 58, 86, 0.14);
	overflow: hidden;
	max-height: min(70vh, 460px);
	overflow-y: auto;
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
}

.azan-search-list {
	list-style: none;
	margin: 0;
	padding: 6px;
}

.azan-search-item + .azan-search-item {
	border-top: 1px solid var(--azan-line, #EBE4DC);
}

.azan-search-link {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 10px;
	border-radius: 10px;
	text-decoration: none;
	color: var(--azan-ink, #123A56);
}

.azan-search-item.is-active .azan-search-link,
.azan-search-link:hover,
.azan-search-link:focus-visible {
	background: var(--azan-surface, #FFF7EE);
}

.azan-search-thumb {
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 8px;
	overflow: hidden;
	background: #FFFFFF;
	border: 1px solid var(--azan-line, #EBE4DC);
	display: flex;
	align-items: center;
	justify-content: center;
}

.azan-search-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.azan-search-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.azan-search-name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--azan-ink, #123A56);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.azan-search-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 13px;
}

.azan-search-price {
	font-weight: 700;
	color: var(--azan-accent, #F7941E);
}

.azan-search-old {
	color: var(--azan-muted, #5F7C8E);
	text-decoration: line-through;
	font-size: 12px;
}

.azan-search-stock {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
}

.azan-search-stock.is-in {
	background: rgba(165, 197, 32, 0.16);
	color: #5A6E10;
}

.azan-search-stock.is-out {
	background: rgba(230, 59, 38, 0.12);
	color: #B32C1C;
}

.azan-search-empty,
.azan-search-loading {
	padding: 18px 16px;
	font-size: 14px;
	color: var(--azan-muted, #5F7C8E);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.azan-search-empty strong {
	color: var(--azan-ink, #123A56);
	font-size: 15px;
}

.azan-search-all {
	display: block;
	text-align: center;
	padding: 12px;
	font-size: 13px;
	font-weight: 700;
	color: var(--azan-deep, #0E5C8E);
	background: var(--azan-surface, #FFF7EE);
	text-decoration: none;
}

.azan-search-all:hover {
	color: var(--azan-accent, #F7941E);
}

@media (max-width: 600px) {
	.azan-search-panel {
		position: fixed;
		left: 10px;
		right: 10px;
		top: auto;
		max-height: 60vh;
	}
}

/* --------------------------------------------------------------------------
   Hero slideshow
   -------------------------------------------------------------------------- */

.azan-hero {
	position: relative;
	overflow: hidden;
}

.azan-hero__track {
	display: block;
}

.azan-hero__slide {
	display: none;
}

.azan-hero__slide.is-active {
	display: block;
}

.azan-hero--fade .azan-hero__slide.is-active {
	animation: azanHeroFade 0.55s ease both;
}

@keyframes azanHeroFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* Slide mode keeps every panel on one row and moves the track. */
.azan-hero.is-slide-mode {
	overflow: hidden;
}

.azan-hero.is-slide-mode .azan-hero__track {
	display: flex;
	width: 100%;
	transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.azan-hero.is-slide-mode .azan-hero__slide {
	display: block;
	flex: 0 0 100%;
	min-width: 100%;
}

.azan-hero__inner {
	display: flex;
	align-items: center;
	gap: 46px;
	width: 100%;
}

.azan-hero__content {
	flex: 1 1 46%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.azan-hero__media {
	flex: 1 1 54%;
	min-width: 0;
	overflow: hidden;
	border-radius: 28px;
}

.azan-hero__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 28px;
}

.azan-hero--zoom .azan-hero__slide.is-active .azan-hero__img {
	animation: azanHeroZoom 7s ease-out both;
}

@keyframes azanHeroZoom {
	from { transform: scale(1); }
	to { transform: scale(1.045); }
}

.azan-hero__eyebrow {
	margin: 0;
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.4px;
	color: var(--azan-accent, #F7941E);
}

.azan-hero__heading {
	margin: 0;
	font-family: var(--azan-font-head, "Fredoka", sans-serif);
	font-weight: 600;
	font-size: 52px;
	line-height: 1.08;
	color: var(--azan-ink, #123A56);
}

.azan-hero__text {
	margin: 0;
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 17px;
	line-height: 1.7;
	color: var(--azan-muted, #5F7C8E);
	max-width: 46ch;
}

.azan-hero__btn {
	display: inline-block;
	background: var(--azan-accent, #F7941E);
	color: #FFFFFF !important;
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 16px;
	font-weight: 700;
	padding: 16px 34px;
	border-radius: var(--azan-radius-pill, 999px);
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.azan-hero__btn:hover {
	background: var(--azan-accent-dark, #E07E08);
	color: #FFFFFF !important;
}

/* Entrance animation for the content of the incoming slide. */
.azan-hero__slide.is-animating [data-azan-anim] {
	animation: azanHeroUp 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.azan-hero__slide.is-animating [data-azan-anim="1"] { animation-delay: 0.02s; }
.azan-hero__slide.is-animating [data-azan-anim="2"] { animation-delay: 0.10s; }
.azan-hero__slide.is-animating [data-azan-anim="3"] { animation-delay: 0.18s; }
.azan-hero__slide.is-animating [data-azan-anim="4"] { animation-delay: 0.26s; }

@keyframes azanHeroUp {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Arrows */
.azan-hero__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 1px solid var(--azan-line, #EBE4DC);
	background: rgba(255, 255, 255, 0.92);
	color: var(--azan-ink, #123A56);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
	padding: 0;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.azan-hero__nav svg {
	width: 18px;
	height: 18px;
}

.azan-hero__nav:hover {
	background: var(--azan-accent, #F7941E);
	border-color: var(--azan-accent, #F7941E);
	color: #FFFFFF;
}

.azan-hero__nav--prev { left: 10px; }
.azan-hero__nav--next { right: 10px; }

/* Dots */
.azan-hero__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 3;
}

.azan-hero__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border-radius: 999px;
	border: none;
	background: rgba(18, 58, 86, 0.24);
	cursor: pointer;
	transition: width 0.2s ease, background-color 0.2s ease;
}

.azan-hero__dot.is-active {
	width: 26px;
	background: var(--azan-accent, #F7941E);
}

@media (max-width: 1024px) {
	.azan-hero__heading { font-size: 42px; }
}

@media (max-width: 767px) {
	.azan-hero__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}

	.azan-hero__heading { font-size: 32px; }
	.azan-hero__text { font-size: 15px; }

	.azan-hero__media,
	.azan-hero__img { border-radius: 20px; }

	.azan-hero__nav { display: none; }

	.azan-hero__dots { bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.azan-hero__slide.is-active,
	.azan-hero__slide.is-animating [data-azan-anim],
	.azan-hero--zoom .azan-hero__slide.is-active .azan-hero__img {
		animation: none !important;
	}

	.azan-hero.is-slide-mode .azan-hero__track {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   Product cards
   Fixed contained image area, equal height cards, clamped titles.
   -------------------------------------------------------------------------- */

.woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-align: center;
}

.woocommerce ul.products li.product .azan-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #FFFFFF;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 12px;
	padding: 6px;
}

/* The image must show in full, never cropped. */
.woocommerce ul.products li.product .azan-card__media img,
.woocommerce ul.products li.product a img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	aspect-ratio: auto;
	margin: 0;
	border-radius: 6px;
	background: #FFFFFF;
}

.azan-card__badge {
	position: absolute;
	top: 8px;
	z-index: 2;
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 6px 10px;
	border-radius: 999px;
	color: #FFFFFF;
}

.azan-card__badge--sale {
	left: 8px;
	background: var(--azan-berry, #E63B26);
}

.azan-card__badge--stock {
	right: 8px;
	background: var(--azan-ink, #123A56);
}

.azan-card__cat {
	display: block;
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.6px;
	color: var(--azan-muted, #5F7C8E);
	margin-bottom: 4px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--azan-ink, #123A56);
	padding: 0;
	margin: 0 0 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	/* Two lines reserved so every card lines up. */
	min-height: calc(2 * 1.4em);
}

.woocommerce ul.products li.product .price {
	margin-bottom: 2px;
}

.azan-card__save {
	display: block;
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 12px;
	font-weight: 700;
	color: var(--azan-lime-ink, #5A6E10);
	min-height: 18px;
	margin-bottom: 10px;
}

.azan-card__save--empty {
	min-height: 18px;
	margin-bottom: 10px;
}

/* Push the button to the bottom so cards stay level. */
.azan-card__btn {
	margin-top: auto;
	display: block;
	width: 100%;
	text-align: center;
	background: var(--azan-accent, #F7941E);
	color: #FFFFFF !important;
	font-family: var(--azan-font-body, "Nunito Sans", sans-serif);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	padding: 12px 16px;
	border-radius: var(--azan-radius-pill, 999px);
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.azan-card__btn:hover,
.azan-card__btn:focus-visible {
	background: var(--azan-accent-dark, #E07E08);
	color: #FFFFFF !important;
}

/* The percentage badge replaces the default flash. */
.woocommerce ul.products li.product .onsale {
	display: none !important;
}

@media (max-width: 767px) {
	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 13.5px;
	}

	.azan-card__btn {
		font-size: 13px;
		padding: 11px 12px;
	}

	.azan-card__badge {
		font-size: 11px;
		padding: 5px 8px;
	}
}

/* Nothing should ever push the page sideways. */
.woocommerce ul.products,
.woocommerce ul.products li.product {
	max-width: 100%;
}

/* --------------------------------------------------------------------------
   Checkout tidy up
   -------------------------------------------------------------------------- */

.woocommerce form .form-row.azan-area-field select {
	width: 100%;
}

.woocommerce-checkout #billing_country_field,
.woocommerce-checkout #shipping_country_field {
	/* Bangladesh is the only option; the label still reads for assistive tech. */
	display: none;
}

@media (max-width: 767px) {
	.woocommerce-checkout .col2-set .col-1,
	.woocommerce-checkout .col2-set .col-2 {
		float: none;
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   CONTROL RESET
   The theme styles bare button elements globally. These controls are icons,
   not buttons, so the class is doubled to win on specificity without !important.
   -------------------------------------------------------------------------- */

.azan-hero .azan-hero__nav.azan-hero__nav {
	width: 42px;
	height: 42px;
	min-width: 0;
	min-height: 0;
	padding: 0;
	margin: 0;
	border-radius: 999px;
	border: 1px solid var(--azan-line, #EBE4DC);
	background: rgba(255, 255, 255, 0.92);
	color: var(--azan-ink, #123A56);
	box-shadow: none;
	font-size: 0;
	line-height: 0;
}

.azan-hero .azan-hero__nav.azan-hero__nav:hover {
	background: var(--azan-accent, #F7941E);
	border-color: var(--azan-accent, #F7941E);
	color: #FFFFFF;
}

.azan-hero .azan-hero__dots .azan-hero__dot.azan-hero__dot {
	width: 9px;
	height: 9px;
	min-width: 0;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 999px;
	background: rgba(18, 58, 86, 0.24);
	box-shadow: none;
	font-size: 0;
	line-height: 0;
}

.azan-hero .azan-hero__dots .azan-hero__dot.azan-hero__dot.is-active {
	width: 26px;
	background: var(--azan-accent, #F7941E);
}

.azan-fab .azan-fab__btn.azan-fab__btn {
	min-width: 0;
	min-height: 0;
	padding: 0;
	margin: 0;
	font-size: 0;
	line-height: 0;
	border-radius: 999px;
}

.azan-fab .azan-fab__btn.azan-fab__btn--top {
	background: #FFFFFF;
	color: var(--azan-ink, #123A56);
	border: 1px solid var(--azan-line, #EBE4DC);
}

.azan-fab .azan-fab__btn.azan-fab__btn--top:hover {
	background: var(--azan-accent, #F7941E);
	border-color: var(--azan-accent, #F7941E);
	color: #FFFFFF;
}

.azan-fab .azan-fab__tip {
	font-size: 12px;
	line-height: 1.2;
}
