/* Burgos Buscador: la barra flotante y /buscar del prototipo de
   www.ferreteriaburgos.cl (app/globals.css), con prefijo bb- para no chocar
   con las clases de WooCommerce (.price, .search…) ni con las del tema. */

:root {
  --bb-background: #fafaf9;
  --bb-surface: #ffffff;
  --bb-secondary: #f3f3f1;
  --bb-line: #e2e2df;
  --bb-muted: #717171;
  --bb-text: #252525;
  --bb-charcoal: #171717;
  --bb-orange: #f45b21;
  --bb-shadow: 0 24px 64px rgba(13, 13, 13, .30), 0 7px 20px rgba(13, 13, 13, .17);
  --bb-sans: "Geist", Arial, sans-serif;
  --bb-mono: "Geist Mono", ui-monospace, monospace;
}

/* El encabezado del tema lo reemplaza la barra. */
.bb-con-barra .wp-site-blocks > header.wp-block-template-part { display: none; }
.bb-con-barra .wp-site-blocks { padding-top: 135px; }
.bb-pagina-buscar .wp-site-blocks { padding-top: 0; }
.bb-pagina-buscar { background: var(--bb-secondary); }
.bb-pagina-buscar main.wp-block-group { margin-top: 0 !important; padding-top: 0; }

.bb-nav svg, .bb-buscar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* El tema pone la letra base en ~21 px; el diseño parte de 16. */
.bb-nav, .bb-buscar, .bb-toast { font-family: var(--bb-sans); font-size: 16px; line-height: 1.5; color: var(--bb-text); }
.bb-nav, .bb-nav *, .bb-buscar, .bb-buscar *, .bb-toast, .bb-toast * { box-sizing: border-box; }
.bb-nav button, .bb-nav input, .bb-buscar button, .bb-buscar input, .bb-buscar select { font: inherit; color: inherit; }

/* ------------------------------------------------------------- barra --- */

.bb-nav {
  position: fixed; z-index: 9990; top: 20px; left: 50%; transform: translateX(-50%);
  width: min(1140px, calc(100% - 40px)); height: 95px; padding: 12px 18px;
  display: grid; grid-template-columns: auto auto 1fr 50px; grid-template-rows: 70px 0fr;
  column-gap: 8px; row-gap: 0; align-items: center; overflow: hidden;
  border: 1px solid rgba(226, 226, 223, .95); border-radius: 21px;
  background: rgba(255, 255, 255, .96); box-shadow: var(--bb-shadow); backdrop-filter: blur(22px);
  transition: height .35s cubic-bezier(.22, .8, .25, 1), top .35s ease, padding .35s ease, border-radius .35s ease, grid-template-rows .35s cubic-bezier(.22, .8, .25, 1);
}
.admin-bar .bb-nav { top: 52px; }
.bb-nav.bb-compacta { top: 10px; height: 62px; padding: 8px 10px; grid-template-rows: 46px 0fr; border-radius: 16px; box-shadow: 0 20px 54px rgba(13, 13, 13, .31), 0 6px 16px rgba(13, 13, 13, .17); }
.admin-bar .bb-nav.bb-compacta { top: 42px; }
.bb-nav.bb-abierta { height: 258px; grid-template-rows: 70px 1fr; }
.bb-nav.bb-compacta.bb-abierta { height: 238px; grid-template-rows: 46px 1fr; border-radius: 18px; }

.bb-brand { display: flex; align-items: center; padding: 0 36px 0 32px; transition: .35s ease; }
.bb-logo { display: block; width: 88px; height: 58px; object-fit: contain; transition: .35s ease; }
.bb-nav.bb-compacta .bb-brand { padding: 0 14px 0 18px; }
.bb-nav.bb-compacta .bb-logo { width: 68px; height: 42px; }

.bb-menu-button, .bb-search button {
  width: 36px; height: 36px; padding: 0; display: grid; place-items: center;
  border: 1px solid #c7c7c4; border-radius: 9px; background: #d2d2cf; color: var(--bb-text); cursor: pointer; transition: .2s;
}
.bb-menu-button:hover { background: #c5c5c2; border-color: #bbbbb8; transform: translateY(-1px); }
.bb-menu-button svg, .bb-search button svg { width: 17px; height: 17px; }
.bb-menu-button .bb-icono-cerrar, .bb-nav.bb-abierta .bb-menu-button .bb-icono-abrir { display: none; }
.bb-nav.bb-abierta .bb-menu-button .bb-icono-cerrar { display: grid; }

.bb-search {
  height: 50px; margin: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding-left: 15px; background: var(--bb-secondary); border: 1px solid transparent; border-radius: 12px; transition: .2s;
}
.bb-search:focus-within { background: #fff; border-color: var(--bb-orange); box-shadow: 0 0 0 3px rgba(244, 91, 33, .12); }
.bb-search input { min-width: 0; height: auto; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; font-size: 14px; box-shadow: none; -webkit-appearance: none; appearance: none; }
.bb-search input::-webkit-search-cancel-button { display: none; }
.bb-search button { margin-right: 4px; }
.bb-search button:hover { background: #c5c5c2; border-color: #bbbbb8; transform: translateX(1px); }

.bb-cart-button {
  position: relative; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 12px; color: var(--bb-charcoal); text-decoration: none; transition: .2s;
}
.bb-cart-button:hover { background: var(--bb-secondary); border-color: var(--bb-line); }
.bb-cart-button svg { width: 20px; }
.bb-cart-button b {
  position: absolute; top: -7px; right: -7px; width: 23px; height: 23px; display: grid; place-items: center;
  background: var(--bb-charcoal); color: #fff; border: 3px solid var(--bb-surface); border-radius: 50%; font-size: 10px;
}
.bb-cart-button b[hidden] { display: none; }
.bb-nav.bb-compacta .bb-search, .bb-nav.bb-compacta .bb-cart-button { height: 46px; }
.bb-nav.bb-compacta .bb-cart-button { width: 46px; }

.bb-menu-panel {
  grid-column: 1 / -1; grid-row: 2; align-self: stretch; min-height: 0; overflow: hidden;
  padding: 0 20px; border-top: 1px solid transparent; opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s ease, transform .35s ease, padding .35s ease, border-color .2s ease, visibility 0s linear .25s;
}
.bb-nav.bb-abierta .bb-menu-panel { padding: 16px 20px 10px; border-color: var(--bb-line); opacity: 1; visibility: visible; transform: none; transition-delay: .06s, 0s, 0s, 0s, 0s; }
.bb-menu-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.bb-menu-head span { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bb-menu-head a { color: var(--bb-orange); font-size: 12px; text-decoration: none; border-bottom: 1px solid var(--bb-orange); }
.bb-menu-items { max-height: 120px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; overflow-y: auto; scrollbar-width: thin; }
.bb-menu-items a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--bb-text); font-size: 13px; text-decoration: none; }
.bb-menu-items a:hover { background: var(--bb-secondary); }
.bb-menu-items a small { color: #a1a19d; font-size: 10px; }

/* ----------------------------------------------------------- /buscar --- */

/* A todo el ancho: el shortcode queda dentro del contenedor del tema, que
   tiene el relleno lateral del sitio, y su alignfull no alcanza a estirarlo.
   Se devuelve ese relleno con margen negativo; 100vw no sirve porque cuenta
   la barra de desplazamiento y deja scroll horizontal en escritorio. */
.bb-buscar, .bb-portada {
  width: auto !important; max-width: none !important;
  margin: 0 calc(-1 * var(--wp--style--root--padding-right, 0px)) 0 calc(-1 * var(--wp--style--root--padding-left, 0px)) !important;
}
.bb-buscar { padding-bottom: 90px; background: var(--bb-secondary); }
.bb-shell { width: min(1140px, calc(100% - 40px)); margin: auto; padding-top: 145px; }
.admin-bar .bb-shell { padding-top: 177px; }
.bb-cargando { color: var(--bb-muted); text-align: center; padding: 80px 0; }

.bb-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 17px; align-items: start; }
.bb-filtros { position: sticky; top: 130px; padding: 22px; border: 1px solid var(--bb-line); border-radius: 18px; background: var(--bb-surface); transition: top .35s ease; }
.bb-compacta-pagina .bb-filtros, .bb-compacta-pagina .bb-toolbar { top: 84px; }
.bb-filtro-head { padding-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--bb-line); }
.bb-filtro-head > div { display: flex; flex-direction: column; gap: 4px; }
.bb-filtro-head span { font-size: 15px; font-weight: 800; }
.bb-filtro-head small { color: var(--bb-muted); font-size: 10px; }
.bb-filtro-head button { padding: 2px 0; border: 0; border-bottom: 1px solid var(--bb-orange); background: transparent; color: var(--bb-orange); font-size: 10px; cursor: pointer; }
.bb-grupo { margin: 0; padding: 20px 0; display: block; border: 0; border-bottom: 1px solid var(--bb-line); }
.bb-grupo legend, .bb-grupo-select > span, .bb-precio > div > span { margin: 0 0 13px; padding: 0; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bb-opciones { max-height: 210px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; scrollbar-width: thin; }
.bb-opciones label { min-height: 32px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 7px; color: var(--bb-muted); font-size: 12px; cursor: pointer; }
.bb-opciones input { margin: 0; accent-color: var(--bb-orange); }
.bb-opciones label:has(input:checked) span { color: var(--bb-text); font-weight: 750; }
.bb-opciones b { color: #a1a19d; font-size: 10px; font-weight: 500; }
.bb-grupo-select { display: flex; flex-direction: column; }
.bb-grupo-select select, .bb-orden select { min-height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--bb-line); border-radius: 9px; outline: 0; background-color: var(--bb-surface); cursor: pointer; }
.bb-grupo-select select { width: 100%; }
.bb-grupo-select select:focus, .bb-orden select:focus { border-color: var(--bb-orange); box-shadow: 0 0 0 3px rgba(244, 91, 33, .1); }
.bb-precio > div { display: flex; justify-content: space-between; gap: 12px; }
.bb-precio > div > span { margin-bottom: 0; }
.bb-precio strong { color: var(--bb-orange); font-size: 12px; }
.bb-precio input { width: 100%; margin: 17px 0 9px; accent-color: var(--bb-orange); cursor: pointer; }
.bb-precio > small { display: flex; justify-content: space-between; color: var(--bb-muted); font-size: 9px; }
.bb-stock { padding-top: 20px; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.bb-stock input { margin: 3px 0 0; accent-color: var(--bb-orange); }
.bb-stock span { display: flex; flex-direction: column; gap: 3px; }
.bb-stock strong { font-size: 12px; }
.bb-stock small { color: var(--bb-muted); font-size: 10px; }

.bb-resultados { min-width: 0; }
.bb-toolbar {
  position: sticky; z-index: 15; top: 130px; min-height: 58px; margin: 0 0 17px; padding: 8px;
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  border: 1px solid var(--bb-line); border-radius: 14px; background: var(--bb-surface); transition: top .35s ease;
}
.bb-resumen { min-width: 0; margin-right: auto; padding-left: 8px; color: var(--bb-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-resumen strong { color: var(--bb-text); font-size: 14px; }
.bb-orden { display: flex; align-items: center; gap: 10px; color: var(--bb-muted); font-size: 12px; }
.bb-vista { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 9px; background: var(--bb-secondary); }
.bb-vista button { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--bb-muted); cursor: pointer; }
.bb-vista button:hover { color: var(--bb-text); }
.bb-vista button.bb-activa { background: var(--bb-surface); color: var(--bb-orange); box-shadow: 0 1px 5px rgba(13, 13, 13, .12); }
.bb-vista svg { width: 17px; height: 17px; }

.bb-grilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.bb-card { min-width: 0; display: flex; flex-direction: column; background: var(--bb-surface); border-radius: 19px; overflow: hidden; transition: .25s; }
.bb-card:hover { transform: translateY(-5px); box-shadow: 0 18px 35px rgba(34, 31, 25, .1); }
.bb-foto { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; background: var(--bb-secondary); overflow: hidden; }
.bb-foto img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: .4s; }
.bb-foto img.bb-sin-foto { padding: 22%; object-fit: contain; opacity: .26; filter: grayscale(1); }
.bb-card:hover .bb-foto img { transform: scale(1.045); }
.bb-ultimas { position: absolute; z-index: 2; left: 12px; bottom: 12px; padding: 6px 8px; border-radius: 7px; background: var(--bb-charcoal); color: #fff; font-size: 9px; font-weight: 750; }
.bb-info { flex: 1; padding: 24px 21px 21px; display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.bb-detalle { min-height: 21px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 9px; }
.bb-detalle small { color: var(--bb-muted); text-transform: uppercase; font-size: 9px; letter-spacing: .1em; }
.bb-marca { display: inline-block; max-width: 100%; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-info h3 { min-height: 44px; margin: 11px 0 24px; font-family: var(--bb-sans); font-size: 16px; font-weight: 700; line-height: 1.35; letter-spacing: normal; text-wrap: balance; }
.bb-info h3 a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.bb-sku { margin: -16px 0 15px; color: #9a9a96; font-family: var(--bb-mono); font-size: 9px; }
.bb-monto { margin-bottom: 25px; display: flex; justify-content: center; align-items: baseline; gap: 9px; }
.bb-monto strong { font-size: 21px; color: var(--bb-orange); }
.bb-info > button {
  width: 100%; min-height: 47px; margin-top: auto; padding: 11px 15px; border: 1px solid var(--bb-orange); border-radius: 10px;
  background: var(--bb-orange); color: #fff; font-weight: 750; cursor: pointer;
}
.bb-info > button:hover { background: #d94814; border-color: #d94814; }
.bb-info > button:disabled { background: var(--bb-secondary); color: var(--bb-muted); border-color: var(--bb-line); cursor: not-allowed; }

.bb-grilla.bb-lista { display: flex; flex-direction: column; gap: 11px; }
.bb-lista .bb-card { min-height: 205px; display: grid; grid-template-columns: 205px minmax(0, 1fr); }
.bb-lista .bb-card:hover { transform: translateY(-2px); }
.bb-lista .bb-foto { aspect-ratio: auto; height: 100%; min-height: 205px; }
.bb-lista .bb-info { padding: 24px 27px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto 1fr; column-gap: 25px; align-items: start; text-align: left; }
.bb-lista .bb-info > .bb-detalle, .bb-lista .bb-info h3, .bb-lista .bb-sku { grid-column: 1; justify-content: flex-start; }
.bb-lista .bb-info h3 { min-height: 0; margin: 8px 0; font-size: 19px; }
.bb-lista .bb-sku { margin: 0; }
.bb-lista .bb-monto { grid-column: 2; grid-row: 1 / 3; justify-content: flex-end; margin: 0; }
.bb-lista .bb-monto strong { font-size: 23px; }
.bb-lista .bb-info > button { grid-column: 2; grid-row: 4; width: 210px; align-self: end; justify-self: end; }

.bb-vacio { min-height: 360px; display: grid; place-items: center; align-content: center; text-align: center; }
.bb-vacio > span { font-size: 45px; }
.bb-vacio h3 { margin: 14px 0 0; font-family: var(--bb-sans); font-size: 27px; }
.bb-vacio p { color: var(--bb-muted); }
.bb-vacio button { padding: 12px 18px; border: 0; border-radius: 10px; background: var(--bb-orange); color: #fff; font-weight: 750; cursor: pointer; }

.bb-toast {
  position: fixed; z-index: 9995; left: 50%; bottom: 28px; transform: translateX(-50%); min-width: min(440px, calc(100% - 30px));
  padding: 15px 18px; display: flex; align-items: center; gap: 12px; border-radius: 12px; background: var(--bb-charcoal); color: #fff;
  box-shadow: var(--bb-shadow); font-size: 13px;
}
.bb-toast span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--bb-text); }
.bb-toast a { margin-left: auto; color: #fff; font-weight: 700; }

/* ----------------------------------------------------------- portada --- */

.bb-pagina-portada .wp-site-blocks { padding-top: 0; }
/* Detrás de la hora del iPhone se ve el fondo de la página: que sea el de
   arriba de la foto y no el blanco del tema. */
html:has(body.bb-pagina-portada), body.bb-pagina-portada { background: #f6f0eb; }
.bb-pagina-portada main.wp-block-group { margin-top: 0 !important; padding-top: 0; }
.bb-portada { display: flow-root; font-family: var(--bb-sans); font-size: 16px; line-height: 1.5; color: var(--bb-text); background: var(--bb-background); }
.bb-portada, .bb-portada * { box-sizing: border-box; }
.bb-portada svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bb-portada h1, .bb-portada h2, .bb-portada h3 { font-family: var(--bb-sans); color: inherit; }
.bb-mensaje { flex: 1 0 100%; min-height: 168px; display: grid; place-items: center; color: var(--bb-muted); font-size: 13px; grid-column: 1 / -1; }

.bb-hero {
  position: relative; min-height: 790px; padding: 132px 40px 36px; overflow: hidden;
  background-image: var(--bb-hero), radial-gradient(ellipse at 50% 34%, #fff 0%, #faf9f6 40%, #f4f2ef 76%, #efeeeb 100%);
  background-repeat: no-repeat, no-repeat; background-position: right top, center; background-size: auto 100%, 100% 100%;
}
.bb-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(255, 255, 255, .14), transparent 24%, transparent 76%, rgba(255, 255, 255, .12)); }
.bb-carrusel { position: relative; display: grid; }
.bb-lamina { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s; }
.bb-lamina.bb-activa { opacity: 1; visibility: visible; transition-delay: 0s; }
.bb-hero-oscuro { color: #fff; background-color: #16130f; background-image: linear-gradient(90deg, #16130f 0%, rgba(22, 19, 15, .85) 30%, rgba(22, 19, 15, 0) 55%), var(--bb-hero); background-position: center, right center; background-size: 100% 100%, auto 100%; }
.bb-hero-oscuro::before { display: none; }
.bb-hero-texto { position: absolute; left: 44px; top: 160px; max-width: 470px; }
.bb-hero-texto h1 { position: static; margin: 14px 0 0; }
.bb-hero-oscuro .bb-eyebrow { color: var(--bb-orange); }
.bb-hero-texto p { margin: 26px 0 8px; color: rgba(255, 255, 255, .72); font-size: 17px; line-height: 1.5; }
.bb-carrusel-controles { position: absolute; z-index: 3; right: max(40px, calc((100% - 1180px) / 2)); bottom: 28px; display: flex; align-items: center; gap: 9px; }
.bb-carrusel-controles > button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(23, 23, 23, .72); color: #fff; font-size: 15px; cursor: pointer; backdrop-filter: blur(12px); }
.bb-carrusel-controles > div { height: 38px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(23, 23, 23, .7); backdrop-filter: blur(12px); }
.bb-carrusel-controles > div button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #777; cursor: pointer; transition: .25s ease; }
.bb-carrusel-controles > div button.bb-activa { width: 24px; border-radius: 999px; background: var(--bb-orange); }
.bb-hero-grid { position: relative; z-index: 1; width: min(1180px, 100%); min-height: 610px; margin: auto; }
.bb-hero h1 { position: absolute; left: 44px; top: 170px; margin: 0; font-size: clamp(58px, 6.4vw, 82px); line-height: .84; letter-spacing: -.075em; font-weight: 820; }
.bb-hero h1 em { color: var(--bb-orange); font-family: Georgia, serif; font-weight: 500; }
.bb-flotante { position: absolute; z-index: 2; padding: 14px 18px; border: 1px solid rgba(226, 226, 223, .72); background: rgba(255, 255, 255, .96); border-radius: 14px; box-shadow: 0 18px 44px rgba(13, 13, 13, .20), 0 5px 14px rgba(13, 13, 13, .10); backdrop-filter: blur(12px); color: var(--bb-text); text-decoration: none; }
.bb-asesoria { right: 1.5%; top: 375px; display: flex; gap: 10px; align-items: center; }
.bb-asesoria > span { color: var(--bb-charcoal); font-size: 28px; }
.bb-asesoria div { display: flex; flex-direction: column; }
.bb-asesoria small { color: var(--bb-muted); font-size: 13px; }
.bb-asesoria:hover { transform: translateY(-2px); }

.bb-destacados { padding: 18px max(40px, calc((100% - 1180px) / 2)) 30px; background: var(--bb-surface); border-bottom: 1px solid var(--bb-line); overflow: hidden; }
.bb-destacados-pista { display: flex; gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-inline: contain; padding: 3px 1px 18px; scrollbar-width: none; }
.bb-destacados-pista::-webkit-scrollbar { display: none; }
.bb-destacado { position: relative; flex: 0 0 280px; min-width: 0; display: grid; grid-template-columns: 112px 1fr; min-height: 168px; background: var(--bb-secondary); border: 1px solid transparent; border-radius: 17px; overflow: hidden; scroll-snap-align: start; transition: .25s ease; }
.bb-destacado:hover { border-color: var(--bb-line); background: var(--bb-surface); box-shadow: 0 14px 32px rgba(13, 13, 13, .09); transform: translateY(-3px); }
.bb-destacado-foto { position: relative; display: block; background: #efefec; overflow: hidden; }
.bb-destacado-foto img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: .35s ease; }
.bb-destacado-foto img.bb-sin-foto { padding: 22%; object-fit: contain; opacity: .26; filter: grayscale(1); }
.bb-destacado-info { position: relative; padding: 17px 14px; display: flex; flex-direction: column; align-items: flex-start; }
.bb-destacado-info > small { color: var(--bb-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.bb-destacado-info h3 { margin: 7px 0 12px; font-size: 13px; font-weight: 700; line-height: 1.28; overflow-wrap: anywhere; }
.bb-destacado-info h3 a { color: inherit; text-decoration: none; }
.bb-destacado-info strong { margin-top: auto; color: var(--bb-orange); font-size: 17px; }
.bb-destacado-info > button { position: absolute; right: 11px; bottom: 11px; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--bb-charcoal); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.bb-destacado-info > button:disabled { background: #c6c6c2; cursor: not-allowed; }

.bb-garantias { padding: 26px max(40px, calc((100% - 1180px) / 2)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--bb-surface); border-bottom: 1px solid var(--bb-line); }
.bb-garantia { min-width: 0; padding: 14px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; border-left: 1px solid var(--bb-line); }
.bb-garantia:first-child { border-left: 0; padding-left: 4px; }
.bb-garantia strong { display: block; color: var(--bb-text); font-size: 13px; font-weight: 750; line-height: 1.25; }
.bb-garantia small { display: block; margin-top: 2px; color: var(--bb-muted); font-size: 11px; line-height: 1.35; text-wrap: balance; }
.bb-garantia-logo { width: 108px; height: 52px; display: grid; place-items: center; }
.bb-garantia-logo img { display: block; max-width: 108px; max-height: 46px; width: auto; height: auto; object-fit: contain; }
.bb-garantia-texto { color: var(--bb-muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.bb-marcas[hidden] { display: none; }
.bb-marcas a { color: inherit; text-decoration: none; transition: color .2s; }
.bb-marcas a:hover { color: var(--bb-orange); }
.bb-marcas { min-height: 108px; display: flex; justify-content: center; align-items: center; gap: clamp(30px, 6vw, 85px); padding: 25px 35px; color: var(--bb-muted); font-size: clamp(16px, 2vw, 25px); font-weight: 900; letter-spacing: -.05em; border-bottom: 1px solid var(--bb-line); overflow: hidden; }

.bb-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--bb-orange); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.bb-eyebrow::before { content: ""; width: 23px; height: 2px; background: currentColor; }
.bb-seccion { width: min(1180px, calc(100% - 80px)); margin: auto; padding: 105px 0; scroll-margin-top: 80px; }
.bb-familias { padding-top: 40px; }
.bb-seccion-head { margin-bottom: 40px; display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.bb-seccion-head h2, .bb-proyecto h2 { margin: 10px 0 0; font-size: clamp(38px, 5vw, 62px); font-weight: 800; line-height: .98; letter-spacing: -.055em; }
.bb-enlace { display: flex; align-items: center; gap: 7px; padding: 8px 0; color: var(--bb-text); font-weight: 720; text-decoration: none; }
.bb-enlace:hover { color: var(--bb-orange); }

.bb-familias-grilla { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bb-familia { min-height: 132px; padding: 24px; background: var(--bb-secondary); border: 1px solid transparent; border-radius: 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; color: var(--bb-text); text-decoration: none; transition: .25s; }
.bb-familia:hover { transform: translateY(-4px); background: var(--bb-surface); border-color: var(--bb-line); box-shadow: 0 13px 28px rgba(13, 13, 13, .08); }
.bb-familia-icono { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--bb-surface); font-size: 26px; }
.bb-familia > span:nth-child(2) { display: flex; flex-direction: column; gap: 6px; }
.bb-familia strong { font-size: 16px; }
.bb-familia small { color: var(--bb-muted); font-size: 13px; }

.bb-productos { width: 100%; padding: 100px max(40px, calc((100% - 1180px) / 2)); background: var(--bb-secondary); }
.bb-grilla.bb-grilla-portada { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.bb-proyecto { position: relative; width: min(1180px, calc(100% - 80px)); margin: 105px auto 90px; padding: 70px; border-radius: 28px; background: var(--bb-charcoal); color: #fff; display: grid; grid-template-columns: 1fr .8fr; gap: 70px; overflow: hidden; }
.bb-proyecto::after { content: "B"; position: absolute; right: -20px; top: -110px; color: rgba(255, 255, 255, .035); font-size: 600px; line-height: 1; font-weight: 900; }
.bb-proyecto > div { position: relative; z-index: 1; }
.bb-proyecto p { max-width: 590px; color: #b7b7b7; line-height: 1.6; }
.bb-primario { min-height: 51px; margin-top: 15px; padding: 0 23px; border-radius: 12px; background: var(--bb-orange); color: #fff; display: inline-flex; align-items: center; gap: 12px; font-weight: 750; text-decoration: none; box-shadow: 0 10px 25px rgba(244, 91, 33, .21); }
.bb-primario:hover { background: #d94814; color: #fff; transform: translateY(-1px); }
.bb-pasos { display: flex; flex-direction: column; justify-content: center; }
.bb-pasos span { padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, .15); display: flex; align-items: center; gap: 18px; }
.bb-pasos b { color: #f7875d; font-family: var(--bb-mono); font-size: 12px; }

/* -------------------------------------------------------------- pie --- */

/* El pie del tema lo reemplaza el del plugin (wp_footer). */
.bb-con-barra .wp-site-blocks > footer.wp-block-template-part { display: none; }
.bb-pie { padding: 70px max(40px, calc((100% - 1180px) / 2)) 25px; background: #0d0d0d; color: #fff; font-family: var(--bb-sans); font-size: 16px; line-height: 1.5; }
.bb-pie, .bb-pie * { box-sizing: border-box; }
.bb-pie-main { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding-bottom: 60px; }
.bb-pie-marca { display: flex; flex-direction: column; align-items: flex-start; }
.bb-pie-marca img { display: block; width: 190px; height: auto; filter: invert(1); }
.bb-pie-marca p { margin: 24px 0 0; color: var(--bb-muted); }
.bb-pie-main > div:not(.bb-pie-marca) { display: flex; flex-direction: column; gap: 13px; }
.bb-pie-main strong { color: #fff; font-size: 14px; }
.bb-pie-main a, .bb-pie-main p { margin: 0; color: #9a9a96; font-size: 14px; text-decoration: none; }
.bb-pie-main a:hover { color: #fff; }
/* El botón flotante de CookieAdmin: lo reemplaza el enlace del pie. */
.bb-con-barra .cookieadmin_reconsent_wrap { display: none !important; }
.bb-pie-abajo { padding-top: 24px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #252525; color: var(--bb-muted); font-size: 12px; }
.bb-pagina-portada .bb-portada, .bb-pagina-buscar .bb-buscar { margin-bottom: 0 !important; }

/* ------------------------------------------------------------ tablet --- */

@media (max-width: 960px) {
  .bb-garantias { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 6px; padding: 18px 28px; }
  .bb-garantia:nth-child(odd) { border-left: 0; padding-left: 4px; }
  .bb-nav { width: calc(100% - 24px); top: 12px; grid-template-columns: auto auto 1fr auto; }
  .bb-logo { width: 66px; height: 40px; }
  .bb-shell { width: calc(100% - 24px); }
  .bb-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .bb-filtros { padding: 18px; }
  .bb-grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bb-lista .bb-card { grid-template-columns: 170px minmax(0, 1fr); }
  .bb-lista .bb-info { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .bb-lista .bb-info > .bb-detalle, .bb-lista .bb-info h3, .bb-lista .bb-sku, .bb-lista .bb-monto, .bb-lista .bb-info > button { grid-column: 1; grid-row: auto; justify-self: stretch; text-align: left; }
  .bb-lista .bb-monto { justify-content: flex-start; margin-top: 14px; }
  .bb-lista .bb-info > button { width: 100%; }
  .bb-hero { padding: 125px 28px 50px; }
  .bb-familias-grilla { grid-template-columns: repeat(2, 1fr); }
  .bb-grilla.bb-grilla-portada { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bb-proyecto { grid-template-columns: 1fr; gap: 40px; }
  .bb-pie-main { grid-template-columns: 1fr 1fr; }
}

/* ----------------------------------------------------------- teléfono --- */

@media (max-width: 640px) {
  .bb-garantias { grid-template-columns: minmax(0, 1fr); padding: 10px 20px; }
  .bb-garantia { padding: 12px 4px; border-left: 0; border-top: 1px solid var(--bb-line); }
  .bb-garantia:first-child { border-top: 0; }
  .bb-con-barra .wp-site-blocks { padding-top: 84px; }
  .bb-pagina-buscar .wp-site-blocks, .bb-pagina-portada .wp-site-blocks { padding-top: 0; }
  /* Cerca del borde de arriba, pero no a menos de 5 px: Safari de iOS 26
     toma una barra fija más pegada como la barra del sitio y pinta la franja
     de la hora de su color, y la foto deja de pasar por detrás al bajar
     (medido en el simulador: 4 px la tapa, 5 px no). La sombra cae sólo
     hacia abajo: la de escritorio sube y se corta en una raya donde empieza
     la hora. */
  .bb-nav, .bb-nav.bb-compacta {
    top: 5px;
    box-shadow: 0 16px 30px -16px rgba(13, 13, 13, .45), 0 6px 12px -6px rgba(13, 13, 13, .18);
  }
  .admin-bar .bb-nav, .admin-bar .bb-nav.bb-compacta { top: 51px; }
  /* Con la página arriba de todo la franja de la hora es lisa igual, así que
     ahí la barra puede ir casi pegada: va con la página (no fija, o Safari la
     pinta blanca) y al empezar a bajar pasa a fija a 5 px. */
  .bb-nav.bb-arriba { position: absolute; top: 1px; }
  .admin-bar .bb-nav.bb-arriba { top: 47px; }
  .bb-nav, .bb-nav.bb-compacta { height: 60px; padding: 7px; grid-template-columns: auto auto 1fr auto; grid-template-rows: 44px 0fr; column-gap: 5px; border-radius: 15px; }
  .bb-nav.bb-abierta, .bb-nav.bb-compacta.bb-abierta { height: 252px; grid-template-rows: 44px 1fr; }
  .bb-brand, .bb-nav.bb-compacta .bb-brand { padding: 0 3px; }
  .bb-logo, .bb-nav.bb-compacta .bb-logo { width: 60px; height: 38px; }
  .bb-menu-button { width: 34px; height: 34px; border-radius: 8px; }
  .bb-cart-button, .bb-nav.bb-compacta .bb-cart-button { width: 44px; height: 44px; border-radius: 10px; }
  .bb-search, .bb-nav.bb-compacta .bb-search { height: 44px; padding-left: 12px; gap: 7px; border-radius: 10px; }
  .bb-search svg { width: 18px; }
  .bb-search input { font-size: 16px; }
  .bb-search button { width: 34px; height: 34px; border-radius: 8px; }
  .bb-nav.bb-abierta .bb-menu-panel { padding: 10px 5px 6px; }
  .bb-menu-items { max-height: 150px; grid-template-columns: 1fr 1fr; }

  .bb-buscar { padding-bottom: 55px; }
  .bb-shell { width: calc(100% - 24px); padding-top: 92px; }
  .admin-bar .bb-shell { padding-top: 138px; }
  .bb-layout { grid-template-columns: 1fr; gap: 14px; }
  .bb-filtros { position: relative; top: auto; padding: 17px; }
  .bb-toolbar, .bb-compacta-pagina .bb-toolbar { top: 78px; gap: 6px; padding: 6px; justify-content: space-between; }
  .admin-bar .bb-toolbar, .admin-bar.bb-compacta-pagina .bb-toolbar { top: 124px; }
  .bb-resumen { flex: 1 1 auto; padding-left: 2px; font-size: 10px; }
  .bb-resumen strong { font-size: 12px; }
  .bb-orden { flex: 0 1 auto; min-width: 0; }
  .bb-orden > span { display: none; }
  .bb-orden select { width: 128px; min-height: 36px; padding: 0 26px 0 10px; font-size: 13px; }
  .bb-vista { flex: none; }
  .bb-vista button { width: 30px; height: 30px; }
  .bb-grilla { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bb-info { padding: 16px 12px 12px; }
  .bb-info h3 { min-height: 0; margin: 8px 0 18px; font-size: 13px; }
  .bb-monto strong { font-size: 17px; }
  .bb-monto { margin-bottom: 14px; }
  .bb-info > button { min-height: 40px; padding: 8px; font-size: 13px; }
  .bb-lista .bb-card { min-height: 160px; grid-template-columns: 122px minmax(0, 1fr); }
  .bb-lista .bb-foto { min-height: 160px; }
  .bb-lista .bb-info { padding: 15px; column-gap: 0; }
  .bb-lista .bb-info h3 { margin: 6px 0; font-size: 14px; }
  .bb-lista .bb-monto strong { font-size: 18px; }
  .bb-lista .bb-info > button { min-height: 38px; }

  /* La foto termina a los 350 px: se funde con el color de su borde de
     abajo en vez de cortar contra el degradado del escritorio. */
  .bb-hero {
    min-height: 0; padding: 105px 20px 42px;
    background: linear-gradient(to bottom, rgba(247, 243, 239, 0) 318px, #f7f3ef 350px) no-repeat, var(--bb-hero) 76% -10px / auto 360px no-repeat, #f7f3ef;
  }
  .bb-hero::before { display: none; }
  .bb-hero-grid { min-height: 0; padding-top: 330px; }
  .bb-hero h1 { position: static; text-align: center; font-size: 55px; }
  .bb-asesoria { display: none; }
  .bb-hero-oscuro { background: linear-gradient(to bottom, rgba(22, 19, 15, 0) 250px, #16130f 300px) no-repeat, var(--bb-hero) 62% 0 / auto 310px no-repeat, #16130f; }
  .bb-hero-oscuro .bb-hero-grid { padding-top: 280px; }
  .bb-hero-texto { position: static; max-width: none; text-align: center; }
  .bb-hero-texto p { font-size: 15px; }
  .bb-carrusel-controles { right: 50%; bottom: 14px; transform: translateX(50%); }
  .bb-carrusel-controles > button { display: none; }
  .bb-destacados { padding: 18px 20px 30px; }
  .bb-destacado { flex-basis: 255px; grid-template-columns: 102px 1fr; min-height: 158px; }
  .bb-marcas { justify-content: flex-start; overflow: auto; min-height: 80px; }
  .bb-seccion { width: calc(100% - 40px); padding: 75px 0; }
  .bb-familias { padding-top: 40px; }
  .bb-seccion-head { align-items: flex-start; }
  .bb-seccion-head .bb-enlace { display: none; }
  .bb-seccion-head h2, .bb-proyecto h2 { font-size: 39px; }
  .bb-familias-grilla { grid-template-columns: 1fr; }
  .bb-familia { min-height: 105px; }
  .bb-productos { padding: 70px 20px; }
  .bb-grilla.bb-grilla-portada { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bb-proyecto { width: calc(100% - 40px); margin: 75px auto 60px; padding: 40px 28px; }
  .bb-pie { padding: 55px 25px 25px; }
  .bb-pie-main { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .bb-pie-marca { grid-column: 1 / 3; }
  .bb-pie-main > div:last-child { grid-column: 1 / 3; }
  .bb-pie-abajo { flex-direction: column; gap: 6px; }
}

@media (max-width: 360px) {
  .bb-nav { grid-template-columns: auto 1fr auto; }
  .bb-brand { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bb-nav, .bb-nav *, .bb-buscar * { transition: none !important; }
}
