/* Infinity Bioscience B2B – shared design tokens and components */
:root {
	--ib-navy: #0A2540;
	--ib-navy-2: #12355C;
	--ib-blue: #0B6FD8;
	--ib-blue-d: #0959AF;
	--ib-cyan: #16B4E8;
	--ib-light: #EEF6FC;
	--ib-line: #D6E4F0;
	--ib-text: #0A2540;
	--ib-muted: #536A80;
	--ib-wa: #128C4A;
	--ib-wa-d: #0E703B;
	--ib-radius: 12px;
	--ib-shadow: 0 6px 20px rgba(10, 37, 64, .08);
	--ib-mnav-h: 64px;
}

/* Buttons */
.ib-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1.5px solid transparent;
	font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none !important; cursor: pointer;
	transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s;
}
.ib-btn:focus-visible, .ib-mnav-item:focus-visible, .ib-sheet a:focus-visible { outline: 3px solid var(--ib-cyan); outline-offset: 2px; }
.ib-btn-primary { background: var(--ib-blue); color: #fff !important; }
.ib-btn-primary:hover { background: var(--ib-blue-d); box-shadow: 0 6px 16px rgba(11, 111, 216, .28); transform: translateY(-1px); }
.ib-btn-ghost { background: #fff; color: var(--ib-navy) !important; border-color: var(--ib-line); }
.ib-btn-ghost:hover { border-color: var(--ib-blue); color: var(--ib-blue) !important; }
.ib-btn-wa { background: var(--ib-wa); color: #fff !important; }
.ib-btn-wa:hover { background: var(--ib-wa-d); box-shadow: 0 6px 16px rgba(18, 140, 74, .25); transform: translateY(-1px); }
.ib-btn-lg { min-height: 50px; padding: 12px 22px; font-size: 16px; }
.ib-btn-block { width: 100%; }
.ib-btn-icon { padding: 10px; min-width: 44px; }
.ib-btn.is-loading { opacity: .65; pointer-events: none; }
.ib-btn.is-added { background: var(--ib-navy); }
.ib-ico { flex: none; }

/* Product card buttons */
.ib-loop-actions { display: flex; gap: 8px; margin-top: 10px; }
.ib-loop-actions .ib-add-quote { flex: 1; font-size: 14px; padding: 8px 12px; }

/* Single product */
.ib-single-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 8px; }
.ib-single-actions .ib-btn { flex: 1 1 220px; }
.ib-single-note { font-size: 14px; color: var(--ib-muted); margin: 0 0 16px; }

/* Toast */
.ib-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100000;
	background: var(--ib-navy); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--ib-shadow);
	font-size: 15px; max-width: calc(100vw - 32px);
}
.ib-toast a { color: #8FDcff; font-weight: 600; margin-left: 8px; text-decoration: underline; }

/* Quote page */
.ib-quote { max-width: 1200px; margin: 0 auto; padding: 24px 0 48px; color: var(--ib-text); }
.ib-quote h2 { font-size: 22px; margin: 0 0 16px; color: var(--ib-navy); }
.ib-quote-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.ib-quote-list, .ib-quote-details { background: #fff; border: 1px solid var(--ib-line); border-radius: var(--ib-radius); padding: 24px; }
.ib-quote-details { position: sticky; top: 24px; background: var(--ib-light); }
.ib-qitems { list-style: none; margin: 0; padding: 0; }
.ib-qitem { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--ib-line); align-items: center; }
.ib-qimg img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--ib-line); border-radius: 8px; background: #fff; }
.ib-qname { font-weight: 600; color: var(--ib-navy); display: block; }
.ib-qsku { display: block; font-size: 13px; color: var(--ib-muted); margin: 2px 0 8px; }
.ib-qnote { width: 100%; font-size: 14px; padding: 8px 10px; border: 1px solid var(--ib-line); border-radius: 8px; }
.ib-qctrl { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 13px; color: var(--ib-muted); }
.ib-qqty { width: 76px; padding: 8px; border: 1px solid var(--ib-line); border-radius: 8px; text-align: center; font-size: 15px; }
.ib-qremove { background: none; border: 0; color: #B42318; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px; }
.ib-qlist-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 18px; }
.ib-link { color: var(--ib-blue); font-weight: 600; }
.ib-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.ib-field { margin: 0; }
.ib-field-name, .ib-field-message, .ib-field-delivery, .ib-field-company { grid-column: 1 / -1; }
.ib-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--ib-navy); }
.ib-field input, .ib-field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--ib-line); border-radius: 8px; background: #fff; font-size: 15px; }
.ib-field input:focus, .ib-field textarea:focus, .ib-qnote:focus, .ib-qqty:focus { outline: 2px solid var(--ib-cyan); border-color: var(--ib-cyan); }
.ib-quote-details .ib-btn-block { margin-top: 18px; }
.ib-small { font-size: 13px; color: var(--ib-muted); margin: 10px 0 0; }
.ib-hp { position: absolute !important; left: -9999px; }
.ib-alert { background: #FEF3F2; border: 1px solid #FECDCA; color: #912018; border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; }
.ib-alert ul { margin: 6px 0 0 18px; }
.ib-alert-ok { background: #ECFDF3; border-color: #ABEFC6; color: #085D3A; }
.ib-quote-empty, .ib-quote-done { text-align: center; max-width: 560px; margin: 24px auto; background: var(--ib-light); border: 1px solid var(--ib-line); border-radius: var(--ib-radius); padding: 40px 28px; }
.ib-quote-done p, .ib-quote-empty p { color: var(--ib-muted); }
.ib-quote .ib-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; }
.ib-cart-quote { width: 100%; margin-bottom: 12px; }

/* Floating WhatsApp button (bottom-left) */
.ib-wa-float {
	position: fixed; left: 20px; bottom: 20px; z-index: 9997;
	display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 20px 0 16px; border-radius: 27px;
	background: #149C4F; color: #fff !important; font-weight: 600; font-size: 15px; text-decoration: none !important;
	box-shadow: 0 8px 24px rgba(18, 140, 74, .35); transition: transform .18s, box-shadow .18s, background-color .18s;
}
.ib-wa-float .ib-ico { width: 26px; height: 26px; }
.ib-wa-float:hover { background: #0E7E3F; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(18, 140, 74, .45); }
.ib-wa-float:focus-visible { outline: 3px solid var(--ib-navy); outline-offset: 3px; }
.ib-wa-float span { color: #fff; }

/* Mobile bottom navigation */
.ib-mnav, .ib-pbar, .ib-sheet { display: none; }
@media (max-width: 991px) {
	#mf-navigation-mobile { display: none !important; }
	body { padding-bottom: calc(var(--ib-mnav-h) + env(safe-area-inset-bottom, 0px)) !important; }
	body.single-product { padding-bottom: calc(var(--ib-mnav-h) + 68px + env(safe-area-inset-bottom, 0px)) !important; }
	.ib-mnav {
		display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
		height: calc(var(--ib-mnav-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
		background: #fff; border-top: 1px solid var(--ib-line); box-shadow: 0 -4px 16px rgba(10, 37, 64, .06);
	}
	.ib-mnav-item {
		position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
		background: none; border: 0; padding: 6px 2px; color: var(--ib-muted) !important; font-size: 11.5px; font-weight: 500; text-decoration: none !important; cursor: pointer;
	}
	.ib-mnav-item.is-active { color: var(--ib-blue) !important; }
	.ib-mnav-item.is-active:before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--ib-blue); }
	.ib-count {
		position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
		background: var(--ib-cyan); color: var(--ib-navy); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
	}
	.ib-count[hidden] { display: none; }
	.ib-pbar {
		display: flex; gap: 10px; position: fixed; left: 0; right: 0; z-index: 9998;
		bottom: calc(var(--ib-mnav-h) + env(safe-area-inset-bottom, 0px)); padding: 10px 14px; background: #fff; border-top: 1px solid var(--ib-line);
	}
	.ib-pbar .ib-add-quote { flex: 1.4; }
	.ib-pbar .ib-btn-wa { flex: 1; }
	.ib-sheet:not([hidden]) { display: flex; align-items: flex-end; position: fixed; inset: 0; z-index: 100001; background: rgba(10, 37, 64, .45); }
	.ib-sheet-panel { width: 100%; max-height: 75vh; overflow: auto; background: #fff; border-radius: 16px 16px 0 0; padding: 8px 0 calc(16px + env(safe-area-inset-bottom, 0px)); }
	.ib-sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--ib-line); position: sticky; top: 0; background: #fff; }
	.ib-sheet-head h2 { font-size: 18px; margin: 0; color: var(--ib-navy); }
	.ib-sheet-close { background: var(--ib-light); border: 0; border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; color: var(--ib-navy); cursor: pointer; }
	.ib-sheet ul { list-style: none; margin: 0; padding: 0; }
	.ib-sheet li a { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--ib-line); color: var(--ib-navy) !important; font-weight: 600; text-decoration: none !important; }
	.ib-sheet li small { color: var(--ib-muted); font-weight: 400; }
	.ib-toast { bottom: calc(var(--ib-mnav-h) + 16px + env(safe-area-inset-bottom, 0px)); }
	.ib-wa-float { left: 14px; bottom: calc(var(--ib-mnav-h) + 14px + env(safe-area-inset-bottom, 0px)); width: 54px; padding: 0; justify-content: center; }
	.ib-wa-float span { display: none; }
	body.single-product .ib-wa-float { display: none; }
	body.single-product .ib-toast { bottom: calc(var(--ib-mnav-h) + 84px + env(safe-area-inset-bottom, 0px)); }
	.ib-quote-grid { grid-template-columns: 1fr; }
	.ib-quote-details { position: static; }
}
@media (max-width: 560px) {
	.ib-quote-list, .ib-quote-details { padding: 16px; }
	.ib-qitem { grid-template-columns: 56px 1fr; }
	.ib-qimg img { width: 56px; height: 56px; }
	.ib-qctrl { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
	.ib-fields { grid-template-columns: 1fr; }
	.ib-loop-actions .ib-add-quote span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
	.ib-btn { transition: none; }
	.ib-btn:hover { transform: none; }
}
