/*
|--------------------------------------------------------------------------
| custom.css — consolidated retained frontend styles
|--------------------------------------------------------------------------
| Every rule here is kept for one of these reasons:
|   1. Styles markup generated at runtime by JS or server-rendered AJAX
|      HTML (classes are emitted in strings; Tailwind utilities cannot be
|      added to them without changing JS/PHP code, which is out of scope).
|   2. State classes toggled by JS (.active / .d-none / .expanded).
|   3. CSS a Tailwind utility cannot express: keyframe animations,
|      ::before content:attr() data labels, scrollbar styling,
|      CMS-generated .entry markup, non-standard breakpoints.
|--------------------------------------------------------------------------
*/

/* ============================================================
   JS-toggled visibility (class name toggled by cart/checkout/
   landing scripts — do not rename)
   ============================================================ */
.d-none { display: none !important; }

/* ============================================================
   Cart drawer (footer partial — .sidebar/.overlay/.toggle-btn)
   State-driven slide-in drawer + fixed toggle button
   ============================================================ */
.overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 99998;
	display: none;
	opacity: 0;
	transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.overlay.active {
	display: block;
	opacity: 1;
}
.sidebar {
	position: fixed;
	top: 0;
	right: -80%;
	width: 80%;
	max-width: 400px;
	height: 100%;
	background: #fff;
	box-shadow: -4px 0 24px rgba(0,0,0,0.15), -1px 0 0 rgba(0,0,0,0.05);
	transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 99999;
	overflow-y: auto;
	border-left: 1px solid rgba(0,0,0,0.05);
}
.sidebar.active { right: 0; }
.sidebar .shopingCart { padding: 20px; }

.toggle-btn {
	position: fixed;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, transform 0.3s;
	z-index: 99997;
	color: var(--color-white);
	background: #fff;
	font-size: var(--font-size-300, 18px);
	padding: 0;
	border: 2px solid var(--color-theme);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toggle-btn > img { width: 60px; height: 60px; }
.toggle-btn.move-left { right: 80%; }
.toggle-btn.hidden {
	opacity: 0;
	pointer-events: none;
	right: -60px;
}
@media only screen and (min-width: 786px) {
	.sidebar { right: -30%; width: 30%; }
	.toggle-btn.move-left { right: 30%; }
}

/* ============================================================
   Server-generated cart items (#tp_cart_data ← /frontend/view_cart)
   CartController emits: .cart-item-card, .cart-item-img,
   .cart-item-desc, .quantity-wrapper/.quantity-btn/.quantity-input
   ============================================================ */
.cart_list { width: 100%; }
.cart-item-card {
	width: 100%;
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid rgba(0,0,0,0.08);
	padding: 12px 0;
}
.cart-item-card:hover { background-color: rgba(0,0,0,0.02); }
.cart-item-card:last-child { border-bottom: none; }
.cart-item-card .cart-item-img {
	width: 60px;
	height: 60px;
	float: left;
	overflow: hidden;
	margin-right: 12px;
	border-radius: 10px;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.cart-item-card .cart-item-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
}
.cart-item-card .cart-item-desc { flex: 1; min-width: 0; }
.cart-item-card .cart-item-desc h6 {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
	font-family: var(--primary-font-family, inherit);
	color: #1a1a1a;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
}
.cart-item-card .cart-item-desc p {
	font-size: 13px;
	margin: 0;
	color: #666;
	font-weight: 500;
}
.item-remove {
	position: absolute;
	top: -5px;
	right: -5px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #ff4444;
	color: var(--color-white, #fff);
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(255,68,68,0.3);
	transition: all 0.2s ease;
	z-index: 5;
}
.item-remove:hover {
	background: #ff0000;
	transform: scale(1.1);
}
.item-remove > i {
	width: 14px;
	height: 14px;
	line-height: 14px;
	font-size: 12px;
}

/* Drawer scrollable body scrollbar */
.shoping-cart-body::-webkit-scrollbar { width: 5px; }
.shoping-cart-body::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 5px; }
.shoping-cart-body::-webkit-scrollbar-thumb { background: var(--color-gray, #c1c1c1); border-radius: 5px; }
.shoping-cart-body::-webkit-scrollbar-thumb:hover { background: var(--color-theme); }

/* ============================================================
   Quantity stepper (.quantity-wrapper/.quantity-btn/.quantity-input)
   Used in server-generated cart markup + blade templates
   ============================================================ */
.quantity-wrapper {
	display: inline-flex;
	align-items: center;
	border: 1px solid rgba(0,0,0,0.1);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.quantity-btn {
	background: #f8f9fa;
	border: none;
	padding: 6px 10px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	color: #333;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
}
.quantity-btn:hover {
	background: #e9ecef;
	color: var(--color-theme);
}
.quantity-btn:active { transform: scale(0.95); }
.quantity-input {
	width: 50px;
	text-align: center;
	border: none;
	outline: none;
	background: #fff;
	font-size: 15px;
	font-weight: 600;
	color: #333;
	padding: 6px 0;
}

/* ============================================================
   Floating contact FAB (footer partial)
   Staggered reveal — .expanded toggled by JS
   ============================================================ */
.fab-contact-wrapper {
	position: fixed;
	bottom: 54px;
	right: 80px;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0;
}
.fab-main-btn {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: linear-gradient(135deg, #34c759 0%, #30b350 100%);
	color: #fff;
	box-shadow: 0 4px 14px rgba(52,199,89,0.45);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fab-main-btn:hover { transform: scale(1.05); box-shadow: 0 6px 18px rgba(52,199,89,0.5); }
.fab-main-btn:active { transform: scale(0.98); }
.fab-main-btn .fab-icon-close { display: none; }
.fab-main-btn.expanded .fab-icon-open { display: none; }
.fab-main-btn.expanded .fab-icon-close { display: flex; align-items: center; justify-content: center; }
.fab-main-btn .fab-icon-open,
.fab-main-btn .fab-icon-close { font-size: 1.5rem; }
.fab-action-btn {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 3px 10px rgba(0,0,0,0.2);
	transition: transform 0.2s, opacity 0.2s;
	margin-bottom: 12px;
	opacity: 0;
	transform: translateY(20px) scale(0.5);
	pointer-events: none;
}
.fab-contact-wrapper.expanded .fab-action-btn {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}
/* Bottom-to-top animation: last child appears first */
.fab-contact-wrapper.expanded .fab-action-btn:nth-last-child(1) { transition-delay: 0.05s; }
.fab-contact-wrapper.expanded .fab-action-btn:nth-last-child(2) { transition-delay: 0.1s; }
.fab-contact-wrapper.expanded .fab-action-btn:nth-last-child(3) { transition-delay: 0.15s; }
.fab-action-btn:hover { transform: translateY(-2px) scale(1.08); }
.fab-phone { background: linear-gradient(135deg, #25d366 0%, #128c7e 100%); }
.fab-whatsapp { background: linear-gradient(135deg, #25d366 0%, #128c7e 100%); }
.fab-facebook { background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%); }
@media (max-width: 767px) {
	.fab-contact-wrapper { bottom: 90px; right: 16px; }
	.fab-main-btn { width: 50px; height: 50px; }
	.fab-action-btn { width: 44px; height: 44px; margin-bottom: 10px; }
}

/* ============================================================
   CMS content (.entry) — markup comes from the WYSIWYG editor
   (tenant page content + article descriptions), so classes
   cannot carry utilities
   ============================================================ */
.entry {
	line-height: 2;
	font-family: 'Montserrat', 'Noto Sans Bengali', var(--primary-font-family, sans-serif);
	overflow-wrap: break-word;
}
.entry > *:first-child { margin-top: 0; }
.entry p,
.entry div { margin: 0 0 10px; }
.entry p { line-height: 2; }

/* Lists — keep the markers the WYSIWYG editor produces
   (Tailwind preflight strips list-style + padding) */
.entry ol,
.entry ul { margin: 0 0 15px; padding-left: 1.75em; }
.entry ul { list-style: disc; }
.entry ol { list-style: decimal; }
.entry ul ul,
.entry ol ul { list-style: circle; }
.entry ol ol,
.entry ul ol { list-style: lower-alpha; }
.entry ul ul,
.entry ul ol,
.entry ol ul,
.entry ol ol { margin-bottom: 0; }
.entry li { margin-bottom: 4px; }
.entry li > ul,
.entry li > ol { margin-top: 4px; }
.entry ol li,
.entry ol li a,
.entry ul li,
.entry ul li a { line-height: 2; }
.entry ol li i,
.entry ol li a i,
.entry ul li i,
.entry ul li a i { margin-right: 5px; }

/* Headings — preflight resets both size AND weight; restore both */
.entry h1 { font-size: 40px; }
.entry h2 { font-size: 33px; }
.entry h3 { font-size: 27px; }
.entry h4 { font-size: 23px; }
.entry h5 { font-size: 20px; }
.entry h6 { font-size: 17px; }
.entry h1, .entry h2, .entry h3, .entry h4, .entry h5, .entry h6 {
	margin: 18px 0 10px;
	font-weight: 700;
	line-height: 1.35;
	font-family: 'Montserrat', 'Noto Sans Bengali', var(--primary-font-family, sans-serif);
}
.entry h1:first-child, .entry h2:first-child, .entry h3:first-child,
.entry h4:first-child, .entry h5:first-child, .entry h6:first-child { margin-top: 0; }

/* Links — preflight makes them inherit color + no underline */
.entry a {
	color: var(--color-primary, #ec5700);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.entry a:hover { color: var(--color-theme, #0ea5e9); }

.entry blockquote,
.entry .blockquote {
	padding: 10px 20px;
	font-size: 14px;
	border-left-width: 5px;
	border-left-style: solid;
	border-color: #a6a6a6;
	letter-spacing: 0.05em;
	margin: 0 0 15px;
}
.entry blockquote p,
.entry .blockquote p { margin: 0; }
.entry pre {
	border-bottom-width: 1px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-left-width: 5px;
	border-style: solid;
	padding: 20px;
	margin: 10px 0;
	line-height: 2;
	letter-spacing: 0.05em;
	white-space: pre-wrap;
	overflow-x: auto;
}
.entry b { font-weight: bold; }
.entry u { text-decoration: underline; }

/* Tables — Summernote emits Bootstrap classes that aren't loaded here */
.entry table {
	width: 100%;
	margin: 0 0 15px;
	border-collapse: collapse;
}
.entry table tr th,
.entry table tr td {
	font-family: inherit;
	color: var(--color-gray-dark, #4b5563);
	border: 1px solid var(--color-gray-400, #e5e7eb);
	padding: 8px 12px;
	text-align: left;
	vertical-align: top;
}
.entry table tr th {
	background: var(--color-gray-400, #f5f5f5);
	font-weight: 700;
}

.entry img { max-width: 100%; height: auto; }
.entry figure { margin: 0 0 15px; }
.entry hr { border: 0; border-top: 1px solid var(--color-gray-400, #e5e7eb); margin: 24px 0; }
.entry iframe,
.entry video { max-width: 100%; }

@media (max-width: 767px) {
	.entry h1 { font-size: 28px; }
	.entry h2 { font-size: 24px; }
	.entry h3 { font-size: 21px; }
}

/* ============================================================
   AJAX autoload animations (home.js appends
   .autoload-content-left/right/down wrappers)
   ============================================================ */
@keyframes slideFadeLeft {
	from { opacity: 0; transform: translateX(-50px); }
	to { opacity: 1; transform: translateX(0); }
}
@keyframes slideFadeRight {
	from { opacity: 0; transform: translateX(50px); }
	to { opacity: 1; transform: translateX(0); }
}
@keyframes slideFadeDown {
	from { opacity: 0; transform: translateY(30px); }
	to { opacity: 1; transform: translateY(0); }
}
.autoload-content-left { animation: slideFadeLeft 0.6s ease-out; }
.autoload-content-right { animation: slideFadeRight 0.6s ease-out; }
.autoload-content-down { animation: slideFadeDown 0.6s ease-out; }

/* ============================================================
   Shim for classes emitted inside JS-generated markup strings
   (checkout.js payment/instruction blocks, landing.js spinners,
   catalog.js tables). JS files are out of migration scope, so
   minimal equivalents of the utility classes they emit live here.
   ============================================================ */
.spinner-border {
	display: inline-block;
	width: 2rem;
	height: 2rem;
	vertical-align: -0.125em;
	border: 0.25em solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spinner-border 0.75s linear infinite;
}
.spinner-border-sm { width: 1rem; height: 1rem; border-width: 0.2em; }
@keyframes spinner-border { to { transform: rotate(360deg); } }

.alert {
	position: relative;
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border: 1px solid transparent;
	border-radius: 0.375rem;
}
.alert-light { color: #636464; background-color: #fefefe; border-color: #fdfdfe; }
.alert-success { color: #0f5132; background-color: #d1e7dd; border-color: #badbcc; }
.alert-danger { color: #842029; background-color: #f8d7da; border-color: #f5c2c7; }
.alert-dismissible { padding-right: 3rem; }
.alert-dismissible .btn-close {
	position: absolute;
	top: 0;
	right: 0;
	padding: 0.95rem 1rem;
}
.btn-close {
	box-sizing: content-box;
	width: 1em;
	height: 1em;
	padding: 0.25em;
	color: #000;
	background: transparent center/1em auto no-repeat;
	border: 0;
	border-radius: 0.375rem;
	opacity: 0.5;
	cursor: pointer;
}
.btn-close:hover { opacity: 0.75; }

.form-control {
	display: block;
	width: 100%;
	padding: 0.375rem 0.75rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: #212529;
	background-color: #fff;
	background-clip: padding-box;
	border: 1px solid #dee2e6;
	border-radius: 0.375rem;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control:focus {
	border-color: var(--color-primary);
	outline: 0;
	box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
}
.form-label { margin-bottom: 0.5rem; display: inline-block; }

.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 0.5rem; border-bottom: 1px solid #dee2e6; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: rgba(0,0,0,0.05); }
.table-responsive { overflow-x: auto; }

/* plain utility shims for JS-emitted markup */
.d-block { display: block; }
.text-start { text-align: left; }
.text-muted { color: #6c757d; }
.fw-bold { font-weight: 700; }
.fs-5 { font-size: 1.25rem; }
.small { font-size: 0.875em; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.p-3 { padding: 1rem; }
.rounded { border-radius: 0.375rem; }
.border { border: 1px solid #dee2e6; }
.text-primary { color: var(--color-primary); }
.text-danger { color: #dc3545; }
.text-center { text-align: center; }
