/* PASTIGACOR88 — clean header layout override
   Keeps all existing header content, links and JavaScript behavior intact. */

body > header {
  position: relative;
  z-index: 100;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e9e9e9;
}

body > header .header-combined {
  width: min(1440px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(300px, 1fr) minmax(420px, auto);
  align-items: center;
  gap: 28px;
  padding: 16px 0;
  box-sizing: border-box;
}

body > header .brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 150px;
  line-height: 0;
  text-decoration: none;
}

body > header .brand-logo img {
  display: block;
  width: auto;
  height: 40px !important;
  max-width: 190px;
  object-fit: contain;
}

body > header .main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

body > header .main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  color: #242424;
  background: transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

body > header .main-nav a:hover,
body > header .main-nav a.active {
  color: #111;
  background: #f3f3f3;
}

body > header .main-nav a.active::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: #111;
}

body > header .search-form {
  width: 100%;
  min-width: 0;
  height: 46px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fafafa;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

body > header .search-form:focus-within {
  background: #fff;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,.07);
}

body > header .search-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 18px;
  border: 0;
  outline: 0;
  color: #171717;
  background: transparent;
  font: inherit;
  font-size: 13px;
}

body > header .search-form input::placeholder {
  color: #858585;
}

body > header .search-form button {
  flex: 0 0 48px;
  width: 48px;
  height: 100%;
  border: 0;
  border-left: 1px solid #e3e3e3;
  color: #fff;
  background: #111;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}

body > header .search-form button:hover {
  background: #2b2b2b;
}

body > header .account-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

body > header .account-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
  min-width: 0;
  color: #555;
  font-size: 11px;
  white-space: nowrap;
}

body > header .account-links > span:first-child {
  color: #222;
  font-weight: 600;
}

body > header .account-links a {
  color: #333;
  text-decoration: none;
  transition: color .2s ease;
}

body > header .account-links a:hover {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body > header .account-links .cart {
  color: #222;
  font-weight: 700;
}

body > header .cta-buttons {
  flex: 0 0 auto;
}

body > header .cta-buttons strong {
  display: flex;
  align-items: center;
  gap: 7px;
}

body > header .cta-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 38px;
  padding: 0 14px;
  box-sizing: border-box;
  border: 1px solid #111;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

body > header .cta-buttons a:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0,0,0,.10);
}

body > header .btn-register {
  color: #fff;
  background: #111;
}

body > header .btn-register:hover {
  background: #292929;
}

body > header .btn-login {
  color: #111;
  background: #fff;
}

body > header .btn-login:hover {
  background: #f5f5f5;
}

/* Existing PASTIGACOR88 dropdown navigation — retained, only restyled. */
body > header .mainnav {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 14px;
  box-sizing: border-box;
}

body > header .drop {
  position: relative;
}

body > header .drop > button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #262626;
  background: #f6f6f6;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

body > header .drop > button:hover,
body > header .drop.open > button {
  background: #fff;
  border-color: #d7d7d7;
  transform: translateY(-1px);
}

body > header .drop > section {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 120;
  width: 285px;
  max-width: min(285px, calc(100vw - 32px));
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 45px rgba(0,0,0,.13);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -7px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

body > header .drop.open > section {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

body > header .drop > section a {
  display: block;
  padding: 11px 12px;
  border-radius: 9px;
  color: #222;
  text-decoration: none;
  transition: background .16s ease, padding-left .16s ease;
}

body > header .drop > section a:hover {
  padding-left: 15px;
  background: #f5f5f5;
}

body > header .drop > section b,
body > header .drop > section small {
  display: block;
}

body > header .drop > section b {
  font-size: 12px;
  line-height: 1.3;
}

body > header .drop > section small {
  margin-top: 3px;
  color: #777;
  font-size: 10px;
  line-height: 1.4;
}

@media (max-width: 1180px) {
  body > header .header-combined {
    grid-template-columns: auto minmax(260px, 1fr);
    gap: 18px;
  }

  body > header .account-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 2px;
  }

  body > header .account-links {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  body > header .header-combined,
  body > header .mainnav {
    width: min(100% - 28px, 720px);
  }

  body > header .header-combined {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 13px 0;
  }

  body > header .brand-logo img {
    height: 36px !important;
    max-width: 170px;
  }

  body > header .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body > header .main-nav::-webkit-scrollbar {
    display: none;
  }

  body > header .search-form {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  body > header .account-actions {
    grid-column: 1 / -1;
    grid-row: 4;
    align-items: center;
    gap: 10px;
  }

  body > header .account-links {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  body > header .account-links::-webkit-scrollbar {
    display: none;
  }

  body > header .mainnav {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body > header .mainnav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 560px) {
  body > header .header-combined,
  body > header .mainnav {
    width: calc(100% - 20px);
  }

  body > header .header-combined {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body > header .brand-logo {
    justify-content: center;
  }

  body > header .brand-logo img {
    height: 34px !important;
  }

  body > header .main-nav,
  body > header .search-form,
  body > header .account-actions {
    grid-column: 1;
  }

  body > header .account-actions {
    flex-direction: column;
    justify-content: center;
  }

  body > header .account-links {
    width: 100%;
    justify-content: center;
  }

  body > header .cta-buttons {
    width: 100%;
  }

  body > header .cta-buttons strong {
    width: 100%;
  }

  body > header .cta-buttons a {
    flex: 1;
  }

  body > header .mainnav {
    padding-bottom: 10px;
  }

  body > header .drop > button {
    padding: 0 13px;
    font-size: 10px;
  }

  body > header .drop > section {
    position: fixed;
    top: auto;
    left: 50%;
    width: calc(100vw - 24px);
    max-width: none;
    transform: translate(-50%, -7px);
  }

  body > header .drop.open > section {
    transform: translate(-50%, 0);
  }
}
