body {
	font-family: 'Segoe UI', sans-serif;
}

/* ── Preview de imagen en modal de producto ───────────────────────── */
.producto-img-preview {
	width: 90px;
	height: 90px;
	min-width: 90px;
	border: 2px dashed #dee2e6;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f9fa;
	color: #adb5bd;
	font-size: 0.7rem;
	text-align: center;
}

.producto-img-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Tablas con scroll horizontal en mobile */
.table-responsive-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Celdas más compactas en mobile */
@media (max-width: 576px) {
	.table td, .table th {
		font-size: 0.85rem;
		padding: 0.4rem 0.5rem;
	}
	h3 {
		font-size: 1.2rem;
	}
	.btn-sm {
		font-size: 0.75rem;
		padding: 0.2rem 0.5rem;
	}
}

.accordion-button:not(.collapsed) {
	background-color: #d1e7dd;
	color: #0f5132;
}

/* ── Catálogo público ───────────────────────────────────────────── */
.catalogo-wrapper {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 0 80px 0;
	font-family: 'Segoe UI', sans-serif;
}

.catalogo-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 3rem 0;
	gap: 1rem;
}

.catalogo-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1rem 0.5rem;
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 10;
	border-bottom: 1px solid #dee2e6;
}

.catalogo-title {
	font-size: 1.4rem;
	margin: 0;
}

.cart-btn {
	white-space: nowrap;
}

.cat-section {
	padding: 1rem;
}

.cat-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: #0f5132;
	border-bottom: 2px solid #d1e7dd;
	padding-bottom: 0.3rem;
	margin-bottom: 0.8rem;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.75rem;
}

.product-card {
	border: 1px solid #dee2e6;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.product-img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.product-img-placeholder {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #aaa;
	font-size: 0.8rem;
}

.product-info {
	padding: 0.5rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.product-name {
	font-weight: 600;
	font-size: 0.9rem;
}

.product-price {
	color: #198754;
	font-size: 0.85rem;
}

.product-qty-row {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: auto;
}

.qty-btn {
	width: 30px;
	height: 30px;
	border: 1px solid #198754;
	background: #fff;
	color: #198754;
	border-radius: 50%;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.qty-btn:disabled {
	opacity: 0.3;
	cursor: default;
}

.qty-val {
	font-weight: 700;
	min-width: 1.2rem;
	text-align: center;
}

.catalogo-bottom-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 0.75rem 1rem;
	background: #fff;
	border-top: 1px solid #dee2e6;
	z-index: 100;
}

/* Confirm step */
.confirm-wrapper {
	padding: 1rem;
	max-width: 500px;
	margin: 0 auto;
}

.confirm-title {
	font-size: 1.2rem;
	margin-bottom: 1rem;
}

.order-items-list {
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 0.75rem;
	margin-bottom: 1rem;
}

.order-item-row {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 0.9rem;
	padding: 0.3rem 0;
	border-bottom: 1px solid #f0f0f0;
}

.order-item-name { flex: 1; }
.order-item-detail { color: #666; }
.order-item-sub { font-weight: 600; color: #198754; }

.order-total-row {
	text-align: right;
	margin-top: 0.5rem;
	font-size: 1rem;
	color: #0f5132;
}

.customer-form {
	margin-bottom: 1rem;
}

.confirm-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 1rem;
}

/* Done step */
.done-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 3rem 1rem;
	text-align: center;
}

.done-icon {
	font-size: 4rem;
	margin-bottom: 1rem;
}
.product-img-clickable {
	cursor: pointer;
}

.product-img-clickable:hover {
	opacity: 0.88;
}

/* ── Product detail popup ─────────────────────────────────────────────── */
.product-detail-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 1050;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

@media (min-width: 576px) {
	.product-detail-overlay {
		align-items: center;
	}
}

.product-detail-popup {
	background: #fff;
	border-radius: 1rem 1rem 0 0;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 1.25rem 1rem 2rem;
	position: relative;
	-webkit-overflow-scrolling: touch;
}

@media (min-width: 576px) {
	.product-detail-popup {
		border-radius: 1rem;
		max-height: 85vh;
	}
}

.product-detail-close {
	position: absolute;
	top: 0.6rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.8rem;
	line-height: 1;
	color: #555;
	cursor: pointer;
}

.product-detail-name {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
	padding-right: 2rem;
}

.product-detail-main-img-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 0.5rem;
	margin-bottom: 0.6rem;
}

.product-detail-main-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-detail-gallery {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.product-detail-thumb {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 0.4rem;
	cursor: pointer;
	border: 2px solid transparent;
	flex-shrink: 0;
}

.product-detail-thumb.active {
	border-color: #198754;
}

.product-detail-desc {
	font-size: 0.9rem;
	color: #444;
	margin-bottom: 0.5rem;
}

.product-detail-price {
	font-size: 1rem;
	font-weight: 700;
	color: #198754;
	margin: 0 0 0.75rem 0;
}

.product-detail-qty-row {
	display: inline-flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.product-detail-subtotal {
	font-size: 0.95rem;
	font-weight: 600;
	color: #198754;
	margin-top: 0.4rem;
	margin-bottom: 0;
}

