/* =========================================================
   HEADER DESGUACES ALCALÁ
   Sticky + buscador compacto optimizado Lighthouse
========================================================= */

:root {
  --da-header-primary: #0071BC;
  --da-header-primary-dark: #0a1766;
  --da-header-primary-hover: #0064a8;
  --da-header-topbar-bg: #edf3f8;
  --da-header-text: #172033;
  --da-header-muted: #5e6672;
  --da-header-white: #ffffff;
  --da-header-shadow: 0 8px 22px rgba(10, 23, 102, 0.14);
}

/* =========================================================
   HEADER STICKY
========================================================= */

.da-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: transparent;
  overflow: visible;
  box-shadow: var(--da-header-shadow);
}

#header.da-header {
  width: 100%;
}

/* =========================================================
   TOPBAR
========================================================= */

.da-header-meta {
  position: relative;
  z-index: 4;
  min-height: 32px;
  background: var(--da-header-topbar-bg);
  color: var(--da-header-text);
  font-size: 13px;
  border-bottom: 1px solid rgba(10, 23, 102, 0.08);
}

.da-header-meta__inner {
  min-height: 32px;
	    padding: 8px 0px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.da-header-meta__links {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.da-header-meta__links a {
  display: inline-flex;
  align-items: center;
  color: var(--da-header-text) !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 180ms ease;
}

.da-header-meta__links a:hover {
  color: var(--da-header-primary) !important;
}

.da-header-meta__tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

/* Acceso PRO */

.da-pro-access {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(10, 23, 102, 0.16);
  border-radius: 999px;
  background: #fff;
  color: #4a4f57 !important;
  text-decoration: none !important;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(10, 23, 102, 0.08);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.da-pro-access:hover {
  border-color: rgba(0, 113, 188, 0.28);
  color: var(--da-header-text) !important;
  box-shadow: 0 4px 10px rgba(10, 23, 102, 0.1);
  transform: translateY(-1px);
}

.da-pro-access__text {
  display: inline-flex;
  align-items: center;
  padding: 0 9px 0 11px;
  color: var(--da-header-muted);
  font-size: 12px;
  font-weight: 650;
}

.da-pro-access__badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #34373d;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Contacto topbar */

.da-header-meta__contact {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--da-header-text) !important;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 180ms ease;
}

.da-header-meta__contact svg {
  flex: 0 0 auto;
  color: currentColor;
}

.da-header-meta__contact:hover {
  color: var(--da-header-primary) !important;
}

.da-header-meta__contact--phone svg {
  color: var(--da-header-primary);
}

.da-header-meta__contact--whatsapp {
  color: #128c3a !important;
}

.da-header-meta__contact--whatsapp svg {
  color: #25D366;
}

.da-header-meta__contact--whatsapp:hover {
  color: #0c7a30 !important;
}

/* =========================================================
   HEADER PRINCIPAL
========================================================= */

.da-header-main {
  position: relative;
  z-index: 3;
  background:
    linear-gradient(
      90deg,
      var(--da-header-primary-dark) 0%,
      var(--da-header-primary) 48%,
      var(--da-header-primary-dark) 100%
    );
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  overflow: visible;
}

.da-header-main__inner {
  position: relative;
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

/* =========================================================
   NAVEGACIÓN IZQUIERDA
========================================================= */

.da-header-primary-nav {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.da-header-primary-nav__item {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: #fff !important;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none !important;
}

.da-header-primary-nav__item:hover {
  color: #fff !important;
  opacity: 0.82;
}

.da-header-primary-nav__item--button {
  padding: 0;
}

/* =========================================================
   BURGER
========================================================= */

.da-burger {
  width: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
}

.da-burger:hover {
  background: transparent;
  color: #fff;
  opacity: 0.82;
  transform: none;
}

.da-burger::before {
  display: none;
}

.da-burger__icon {
  width: 18px;
  height: 14px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 0 0 auto;
}

.da-burger__icon span {
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.da-burger strong {
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

/* =========================================================
   LOGO
========================================================= */

.da-header-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 300px;
  min-height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.da-header-logo__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.da-header-logo__img {
  display: block;
  width: 210px;
  height: 62px;
  max-width: 210px;
  max-height: 62px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.98;
}

/* =========================================================
   ACCIONES DERECHA
========================================================= */

.da-header-actions {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  min-width: 0;
  color: #fff;
}

.da-header-action-icon {
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  text-decoration: none !important;
}

.da-header-action-icon:hover {
  color: #fff;
  opacity: 0.82;
}

/* =========================================================
   CUENTA
========================================================= */

.da-header-account {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #fff !important;
  text-decoration: none !important;
}

.da-header-account:hover {
  color: #fff !important;
  opacity: 0.86;
}

.da-header-account__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.da-header-account__content {
  display: grid;
  gap: 2px;
  line-height: 1.05;
}

.da-header-account__content small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.da-header-account__content strong {
  color: #fff;
  font-size: 18px;
  font-weight: 850;
}

/* =========================================================
   CARRITO
========================================================= */

.da-header-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.da-header-cart .blockcart,
.da-header-cart .cart-preview {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: #fff;
  box-shadow: none !important;
  border: 0 !important;
}

.da-header-cart .blockcart:hover,
.da-header-cart .cart-preview:hover {
  color: #fff;
  background: transparent !important;
  transform: none;
  box-shadow: none;
  opacity: 0.86;
}

.da-header-cart .blockcart a,
.da-header-cart .cart-preview a {
  color: inherit;
  text-decoration: none !important;
}

.da-header-cart .cart-products-count {
  min-width: 18px;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 0 5px;
  border-radius: 999px;
  background: #25a9e0;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

/* =========================================================
   BUSCADOR COMPACTO HEADER
   Corregido para evitar NO_LCP en Lighthouse
========================================================= */

.da-header-compact-search {
  position: fixed;
  left: 0;
  right: 0;
  top: 114px;
  z-index: 990;
  width: 100%;
  background: #f7f9fc;
  border-bottom: 1px solid rgba(10, 23, 102, 0.08);
  box-shadow: 0 10px 24px rgba(10, 23, 102, 0.08);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);

  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease;

  will-change: opacity, transform;
}

.da-header-compact-search.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.da-header-compact-search[data-is-home="0"] {
  position: relative;
  top: auto;
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.da-header-compact-search__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.da-header-compact-search__hook {
  position: relative;
  width: min(100%, 1220px);
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 88px 0 86px;
  background: #ffffff;
  border: 1px solid rgba(10, 23, 102, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(10, 23, 102, 0.12);
}

/* Bloque izquierdo inclinado */

.da-header-compact-search__hook::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 84px;
  height: calc(100% + 2px);
  background: #ffffff;
  border: 1px solid rgba(10, 23, 102, 0.12);
  border-right: 6px solid var(--da-header-primary-dark);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 100%, 18px 100%);
  pointer-events: none;
}

.da-header-compact-search__vehicle-deco {
  position: absolute;
  left: 31px;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9aa1aa;
  transform: translateY(-50%);
  pointer-events: none;
}

.da-header-compact-search__divider {
  position: absolute;
  left: 50%;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: rgba(10, 23, 102, 0.28);
  pointer-events: none;
}

.da-header-compact-search__submit-deco {
  position: absolute;
  right: -1px;
  top: -1px;
  width: 86px;
  height: calc(100% + 2px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0066df;
  color: #fff;
  clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  pointer-events: none;
}

.da-header-compact-search__hook > *:not(.da-header-compact-search__vehicle-deco):not(.da-header-compact-search__divider):not(.da-header-compact-search__submit-deco) {
  width: 100%;
  min-width: 0;
}

/* =========================================================
   MENÚ BURGER
   Corregido sin display:none/display:block
========================================================= */

.da-burger-nav {
  position: fixed;
  inset: 0;
  z-index: 1100;
  visibility: hidden;
  pointer-events: none;
}

.da-burger-nav.is-open {
  visibility: visible;
  pointer-events: auto;
}

.da-burger-nav__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 23, 102, 0.42);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.da-burger-nav.is-open .da-burger-nav__overlay {
  opacity: 1;
}

.da-burger-nav__panel {
  position: relative;
  width: min(420px, calc(100% - 36px));
  height: 100%;
  overflow-y: auto;
  background: #fff;
  box-shadow: 24px 0 70px rgba(10, 23, 102, 0.18);
  transform: translateX(-100%);
  transition: transform 220ms ease;
}

.da-burger-nav.is-open .da-burger-nav__panel {
  transform: translateX(0);
}

.da-burger-nav__header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(10, 23, 102, 0.1);
}

.da-burger-nav__title {
  color: var(--da-header-primary-dark);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.da-burger-nav__close {
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 113, 188, 0.1);
  color: var(--da-header-primary-dark);
  box-shadow: none;
}

.da-burger-nav__close:hover {
  background: var(--da-header-primary);
  color: #fff;
  transform: none;
}

.da-burger-nav__section {
  padding: 20px 22px 8px;
}

.da-burger-nav__label {
  display: block;
  margin-bottom: 12px;
  color: #69758a;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.da-burger-nav__link {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--da-header-primary-dark);
  font-size: 15px;
  font-weight: 750;
  text-decoration: none !important;
}

.da-burger-nav__link:hover {
  background: rgba(0, 113, 188, 0.08);
  color: var(--da-header-primary);
}

.da-burger-nav__actions {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.da-burger-nav__btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 900;
  text-decoration: none !important;
}

.da-burger-nav__btn--primary {
  background: var(--da-header-primary);
  color: #fff;
}

.da-burger-nav__btn--primary:hover {
  background: var(--da-header-primary-dark);
  color: #fff;
}

.da-burger-nav__btn--outline {
  border: 1px solid rgba(10, 23, 102, 0.18);
  background: #fff;
  color: var(--da-header-primary-dark);
}

.da-burger-nav__btn--outline:hover {
  border-color: var(--da-header-primary);
  color: var(--da-header-primary);
}

body.da-menu-open {
  overflow: hidden;
}

/* =========================================================
   PRESTASHOP OVERRIDES
========================================================= */

#header .header-top,
#header .header-nav {
  background: transparent;
  border: 0;
}

#header .logo {
  max-width: 210px;
}

.da-main-nav {
  display: none;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1199px) {
  .da-header-meta__inner {
    gap: 16px;
  }

  .da-header-meta__links {
    gap: 18px;
  }

  .da-header-meta__tools {
    gap: 10px;
  }

  .da-header-meta__links a,
  .da-header-meta__contact {
    font-size: 12px;
  }

  .da-header-meta__contact--whatsapp span {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .da-header-primary-nav {
    gap: 20px;
  }

  .da-header-primary-nav__item {
    font-size: 13px;
  }

  .da-header-logo {
    width: 270px;
    min-height: 68px;
  }

  .da-header-logo__img {
    width: 190px;
    height: 56px;
    max-width: 190px;
    max-height: 56px;
  }

  .da-header-actions {
    gap: 16px;
  }

  .da-header-compact-search__hook {
    width: 100%;
  }
}

@media (max-width: 991px) {
  .da-header-meta {
    display: none;
  }

  .da-header-main__inner {
    min-height: 64px;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .da-header-primary-nav {
    grid-column: 1;
  }

  .da-header-primary-nav a {
    display: none;
  }

  .da-header-logo {
    position: static;
    grid-column: 2;
    width: auto;
    min-height: auto;
    transform: none;
  }

  .da-header-logo__img {
    width: 170px;
    height: 46px;
    max-width: 170px;
    max-height: 46px;
  }

  .da-header-actions {
    grid-column: 3;
    gap: 10px;
  }

  .da-header-action-icon {
    display: none;
  }

  .da-header-account__content {
    display: none;
  }

  .da-header-account__icon svg {
    width: 28px;
    height: 28px;
  }

  .da-header-compact-search {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
  }
}

@media (max-width: 575px) {
  .da-header-main__inner {
    min-height: 60px;
  }

  .da-burger {
    min-height: 40px;
  }

  .da-burger strong {
    display: none;
  }

  .da-burger__icon {
    width: 20px;
    height: 14px;
  }

  .da-burger__icon span {
    width: 20px;
  }

  .da-header-logo__img {
    width: 145px;
    height: 40px;
    max-width: 145px;
    max-height: 40px;
  }

  .da-header-account {
    min-height: 34px;
  }

  .da-header-account__icon svg {
    width: 25px;
    height: 25px;
  }

  .da-header-cart .blockcart,
  .da-header-cart .cart-preview {
    min-width: 32px;
    min-height: 34px;
  }

  .da-burger-nav__panel {
    width: min(390px, calc(100% - 24px));
  }
}