/* fenicia sobre la plantilla de gnumux: solo lo propio de la marca.
   Los colores principales se configuran en Parametros del Sitio Web. */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap");

:root { --gx-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }

/* Proveedores (/proveedores): cuadros planos */
.fn-proveedores { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fn-proveedor { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid #c9d6e1; border-radius: 4px; background: #fff; transition: background .15s, border-color .15s; text-decoration: none !important; }
.fn-proveedor:hover { background: var(--gx-soft-2); border-color: var(--gx-ink); }
.fn-proveedor__logo { display: flex; align-items: center; gap: 12px; min-height: 32px; }
.fn-proveedor__logo img { max-height: 36px; max-width: 120px; object-fit: contain; }
.fn-proveedor__logo strong { font-size: 17px; font-weight: 500; letter-spacing: .02em; color: var(--gx-ink); }
.fn-proveedor__marcas { font-size: 13px; color: var(--gx-muted); }
.fn-proveedor__coincidencias { font-size: 13px; font-weight: 600; color: var(--gx-primary); }

/* Portada: secciones con título centrado, planas */
.gx .fn-seccion__titulo { text-align: center; font-size: 26px; font-weight: 400; color: var(--gx-ink); margin: 0 0 28px; letter-spacing: .01em; }
.fn-representaciones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fn-representacion { display: grid; place-items: center; min-height: 64px; padding: 12px; border: 1px solid #c9d6e1; border-radius: 4px; background: #fff; text-align: center; font-size: 19px; font-weight: 400; color: var(--gx-ink) !important; text-decoration: none !important; transition: background .15s, border-color .15s; }
.fn-representacion:hover { background: var(--gx-soft-2); border-color: var(--gx-ink); }
@media (max-width: 960px) { .fn-representaciones { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .fn-representaciones { grid-template-columns: repeat(2, 1fr); } .fn-representacion { font-size: 16px; min-height: 56px; } }

/* Representantes de venta (pie) */
.fn-representantes { background: var(--gx-primary); color: #dbe6ff; padding: 40px 0; }
.gx .fn-representantes__titulo { color: #fff; text-align: center; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 28px; font-size: 22px; }
.fn-representantes__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.fn-representante { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 14px; }
.gx .fn-representante strong { color: #fff; text-transform: uppercase; font-size: 14px; letter-spacing: .03em; }
.gx .fn-representante a { display: inline-flex; align-items: center; gap: 6px; color: #dbe6ff; }
.gx .fn-representante a:hover { color: #fff; }
.fn-representante__foto {
	width: 64px; height: 64px; border-radius: 999px; background: rgb(255 255 255 / 15%); color: #fff;
	display: grid; place-items: center; font-weight: 700; font-size: 20px; overflow: hidden; margin-bottom: 4px;
}
.fn-representante__foto img { width: 100%; height: 100%; object-fit: cover; }
.gx .gx-footer { margin-top: 0; }

/* Carrusel de marcas (Owl Carousel): solo logos, sin cuadros */
.fn-marcas .fn-marca { height: 90px; display: grid; place-items: center; padding: 8px; }
.fn-marcas .fn-marca a { display: grid; place-items: center; width: 100%; height: 100%; }
.fn-marcas .fn-marca img { max-height: 64px; width: auto !important; max-width: 100%; object-fit: contain; opacity: .9; transition: opacity .2s; }
.fn-marcas .fn-marca:hover img { opacity: 1; }
.fn-marcas .fn-marca strong { color: var(--gx-ink); text-align: center; font-weight: 500; font-size: 14px; }

/* ---------- Ventana "Todas las marcas" (cada marca lleva a su proveedor) ---------- */
.fn-dlg-marcas { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 0; border-radius: var(--gx-radius); box-shadow: var(--gx-shadow-lg); overflow: hidden; }
.fn-dlg-marcas[open] { display: flex; flex-direction: column; }
.fn-dlg-marcas::backdrop { background: rgb(15 23 42 / 55%); }
.fn-dlg-marcas__head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--gx-line); }
.fn-dlg-marcas__head h2 { font-size: 18px; margin: 0; white-space: nowrap; color: var(--gx-ink); }
.fn-dlg-marcas__buscar { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--gx-line); border-radius: 999px; padding: 0 18px; background: var(--gx-soft); outline: none; }
.fn-dlg-marcas__buscar:focus { background: #fff; border-color: var(--gx-primary); }
.fn-dlg-marcas__grid { overflow-y: auto; padding: 20px 22px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.fn-dlg-marca { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 10px; border: 1px solid var(--gx-line); border-radius: 12px; text-decoration: none !important; color: var(--gx-text); transition: .15s; }
.fn-dlg-marca:hover { border-color: var(--gx-primary); box-shadow: var(--gx-shadow); }
.fn-dlg-marca[hidden] { display: none; }
.fn-dlg-marca__logo { height: 56px; width: 100%; display: grid; place-items: center; }
.fn-dlg-marca__logo img { max-height: 56px; max-width: 100%; object-fit: contain; }
.fn-dlg-marca__nombre { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.25; }
.fn-dlg-marcas__vacio { grid-column: 1 / -1; text-align: center; padding: 30px 0; }
@media (max-width: 640px) {
	.fn-dlg-marcas { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
	.fn-dlg-marcas__head { flex-wrap: wrap; }
	.fn-dlg-marcas__buscar { order: 3; flex-basis: 100%; }
	.fn-dlg-marcas__head .gx-iconbtn { margin-left: auto; }
	.fn-dlg-marcas__grid { grid-template-columns: repeat(3, 1fr); }
}
.fn-dlg-marca__logo:empty { display: none; }
.fn-dlg-marca:has(.fn-dlg-marca__logo:empty) { justify-content: center; min-height: 64px; }

/* ---------- Vista rápida del producto (modal) ---------- */
.fn-qv { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--gx-radius); box-shadow: var(--gx-shadow-lg); overflow: hidden; }
.fn-qv[open] { display: block; }
.fn-qv::backdrop { background: rgb(15 23 42 / 55%); }
.gx .fn-qv__cerrar { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: #fff; color: var(--gx-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgb(15 23 42 / 12%); }
.fn-qv__cerrar:hover { background: var(--gx-soft-2); }
.fn-qv__cuerpo { display: grid; grid-template-columns: 1.05fr 1fr; max-height: calc(100vh - 48px); overflow-y: auto; }
.fn-qv__cargando { grid-column: 1 / -1; min-height: 320px; display: grid; place-items: center; }
.fn-qv__galeria { padding: 24px; background: var(--gx-soft); display: flex; flex-direction: column; gap: 12px; }
.fn-qv__principal { aspect-ratio: 1; background: #fff; border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.fn-qv__principal img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fn-qv__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.fn-qv__thumbs button { aspect-ratio: 1; padding: 4px; border: 1px solid var(--gx-line); border-radius: 8px; background: #fff; cursor: pointer; }
.fn-qv__thumbs button.is-active { border-color: var(--gx-primary); box-shadow: 0 0 0 1px var(--gx-primary); }
.fn-qv__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.fn-qv__info { padding: 32px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.fn-qv__marca { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gx-muted) !important; }
.gx .fn-qv__nombre { font-size: 22px; line-height: 1.25; margin: 0; padding-right: 28px; color: var(--gx-ink); }
.fn-qv__precio { font-size: 24px; font-weight: 700; color: var(--gx-ink); }
.fn-qv__precio s { font-size: 15px; font-weight: 400; color: var(--gx-muted); margin-left: 8px; }
.fn-qv__precio--consultar { font-size: 16px; color: var(--gx-muted); font-weight: 600; }
.fn-qv__compra { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-top: 1px solid var(--gx-line); border-bottom: 1px solid var(--gx-line); }
.fn-qv__label { font-size: 13px; color: var(--gx-muted); }
.fn-qv__fila { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.fn-qv__qty { height: 50px; }
.fn-qv__qty input { width: 64px; }
.fn-qv__agregar { flex: 1; min-width: 180px; }
.fn-qv__aviso { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #92400e; font-weight: 600; }
.fn-qv__datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.fn-qv__datos dt { color: var(--gx-muted); font-weight: 500; }
.fn-qv__datos dd { margin: 0; color: var(--gx-ink); }
.fn-qv__detalle { font-size: 14px; color: var(--gx-text); }
@media (max-width: 760px) {
	.fn-qv { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
	.fn-qv__cuerpo { grid-template-columns: 1fr; max-height: 100vh; }
	.fn-qv__galeria { padding: 16px; }
	.fn-qv__principal { aspect-ratio: auto; height: 46vh; }
	.fn-qv__info { padding: 20px 16px 28px; }
}

/* ---------- Scroll infinito ---------- */
.fn-cargador { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 72px; margin-top: 24px; color: var(--gx-muted); font-size: 14px; }
.fn-spinner { width: 28px; height: 28px; border-radius: 999px; border: 3px solid var(--gx-line); border-top-color: var(--gx-primary); animation: fn-girar .8s linear infinite; }
@keyframes fn-girar { to { transform: rotate(360deg); } }

/* ---------- Columna de filtros con scroll propio (escritorio) ---------- */
@media (min-width: 961px) {
	.gx .gx-filters {
		top: calc(var(--fn-header-h, 0px) + 16px);
		max-height: calc(100vh - var(--fn-header-h, 0px) - 32px);
		overflow-y: auto; overscroll-behavior: contain;
		padding-right: 10px; scrollbar-width: thin; scrollbar-color: var(--gx-line) transparent;
	}
	.gx .gx-filters::-webkit-scrollbar { width: 6px; }
	.gx .gx-filters::-webkit-scrollbar-thumb { background: var(--gx-line); border-radius: 999px; }
}
