/* Header, trust bar, announcement, search, language, mobile nav */

/* Trust bar — 4 columns on desktop, marquee on small screens */
.co-trustbar {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  color: #111;
}

.co-trustbar__viewport {
  width: min(100% - 2rem, var(--co-container));
  margin-inline: auto;
  overflow: hidden;
}

.co-trustbar__track {
  display: grid;
  grid-template-columns: repeat(var(--co-trustbar-cols, 4), minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  background: #e5e5e5;
}

.co-trustbar__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  background: #fff;
  white-space: nowrap;
}

.co-trustbar__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
}

.co-trustbar__text {
  font-size: 0.7rem;
  font-weight: 400;
  color: #57534e;
  white-space: normal;
}

.co-trustbar__item--clone { display: none; }

.co-trustbar .co-icon {
  color: #111;
  flex-shrink: 0;
}

.co-trustbar .co-icon svg,
.co-trustbar .co-icon-img {
  width: 22px;
  height: 22px;
}

/* Header */
.co-announce {
  background: #000;
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow: hidden;
  padding: 0.55rem 0;
}

.co-announce__viewport {
  overflow: hidden;
  width: 100%;
}

.co-announce__track {
  display: flex;
  align-items: center;
  gap: 4.5rem;
  width: max-content;
  animation: co-marquee 32s linear infinite;
}

.co-announce p {
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
}

.co-announce:hover .co-announce__track {
  animation-play-state: paused;
}

.co-lang-ar .co-announce__track {
  animation-name: co-marquee-rtl;
}

@keyframes co-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes co-marquee-rtl {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.co-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  z-index: 40;
}

.co-sticky-header .co-header {
  position: sticky;
  top: 0;
}

.co-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 84px;
}

.co-branding { display: flex; align-items: center; }

.co-logo-text {
  font-family: var(--co-font-display);
  font-size: 1.55rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.co-logo-text a {
  color: #111;
  text-decoration: none;
}

.custom-logo { max-height: 72px; width: auto; }

.co-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.co-nav a {
  color: #111;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.co-nav a:hover,
.co-nav .current-menu-item > a {
  color: #111;
  border-bottom: 1px solid #111;
}

.co-nav .sub-menu {
  display: none;
  position: absolute;
  background: #fff;
  box-shadow: var(--co-shadow);
  border-radius: 0;
  padding: 0.6rem 0;
  min-width: 220px;
  z-index: 20;
}

.co-nav li { position: relative; }

.co-nav li:hover > .sub-menu,
.co-nav li:focus-within > .sub-menu {
  display: block;
}

.co-nav .sub-menu a {
  display: block;
  padding: 0.5rem 1rem;
  border: 0;
  letter-spacing: 0.08em;
}

.co-toolbar {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.co-header-icon,
.co-nav-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0;
}

.co-header-icon:hover,
.co-nav-toggle:hover {
  background: transparent;
  color: #111;
  opacity: 0.65;
}

.co-lang {
  position: relative;
}

.co-lang__toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.4rem 0.45rem;
  cursor: pointer;
  color: #111;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.co-lang__toggle::-webkit-details-marker { display: none; }

.co-lang__menu {
  position: absolute;
  inset-inline-end: 0;
  top: 100%;
  min-width: 88px;
  background: #fff;
  border: 1px solid #eee;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  z-index: 30;
}

.co-lang__menu a {
  display: block;
  padding: 0.4rem 0.8rem;
  color: #111;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
}

.co-count {
  position: absolute;
  top: 4px;
  inset-inline-end: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  background: #111;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.co-count[data-count="0"],
.co-count[data-wishlist-count="0"] { display: none; }

.co-nav-toggle { display: none; }

/* Search panel */
.co-search-panel {
  background: #fff;
  border-bottom: 1px solid var(--co-border);
  padding: 1rem 0 1.25rem;
}

.co-search-panel[hidden] { display: none; }

.co-search-panel__form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.co-search-panel__input {
  flex: 1;
  border: 1px solid var(--co-border);
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  background: var(--co-bg);
}

.co-search-panel__close {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.co-search-results {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.co-search-result {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: var(--co-radius-sm);
  color: inherit;
  text-decoration: none;
}

.co-search-result:hover { background: var(--co-bg); }

.co-search-result img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}

/* Mobile nav */
.co-mobile-nav[hidden] { display: none; }

.co-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(26, 35, 50, 0.45);
}

.co-mobile-nav__panel {
  width: min(100%, 360px);
  height: 100%;
  background: #fff;
  padding: 1rem 1.25rem 2rem;
  overflow: auto;
}

.co-mobile-nav__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 600;
}

.co-mobile-nav__close {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.co-mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.co-mobile-nav a {
  display: block;
  padding: 0.7rem 0;
  color: var(--co-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--co-border);
}

.co-mobile-nav__utils {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.6rem;
}

.co-mobile-nav__utils a,
.co-mobile-nav__utils .co-lang__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.co-drawer-open { overflow: hidden; }

.co-header-icon .co-icon-img,
.co-lang .co-icon-img {
  width: 20px;
  height: 20px;
}

.co-lang__menu a[aria-current="true"] {
  background: #111;
  color: #fff;
}

@media (max-width: 1023px) {
  .co-trustbar__viewport { width: 100%; }

  .co-trustbar__track {
    display: flex;
    width: max-content;
    animation: co-marquee 28s linear infinite;
  }

  .co-trustbar__item,
  .co-trustbar__item--clone {
    display: flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 0.65rem 1.4rem;
    border-bottom: 0;
    border-inline-end: 1px solid #e5e5e5;
  }

  .co-trustbar:hover .co-trustbar__track { animation-play-state: paused; }
  .co-lang-ar .co-trustbar__track { animation-name: co-marquee-rtl; }

  .co-nav { display: none; }
  .co-nav-toggle { display: inline-flex; }
  .co-header__inner { grid-template-columns: auto 1fr auto; }
  .co-branding { justify-content: center; }
}

@media (max-width: 767px) {
  .co-toolbar .co-lang { display: none; }
}
