.ccg-header {
  --ccg-header-bg: #fff;
  --ccg-header-text: #111827;
  --ccg-header-accent: #2563eb;
  position: sticky;
  top: 0;
  z-index: 990;
  width: 100%;
  border-bottom: 1px solid #e5e7eb;
  background: var(--ccg-header-bg);
  color: var(--ccg-header-text);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}

.ccg-header *, .ccg-header *::before, .ccg-header *::after { box-sizing: border-box; }

.ccg-header__inner {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  width: min(92%, 1240px);
  min-height: 78px;
  margin: 0 auto;
}

.ccg-header__brand { display: inline-flex; align-items: center; width: fit-content; color: inherit; text-decoration: none; }
.ccg-header__logo { display: block; width: min(100%, 176px); height: 44px; object-fit: contain; object-position: left center; }
.ccg-header__brand-text { font-family: Poppins, sans-serif; font-size: 20px; font-weight: 800; }

.ccg-header__nav { min-width: 0; }
.ccg-header__menu { display: flex; align-items: center; justify-content: center; gap: clamp(15px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.ccg-header__menu li { margin: 0; padding: 0; list-style: none; }
.ccg-header__menu a, .ccg-header__menu-link {
  position: relative;
  display: inline-flex;
  padding: 29px 0 27px;
  color: var(--ccg-header-text);
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.ccg-header__menu a::after, .ccg-header__menu-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 20px;
  left: 0;
  height: 2px;
  background: var(--ccg-header-accent);
  transform: scaleX(0);
  transition: transform .18s ease;
}
.ccg-header__menu a:hover::after, .ccg-header__menu-link:hover::after { transform: scaleX(1); }

.ccg-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ccg-header__search { position: relative; width: clamp(150px, 15vw, 220px); }
.ccg-header__search input[type="search"] {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 14px;
  border: 1px solid #dbe1e8;
  border-radius: 999px;
  background: #f8fafc;
  color: #111827;
  font-family: Inter, sans-serif;
  font-size: 13px;
  outline: none;
}
.ccg-header__search input[type="search"]:focus { border-color: var(--ccg-header-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ccg-header-accent) 12%, transparent); }
.ccg-header__search button {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #475569;
  place-items: center;
  cursor: pointer;
}
.ccg-header svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ccg-header__icon-button {
  position: relative;
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ccg-header-text);
  place-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.ccg-header__icon-button:hover { background: #eff6ff; color: var(--ccg-header-accent); }
.ccg-header .site-header__cart-badge.ccg-header__cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--ccg-header-bg);
  border-radius: 999px;
  background: var(--ccg-header-accent);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  place-items: center;
  box-sizing: border-box;
  pointer-events: none;
}
.ccg-header__cta { padding: 12px 17px; border-radius: 999px; background: var(--ccg-header-accent); color: #fff; font-size: 13px; font-weight: 800; text-decoration: none; }
.ccg-header__mobile-toggle { display: none; width: 42px; height: 42px; padding: 10px; border: 0; border-radius: 9px; background: #f1f5f9; cursor: pointer; }
.ccg-header__mobile-toggle > span:not(.screen-reader-text) { display: block; width: 100%; height: 2px; margin: 4px 0; border-radius: 2px; background: #111827; transition: transform .18s ease, opacity .18s ease; }

@media (max-width: 1100px) {
  .ccg-header__inner { grid-template-columns: minmax(145px, 190px) minmax(0, 1fr) auto; gap: 18px; }
  .ccg-header__search { display: none; }
  .ccg-header__menu { gap: 16px; }
}

@media (max-width: 820px) {
  .ccg-header__inner { display: flex; justify-content: space-between; min-height: 70px; }
  .ccg-header__logo { width: 154px; height: 38px; }
  .ccg-header__mobile-toggle { display: block; }
  .ccg-header__nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid transparent;
    background: var(--ccg-header-bg);
    opacity: 0;
    visibility: hidden;
    transition: max-height .25s ease, opacity .18s ease, visibility .18s ease;
  }
  .ccg-header.is-menu-open .ccg-header__nav { max-height: 70vh; border-bottom-color: #e5e7eb; opacity: 1; visibility: visible; }
  .ccg-header__menu { display: grid; gap: 0; width: min(92%, 720px); margin: 0 auto; padding: 10px 0 18px; }
  .ccg-header__menu a, .ccg-header__menu-link { display: flex; padding: 13px 2px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
  .ccg-header__menu a::after, .ccg-header__menu-link::after { display: none; }
  .ccg-header.is-menu-open .ccg-header__mobile-toggle > span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .ccg-header.is-menu-open .ccg-header__mobile-toggle > span:nth-child(2) { opacity: 0; }
  .ccg-header.is-menu-open .ccg-header__mobile-toggle > span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

@media (max-width: 440px) {
  .ccg-header__inner { width: calc(100% - 28px); }
  .ccg-header__logo { width: 132px; }
  .ccg-header__account { display: none; }
  .ccg-header__actions { gap: 3px; }
}
