/* Ateliê Ótico — navbar global.
 * Garante que a navegação com todos os links (ÓCULOS, O ATELIÊ, CONTACTOS,
 * PROTOCOLOS, PARCERIAS) caiba entre a marca e as acções do cabeçalho em
 * todas as páginas, sem sobreposição com os ícones.
 * Especificidade elevada porque cada template da loja define o .site-header
 * com !important na sua própria folha.
 */
/* Separação visual entre o cabeçalho fixo e o conteúdo que passa por baixo:
 * uma linha fina e uma sombra curta deixam claro onde acaba o navbar. */
html body .site-header {
  border-bottom: 1px solid rgba(17, 17, 17, .12) !important;
  box-shadow: 0 1px 0 rgba(17, 17, 17, .04), 0 12px 22px -20px rgba(17, 17, 17, .6) !important;
}

@media (min-width: 1025px) {
  html body .site-header {
    grid-template-columns: 180px minmax(0, 1fr) auto !important;
    column-gap: clamp(20px, 2.2vw, 54px) !important;
    align-items: center !important;
  }
  html body .site-header .brand {
    justify-self: start !important;
  }
  html body .site-header .desktop-nav {
    justify-self: center !important;
    min-width: 0 !important;
    gap: clamp(12px, 1.35vw, 26px) !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
  }
  html body .site-header .desktop-nav > a,
  html body .site-header .desktop-nav > .nav-drop > a {
    font-size: 10.5px !important;
    letter-spacing: .06em !important;
    white-space: nowrap !important;
  }
  html body .site-header .header-actions {
    justify-self: end !important;
    gap: 6px !important;
    margin-left: 0 !important;
  }
}

/* Invariante do navbar móvel: hambúrguer (esquerda) · logótipo (centrado) ·
 * ícones (direita). O CTA de texto "MARCAR CONSULTA" e a pesquisa inline de
 * secretária não cabem ao lado do logótipo centrado e ficavam pintados por
 * cima dele (o logótipo tem z-index inferior às acções). Ambos já existem no
 * drawer móvel. Esta regra fica aqui — e não na folha de uma página — porque
 * este ficheiro é carregado por todos os modelos (home, catálogo, ficha de
 * produto...), impedindo que o problema volte numa página só. */
/* Navbar móvel sempre visível: o overflow-x:hidden do html/body anulava o
 * position:sticky e o cabeçalho desaparecia ao rolar. overflow-x:clip não
 * cria contentor de scroll, por isso o sticky volta a funcionar. */
@media (max-width: 1024px) {
  html,
  body {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }
  html body.topbar-hidden.xmas-banner-on .site-header {
    top: 34px !important;
  }
}

/* O snap do carrossel alinhava o primeiro card ao bordo da pista, ignorando
 * o padding de 16 px, e a wrapper cortava-o à esquerda. */
@media (max-width: 768px) {
  html body .ll-carousel-track {
    scroll-padding-left: 16px !important;
  }
}

@media (max-width: 1024px) {
  html body .site-header .nav-book-consultation,
  html body .site-header .header-inline-search-wrap,
  html body .site-header .desktop-lang-wrap,
  html body .site-header .favorites-trigger {
    display: none !important;
  }
  html body .site-header > .brand {
    z-index: 3 !important;
  }
}

/* Bloco de valores da home (foto 800×581, paisagem). Numa só coluna o bloco
 * esticava a height:100% porque a lista de especificações empilhada é muito
 * mais alta; object-fit:cover cortava ~50% da largura e o conjunto passava dos
 * 480 px de altura. Aqui a foto aparece inteira, na proporção real. */
@media (max-width: 860px) {
  html body .ll-craft-single-image-box {
    height: auto !important;
  }
  html body .ll-craft-single-image-box .ll-craft-img-tile {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 800 / 581;
  }
  html body .ll-craft-single-image-box .ll-craft-img-tile img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}

/* Tarjetas que pasam a "position: relative" no telemóvel mas conservavam o
 * left/right do modo absoluto: deslocavam-se e geravam scroll horizontal
 * (11 px na home a 390 px). */
@media (max-width: 768px) {
  html body .ll-prefooter-floating-card {
    left: auto !important;
  }
  html body .ll-floating-white-card {
    right: auto !important;
  }
}

@media (min-width: 1025px) and (max-width: 1320px) {
  html body .site-header {
    grid-template-columns: 150px minmax(0, 1fr) auto !important;
    column-gap: 16px !important;
  }
  html body .site-header .desktop-nav {
    gap: 9px !important;
  }
  html body .site-header .desktop-nav > a,
  html body .site-header .desktop-nav > .nav-drop > a {
    font-size: 9.5px !important;
    letter-spacing: .03em !important;
  }
  html body .site-header .header-actions {
    gap: 4px !important;
  }
  html body .site-header .nav-book-consultation {
    font-size: 9px !important;
  }
}
