/* MJ Wholesale Plus — front-end styles (scoped under .mjw) */
.mjw, .mjw * { box-sizing: border-box; }
.mjw {
	--p: #e11d3f; --pd: #b3122f; --ps: #fff1f3; --ink: #1f2430; --text: #3a4152; --muted: #7b8194;
	--line: #e7e9ef; --bg: #f5f6f9; --r: 14px;
	max-width: 1240px; margin: 24px auto 90px; padding: 0 16px; color: var(--text); line-height: 1.8;
}
.mjw a { text-decoration: none; }
.mjw img { max-width: 100%; height: auto; }

/* Hero */
.mjw-hero {
	position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px;
	padding: 34px 32px; border-radius: 18px; color: #fff; margin-bottom: 26px;
	background: linear-gradient(120deg, #e11d3f 0%, #b3122f 60%, #7f0d22 100%);
}
.mjw-hero::before, .mjw-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.mjw-hero::before { width: 280px; height: 280px; inset-inline-end: -70px; top: -110px; }
.mjw-hero::after { width: 160px; height: 160px; inset-inline-start: 30%; bottom: -90px; }
.mjw-hero__txt { position: relative; z-index: 1; min-width: 0; }
.mjw .mjw-hero h1 { margin: 8px 0 6px; font-size: 30px; font-weight: 800; color: #fff; line-height: 1.4; }
.mjw-hero p { margin: 0; opacity: .92; font-size: 15px; }
.mjw-tag { display: inline-block; padding: 4px 14px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 12.5px; font-weight: 700; }
.mjw-hero__logo { position: relative; z-index: 1; width: 110px; height: 110px; flex: none; border-radius: 20px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); }
.mjw-hero__logo img { max-height: 100%; width: auto; object-fit: contain; }
.mjw-initial { font-size: 38px; font-weight: 800; color: var(--p); }

.mjw .mjw-h { font-size: 19px; font-weight: 800; color: var(--ink); margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.mjw .mjw-h::before { content: ""; width: 5px; height: 20px; border-radius: 3px; background: var(--p); }

/* Brand cards */
.mjw-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.mjw-brand {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
	padding: 22px 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
	color: var(--text) !important; transition: border-color .2s, box-shadow .25s;
}
.mjw-brand:hover { border-color: var(--p); box-shadow: 0 10px 28px rgba(225, 29, 63, .12); }
.mjw-brand__logo { width: 120px; height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.mjw-brand__logo img { max-height: 90px; width: auto; max-width: 100%; object-fit: contain; }
.mjw-brand__name { font-size: 17px; color: var(--ink); font-weight: 800; }
.mjw-brand__cnt { font-size: 12.5px; color: var(--muted); }
.mjw-brand__go { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--p); }

/* Toolbar */
.mjw-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.mjw-back { padding: 9px 16px; border-radius: 10px; background: var(--bg); color: var(--ink) !important; font-weight: 700; font-size: 13.5px; }
.mjw-back:hover { background: #eceef4; }
.mjw-search { flex: 1 1 280px; max-width: 420px; margin: 0; }
.mjw .mjw-search input[type=search] {
	width: 100%; padding: 11px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
	font-size: 14px; box-shadow: none; -webkit-appearance: none; appearance: none; height: auto;
}
.mjw .mjw-search input[type=search]:focus { outline: 0; border-color: var(--p); box-shadow: 0 0 0 4px var(--ps); }
.mjw-count { margin-inline-start: auto; font-size: 13px; color: var(--muted); }
.mjw-count b { color: var(--p); font-size: 16px; }

/* Product cards */
.mjw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mjw-card {
	position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s, box-shadow .25s;
}
.mjw-card[hidden] { display: none; }
.mjw-card:hover { border-color: #f3b5c0; box-shadow: 0 8px 24px rgba(31, 36, 48, .08); }
.mjw-card.is-hit { border-color: var(--p); box-shadow: 0 0 0 4px var(--ps); }
.mjw-off { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; background: var(--p); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.mjw-card__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: #fff; border-radius: 10px; overflow: hidden; }
.mjw-card__img img { width: 100%; height: 100%; object-fit: contain; margin: 0; }
.mjw .mjw-card__name { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.8; min-height: 3.6em; }
.mjw .mjw-card__name a { color: var(--ink) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mjw-price { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 10px; background: var(--ps); }
.mjw-price small { font-size: 11.5px; color: var(--pd); font-weight: 700; }
.mjw-price b { font-size: 18px; color: var(--pd); font-weight: 800; }
.mjw-price del { font-size: 12.5px; color: var(--muted); }
.mjw-min { font-size: 12.5px; font-weight: 700; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 4px 10px; align-self: flex-start; }
.mjw-out { text-align: center; padding: 11px; border-radius: 10px; background: var(--bg); color: var(--muted); font-weight: 700; }

.mjw-buy { display: flex; gap: 8px; margin: auto 0 0; }
.mjw-qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; background: #fff; }
.mjw .mjw-qty button { width: 34px; height: 42px; border: 0; background: var(--bg); color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; padding: 0; line-height: 1; border-radius: 0; }
.mjw .mjw-qty button:hover { background: #eceef4; }
.mjw .mjw-qty input { width: 48px; height: 42px; border: 0; text-align: center; font-size: 14.5px; font-weight: 800; padding: 0; margin: 0; background: #fff; box-shadow: none; -moz-appearance: textfield; }
.mjw .mjw-qty input::-webkit-outer-spin-button, .mjw .mjw-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.mjw .mjw-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-height: 42px; padding: 0 16px;
	border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink) !important;
	font-weight: 800; font-size: 13.5px; cursor: pointer; font-family: inherit; line-height: 1.2; transition: background .2s, box-shadow .2s;
}
.mjw .mjw-btn--primary { background: var(--p); border-color: var(--p); color: #fff !important; }
.mjw .mjw-btn--primary:hover { background: var(--pd); box-shadow: 0 6px 16px rgba(225, 29, 63, .28); }

.mjw-empty { text-align: center; padding: 48px 16px; border: 1.5px dashed var(--line); border-radius: var(--r); background: #fafbfd; }
.mjw-empty[hidden] { display: none; }
.mjw .mjw-empty h3 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.mjw-empty p { margin: 0 0 16px; color: var(--muted); }

/* Floating cart bar */
.mjw-cartbar {
	position: fixed; z-index: 9990; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 420px; margin-inline: auto;
	display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px;
	background: var(--ink); color: #fff !important; border-radius: 14px; font-weight: 800; font-size: 14px;
	box-shadow: 0 10px 30px rgba(15, 18, 28, .3);
}
.mjw-cartbar b { background: var(--p); border-radius: 999px; padding: 2px 12px; font-size: 13px; }

/* Responsive */
@media (max-width: 900px) {
	.mjw { margin-top: 14px; }
	.mjw-hero { padding: 24px 20px; border-radius: 16px; }
	.mjw .mjw-hero h1 { font-size: 23px; }
	.mjw-hero__logo { width: 82px; height: 82px; border-radius: 16px; padding: 8px; }
	.mjw-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.mjw-brand { padding: 16px 10px 14px; }
	.mjw-brand__logo { width: 90px; height: 70px; }
	.mjw-brand__logo img { max-height: 70px; }
}
@media (max-width: 640px) {
	.mjw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.mjw-card { padding: 10px; gap: 8px; }
	.mjw .mjw-card__name { font-size: 13px; }
	.mjw-price b { font-size: 15px; }
	.mjw-buy { flex-direction: column; }
	.mjw-qty { width: 100%; justify-content: space-between; }
	.mjw .mjw-qty input { flex: 1; }
	.mjw-search { max-width: none; flex-basis: 100%; order: 3; }
	.mjw-count { margin-inline-start: auto; }
}
@media (max-width: 360px) {
	.mjw-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .mjw * { transition: none !important; } }

/* ---- v1.1: category chips + extras ---- */
.mjw-brand__cats { font-size: 12px; color: var(--muted); line-height: 1.7; max-width: 100%; }
.mjw-cats { margin: 0 0 18px; }
.mjw-cats__in {
	display: flex; flex-wrap: wrap; gap: 8px; padding: 2px;
}
.mjw .mjw-chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
	background: #fff; border: 1.5px solid var(--line); color: var(--ink) !important;
	font-weight: 700; font-size: 13.5px; white-space: nowrap; line-height: 1.4;
	transition: border-color .2s, background .2s, color .2s;
}
.mjw .mjw-chip i { font-style: normal; font-size: 11.5px; min-width: 22px; padding: 0 8px; text-align: center; border-radius: 999px; background: var(--bg); color: var(--muted); line-height: 20px; }
.mjw .mjw-chip:hover { border-color: var(--p); }
.mjw .mjw-chip.is-active { background: var(--p); border-color: var(--p); color: #fff !important; }
.mjw .mjw-chip.is-active i { background: rgba(255, 255, 255, .24); color: #fff; }

@media (max-width: 900px) {
	/* one swipeable row on tablet/mobile */
	.mjw-cats { margin-inline: -16px; }
	.mjw-cats__in {
		flex-wrap: nowrap; overflow-x: auto; padding: 4px 16px 10px; gap: 8px;
		scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
	}
	.mjw-cats__in::-webkit-scrollbar { display: none; }
	.mjw .mjw-chip { flex: none; scroll-snap-align: center; padding: 9px 14px; font-size: 13px; }
	.mjw-toolbar { gap: 10px; }
	.mjw-back { padding: 8px 14px; }
}
@media (max-width: 640px) {
	.mjw-hero__txt p { font-size: 13px; }
	.mjw-hero__logo { width: 68px; height: 68px; }
	.mjw-brand__cats { font-size: 11.5px; }
	.mjw-cartbar { inset-inline: 12px; }
}

/* Access gate */
.mjw-gate { max-width: 560px; margin: 10px auto 40px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 38px 28px 32px; box-shadow: 0 14px 40px rgba(31, 36, 48, .07); }
.mjw-gate__ic { width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 50%; background: var(--ps); color: var(--p); display: flex; align-items: center; justify-content: center; }
.mjw .mjw-gate h2 { margin: 0 0 8px; font-size: 21px; font-weight: 800; color: var(--ink); }
.mjw-gate p { margin: 0 0 20px; color: var(--muted); }
.mjw-gate small { display: block; margin-top: 12px; color: var(--muted); }
.mjw-gate form { margin: 0; }
.mjw-gate__status { display: inline-block; padding: 12px 20px; border-radius: 12px; background: #fff8e5; border: 1px solid #f0d58a; color: #8a5a00; font-weight: 700; }
