:root {
	--ink: #1c1917;
	--muted: #78716c;
	--bg: #f6f1ea;
	--line: #e7e5e4;
	--accent: #c2410c;
	--accent-soft: #fdba74;
	--header: #1c1917;
	--radius: 16px;
}

body {
	margin: 0;
	background: #e7e2da;
	color: var(--ink);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.cat-shell {
	max-width: 32rem;
	margin: 0 auto;
	min-height: 100vh;
	background: var(--bg);
	color: var(--ink);
}

.cat-shell a {
	color: inherit;
	text-decoration: none;
}

.cat-top {
	position: sticky;
	top: 0;
	z-index: 20;
	display: grid;
	grid-template-columns: 4.75rem 1fr 4.75rem;
	align-items: center;
	min-height: 3.5rem;
	padding: env(safe-area-inset-top) 0.35rem 0;
	background: var(--header);
	color: #fff;
}

.cat-top h1 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cat-top-slot {
	display: grid;
	place-items: center;
	width: 4.75rem;
	height: 3.5rem;
}

.cat-logo {
	display: block;
	max-width: 4.4rem;
	max-height: 2.5rem;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	background: #fff;
}

.cat-icon-btn {
	position: relative;
	display: grid;
	place-items: center;
	justify-self: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	color: #fff;
}

.cat-shell a.cat-icon-btn {
	color: #fff;
}

.cat-badge {
	position: absolute;
	top: 0.15rem;
	right: 0.05rem;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 0 0.25rem;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	display: grid;
	place-items: center;
}

.cat-main {
	padding: 1rem 1rem 1.5rem;
}

.cat-main.has-bar {
	padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));
}

.cat-main .alert {
	border: 0;
	border-radius: 12px;
}

.cat-search {
	position: relative;
	margin: 0 0 1rem;
}

.cat-search i {
	position: absolute;
	left: 0.9rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--muted);
	pointer-events: none;
}

.cat-search input {
	width: 100%;
	height: 3rem;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 0 0.9rem 0 2.5rem;
	background: #fff;
	color: var(--ink);
	font: inherit;
	font-size: 16px;
}

.cat-search input:focus {
	outline: 2px solid var(--accent);
	border-color: transparent;
}

.cat-lead,
.cat-hint,
.cat-empty,
.cat-note,
.cat-meta {
	color: var(--muted);
}

.cat-lead {
	margin: 0.15rem 0 1.15rem;
	color: #44403c;
	font-size: 0.95rem;
	line-height: 1.5;
	text-align: center;
}

.cat-hint {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.cat-empty {
	margin: 0 0 0.9rem;
}

.cat-eyebrow,
.cat-group {
	margin: 0.25rem 0 0.65rem;
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.cat-group {
	margin-top: 1.1rem;
}

.cat-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.cat-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	min-height: 4.75rem;
	padding: 0.9rem 1rem;
	background: #fff;
	border-radius: var(--radius);
	color: inherit;
}

.cat-card:active {
	transform: scale(0.99);
}

.cat-card:focus-visible,
.cat-icon-btn:focus-visible,
.cat-btn:focus-visible,
.cat-stepper button:focus-visible,
.cat-search input:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.cat-card-img {
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 12px;
	object-fit: cover;
	flex: 0 0 auto;
}

.cat-card-title {
	display: block;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
}

.cat-card-meta {
	display: block;
	margin-top: 0.15rem;
	color: var(--muted);
	font-size: 0.875rem;
}

.cat-card i {
	color: var(--muted);
}

.cat-product {
	display: grid;
	grid-template-columns: 4.5rem 1fr;
	gap: 0.75rem;
	align-items: center;
	padding: 0.75rem;
	background: #fff;
	border-radius: var(--radius);
}

.cat-foto {
	display: block;
	padding: 0;
	border: 0;
	background: transparent;
	border-radius: 12px;
	cursor: zoom-in;
}

.cat-lightbox {
	position: relative;
	width: min(32rem, calc(100vw - 2rem));
	max-width: calc(100vw - 2rem);
	padding: 0;
	border: 0;
	background: transparent;
}

.cat-lightbox img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px;
}

.cat-lightbox::backdrop {
	background: rgba(28, 25, 23, 0.78);
}

.cat-lightbox-close {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 999px;
	background: rgba(28, 25, 23, 0.72);
	color: #fff;
	font-size: 1.15rem;
	cursor: pointer;
}

.cat-product img,
.cat-ph {
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 12px;
	object-fit: cover;
	background: #efeae4;
}

.cat-ph {
	display: grid;
	place-items: center;
	color: var(--muted);
	font-size: 1.15rem;
}

.cat-product-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.cat-product-name {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.cat-meta,
.cat-note {
	margin: 0.15rem 0 0;
}

.cat-note {
	font-size: 0.8125rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cat-stepper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
}

.cat-stepper button {
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
}

.cat-stepper button:active,
.cat-btn:active {
	transform: scale(0.98);
}

.cat-stepper .cat-add {
	width: auto;
	padding: 0 1.1rem;
	font-size: 0.95rem;
	font-weight: 700;
}

.cat-stepper .cat-text-btn {
	width: auto;
	height: 2.75rem;
	padding: 0 0.35rem;
	background: transparent;
	color: var(--muted);
	font-size: 0.875rem;
	font-weight: 600;
}

.cat-qty {
	min-width: 1.4rem;
	font-weight: 700;
	text-align: center;
}

.cat-pages {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.25rem;
}

.cat-pages a,
.cat-pages span {
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
}

.cat-shell .cat-pages a {
	color: var(--accent);
	font-weight: 700;
}

.cat-pages .is-disabled {
	color: var(--muted);
}

.cat-summary {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cat-summary li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--line);
}

.cat-section {
	margin: 1.5rem 0 0.75rem;
	font-size: 1.05rem;
	font-weight: 700;
}

.cat-shell a.cat-link {
	color: var(--accent);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cat-form {
	margin-top: 0.5rem;
}

.cat-form .form-control,
.cat-form .form-select {
	font-size: 16px;
	min-height: 3rem;
}

.cat-field-hint {
	margin: -0.35rem 0 0.85rem;
	color: var(--muted);
	font-size: 0.8125rem;
}

.cat-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	min-height: 3.25rem;
	margin-top: 1rem;
	border: 0;
	border-radius: 14px;
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	touch-action: manipulation;
}

.cat-shell a.cat-btn,
button.cat-btn {
	color: #fff;
	text-decoration: none;
}

.cat-btn-wa {
	background: #128c7e;
}

.cat-btn-ghost {
	background: transparent;
	color: var(--ink);
	border: 1px solid #d6d3d1;
}

.cat-shell a.cat-btn-ghost {
	color: var(--ink);
}

.cat-done {
	text-align: center;
	padding-top: 2.5rem;
}

.cat-done .fa-circle-check {
	font-size: 2.75rem;
	color: #128c7e;
}

.cat-done p {
	margin: 0.9rem 0 0;
	line-height: 1.45;
}

.cat-bar {
	position: fixed;
	z-index: 30;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: min(32rem, 100%);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	min-height: 4rem;
	padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
	background: var(--header);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
}

.cat-bar-qty {
	display: grid;
	place-items: center;
	min-width: 1.75rem;
	height: 1.75rem;
	padding: 0 0.4rem;
	border-radius: 999px;
	background: var(--accent);
	font-size: 0.85rem;
	font-weight: 700;
}

.cat-bar-cta {
	color: var(--accent-soft);
	font-weight: 700;
}

.cat-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (min-width: 540px) {
	.cat-shell {
		box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.08);
	}
}

@media (min-width: 960px) {
	.cat-shell {
		max-width: 68rem;
	}

	.cat-bar {
		width: min(68rem, 100%);
	}

	.cat-list {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.cat-form {
		max-width: 36rem;
	}
}
