/* "Colección" block. Colors and fonts come from the El Duende theme presets. */
.ed-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(36px, 4vw, 64px) clamp(18px, 3vw, 48px); }
.ed-item__photo { margin: 0 0 26px; overflow: hidden; }
.ed-item__photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1.6s cubic-bezier(.2, .7, .1, 1); }
.ed-items--ed_obra .ed-item__photo img { aspect-ratio: 4 / 5; }
.ed-item:hover .ed-item__photo img { transform: scale(1.05); }
.ed-item__title { margin: 0 0 10px; font-family: var(--wp--preset--font-family--display); font-weight: 400; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; }
.ed-items--ed_obra .ed-item__title { font-style: italic; }
.ed-item__by { margin: 0 0 6px; color: var(--wp--preset--color--accent-2); }
.ed-item__facts { margin: 0 0 12px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--wp--preset--color--accent-1); }
.ed-item__text { margin: 0 0 18px; color: var(--wp--preset--color--accent-4); font-size: 15px; }
.ed-item__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0; padding-top: 16px; border-top: 1px solid var(--wp--preset--color--accent-6); }
.ed-item__price { font-family: var(--wp--preset--font-family--display); font-size: 20px; }
.ed-item__link { margin-left: auto; font-size: 11px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; }
.ed-items__empty { grid-column: 1 / -1; text-align: center; font-family: var(--wp--preset--font-family--display); font-style: italic; font-size: 22px; color: var(--wp--preset--color--accent-4); }

.ed-carta__group + .ed-carta__group { margin-top: clamp(70px, 9vw, 130px); }
.ed-carta__title { margin: 0 0 clamp(30px, 4vw, 56px); text-align: center; font-family: var(--wp--preset--font-family--display); font-weight: 400; font-style: italic; font-size: clamp(40px, 5.6vw, 84px); }
.ed-carta__group { columns: 2 380px; column-gap: clamp(40px, 6vw, 100px); }
.ed-carta__title { column-span: all; }
.ed-carta__cat { break-inside: avoid; margin-bottom: clamp(36px, 4vw, 56px); }
.ed-carta__cat-title { margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--wp--preset--color--accent-6); font-family: var(--wp--preset--font-family--body); font-size: 11px; font-weight: 500; letter-spacing: .42em; text-transform: uppercase; color: var(--wp--preset--color--accent-1); }
.ed-carta__list { list-style: none; margin: 0; padding: 0; }
.ed-carta__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; padding: 9px 0; }
.ed-carta__name { font-family: var(--wp--preset--font-family--display); font-size: 20px; line-height: 1.3; }
.ed-carta__dots { flex: 1 1 24px; border-bottom: 1px dotted rgba(212, 166, 60, .4); transform: translateY(-5px); }
.ed-carta__price { color: var(--wp--preset--color--accent-2); white-space: nowrap; }
.ed-carta__desc { flex-basis: 100%; font-size: 14px; color: var(--wp--preset--color--accent-4); }

/* Category bar on the carta: sticky under the header, scrolls sideways on phones. */
.ed-carta__nav {
	position: sticky; top: 66px; z-index: 5; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
	margin: 0 0 clamp(40px, 6vw, 80px); padding: 14px 4px;
	background: var(--wp--preset--color--base);
	border-block: 1px solid var(--wp--preset--color--accent-6);
}
.ed-carta__nav::-webkit-scrollbar { display: none; }
@media (min-width: 901px) { .ed-carta__nav { top: 80px; } } /* = height of the compact header after scroll */
.ed-carta__nav a {
	flex: none; padding: 10px 16px; border: 1px solid var(--wp--preset--color--accent-6); border-radius: 999px;
	font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--wp--preset--color--contrast); white-space: nowrap;
	transition: background .3s, color .3s, border-color .3s;
}
.ed-carta__nav a:hover { background: var(--wp--preset--color--accent-1); border-color: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--base); }
.ed-carta__cat { scroll-margin-top: calc(var(--ed-header-h) + 80px); }

/* Tappable carta line and its detail sheet (carta.js). */
.ed-carta__open { all: unset; box-sizing: border-box; display: flex; flex: 1 1 100%; align-items: baseline; gap: 0 10px; cursor: pointer; border-radius: 4px; }
.ed-carta__open:focus-visible { outline: 2px solid var(--wp--preset--color--accent-1); outline-offset: 4px; }
.ed-carta__more { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--wp--preset--color--accent-6); border-radius: 50%; font-size: 15px; line-height: 1; color: var(--wp--preset--color--accent-1); transform: translateY(-2px); transition: background .3s, color .3s; }
.ed-carta__open:hover .ed-carta__name { color: var(--wp--preset--color--accent-2); }
.ed-carta__open:hover .ed-carta__more { background: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--base); }
.ed-sheet { width: min(520px, calc(100% - 32px)); max-height: min(88vh, 820px); padding: 0; border: 1px solid var(--wp--preset--color--accent-6); background: var(--wp--preset--color--accent-5); color: var(--wp--preset--color--contrast); overflow: auto; }
.ed-sheet::backdrop { background: rgba(8, 6, 4, .78); }
.ed-sheet__x { position: absolute; top: 10px; right: 10px; z-index: 1; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(11, 9, 8, .7); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.ed-sheet__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--wp--preset--color--accent-3); }
.ed-sheet__img[hidden] { display: none; }
.ed-sheet__body { padding: 24px 24px 28px; }
.ed-sheet__name { margin: 0 48px 6px 0; font-family: var(--wp--preset--font-family--display); font-weight: 400; font-size: clamp(26px, 6vw, 34px); line-height: 1.1; }
.ed-sheet__price { margin: 0 0 14px; color: var(--wp--preset--color--accent-2); font-size: 18px; }
.ed-sheet__desc { margin: 0 0 22px; color: var(--wp--preset--color--accent-4); font-size: 15px; line-height: 1.6; }
.ed-sheet__desc:empty { display: none; }
.ed-sheet__wa { display: inline-block; text-decoration: none; }
@media (max-width: 600px) {
	/* phone: the sheet rises from the bottom edge */
	.ed-sheet { width: 100%; max-width: none; margin: auto 0 0; max-height: 86vh; border-width: 1px 0 0; }
	.ed-sheet[open] { animation: ed-sheet-up .35s cubic-bezier(.2, .7, .1, 1); }
	.ed-sheet__wa { display: block; text-align: center; }
}
@keyframes ed-sheet-up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ed-sheet[open] { animation: none; } }
