/* =============================================================================
   Los Caseros — Layout global (Fase 2)
   Promo bar · Header · MainNav + dropdown · Footer · WhatsApp FAB
   Traducción 1:1 de los componentes del prototipo (PromoBar/Header/MainNav/Footer).
   ============================================================================= */

/* ---------- Masthead sticky (promo + header + nav pinados) ---------- */
.lc-masthead {
	position: sticky;
	top: 0;
	z-index: 50;
}

/* ---------- Promo bar ---------- */
.lc-promobar {
	background: var(--lc-green-800);
	color: var(--lc-cream-100);
	padding: 10px 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 13px;
	font-family: var(--lc-font-body);
	text-align: center;
}
.lc-promobar__main { font-weight: var(--lc-w-semibold); }
.lc-promobar__note { opacity: 0.7; font-size: 12px; }

/* ---------- Header (top row) ---------- */
.lc-header {
	background: var(--lc-cream-50);
	border-bottom: 1px solid var(--lc-border);
}
.lc-header__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 16px 24px;
	display: flex;
	align-items: center;
	gap: 20px;
}
.lc-logo {
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	display: inline-flex;
	line-height: 0;
}
.lc-logo img { height: 52px; width: auto; display: block; }

/* Search — pill */
.lc-search {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--lc-cream-50);
	border: 1px solid var(--lc-border);
	border-radius: var(--lc-radius-pill);
	padding: 10px 16px;
	transition: box-shadow var(--lc-dur-fast) var(--lc-ease), border-color var(--lc-dur-fast) var(--lc-ease);
}
.lc-search:focus-within {
	border-color: var(--lc-green-500);
	box-shadow: var(--lc-shadow-focus);
}
.lc-search .lc-icon { color: var(--lc-ink-500); flex-shrink: 0; }
.lc-search input {
	border: 0;
	outline: none;
	background: transparent;
	flex: 1;
	min-width: 0;
	font-family: var(--lc-font-body);
	font-size: 13px;
	color: var(--lc-ink-900);
}
.lc-search button[type="submit"] {
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	color: var(--lc-ink-500);
	display: inline-flex;
}

/* Cart button (pill primario con badge en línea) */
.lc-cart-btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--lc-green-800);
	color: var(--lc-cream-100);
	border: 0;
	border-radius: var(--lc-radius-pill);
	padding: 12px 24px;
	font-family: var(--lc-font-body);
	font-weight: var(--lc-w-semibold);
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: var(--lc-shadow-sm);
	transition: background var(--lc-dur-fast) var(--lc-ease), box-shadow var(--lc-dur-base) var(--lc-ease), transform 100ms var(--lc-ease);
	text-decoration: none;
}
.lc-cart-btn:hover { background: var(--lc-green-900); color: var(--lc-cream-100); box-shadow: var(--lc-shadow-md); }
.lc-cart-btn:active { transform: scale(0.98); box-shadow: var(--lc-shadow-xs); }

/* Mobile menu trigger (oculto en desktop) */
.lc-mobile-menu-btn {
	display: none;
	background: var(--lc-cream-200);
	border: 0;
	cursor: pointer;
	width: 40px;
	height: 40px;
	border-radius: var(--lc-radius-pill);
	align-items: center;
	justify-content: center;
	color: var(--lc-ink-900);
	flex-shrink: 0;
}

/* ---------- MainNav (second row) ---------- */
.lc-mainnav {
	background: var(--lc-cream-50);
	border-bottom: 1px solid var(--lc-divider);
}
.lc-mainnav__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 8px;
}
.lc-mainnav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: stretch;
	gap: 4px;
}
.lc-mainnav__link {
	background: transparent;
	border: 0;
	cursor: pointer;
	font-family: var(--lc-font-body);
	font-size: 14px;
	font-weight: var(--lc-w-medium);
	color: var(--lc-ink-900);
	padding: 14px 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	transition: color var(--lc-dur-fast) var(--lc-ease), background var(--lc-dur-fast) var(--lc-ease);
}
.lc-mainnav__link:hover { color: var(--lc-green-800); }
.lc-mainnav__link.is-active { color: var(--lc-green-800); font-weight: var(--lc-w-bold); }

.lc-mainnav__item--drop { position: relative; }
.lc-mainnav__item--drop > .lc-mainnav__link .lc-icon { transition: transform 180ms var(--lc-ease); }
.lc-mainnav__item--drop.is-open > .lc-mainnav__link { color: var(--lc-green-800); background: var(--lc-cream-100); }
.lc-mainnav__item--drop.is-open > .lc-mainnav__link .lc-icon { transform: rotate(180deg); }

/* Categorías dropdown */
.lc-cat-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--lc-cream-50);
	border-radius: 18px;
	box-shadow: var(--lc-shadow-lg);
	padding: 12px;
	min-width: 300px;
	z-index: 100;
	border: 1px solid var(--lc-divider);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 180ms var(--lc-ease), transform 180ms var(--lc-ease-organic), visibility 180ms;
}
.lc-mainnav__item--drop.is-open .lc-cat-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.lc-cat-dropdown__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
}
.lc-cat-dropdown__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 12px;
	background: transparent;
	border: 0;
	cursor: pointer;
	font-family: var(--lc-font-body);
	font-size: 13px;
	font-weight: var(--lc-w-medium);
	color: var(--lc-ink-900);
	text-align: left;
	width: 100%;
	text-decoration: none;
	transition: background var(--lc-dur-fast) var(--lc-ease);
}
.lc-cat-dropdown__item:hover { background: var(--lc-cream-200); }
.lc-cat-dropdown__icon {
	width: 32px;
	height: 32px;
	border-radius: var(--lc-radius-pill);
	background: var(--lc-green-100);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.lc-cat-dropdown__foot {
	margin-top: 8px;
	padding: 10px 12px;
	border-top: 1px solid var(--lc-divider);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.lc-cat-dropdown__count { font-size: 12px; color: var(--lc-ink-500); }
.lc-cat-dropdown__all {
	font-family: var(--lc-font-body);
	font-size: 12px;
	font-weight: var(--lc-w-semibold);
	color: var(--lc-green-700);
	background: transparent;
	border: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-decoration: none;
}

/* Nuestras tiendas */
.lc-stores-link {
	color: var(--lc-green-700);
	font-weight: var(--lc-w-semibold);
	font-size: 13px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--lc-font-body);
	padding: 14px 0;
	white-space: nowrap;
}
.lc-stores-link:hover { color: var(--lc-green-800); }

/* ---------- Mobile menu panel ---------- */
.lc-mobile-menu {
	display: none;
	background: var(--lc-cream-50);
	border-bottom: 1px solid var(--lc-divider);
	padding: 12px 24px 18px;
}
.lc-mobile-menu.is-open { display: block; }
.lc-mobile-menu a {
	display: block;
	padding: 12px 4px;
	font-family: var(--lc-font-body);
	font-weight: var(--lc-w-semibold);
	font-size: 15px;
	color: var(--lc-ink-900);
	text-decoration: none;
	border-bottom: 1px solid var(--lc-divider);
}
.lc-mobile-menu a:last-child { border-bottom: 0; }
.lc-mobile-menu a:hover { color: var(--lc-green-800); }
.lc-mobile-menu__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 0 4px;
}
.lc-mobile-menu__cats a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid var(--lc-border-strong);
	border-radius: var(--lc-radius-pill);
	font-size: 13px;
	border-bottom: 1px solid var(--lc-border-strong);
}

/* ---------- Footer ---------- */
.lc-footer {
	background: var(--lc-green-800);
	color: var(--lc-cream-100);
	margin-top: 30px;
}
.lc-footer__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 64px 24px 32px;
}
.lc-footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 40px;
	margin-bottom: 48px;
}
.lc-footer-brand img {
	height: 64px;
	width: auto;
	filter: brightness(0) invert(1);
	margin-bottom: 16px;
}
.lc-footer-brand p {
	font-family: var(--lc-font-body);
	font-size: 14px;
	line-height: 1.6;
	color: var(--lc-green-200);
	max-width: 320px;
	margin: 0 0 20px;
}
.lc-footer-social { display: flex; gap: 10px; }
.lc-footer-social a {
	width: 38px;
	height: 38px;
	border-radius: var(--lc-radius-pill);
	background: rgba(251, 246, 236, 0.10);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--lc-cream-100);
	text-decoration: none;
	transition: background var(--lc-dur-fast) var(--lc-ease);
}
.lc-footer-social a:hover { background: rgba(251, 246, 236, 0.20); }

.lc-footer-col__title {
	font-family: var(--lc-font-body);
	font-weight: var(--lc-w-bold);
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--lc-cream-100);
	margin-bottom: 16px;
}
.lc-footer-col ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.lc-footer-col a {
	color: var(--lc-green-200);
	text-decoration: none;
	font-size: 14px;
	font-family: var(--lc-font-body);
}
.lc-footer-col a:hover { color: var(--lc-cream-100); }

.lc-footer-bottom {
	padding-top: 28px;
	border-top: 1px solid rgba(251, 246, 236, 0.15);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 18px;
	align-items: center;
	font-size: 12px;
	color: var(--lc-green-200);
	font-family: var(--lc-font-body);
}
.lc-footer-bottom a { color: var(--lc-green-200); text-decoration: underline; font-weight: var(--lc-w-semibold); }
.lc-footer-pay { display: flex; align-items: center; gap: 10px; }
.lc-pay {
	font-weight: var(--lc-w-extrabold);
	font-size: 11px;
	padding: 6px 10px;
	border-radius: 6px;
	font-family: var(--lc-font-body);
	letter-spacing: 0.04em;
	min-width: 42px;
	text-align: center;
}
.lc-pay--yape { background: #7B2EFF; color: #fff; }
.lc-pay--plin { background: #00C2A8; color: #fff; }
.lc-pay--visa { background: var(--lc-cream-100); color: #1A1F71; }
.lc-pay--mc   { background: var(--lc-cream-100); color: var(--lc-ink-900); }
.lc-pay--bcp  { background: transparent; color: var(--lc-cream-100); border: 1px solid rgba(251, 246, 236, 0.4); }

/* ---------- WhatsApp FAB ---------- */
.lc-wa-fab {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 180;
	width: 60px;
	height: 60px;
	border-radius: var(--lc-radius-pill);
	background: #25D366;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-shadow: 0 12px 28px rgba(37, 211, 102, 0.36), 0 4px 10px rgba(0, 0, 0, 0.18);
	transition: transform 220ms var(--lc-ease-organic), box-shadow 220ms var(--lc-ease);
}
.lc-wa-fab:hover {
	transform: scale(1.06);
	box-shadow: 0 18px 40px rgba(37, 211, 102, 0.45), 0 6px 14px rgba(0, 0, 0, 0.22);
}
.lc-wa-fab svg { position: relative; z-index: 1; }
.lc-wa-ring {
	position: absolute;
	inset: 0;
	border-radius: var(--lc-radius-pill);
	background: #25D366;
	opacity: 0.55;
	z-index: 0;
	animation: lc-wa-radiate 2.7s cubic-bezier(.22, .61, .36, 1) infinite;
	pointer-events: none;
}
.lc-wa-ring:nth-child(2) { animation-delay: 0.9s; }
.lc-wa-ring:nth-child(3) { animation-delay: 1.8s; }
@keyframes lc-wa-radiate {
	0%   { transform: scale(1);   opacity: 0.55; }
	70%  { transform: scale(2);   opacity: 0;    }
	100% { transform: scale(2.1); opacity: 0;    }
}
@media (prefers-reduced-motion: reduce) {
	.lc-wa-ring { animation: none; opacity: 0; }
}

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 980px) {
	.lc-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 760px) {
	.lc-mainnav { display: none; }
	.lc-mobile-menu-btn { display: inline-flex; }
	.lc-cart-label { display: none; }
	/* Header en 2 filas: logo + carrito + menú arriba, buscador full-width abajo. */
	.lc-header__inner { flex-wrap: wrap; gap: 12px; }
	.lc-logo { margin-right: auto; }
	.lc-search { order: 5; flex-basis: 100%; }
	.lc-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; text-align: center; }
	.lc-footer-brand { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; }
	.lc-footer-brand p { margin-inline: auto; }
	.lc-footer-social { justify-content: center; }
	.lc-footer-col ul { align-items: center; }
	.lc-footer-bottom { justify-content: center; text-align: center; }
}
@media (max-width: 560px) {
	.lc-footer-grid { grid-template-columns: 1fr; }
}

/* =============================================================================
   Cart drawer (mini-cart lateral) — réplica de CartDrawer.jsx
   ============================================================================= */
.lc-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(27, 26, 18, 0.45);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 220ms var(--lc-ease);
}
.lc-cart-overlay.is-open { opacity: 1; pointer-events: auto; }
.lc-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 95;
	width: 420px;
	max-width: 92vw;
	background: var(--lc-cream-100);
	box-shadow: -24px 0 60px rgba(60, 38, 3, 0.20);
	transform: translateX(100%);
	transition: transform 320ms var(--lc-ease-organic);
	display: flex;
	flex-direction: column;
	font-family: var(--lc-font-body);
}
.lc-cart-drawer.is-open { transform: translateX(0); }
.lc-cart-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--lc-divider); }
.lc-cart-drawer__head h3 { margin: 0; font-size: 18px; font-weight: var(--lc-w-bold); color: var(--lc-ink-900); }
.lc-cart-drawer__close { width: 36px; height: 36px; border-radius: var(--lc-radius-pill); background: var(--lc-cream-200); border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--lc-ink-900); }
.lc-cart-drawer__body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

.lc-drawer-progress { padding: 16px 24px 8px; }
.lc-drawer-progress__msg { font-size: 13px; color: var(--lc-ink-700); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.lc-drawer-progress__msg .lc-icon { color: var(--lc-green-800); }
.lc-drawer-progress__msg strong { color: var(--lc-green-800); }
.lc-drawer-progress__bar { height: 8px; background: var(--lc-cream-200); border-radius: var(--lc-radius-pill); overflow: hidden; }
.lc-drawer-progress__fill { height: 100%; background: linear-gradient(90deg, var(--lc-green-500), var(--lc-green-800)); border-radius: var(--lc-radius-pill); transition: width 320ms var(--lc-ease); }

.lc-drawer-items { list-style: none; padding: 12px 24px; margin: 0; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.lc-drawer-item { display: flex; gap: 14px; padding: 12px; background: var(--lc-cream-50); border-radius: 14px; box-shadow: var(--lc-shadow-xs); position: relative; }
.lc-drawer-item__media { width: 70px; height: 70px; border-radius: 10px; background: var(--lc-cream-200); overflow: hidden; flex-shrink: 0; }
.lc-drawer-item__media img { width: 100%; height: 100%; object-fit: cover; }
.lc-drawer-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-right: 18px; }
.lc-drawer-item__cat { font-size: 10px; color: var(--lc-green-700); text-transform: uppercase; letter-spacing: 0.1em; font-weight: var(--lc-w-semibold); }
.lc-drawer-item__name { font-size: 13px; font-weight: var(--lc-w-semibold); line-height: 1.3; color: var(--lc-ink-900); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-drawer-item__row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.lc-drawer-item__qty { font-size: 13px; color: var(--lc-ink-500); }
.lc-drawer-item__price { font-weight: var(--lc-w-bold); color: var(--lc-green-800); font-size: 14px; }
.lc-drawer-remove { position: absolute; top: 10px; right: 10px; color: var(--lc-ink-500); display: inline-flex; padding: 4px; text-decoration: none; line-height: 0; }
.lc-drawer-remove:hover { color: var(--lc-sale); }

.lc-drawer-foot { padding: 20px 24px; border-top: 1px solid var(--lc-divider); background: var(--lc-cream-50); }
.lc-drawer-foot__row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.lc-drawer-foot__row > span:first-child { color: var(--lc-ink-700); }
.lc-drawer-foot__subtotal { font-weight: var(--lc-w-bold); color: var(--lc-ink-900); }
.lc-drawer-foot__delivery { font-size: 13px; color: var(--lc-ink-500); margin-bottom: 14px; }
.lc-drawer-foot__delivery strong { color: var(--lc-green-700); }
.lc-drawer-viewcart { display: block; text-align: center; margin-top: 10px; font-size: 13px; font-weight: var(--lc-w-semibold); color: var(--lc-green-700); text-decoration: none; }
.lc-drawer-viewcart:hover { color: var(--lc-green-800); }
.lc-drawer-secure { font-size: 11px; color: var(--lc-ink-500); text-align: center; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; }

.lc-drawer-empty { text-align: center; padding: 60px 20px; color: var(--lc-ink-500); }
.lc-drawer-empty .lc-icon { color: var(--lc-ink-300); }
.lc-drawer-empty__title { font-size: 16px; font-weight: var(--lc-w-semibold); color: var(--lc-ink-900); margin-top: 12px; }
.lc-drawer-empty p { font-size: 13px; margin: 4px 0 20px; }
