/* =========================================================
   Picco Pizza · tienda online (carta con fotos, carrito y pedido por WhatsApp)
   ========================================================= */
.tilt-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }

.card--product { display: flex; flex-direction: column; padding: 14px 14px 16px; }
.card--product .card__img { aspect-ratio: 4 / 3; background: #000; }
.card--product .card__img img { width: 100%; height: 100%; object-fit: cover; }
.card--product h3 { margin-top: 14px; }
.card .card__desc { margin-top: 6px; font-size: 14.5px; line-height: 1.3; opacity: .9; min-height: 2.6em; }
.card__buy { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .card__buy .card__price { margin: 0; }
.btn--add { min-height: 44px; padding: 0 20px; border: 0; background: var(--crema); color: var(--carbon); font-size: 16px; cursor: pointer; }
.btn--add:hover { background: var(--muzza); }
.qty { display: none; align-items: center; gap: 4px; background: var(--crema); color: var(--carbon); border-radius: 999px; padding: 4px; }
.card--product.in-cart .qty { display: inline-flex; }
.card--product.in-cart .btn--add { display: none; }
.qty__btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--carbon); color: var(--crema); font: 800 20px/1 var(--f-cond); cursor: pointer; }
.qty__btn:hover { background: var(--tomate); }
.qty__n { min-width: 26px; text-align: center; font: 900 20px/1 var(--f-title); font-stretch: 80%; }
.qty--sm { display: inline-flex; background: var(--crema-fondo); }
.qty--sm .qty__btn { width: 30px; height: 30px; font-size: 17px; }

/* Contador en el topbar */
.topbar__cta { position: relative; }
.topbar__count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--tomate); color: #fff; font: 800 13px/18px var(--f-cond); text-align: center; border: 2px solid var(--crema); }

/* Botón flotante del pedido */
.cart-fab {
	position: fixed; z-index: 95; right: 16px; bottom: 16px;
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 56px; padding: 0 20px 0 16px;
	border: 0; border-radius: 999px;
	background: var(--tomate); color: #fff;
	font: 800 17px/1 var(--f-cond); letter-spacing: .06em; text-transform: uppercase;
	box-shadow: 0 14px 34px rgb(120 10 5 / .4);
	cursor: pointer;
	transform: translateY(140%); transition: transform .45s var(--ease);
}
.cart-fab.is-on { transform: none; }
.cart-fab svg { width: 22px; fill: currentColor; }
.cart-fab__n { min-width: 26px; height: 26px; border-radius: 999px; background: var(--crema); color: var(--carbon); display: grid; place-items: center; padding: 0 6px; }
.cart-fab__t b { color: var(--muzza); }
.cart-open .cart-fab { transform: translateY(140%); }

.toast {
	position: fixed; z-index: 140; left: 50%; bottom: 88px;
	padding: 12px 20px; border-radius: 999px;
	background: var(--carbon); color: var(--crema);
	font: 700 16px/1.2 var(--f-text);
	transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	transition: opacity .3s, transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Panel del carrito */
.cart { position: fixed; inset: 0; z-index: 160; }
.cart[hidden] { display: none; }
.cart__backdrop { position: absolute; inset: 0; background: rgb(23 20 18 / .55); opacity: 0; transition: opacity .35s; }
.cart__panel {
	position: absolute; top: 0; right: 0; bottom: 0;
	width: min(460px, 100%);
	display: grid; grid-template-rows: auto 1fr auto;
	background: var(--crema); color: var(--carbon);
	transform: translateX(100%); transition: transform .4s var(--ease);
	box-shadow: -20px 0 60px rgb(0 0 0 / .25);
}
.cart.is-open .cart__backdrop { opacity: 1; }
.cart.is-open .cart__panel { transform: none; }
.has-cursor .cart, .has-cursor .cart * { cursor: auto; }
.has-cursor .cart button, .has-cursor .cart a, .has-cursor .cart label { cursor: pointer; }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 2px solid var(--crema-fondo); }
.cart__head h2 { font: 900 34px/1 var(--f-title); font-stretch: 80%; color: var(--tomate); text-transform: uppercase; }
.cart__close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--crema-fondo); font: 400 30px/1 var(--f-text); color: var(--carbon); }
.cart__body { overflow-y: auto; padding: 16px 22px 24px; overscroll-behavior: contain; }
.cart__items { display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; grid-template-areas: "img info sum" "img qty sum"; align-items: center; gap: 4px 12px; padding: 10px; border-radius: 14px; background: #fff; }
.line img { grid-area: img; width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.line__info { grid-area: info; display: grid; }
.line__info b { font: 800 19px/1.1 var(--f-cond); text-transform: uppercase; }
.line__info span { font-size: 13px; opacity: .7; }
.line .qty { grid-area: qty; justify-self: start; }
.line__sum { grid-area: sum; font: 900 20px/1 var(--f-title); font-stretch: 80%; }
.cart__empty { padding: 30px 0; font-size: 18px; text-align: center; }
.cart__empty[hidden] { display: none; }
.cart__empty a { color: var(--tomate); font-weight: 700; }
.cart__form { display: grid; gap: 16px; margin-top: 22px; }
.cart__form[hidden] { display: none; }
.cart__form fieldset { border: 0; padding: 0; margin: 0; }
.cart__form legend, .field > span { display: block; margin-bottom: 8px; font: 800 14px/1 var(--f-cond); letter-spacing: .12em; text-transform: uppercase; color: var(--ladrillo); }
.choices { display: grid; gap: 8px; }
.choices--row { grid-template-columns: 1fr 1fr; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--crema-fondo); background: #fff; transition: border-color .2s, background .2s; }
.choice b { font: 800 18px/1.1 var(--f-cond); text-transform: uppercase; }
.choice small { font-size: 13px; opacity: .7; }
.choice input:checked + span { border-color: var(--tomate); background: #FFF1EE; }
.choice input:focus-visible + span { outline: 3px solid var(--muzza); outline-offset: 2px; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--crema-fondo); background: #fff; font: 400 17px/1.3 var(--f-text); color: var(--carbon); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--tomate); }
.field[hidden] { display: none; }
.cart__preview { white-space: pre-wrap; margin: 0; padding: 14px; border-radius: 14px; background: #E7F6EA; border: 2px dashed #25A244; font: 400 14.5px/1.45 var(--f-text); }
.cart__preview[hidden] { display: none; }
.cart__foot { padding: 14px 22px 18px; border-top: 2px solid var(--crema-fondo); display: grid; gap: 10px; background: var(--crema); }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; font: 800 18px/1 var(--f-cond); text-transform: uppercase; letter-spacing: .08em; }
.cart__total b { font: 900 32px/1 var(--f-title); font-stretch: 80%; letter-spacing: 0; color: var(--tomate); }
.btn--wa { width: 100%; border: 0; background: #25A244; color: #fff; cursor: pointer; }
.btn--wa:hover { background: #1E8A39; }
.btn--wa:disabled { opacity: .45; cursor: not-allowed; }
.cart__note { font-size: 14px; line-height: 1.35; opacity: .8; }
.cart__note.is-error { color: var(--tomate); opacity: 1; font-weight: 700; }
.cart__note.is-ok { color: #1E8A39; opacity: 1; font-weight: 600; }

@media (max-width: 760px) {
	.cart-fab { left: 16px; right: 16px; justify-content: center; bottom: 12px; }
	.toast { bottom: 84px; max-width: calc(100% - 32px); }
	.card .card__desc { font-size: 14px; }
	.btn--add { padding: 0 16px; }
}

@media (max-width: 760px) {
	.has-cart .demo-badge { bottom: 80px; }
}
