/* ==========================================================================
   Idea Wine List — public menu [carta_vinos] (ported from the prototype)
   Everything is scoped under .iwl-carta; the first block neutralises common
   theme styles for buttons, headings, lists and form controls.
   ========================================================================== */

.iwl-carta {
	--iwl-accent: #D9B26A;
	--iwl-serif: 'IWL Cormorant Garamond', 'Cormorant Garamond', Georgia, serif;
	--iwl-sans: 'IWL Inter', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	background: #15100F;
	color: #F3EAE0;
	font-family: var(--iwl-sans);
	font-size: 15px;
	line-height: 1.4;
	text-align: left;
	color-scheme: dark;
	-webkit-font-smoothing: antialiased;
}
.iwl-carta *, .iwl-carta *::before, .iwl-carta *::after { box-sizing: border-box; }

/* ---- theme reset ---- */
.iwl-carta button, .iwl-carta a.iwl-ib, .iwl-carta select {
	margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; text-shadow: none;
	font: inherit; color: inherit; line-height: normal; letter-spacing: normal; text-transform: none; text-decoration: none;
	width: auto; min-width: 0; min-height: 0; height: auto; cursor: pointer; -webkit-tap-highlight-color: transparent;
	-webkit-appearance: none; appearance: none;
}
.iwl-carta button:hover, .iwl-carta button:focus { background: none; color: inherit; box-shadow: none; text-decoration: none; }
.iwl-carta button:disabled { cursor: not-allowed; opacity: .32; }
.iwl-carta h1, .iwl-carta h2, .iwl-carta h3, .iwl-carta p, .iwl-carta dl, .iwl-carta dd, .iwl-carta dt, .iwl-carta ul {
	margin: 0; padding: 0; border: 0; background: none; color: inherit; text-transform: none; letter-spacing: normal; font-family: inherit; line-height: inherit;
}
.iwl-carta h1::before, .iwl-carta h2::before, .iwl-carta h1::after, .iwl-carta h2::after { content: none; }
.iwl-carta img { max-width: none; height: auto; border: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 0; }
.iwl-carta svg { flex-shrink: 0; overflow: visible; }
.iwl-carta button:focus-visible, .iwl-carta select:focus-visible, .iwl-carta a:focus-visible {
	outline: 2px solid var(--iwl-accent); outline-offset: 2px;
}
.iwl-carta .iwl-scroll { scrollbar-width: thin; scrollbar-color: rgba(243,234,224,.18) transparent; }
.iwl-carta .iwl-lbl { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #A8998B; font-weight: 600; }
.iwl-carta .iwl-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ---- layouts ---- */
.iwl-carta.iwl-layout-inline { border-radius: 18px; overflow: hidden; margin: 0 0 1.5em; }
.iwl-carta.iwl-layout-inline .iwl-app { min-height: 420px; }
.iwl-carta.iwl-layout-fullscreen {
	position: fixed; top: var(--wp-admin--admin-bar--height, 0px); right: 0; bottom: 0; left: 0; z-index: 99990;
	/* Block themes constrain post content (max-width + auto margins); escape it. */
	width: auto !important; max-width: none !important; margin: 0 !important; border-radius: 0;
}
.iwl-carta.iwl-layout-fullscreen .iwl-app { height: 100%; display: flex; flex-direction: column; }
.iwl-carta.iwl-layout-fullscreen .iwl-main { flex: 1; min-height: 0; position: relative; }
.iwl-carta.iwl-layout-fullscreen .iwl-gridwrap { position: absolute; inset: 0; overflow-y: auto; }
html:has(.iwl-layout-fullscreen.is-ready), html.iwl-lock { overflow: hidden; }

/* ---- no-JS / pre-render fallback ---- */
.iwl-carta .iwl-fallback { padding: 24px 32px; }
.iwl-carta .iwl-fallback h2 { font-family: var(--iwl-serif); font-size: 32px; font-weight: 600; margin-bottom: 12px; }
.iwl-carta .iwl-fallback h3 { font-family: var(--iwl-serif); font-size: 22px; color: #E9D3A8; margin: 16px 0 6px; }
.iwl-carta .iwl-fallback ul { list-style: none; }
.iwl-carta .iwl-fallback li { padding: 4px 0; color: #D9CBBE; border-bottom: 1px solid rgba(243,234,224,.06); }

/* ---- header ---- */
.iwl-carta .iwl-hdr {
	height: 76px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 0 32px; border-bottom: 1px solid rgba(243,234,224,.08);
}
.iwl-carta .iwl-hdr-l { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.iwl-carta .iwl-hdr-r { display: flex; align-items: center; gap: 12px; }
.iwl-carta .iwl-title { font-family: var(--iwl-serif); font-weight: 600; font-size: 36px; letter-spacing: .01em; line-height: 1.1; color: #F3EAE0; }
.iwl-carta .iwl-total { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #A8998B; white-space: nowrap; }
.iwl-carta .iwl-langs { display: flex; gap: 4px; padding: 4px; border-radius: 26px; border: 1px solid rgba(243,234,224,.14); }
.iwl-carta .iwl-langs button {
	height: 40px; min-width: 48px; padding: 0 12px; border-radius: 20px; font-size: 13px; font-weight: 600;
	letter-spacing: .06em; color: #D9CBBE; text-align: center;
}
.iwl-carta .iwl-langs button[aria-pressed=true] { background: #F3EAE0; color: #15100F; }
.iwl-carta .iwl-ib, .iwl-carta a.iwl-ib {
	width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 10px; border: 1px solid rgba(243,234,224,.14); color: #E6D9CC; flex-shrink: 0;
}
.iwl-carta .iwl-ib:hover:not(:disabled) { background: rgba(243,234,224,.07); color: #E6D9CC; }
.iwl-carta .iwl-ib-round { width: 52px; height: 52px; border-radius: 26px; }

/* ---- type tabs ---- */
.iwl-carta .iwl-tabs {
	height: 66px; flex-shrink: 0; display: flex; align-items: stretch; gap: 4px; padding: 0 20px;
	overflow-x: auto; border-bottom: 1px solid rgba(243,234,224,.08);
}
.iwl-carta .iwl-tab {
	display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 2px solid transparent;
	color: #A8998B; white-space: nowrap; flex-shrink: 0;
}
.iwl-carta .iwl-tab:hover { color: #F3EAE0; }
.iwl-carta .iwl-tab[aria-pressed=true] { color: #F3EAE0; border-bottom-color: var(--iwl-accent); }
.iwl-carta .iwl-tab-star { color: var(--iwl-accent); display: inline-flex; }
.iwl-carta .iwl-tab-dot { width: 10px; height: 10px; border-radius: 50%; display: block; flex-shrink: 0; }
.iwl-carta .iwl-tab-label { font-family: var(--iwl-serif); font-size: 24px; font-weight: 600; }
.iwl-carta .iwl-tab-count { font-size: 13px; color: #A8998B; font-variant-numeric: tabular-nums; }

/* ---- toolbar: appellation chips + sort ---- */
.iwl-carta .iwl-tbar { min-height: 70px; flex-shrink: 0; display: flex; align-items: center; gap: 20px; padding: 0 32px; }
.iwl-carta .iwl-chips { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.iwl-carta .iwl-chip {
	height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid rgba(243,234,224,.16);
	background: rgba(243,234,224,.05); color: #E6D9CC; font-size: 14px; font-weight: 500; white-space: nowrap; flex-shrink: 0;
}
.iwl-carta .iwl-chip:hover { border-color: rgba(243,234,224,.32); background: rgba(243,234,224,.05); }
.iwl-carta .iwl-chip[aria-pressed=true], .iwl-carta .iwl-chip[aria-pressed=true]:hover { background: #F3EAE0; color: #15100F; border-color: #F3EAE0; }
.iwl-carta .iwl-sort { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: 13px; color: #A8998B; margin: 0; }
/* filter chips that open a menu */
.iwl-carta .iwl-tbar { position: relative; }
.iwl-carta .iwl-fchip { display: inline-flex; flex-shrink: 0; }
.iwl-carta .iwl-fchip.is-active .iwl-chip { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 10px; }
.iwl-carta .iwl-fchip-x {
	height: 44px; padding: 0 12px 0 8px; border-radius: 0 22px 22px 0; border: 1px solid #F3EAE0; border-left: 1px solid rgba(21,16,15,.18);
	background: #F3EAE0; color: #15100F; display: inline-flex; align-items: center;
}
.iwl-carta .iwl-fchip-x:hover { background: #E6D9CC; }
.iwl-carta .iwl-chev { display: inline-flex; opacity: .7; transition: transform .15s; }
.iwl-carta [data-act=menu][aria-expanded=true] .iwl-chev { transform: rotate(180deg); }
.iwl-carta .iwl-fmenu-host { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.iwl-carta .iwl-fmenu {
	position: absolute; pointer-events: auto; background: #211A18; border: 1px solid rgba(243,234,224,.16); border-radius: 14px;
	box-shadow: 0 18px 40px rgba(0,0,0,.45); padding: 6px; overflow: hidden;
}
.iwl-carta .iwl-fmenu-list { max-height: min(360px, 60vh); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.iwl-carta .iwl-fopt {
	display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px;
	background: transparent; color: #E6D9CC; font-size: 14px; text-align: left;
}
.iwl-carta .iwl-fopt:hover, .iwl-carta .iwl-fopt:focus-visible { background: rgba(243,234,224,.07); }
.iwl-carta .iwl-fopt[aria-pressed=true] { color: #F3EAE0; font-weight: 600; }
.iwl-carta .iwl-fopt-name { flex: 1; min-width: 0; }
.iwl-carta .iwl-fopt-n { font-size: 12px; color: #A8998B; font-variant-numeric: tabular-nums; }
.iwl-carta .iwl-fopt-check { display: inline-flex; color: var(--iwl-accent, #D9B26A); visibility: hidden; }
.iwl-carta .iwl-fopt[aria-pressed=true] .iwl-fopt-check { visibility: visible; }
.iwl-carta .iwl-chip { display: inline-flex; align-items: center; gap: 8px; }
.iwl-carta .iwl-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.iwl-carta .iwl-grape-t { background: #9B2D3F; }
.iwl-carta .iwl-grape-b { background: #E3C77B; }
.iwl-carta .iwl-select {
	height: 44px; width: 250px; background-color: #120D0C; border: 1px solid rgba(243,234,224,.18); border-radius: 10px;
	color: #F3EAE0; padding: 0 34px 0 12px; font-size: 15px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C9B9A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.iwl-carta .iwl-select option { background: #1B1412; color: #F3EAE0; }

/* ---- grid of cards ---- */
.iwl-carta .iwl-gridwrap { padding: 4px 32px 40px; }
.iwl-carta .iwl-group { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.iwl-carta .iwl-group-head { display: flex; align-items: baseline; gap: 14px; padding-top: 6px; border-bottom: 1px solid rgba(243,234,224,.08); padding-bottom: 10px; flex-wrap: wrap; }
.iwl-carta .iwl-group-title { font-family: var(--iwl-serif); font-size: 26px; font-weight: 600; color: #E9D3A8; line-height: 1.15; }
.iwl-carta .iwl-group-sub { font-size: 13px; color: #A8998B; }
.iwl-carta .iwl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 20px; }
.iwl-carta .iwl-card {
	display: flex; flex-direction: column; text-align: left; background: #1E1715; border: 1px solid rgba(243,234,224,.08);
	border-radius: 18px; overflow: hidden; color: #F3EAE0; transition: transform .18s ease, border-color .18s ease;
}
.iwl-carta .iwl-card:hover { border-color: rgba(217,178,106,.45); background: #1E1715; color: #F3EAE0; }
.iwl-carta .iwl-card:active { transform: scale(.98); }
.iwl-carta .iwl-card-img { height: 200px; position: relative; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; }
.iwl-carta .iwl-card-photo { height: 188px; width: auto; max-width: 90%; object-fit: contain; display: block; }
.iwl-carta .iwl-card-svg { height: 176px; width: auto; display: block; filter: drop-shadow(0 10px 14px rgba(0,0,0,.45)); }
.iwl-carta .iwl-badge-star {
	position: absolute; top: 12px; left: 12px; height: 26px; display: flex; align-items: center; gap: 5px; padding: 0 10px 0 8px;
	border-radius: 13px; background: var(--iwl-accent); color: #1A1210; font-size: 12px; font-weight: 600;
}
.iwl-carta .iwl-badge-glass {
	position: absolute; top: 12px; right: 12px; height: 26px; display: flex; align-items: center; padding: 0 10px;
	border-radius: 13px; background: rgba(21,16,15,.78); color: #E9D3A8; font-size: 12px; font-weight: 600;
}
.iwl-carta .iwl-card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.iwl-carta .iwl-card-do { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #C9A97A; font-weight: 600; }
.iwl-carta .iwl-card-name { font-family: var(--iwl-serif); font-size: 23px; font-weight: 600; line-height: 1.08; text-wrap: balance; }
.iwl-carta .iwl-card-vintage { color: #C9A97A; font-size: .8em; }
.iwl-carta .iwl-card-grapes { font-size: 13px; color: #A8998B; }
.iwl-carta .iwl-card-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.iwl-carta .iwl-card-region { font-size: 13px; color: #A8998B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.iwl-carta .iwl-card-price { font-family: var(--iwl-serif); font-size: 26px; font-weight: 700; color: var(--iwl-accent); white-space: nowrap; }
.iwl-carta .iwl-empty { margin: 80px 0; text-align: center; color: #A8998B; font-size: 16px; }

/* ---- detail dialog (rendered in a portal on <body>) ---- */
.iwl-portal { background: none; }
.iwl-portal:empty { display: none; }
.iwl-carta .iwl-dlg-wrap { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; }
.iwl-carta .iwl-backdrop, .iwl-carta .iwl-backdrop:hover, .iwl-carta .iwl-backdrop:focus {
	position: absolute; inset: 0; background: rgba(8,5,4,.8); backdrop-filter: blur(4px); cursor: default; width: 100%; height: 100%;
}
.iwl-carta .iwl-dlg {
	position: relative; width: 1010px; max-width: calc(100% - 48px); height: 680px; max-height: calc(100% - 48px); display: flex;
	background: #1B1412; color: #F3EAE0; border: 1px solid rgba(243,234,224,.12); border-radius: 26px; overflow: hidden;
	box-shadow: 0 40px 120px rgba(0,0,0,.6); font-family: var(--iwl-sans);
}
.iwl-carta .iwl-dlg-media { width: 370px; flex-shrink: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.iwl-carta .iwl-dlg-photo { height: 500px; width: auto; max-width: 86%; object-fit: contain; display: block; }
.iwl-carta .iwl-dlg-svg { height: 500px; width: auto; display: block; filter: drop-shadow(0 24px 30px rgba(0,0,0,.55)); }
.iwl-carta .iwl-dlg-type {
	position: absolute; left: 24px; bottom: 24px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 14px;
	border-radius: 17px; background: rgba(21,16,15,.8); font-size: 13px; font-weight: 600; color: #F3EAE0;
}
.iwl-carta .iwl-dlg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 44px 48px 32px; position: relative; }
.iwl-carta .iwl-dlg-close { position: absolute; top: 20px; right: 20px; }
.iwl-carta .iwl-dlg-do { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #C9A97A; font-weight: 600; padding-right: 64px; }
.iwl-carta .iwl-dlg-title { margin: 10px 64px 0 0; font-family: var(--iwl-serif); font-size: 50px; font-weight: 600; line-height: 1; text-wrap: balance; color: #F3EAE0; }
.iwl-carta .iwl-dlg-place { margin-top: 12px; font-size: 16px; color: #B9AA9B; }
.iwl-carta .iwl-dlg-scroll {
	flex: 1; min-height: 0; overflow-y: auto; margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(243,234,224,.1);
	display: flex; flex-direction: column; gap: 24px;
}
.iwl-carta .iwl-dlg-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.iwl-carta .iwl-dlg-specs > div { display: flex; flex-direction: column; gap: 4px; }
.iwl-carta .iwl-dlg-specs dd { font-size: 17px; color: #F3EAE0; line-height: 1.35; }
.iwl-carta .iwl-dlg-note { display: flex; flex-direction: column; gap: 6px; }
.iwl-carta .iwl-dlg-note p { font-family: var(--iwl-serif); font-style: italic; font-size: 22px; line-height: 1.35; color: #E9DED2; text-wrap: pretty; }
.iwl-carta .iwl-dlg-foot {
	flex-shrink: 0; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(243,234,224,.1);
	display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
}
.iwl-carta .iwl-dlg-prices { display: flex; align-items: flex-end; gap: 36px; }
.iwl-carta .iwl-dlg-prices > div { display: flex; flex-direction: column; gap: 2px; }
.iwl-carta .iwl-dlg-price { font-family: var(--iwl-serif); font-size: 44px; font-weight: 700; color: var(--iwl-accent); line-height: 1; }
.iwl-carta .iwl-dlg-glass { font-family: var(--iwl-serif); font-size: 34px; font-weight: 700; color: #E9D3A8; line-height: 1; }
.iwl-carta .iwl-dlg-nav { display: flex; align-items: center; gap: 10px; }
.iwl-carta .iwl-dlg-counter { font-size: 13px; color: #A8998B; font-variant-numeric: tabular-nums; }

/* ---- responsive ----
   The menu reacts to its own width (container queries) so it also fits narrow
   theme columns; the dialog lives on <body> and reacts to the viewport. */
.iwl-carta[data-iwl-carta] { container-type: inline-size; container-name: iwlcarta; }
@container iwlcarta (max-width: 900px) {
	.iwl-carta .iwl-hdr { padding: 0 20px; }
	.iwl-carta .iwl-tbar { padding: 0 20px; }
	.iwl-carta .iwl-gridwrap { padding: 4px 20px 32px; }
}
@container iwlcarta (max-width: 720px) {
	.iwl-carta .iwl-tbar { height: auto; flex-wrap: wrap; gap: 10px; padding: 10px 20px; }
	.iwl-carta .iwl-chips { flex-basis: 100%; }
	.iwl-carta .iwl-sort { width: 100%; }
	.iwl-carta .iwl-select { width: auto; flex: 1; }
}
@container iwlcarta (max-width: 600px) {
	.iwl-carta .iwl-hdr { height: auto; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
	.iwl-carta .iwl-title { font-size: 28px; }
	.iwl-carta .iwl-total { display: none; }
	.iwl-carta .iwl-tbar { padding: 10px 16px; }
	.iwl-carta .iwl-gridwrap { padding: 4px 12px 28px; }
	.iwl-carta .iwl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.iwl-carta .iwl-card-img { height: 160px; }
	.iwl-carta .iwl-card-photo, .iwl-carta .iwl-card-svg { height: 140px; }
	.iwl-carta .iwl-card-name { font-size: 19px; }
	.iwl-carta .iwl-card-price { font-size: 22px; }
	.iwl-carta .iwl-tab-label { font-size: 21px; }
}
@media (max-width: 600px) {
	.iwl-carta.iwl-layout-inline { border-radius: 0; }
}
@media (max-width: 900px) {
	.iwl-carta .iwl-dlg { flex-direction: column; width: 720px; height: calc(100% - 40px); max-height: none; overflow-y: auto; }
	.iwl-carta .iwl-dlg-media { width: 100%; height: 280px; flex-shrink: 0; }
	.iwl-carta .iwl-dlg-photo, .iwl-carta .iwl-dlg-svg { height: 240px; }
	.iwl-carta .iwl-dlg-body { flex: none; padding: 32px 32px 24px; }
	.iwl-carta .iwl-dlg-scroll { flex: none; overflow: visible; }
}
@media (max-width: 600px) {
	.iwl-carta .iwl-dlg-wrap { align-items: stretch; }
	.iwl-carta .iwl-dlg { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; border: 0; }
	.iwl-carta .iwl-dlg-media { height: 230px; }
	.iwl-carta .iwl-dlg-photo, .iwl-carta .iwl-dlg-svg { height: 190px; }
	.iwl-carta .iwl-dlg-body { padding: 24px 20px; }
	.iwl-carta .iwl-dlg-title { font-size: 36px; }
	.iwl-carta .iwl-dlg-specs { grid-template-columns: minmax(0, 1fr); }
	.iwl-carta .iwl-dlg-foot { flex-wrap: wrap; align-items: center; }
}
