/* ==========================================================================
   Arymar — estilos base
   1. Variables        5. Encabezado        9. Pie de página
   2. Base             6. Menú              10. Contenido de páginas
   3. Utilidades       7. Panel celular     11. Movimiento reducido
   4. Botones          8. Etiquetas
   ========================================================================== */

/* 1. Variables ------------------------------------------------------------- */
:root {
	/* Los colores de marca se pueden cambiar en Personalizar → Tema Arymar → Colores. */
	--ay-blue: #00308a;
	--ay-night: #0a1a4a;
	--ay-purple: #3e3a8c;
	--ay-gold: #f5b301;

	--ay-ink: #1b2340;
	--ay-muted: #5a6380;
	--ay-line: rgba(10, 26, 74, 0.12);
	--ay-soft: #f4f6fb;
	--ay-white: #fff;
	--ay-ok: #12805c;
	--ay-warn: #a85d00;
	--ay-bad: #c02f3c;

	--ay-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--ay-radius-s: 10px;
	--ay-radius-m: 14px;
	--ay-radius-l: 20px;
	--ay-shadow: 0 1px 2px rgba(10, 26, 74, 0.06), 0 8px 24px rgba(10, 26, 74, 0.06);
	--ay-shadow-up: 0 2px 4px rgba(10, 26, 74, 0.06), 0 18px 40px rgba(10, 26, 74, 0.12);
	--ay-container: 1280px;
	--ay-gutter: clamp(16px, 3vw, 32px);
	--ay-topbar-h: 36px;
	--ay-focus: 0 0 0 3px rgba(245, 179, 1, 0.9);
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }

body {
	margin: 0;
	font-family: var(--ay-font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ay-ink);
	background: var(--ay-white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-feature-settings: "tnum" 1;
}

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--ay-blue); text-underline-offset: 0.18em; }
a:hover { color: var(--ay-purple); }
h1, h2, h3, h4 { color: var(--ay-night); line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: none; box-shadow: var(--ay-focus); border-radius: 6px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}

.ay-skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 1000;
	background: var(--ay-night); color: #fff; padding: 10px 16px; border-radius: var(--ay-radius-s);
	font-weight: 700; text-decoration: none;
}
.ay-skip-link:focus { top: 12px; color: #fff; }
.ay-main:focus { outline: none; box-shadow: none; }

/* 3. Utilidades ------------------------------------------------------------ */

.ay-container { width: 100%; max-width: var(--ay-container); margin-inline: auto; padding-inline: var(--ay-gutter); }

.ay-icon { width: 1.25em; height: 1.25em; flex: none; }

/* 4. Botones --------------------------------------------------------------- */
.ay-btn,
.wp-element-button,
.wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
	min-height: 44px; padding: 0.7em 1.4em; border-radius: 999px; border: 1.5px solid transparent;
	background: var(--ay-blue); color: #fff; font-weight: 700; font-size: 0.95rem; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.ay-btn:hover, .wp-element-button:hover, .wp-block-button__link:hover { background: var(--ay-night); color: #fff; transform: translateY(-1px); }
.ay-btn .ay-icon { width: 1.15em; height: 1.15em; }

.ay-btn--gold { background: var(--ay-gold); color: var(--ay-night); box-shadow: 0 8px 24px rgba(245, 179, 1, 0.32); }
.ay-btn--gold:hover { background: #ffc629; color: var(--ay-night); }
.ay-btn--ghost { background: transparent; color: var(--ay-night); border-color: var(--ay-line); }
.ay-btn--ghost:hover { background: var(--ay-soft); color: var(--ay-night); }
.ay-btn--outline { background: transparent; color: var(--ay-blue); border-color: currentColor; }
.ay-btn--outline:hover { background: var(--ay-blue); color: #fff; }
.ay-btn--glass { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.45); backdrop-filter: blur(8px); }
.ay-btn--glass:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

.ay-btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* 5. Encabezado ------------------------------------------------------------ */
.ay-header {
	position: sticky; top: 0; z-index: 100;
	background: #fff;
	box-shadow: 0 1px 0 var(--ay-line);
}
.has-topbar .ay-header { top: calc(var(--ay-topbar-h) * -1); }
.admin-bar .ay-header { top: 32px; }
.admin-bar.has-topbar .ay-header { top: calc(32px - var(--ay-topbar-h)); }
@media (max-width: 782px) {
	.admin-bar .ay-header, .admin-bar.has-topbar .ay-header { top: calc(var(--ay-topbar-h) * -1); }
}

.ay-topbar { background: var(--ay-night); color: rgba(255, 255, 255, 0.86); font-size: 0.8125rem; }
.ay-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--ay-topbar-h); }
.ay-topbar__text { margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ay-topbar__info { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; }
.ay-topbar__info li, .ay-topbar__info a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; white-space: nowrap; }
.ay-topbar__info a:hover { color: var(--ay-gold); }
.ay-topbar__info .ay-icon { width: 15px; height: 15px; color: var(--ay-gold); }

.ay-header__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-areas: "brand search actions";
	align-items: center; gap: 24px; min-height: 80px;
}
.ay-brand { grid-area: brand; display: flex; align-items: center; }
.ay-brand .custom-logo { display: block; max-height: 58px; width: auto; }
.ay-brand__name { font-size: 1.4rem; font-weight: 800; color: var(--ay-night); text-decoration: none; letter-spacing: 0.04em; }
.ay-header__search { grid-area: search; max-width: 680px; width: 100%; justify-self: center; }
.ay-header__actions { grid-area: actions; display: flex; align-items: center; gap: 6px; }
.ay-header__icon.ay-menu-toggle { display: none; grid-area: toggle; }

.ay-header__icon {
	position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 44px; height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent;
	color: var(--ay-night); font-weight: 700; font-size: 0.875rem; text-decoration: none; cursor: pointer;
}
.ay-header__icon:hover { background: var(--ay-soft); color: var(--ay-blue); }
.ay-header__icon .ay-icon { width: 24px; height: 24px; }
.ay-cart-link { background: var(--ay-blue); color: #fff; padding: 0 16px 0 14px; }
.ay-cart-link:hover { background: var(--ay-night); color: #fff; }
.ay-cart-count {
	min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
	background: var(--ay-gold); color: var(--ay-night); font-size: 0.75rem; font-weight: 800;
	display: inline-flex; align-items: center; justify-content: center;
}
.ay-cart-count.is-empty { background: rgba(255, 255, 255, 0.25); color: #fff; }
.ay-cart-count.is-bump { animation: ayBump 0.5s ease; }
@keyframes ayBump { 40% { transform: scale(1.35); } }

.ay-social { display: flex; gap: 4px; }
.ay-social a {
	display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
	color: var(--ay-purple); text-decoration: none;
}
.ay-social a:hover { background: var(--ay-soft); color: var(--ay-blue); }
.ay-social .ay-icon { width: 20px; height: 20px; }

/* Buscador (FiboSearch o el de WooCommerce) */
.ay-header__search .woocommerce-product-search,
.ay-404__search .woocommerce-product-search { display: flex; gap: 0; }
.ay-header__search .search-field,
.ay-404__search .search-field {
	flex: 1; min-width: 0; height: 46px; padding: 0 18px; border: 1.5px solid var(--ay-line); border-right: 0;
	border-radius: 999px 0 0 999px; background: var(--ay-soft);
}
.ay-header__search .woocommerce-product-search button,
.ay-404__search .woocommerce-product-search button {
	height: 46px; padding: 0 20px; border: 0; border-radius: 0 999px 999px 0; background: var(--ay-blue); color: #fff; font-weight: 700; cursor: pointer;
}
.ay-header__search .dgwt-wcas-search-wrapp { max-width: none; }
.ay-header__search .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
	height: 46px; border-radius: 999px; border: 1.5px solid var(--ay-line); background: var(--ay-soft); padding-left: 44px;
}
.ay-header__search .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus { border-color: var(--ay-blue); background: #fff; }

/* 6. Menú (barra azul en computador) --------------------------------------- */
.ay-nav { background: var(--ay-blue); }
.ay-nav .ay-menu { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ay-nav .ay-menu > li { position: relative; }
.ay-nav .ay-menu > li > a {
	display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px;
	color: #fff; font-weight: 700; font-size: 0.9375rem; text-decoration: none;
}
.ay-nav .ay-menu > li > a:hover,
.ay-nav .ay-menu > .current-menu-item > a,
.ay-nav .ay-menu > .current-menu-ancestor > a { background: rgba(255, 255, 255, 0.12); color: #fff; }
.ay-nav .menu-item-has-children > a::after {
	content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg); margin-left: 2px;
}
.ay-nav .sub-menu {
	position: absolute; left: 0; top: 100%; z-index: 50; min-width: 260px; margin: 0; padding: 8px; list-style: none;
	background: #fff; border-radius: 0 0 var(--ay-radius-m) var(--ay-radius-m); box-shadow: var(--ay-shadow-up);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.ay-nav .ay-menu > li:hover > .sub-menu,
.ay-nav .ay-menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.ay-nav .sub-menu a {
	display: block; padding: 10px 12px; border-radius: var(--ay-radius-s); color: var(--ay-ink);
	font-weight: 600; font-size: 0.9375rem; text-decoration: none;
}
.ay-nav .sub-menu a:hover { background: var(--ay-soft); color: var(--ay-blue); }
/* Submenú largo (por ejemplo, 11 categorías) en dos columnas */
.ay-nav .sub-menu:has(> li:nth-child(8)) { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); min-width: 500px; }

/* Encabezado en tablet y celular */
@media (max-width: 1024px) {
	.ay-nav, .ay-header__social, .ay-topbar__text { display: none; }
	.ay-header__icon.ay-menu-toggle { display: inline-flex; }
	.ay-header__inner {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "toggle brand actions" "search search search";
		gap: 4px 8px; min-height: 0; padding-block: 8px 12px;
	}
	.ay-brand { justify-content: center; }
	.ay-brand .custom-logo { max-height: 46px; }
	.ay-header__search { max-width: none; }
	.ay-topbar__inner { justify-content: center; }
}
@media (max-width: 1240px) { .ay-header__icon-label { display: none; } }
@media (max-width: 560px) {
	.ay-topbar__info li:first-child { display: none; }
	.ay-topbar__info { gap: 16px; }
	.ay-cart-link { padding: 0 10px; }
}

/* 7. Panel del menú en celular --------------------------------------------- */
.ay-drawer { position: fixed; inset: 0; z-index: 9999; }
.ay-drawer[hidden] { display: none; }
.ay-drawer__backdrop { position: absolute; inset: 0; background: rgba(6, 15, 51, 0.55); animation: ayFade 0.2s ease; }
.ay-drawer__panel {
	position: absolute; inset: 0 auto 0 0; width: min(380px, 88vw); background: #fff;
	display: flex; flex-direction: column; overflow-y: auto; animation: aySlideIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes ayFade { from { opacity: 0; } }
@keyframes aySlideIn { from { transform: translateX(-100%); } }
.ay-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--ay-line); }
.ay-drawer__title { font-weight: 800; color: var(--ay-night); }
.ay-drawer__nav { padding: 8px 12px; flex: 1; }
.ay-menu--mobile { margin: 0; padding: 0; list-style: none; }
.ay-menu--mobile a { display: block; padding: 12px; border-radius: var(--ay-radius-s); color: var(--ay-night); font-weight: 700; text-decoration: none; }
.ay-menu--mobile a:hover { background: var(--ay-soft); }
.ay-menu--mobile .sub-menu { margin: 0 0 8px 12px; padding: 0 0 0 8px; list-style: none; border-left: 2px solid var(--ay-line); }
.ay-menu--mobile .sub-menu a { font-weight: 600; padding-block: 9px; }
.ay-drawer__contact { display: grid; gap: 10px; padding: 16px 20px 24px; border-top: 1px solid var(--ay-line); }
.ay-drawer__contact .ay-social { justify-content: center; }
body.ay-locked { overflow: hidden; }

/* 8. Etiquetas y títulos de sección ---------------------------------------- */
.ay-kicker {
	display: inline-block; margin-bottom: 10px; padding: 6px 14px; border-radius: 999px;
	background: rgba(0, 48, 138, 0.08); color: var(--ay-blue); font-size: 0.875rem; font-weight: 700;
}
.ay-section-title { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem); }
.ay-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 32px); }
.ay-hl { color: var(--ay-blue); }

/* 9. Pie de página --------------------------------------------------------- */
.ay-footer { background: var(--ay-night); color: rgba(255, 255, 255, 0.78); }
.ay-main { padding-bottom: clamp(48px, 6vw, 96px); }
.ay-main:has(> .ay-article .ay-entry > .alignfull:last-child) { padding-bottom: 0; }
.ay-footer a { color: rgba(255, 255, 255, 0.9); text-decoration: none; }
.ay-footer a:hover { color: var(--ay-gold); }
.ay-footer__grid {
	display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 40px;
	padding-block: clamp(48px, 6vw, 72px) 40px;
}
.ay-footer .custom-logo { max-height: 64px; width: auto; border-radius: 8px; background: #fff; padding: 6px; }
.ay-footer__name { font-size: 1.3rem; font-weight: 800; color: #fff; margin: 0; }
.ay-footer__about { margin: 16px 0; max-width: 34ch; font-size: 0.9375rem; }
.ay-footer__title { margin: 0 0 16px; color: #fff; font-size: 1rem; }
.ay-footer__links, .ay-footer__contact { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 0.9375rem; }
.ay-footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.ay-footer__contact .ay-icon { color: var(--ay-gold); margin-top: 3px; width: 18px; height: 18px; }
.ay-social--footer a { color: #fff; background: rgba(255, 255, 255, 0.08); }
.ay-social--footer a:hover { background: var(--ay-gold); color: var(--ay-night); }
.ay-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.8125rem; }
.ay-footer__bottom p { margin: 0; padding-block: 18px; }
@media (max-width: 960px) { .ay-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ay-footer__grid { grid-template-columns: 1fr; gap: 28px; } }

/* 10. Contenido de páginas ------------------------------------------------- */
.ay-page { padding-block: clamp(24px, 4vw, 48px); }
.ay-page__head { padding-top: clamp(24px, 4vw, 48px); }
.ay-page__title { margin: 0 0 8px; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); }
.ay-page__meta { color: var(--ay-muted); margin: 0; }

/* Bloques: ancho normal, ancho amplio y ancho completo */
.ay-entry { padding-bottom: 8px; }
.ay-entry > * { max-width: 760px; margin-inline: auto; padding-inline: var(--ay-gutter); }
.ay-entry > .alignwide { max-width: calc(var(--ay-container)); }
.ay-entry > .alignfull { max-width: none; padding-inline: 0; }
.ay-entry > [class*="wp-block-arymar-"] { margin-block: 0; }
.ay-entry > [class*="wp-block-arymar-"].alignwide { padding-block: clamp(32px, 5vw, 64px); }
.ay-entry > p, .ay-entry > ul, .ay-entry > ol { margin-block: 1em; }
.ay-entry > :first-child { margin-top: 0; }
.ay-article:not(.ay-entry) > .ay-entry > :first-child.alignfull { margin-top: 0; }

.ay-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.ay-post-card { border: 1px solid var(--ay-line); border-radius: var(--ay-radius-l); overflow: hidden; background: #fff; }
.ay-post-card__media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ay-post-card__body { padding: 20px; }
.ay-post-card__title { margin: 0 0 8px; font-size: 1.2rem; }
.ay-post-card__title a { color: inherit; text-decoration: none; }
.ay-post-card__excerpt { margin: 0; color: var(--ay-muted); }
.ay-empty, .ay-404 { text-align: center; padding-block: 64px; }
.ay-404__search { max-width: 560px; margin: 24px auto; }
.ay-comments { padding-block: 32px; }
.nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.nav-links .page-numbers { padding: 8px 14px; border-radius: var(--ay-radius-s); border: 1px solid var(--ay-line); text-decoration: none; }
.nav-links .current { background: var(--ay-blue); color: #fff; border-color: var(--ay-blue); }

/* Página Nosotros (patrón) */
.ay-about { padding-block: clamp(32px, 5vw, 64px); }
.ay-about__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); margin-bottom: 4px; }
.ay-about__lead { font-size: 1.15rem; color: var(--ay-muted); margin-top: 0; }
.ay-about__cols { gap: 24px; margin-top: 32px; }
.ay-about__card { padding: clamp(20px, 3vw, 32px); border-radius: var(--ay-radius-l); background: var(--ay-soft); border: 1px solid var(--ay-line); }
.ay-about__card h2 { margin-top: 0; font-size: 1.5rem; }
.ay-about__card p { margin-bottom: 0; }

/* 11. Movimiento reducido -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
