/* Cerámicas Core – component styles. Visual tokens come from the child theme (:root),
   with fallbacks so components stay usable if the theme changes. */

.cer-wa-icon { flex: none; vertical-align: -3px; }

/* ---------- WhatsApp selector ---------- */
.cer-wa {
	width: min(440px, calc(100% - 32px));
	max-height: calc(100% - 32px);
	padding: 0;
	border: 1px solid var(--line, #ded8cf);
	border-radius: 4px;
	background: #fff;
	color: var(--ink, #1f1f1d);
	box-shadow: var(--shadow, 0 18px 50px rgba(31,31,29,.09));
}
.cer-wa::backdrop { background: rgba(22, 21, 19, .55); }
.cer-wa[open]:not(:modal) { position: fixed; inset: 0; margin: auto; z-index: 10000; }
html.cer-wa-open { overflow: hidden; }
.cer-wa__head { position: relative; padding: 26px 56px 18px 26px; border-bottom: 1px solid var(--line, #ded8cf); }
.cer-wa__eyebrow { margin: 0 0 4px; font-size: .68rem; font-weight: 700; letter-spacing: .23em; text-transform: uppercase; color: var(--taupe, #8b7f73); }
.cer-wa__title { margin: 0; font-family: var(--serif, Georgia, serif); font-size: 1.9rem; font-weight: 500; line-height: 1.05; }
.cer-wa__product { margin: 8px 0 0; font-size: .85rem; font-weight: 600; color: var(--muted, #6d675f); }
.cer-wa__close {
	position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: var(--paper, #f8f6f1); color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.cer-wa__list { list-style: none; margin: 0; padding: 8px 14px; }
.cer-wa__list li { margin: 0; }
.cer-wa__store {
	display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px;
	min-height: 64px; padding: 12px; border-bottom: 1px solid var(--line, #ded8cf); color: inherit; text-decoration: none;
}
.cer-wa__list li:last-child .cer-wa__store { border-bottom: 0; }
.cer-wa__store:hover, .cer-wa__store:focus-visible { background: var(--paper, #f8f6f1); }
.cer-wa__num { font-size: .7rem; font-weight: 700; color: var(--taupe, #8b7f73); }
.cer-wa__name { font-weight: 700; font-size: .92rem; }
.cer-wa__name small { display: block; font-weight: 500; font-size: .76rem; color: var(--muted, #6d675f); }
.cer-wa__arrow { transition: transform .2s; }
.cer-wa__store:hover .cer-wa__arrow { transform: translateX(4px); }
.cer-wa__alt { margin: 0; padding: 14px 26px 20px; font-size: .75rem; color: var(--muted, #6d675f); border-top: 1px solid var(--line, #ded8cf); }
.cer-wa__alt a { text-decoration: underline; }

.cer-wa-float {
	position: fixed; right: 18px; bottom: 18px; z-index: 999; width: 56px; height: 56px; min-height: 0; margin: 0; padding: 0;
	display: grid; place-items: center; border: 0; border-radius: 50%; background: #25d366; color: #fff;
	box-shadow: 0 10px 30px rgba(0,0,0,.18); cursor: pointer;
}
.cer-wa-float .cer-wa-icon { width: 28px; height: 28px; }

/* ---------- Facets ---------- */
.cer-facets { font-size: .85rem; }
.cer-facets__label { display: block; margin-bottom: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--taupe, #8b7f73); }
.cer-facets__search input { width: 100%; margin: 0 0 18px; border-radius: 999px; }
.cer-facet { border-top: 1px solid var(--line, #ded8cf); padding: 4px 0; }
.cer-facet__title {
	display: flex; align-items: center; gap: 8px; padding: 12px 0; cursor: pointer; list-style: none;
	font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.cer-facet__title::-webkit-details-marker { display: none; }
.cer-facet__title::after { content: "+"; margin-left: auto; font-weight: 400; font-size: 1.1rem; }
.cer-facet[open] > .cer-facet__title::after { content: "–"; }
.cer-facet__badge { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--ink, #1f1f1d); color: #fff; font-size: .65rem; text-align: center; }
.cer-facet__list { list-style: none; margin: 0 0 10px; padding: 0; }
.cer-facet__list li { margin: 0; }
.cer-facet__opt { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; font-weight: 500; cursor: pointer; }
.cer-facet__opt input { margin: 0; width: 18px; height: 18px; accent-color: var(--ink, #1f1f1d); }
.cer-facet__name { flex: 1; }
.cer-facet__count { font-size: .72rem; color: var(--taupe, #8b7f73); }
.cer-facets__actions { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line, #ded8cf); }
.cer-facets__clear { font-size: .78rem; font-weight: 700; text-decoration: underline; }
.cer-facets.is-loading { opacity: .55; pointer-events: none; }
.cer-facets--sidebar .cer-facets__apply { display: none; } /* desktop sidebar applies on change */
.cer-facets--sidebar .cer-facets__actions:not(:has(a)) { display: none; }

/* ---------- Mobile drawer ---------- */
.cer-mobile-filters { display: none; margin: 0 0 16px; }
.cer-mobile-filters__open { width: 100%; }
@media (max-width: 849px) {
	.cer-mobile-filters { display: block; }
	.cer-has-facets .category-filtering.category-filter-row { display: none !important; } /* Flatsome generic button */
}
.cer-drawer {
	width: min(420px, 100%); max-width: 100%; height: 100%; max-height: 100%;
	margin: 0 0 0 auto; padding: 0; border: 0; background: var(--paper, #f8f6f1); color: var(--ink, #1f1f1d);
}
.cer-drawer[open] { display: flex; flex-direction: column; }
.cer-drawer[open]:not(:modal) { position: fixed; inset: 0 0 0 auto; z-index: 10000; }
.cer-drawer::backdrop { background: rgba(22, 21, 19, .55); }
html.cer-drawer-open { overflow: hidden; }
.cer-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line, #ded8cf); background: #fff; }
.cer-drawer__title { margin: 0; font-family: var(--serif, Georgia, serif); font-size: 1.7rem; font-weight: 500; }
.cer-drawer__close {
	width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%;
	background: var(--paper, #f8f6f1); color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.cer-drawer__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 20px 0; }
/* Apply/clear stay reachable at the bottom while scrolling the options. */
.cer-facets--drawer .cer-facets__actions {
	position: sticky; bottom: 0; margin: 0 -20px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
	background: var(--paper, #f8f6f1); box-shadow: 0 -8px 20px rgba(31,31,29,.06);
}
.cer-facets--drawer .cer-facets__apply { width: 100%; }
.cer-facets--drawer .cer-facets__clear { text-align: center; }

.cer-active-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 22px; }
.cer-active-bar__count { margin: 0; font-size: .85rem; }
.cer-active-bar__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cer-chip {
	display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px;
	border: 1px solid var(--line, #ded8cf); border-radius: 999px; background: #fff; font-size: .74rem; font-weight: 600;
}
.cer-chip:hover { border-color: var(--ink, #1f1f1d); }

.cer-empty { padding: 48px 24px; text-align: center; background: #fff; border: 1px solid var(--line, #ded8cf); }
.cer-empty__title { font-family: var(--serif, Georgia, serif); font-weight: 500; font-size: 2rem; }
.cer-empty p { max-width: 520px; margin: 0 auto 20px; color: var(--muted, #6d675f); }
.cer-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Product page ---------- */
.cer-pd__eyebrow { margin: 0 0 6px; font-size: .7rem; font-weight: 700; letter-spacing: .23em; text-transform: uppercase; color: var(--taupe, #8b7f73); }
.cer-pd__sku { margin: -4px 0 16px; font-size: .75rem; color: var(--muted, #6d675f); letter-spacing: .06em; }
.cer-pd__specs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 24px; border-top: 1px solid var(--line, #ded8cf); }
.cer-pd__spec { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line, #ded8cf); }
.cer-pd__spec dt { margin: 0 0 2px; font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--taupe, #8b7f73); }
.cer-pd__spec dd { margin: 0; font-size: .9rem; font-weight: 600; }
.cer-pd__cta { margin: 0 0 24px; }
.cer-pd__cta .cer-wa-launch { width: 100%; }
.cer-pd__cta-note { margin: 8px 0 0; font-size: .74rem; color: var(--muted, #6d675f); }

/* ---------- Product cards (Blog, Inicio, shortcodes) ---------- */
.cer-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.cer-cards--featured { grid-template-columns: repeat(4, 1fr); }
.cer-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line, #ded8cf); }
.cer-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e7e1d8; }
.cer-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.cer-card:hover .cer-card__media img { transform: scale(1.035); }
.cer-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.cer-card__tag { font-size: .64rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--taupe, #8b7f73); }
.cer-card__title { margin: 6px 0; font-family: var(--serif, Georgia, serif); font-size: 1.45rem; font-weight: 600; line-height: 1.1; }
.cer-card__meta { margin: 0 0 14px; font-size: .74rem; color: var(--muted, #6d675f); }
.cer-card .text-link { margin-top: auto; }
.cer-post-products { margin: 56px 0 0; padding-top: 40px; border-top: 1px solid var(--line, #ded8cf); }
.cer-post-products__title { font-family: var(--serif, Georgia, serif); font-weight: 500; font-size: 2.2rem; margin: 4px 0 24px; }
@media (max-width: 849px) { .cer-cards--featured { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 549px) { .cer-cards, .cer-cards--featured { grid-template-columns: 1fr; } }

/* ---------- Branches ---------- */
.cer-branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cer-branch { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line, #ded8cf); }
.cer-branch__media { aspect-ratio: 395 / 202; overflow: hidden; background: #e7e1d8; }
.cer-branch__media img { width: 100%; height: 100%; object-fit: cover; }
.cer-branch__body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.cer-branch__index { font-size: .7rem; font-weight: 700; color: var(--taupe, #8b7f73); }
.cer-branch__name { margin: 4px 0 10px; font-family: var(--serif, Georgia, serif); font-size: 1.7rem; font-weight: 600; }
.cer-branch__address, .cer-branch__hours { margin: 0 0 12px; font-size: .8rem; line-height: 1.6; color: var(--muted, #6d675f); }
.cer-branch__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.cer-branch__actions .btn { flex: 1 1 auto; }
@media (max-width: 849px) { .cer-branches { grid-template-columns: 1fr; } }

/* ---------- Contact form ---------- */
.cer-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.cer-form__field label { display: block; margin-bottom: 6px; font-size: .74rem; font-weight: 700; }
.cer-form__field input, .cer-form__field select, .cer-form__field textarea { width: 100%; }
.cer-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cer-form__privacy label { display: flex; gap: 10px; align-items: flex-start; font-size: .78rem; font-weight: 500; }
.cer-form__privacy input { margin-top: 3px; }
.cer-form__error { display: block; margin: -6px 0 10px; font-size: .74rem; font-weight: 600; color: #b32d2e; }
.cer-form__error:empty { display: none; }
.cer-form [aria-invalid="true"] { border-color: #b32d2e; }
.cer-form__notice { margin: 0 0 20px; padding: 14px 18px; border-left: 3px solid; background: #fff; font-size: .88rem; }
.cer-form__notice--success { border-color: #177a50; }
.cer-form__notice--error { border-color: #b32d2e; }
@media (max-width: 549px) { .cer-form__grid { grid-template-columns: 1fr; } }

/* Focus visibility for every custom control. */
.cer-wa :focus-visible, .cer-facets :focus-visible, .cer-chip:focus-visible, .cer-card a:focus-visible,
.cer-branch a:focus-visible, .cer-wa-float:focus-visible, .cer-wa-launch:focus-visible {
	outline: 2px solid var(--ink, #1f1f1d); outline-offset: 2px;
}

/* Social links [cer_redes] */
.cer-social { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 14px; }
.cer-social__link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line, #ded8cf); border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--ink, #1f1f1d); background: #fff; }
.cer-social__link:hover { background: var(--ink, #1f1f1d); color: #fff; }
