/* =========================================================================
   Confitería Ochoa · Menú principal (barra fija + menú a pantalla completa)
   ========================================================================= */

@font-face {
	font-family: "Fraunces";
	src: url("../fonts/fraunces/fraunces.woff2") format("woff2");
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
}

.om-bar,
.om-menu {
	--om-navy: #17224f;
	--om-blue: #3b509d;
	--om-cream: #f6f0e4;
	--om-paper: #fffcf6;
	--om-ink: #1c2033;
	--om-gold: #c9a25e;
	--om-gold-soft: #ead8ac;
	--om-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
	--om-sans: "avenir", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
.om-bar *, .om-menu *, .om-menu *::before, .om-menu *::after { box-sizing: border-box; }

/* ---------- Barra fija ---------- */
.om-bar {
	position: fixed; inset: 0 0 auto 0; z-index: 1000;
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
	padding: 18px clamp(16px, 3vw, 36px);
	color: #fff; pointer-events: none;
	transition: background-color .3s, box-shadow .3s, padding .3s, color .3s;
}
.om-bar > * { pointer-events: auto; }
.om-bar.is-scrolled {
	background: rgb(255 252 246 / .9); color: var(--om-navy);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	box-shadow: 0 1px 0 rgb(23 34 79 / .08), 0 10px 30px -18px rgb(23 34 79 / .35);
	padding-block: 10px;
}

/* Botón Menú (anula el estilo global de <button>) */
.om-bar .om-toggle,
.om-menu .om-close {
	justify-self: start; display: inline-flex; align-items: center; gap: 12px;
	min-height: 44px; padding: 0 18px 0 14px !important; margin: 0;
	border: 1px solid currentColor; border-color: rgb(255 255 255 / .45); border-radius: 999px;
	background: rgb(23 34 79 / .18); color: inherit; cursor: pointer;
	font: 400 .8rem/1 var(--om-sans); letter-spacing: .16em; text-transform: uppercase;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	transition: background-color .2s, border-color .2s, color .2s;
}
.om-bar .om-toggle:hover { background: rgb(255 255 255 / .14); border-color: #fff; }
.om-bar.is-scrolled .om-toggle { border-color: rgb(23 34 79 / .25); background: transparent; }
.om-bar.is-scrolled .om-toggle:hover { background: var(--om-navy); border-color: var(--om-navy); color: #fff; }
.om-toggle__icon { display: grid; gap: 5px; width: 20px; }
.om-toggle__icon span { display: block; height: 1.6px; background: currentColor; border-radius: 2px; }
.om-toggle__icon span:last-child { width: 70%; }

/* Logo central (aparece al hacer scroll) */
.om-bar__logo { display: block; width: 64px; opacity: 0; translate: 0 -6px; transition: opacity .3s, translate .3s; pointer-events: none; }
.om-bar.is-scrolled .om-bar__logo { opacity: 1; translate: 0 0; pointer-events: auto; }
.om-bar__logo img { width: 100%; height: auto; display: block; }
.om-bar__logo-w { display: none !important; }

/* Tienda destacada */
.om-bar__shop {
	justify-self: end; display: inline-flex; align-items: center; gap: 8px;
	min-height: 44px; padding: 0 20px; border-radius: 999px;
	background: var(--om-gold-soft); color: var(--om-navy) !important; text-decoration: none !important;
	font: 400 .8rem/1 var(--om-sans); letter-spacing: .14em; text-transform: uppercase;
	box-shadow: 0 8px 24px -12px rgb(0 0 0 / .45);
	transition: background-color .2s, color .2s, transform .2s;
}
.om-bar__shop:hover { background: #fff; }
.om-bar.is-scrolled .om-bar__shop { background: var(--om-navy); color: #fff !important; box-shadow: none; }
.om-bar.is-scrolled .om-bar__shop:hover { background: var(--om-blue); }
.om-bar__shop.is-current { outline: 1px solid rgb(255 255 255 / .6); outline-offset: 3px; }

.om-bar :where(a, button):focus-visible,
.om-menu :where(a, button):focus-visible { outline: 2px solid var(--om-gold); outline-offset: 3px; }

/* ---------- Menú a pantalla completa ---------- */
.om-menu {
	position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%;
	margin: 0; padding: 0 0 clamp(24px, 4vw, 48px); border: 0;
	background:
		radial-gradient(60% 70% at 90% 10%, rgb(59 80 157 / .55), transparent 70%),
		radial-gradient(50% 60% at 0% 100%, rgb(201 162 94 / .12), transparent 70%),
		var(--om-navy);
	color: var(--om-cream);
	overflow-y: auto; overscroll-behavior: contain;
}
.om-menu::backdrop { background: var(--om-navy); overflow: hidden; overscroll-behavior: contain; }
.om-menu:not([open]) { display: none; }
.om-wrap { width: min(1240px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }

.om-menu__top { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }
.om-menu__logo { display: block; width: 110px; }
.om-menu__logo img { width: 100%; height: auto; display: block; }
.om-menu .om-close { border-color: rgb(255 255 255 / .35); background: transparent; color: var(--om-cream); gap: 10px; padding: 0 14px 0 18px !important; }
.om-menu .om-close:hover { background: rgb(255 255 255 / .1); border-color: #fff; }

.om-menu__grid {
	display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 6vw, 96px);
	align-items: center; padding-block: clamp(24px, 6vh, 72px);
}

/* Enlaces */
.om-links { list-style: none; margin: 0; padding: 0; counter-reset: om; }
.om-links li { counter-increment: om; margin: 0; padding: 0; border-bottom: 1px solid rgb(234 216 172 / .14); list-style: none; }
.om-links li:first-child { border-top: 1px solid rgb(234 216 172 / .14); }
.om-links a {
	display: flex; align-items: baseline; gap: 18px; padding: clamp(10px, 1.6vh, 16px) 0;
	font-family: var(--om-serif) !important; font-weight: 400; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.4rem); line-height: 1.05;
	letter-spacing: -.015em; color: var(--om-cream) !important; text-decoration: none !important; text-shadow: none;
	transition: color .2s, translate .25s;
}
.om-links a::before {
	content: counter(om, decimal-leading-zero); flex: none; width: 2.2em;
	font: 400 .72rem/1 var(--om-sans); letter-spacing: .14em; color: var(--om-gold); translate: 0 -.4em;
}
.om-links a:hover { color: var(--om-gold-soft) !important; }
@media (prefers-reduced-motion: no-preference) { .om-links a:hover { translate: 8px 0; } }
.om-links .current-menu-item > a,
.om-links a[aria-current="page"] { color: var(--om-gold-soft) !important; }
.om-links .current-menu-item > a::after,
.om-links a[aria-current="page"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--om-gold); align-self: center; }

/* Tarjeta de la tienda */
.om-shop {
	display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; text-decoration: none !important;
	background: var(--om-paper); color: var(--om-ink) !important;
	box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); transition: transform .3s, box-shadow .3s;
}
@media (prefers-reduced-motion: no-preference) { .om-shop:hover { transform: translateY(-4px); } }
.om-shop:hover { box-shadow: 0 40px 70px -30px rgb(0 0 0 / .7); }
.om-shop__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #efe6d4; }
.om-shop__img { width: 100%; height: 100% !important; object-fit: cover; display: block; transition: scale .6s; }
@media (prefers-reduced-motion: no-preference) { .om-shop:hover .om-shop__img { scale: 1.05; } }
.om-shop__body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 24px; }
.om-shop__eyebrow { font: 400 .72rem/1 var(--om-sans); letter-spacing: .16em; text-transform: uppercase; color: #8a6526; }
.om-shop__title { font: 450 clamp(1.6rem, 1.2rem + 1vw, 2.1rem)/1.05 var(--om-serif); color: var(--om-navy); }
.om-shop__text { font: 400 .95rem/1.5 var(--om-sans); color: #4a4c5c; }
.om-shop__cta {
	align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px;
	border-radius: 999px; background: var(--om-blue); color: #fff; font: 400 .78rem/1 var(--om-sans); letter-spacing: .12em; text-transform: uppercase;
	transition: background-color .2s;
}
.om-shop:hover .om-shop__cta { background: var(--om-navy); }

/* Pie del menú */
.om-menu__foot {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 32px;
	padding-top: 28px; border-top: 1px solid rgb(234 216 172 / .18);
}
.om-menu__foot p { margin: 0; font: 400 .95rem/1.6 var(--om-sans) !important; color: rgb(246 240 228 / .8); text-align: left !important; }
.om-menu__foot a { color: var(--om-cream) !important; text-decoration: none; border-bottom: 1px solid rgb(234 216 172 / .3); }
.om-menu__foot a:hover { border-bottom-color: var(--om-gold); }
.om-menu__foot .om-foot__label { font: 400 .72rem/1.4 var(--om-sans) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--om-gold) !important; margin-bottom: 6px; }
.om-new { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--om-gold); color: var(--om-navy); letter-spacing: .1em; font-size: .62rem; }
.om-foot__social { display: flex; gap: 18px; align-items: flex-end; justify-content: flex-end; }
.om-foot__social a { font: 400 .8rem/1 var(--om-sans); letter-spacing: .14em; text-transform: uppercase; padding-bottom: 4px; }

/* Animación de apertura */
@media (prefers-reduced-motion: no-preference) {
	.om-menu[open] { animation: om-fade .35s ease both; }
	.om-menu[open] .om-links li { animation: om-up .55s cubic-bezier(.2, .7, .2, 1) both; }
	.om-menu[open] .om-links li:nth-child(1) { animation-delay: .05s; }
	.om-menu[open] .om-links li:nth-child(2) { animation-delay: .09s; }
	.om-menu[open] .om-links li:nth-child(3) { animation-delay: .13s; }
	.om-menu[open] .om-links li:nth-child(4) { animation-delay: .17s; }
	.om-menu[open] .om-links li:nth-child(5) { animation-delay: .21s; }
	.om-menu[open] .om-links li:nth-child(6) { animation-delay: .25s; }
	.om-menu[open] .om-links li:nth-child(7) { animation-delay: .29s; }
	.om-menu[open] .om-links li:nth-child(8) { animation-delay: .33s; }
	.om-menu[open] .om-shop { animation: om-up .6s .18s cubic-bezier(.2, .7, .2, 1) both; }
	@keyframes om-fade { from { opacity: 0; } to { opacity: 1; } }
	@keyframes om-up { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.om-menu__grid { grid-template-columns: 1fr; align-items: start; padding-block: 8px 28px; gap: 24px; }
	.om-shop { order: -1; flex-direction: row; border-radius: 20px; }
	.om-shop__media { flex: 0 0 34%; aspect-ratio: auto; }
	.om-shop__body { padding: 16px 18px; gap: 4px; }
	.om-shop__text { display: none; }
	.om-shop__cta { min-height: 38px; padding: 0 14px; margin-top: 6px; }
	.om-menu__foot { grid-template-columns: 1fr 1fr; }
	.om-foot__social { justify-content: flex-start; align-items: center; }
}
@media (max-width: 560px) {
	.om-bar { padding: 12px 14px; }
	.om-bar .om-toggle { padding: 0 14px 0 12px !important; }
	.om-hide-sm { display: none; }
	.om-bar__shop { padding: 0 16px; }
	.om-bar__logo { width: 54px; }
	.om-menu__foot { grid-template-columns: 1fr; }
}
