/* Cosmetics Header Variant */
:root {
  
  --cos-dark: #1a1a1a;
}

/* ── Topbar ── */
.cos-header-topbar {
  background: var(--cos-dark);
  color: rgba(255,255,255,.75);
  font-size: 12px;
  padding: 8px 0;
}
.cos-topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.cos-topbar-left { display: flex; align-items: center; gap: 8px; }
.cos-topbar-right { display: flex; align-items: center; gap: 8px; }
.cos-topbar-right a,
.cos-topbar-left a { color: rgba(255,255,255,.75); text-decoration: none; transition: color .15s; }
.cos-topbar-right a:hover,
.cos-topbar-left a:hover { color: #fff; }
.cos-topbar-sep { color: rgba(255,255,255,.3); }

/* Topbar dropdown */
.cos-td-wrap { position: relative; }
.cos-td-toggle {
  background: none; border: none; color: rgba(255,255,255,.75); font-size: 12px;
  cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 0;
}
.cos-td-toggle:hover { color: #fff; }
.cos-td-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid #ebebeb; min-width: 110px;
  z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.cos-td-menu a { display: block; padding: 8px 14px; font-size: 12px; color: #555; text-decoration: none; }
.cos-td-menu a:hover { background: #f5f5f5; }
.cos-td-wrap:hover .cos-td-menu { display: block; }

/* ── Main Header ── */
.cos-header-main {
  background: #fff;
  border-bottom: 1px solid #f0e8de;
  position: sticky; top: 0; z-index: 999;
}
.cos-header-inner {
  display: flex; align-items: center; gap: 24px; height: 70px;
}

/* Mobile toggle */
.cos-mobile-toggle {
  display: none; background: none; border: none; font-size: 22px; color: var(--cos-dark);
  padding: 4px; cursor: pointer; flex-shrink: 0;
}

/* Logo */
.cos-logo { flex-shrink: 0; text-decoration: none; }
.cos-logo-text {
  font-size: 22px; font-weight: 800; letter-spacing: 3px;
  text-transform: uppercase; color: var(--cos-dark); font-style: italic;
}

/* Nav */
.cos-nav { flex: 1; }
.cos-nav ul {
  display: flex; list-style: none; margin: 0; padding: 0;
  align-items: center; gap: 0; justify-content: center;
}
.cos-nav ul li { position: relative; }
.cos-nav ul li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 24px 14px;
  font-size: 13px; font-weight: 600; letter-spacing: .5px;
  color: var(--cos-dark); text-decoration: none; white-space: nowrap;
  transition: color .15s;
}
.cos-nav ul li > a:hover,
.cos-nav ul li > a.active { color: var(--molla-accent); }
.cos-nav ul li > a.active::after {
  content: ''; display: block; position: absolute; bottom: 0;
  left: 14px; right: 14px; height: 2px; background: var(--molla-accent);
}

/* Reuse molla-nav-dropdown scoped */
.cos-nav li:hover > .molla-nav-dropdown { display: block; }
.cos-nav .molla-nav-dropdown { top: 100%; left: 0; }
.cos-nav .molla-nav-dropdown li.has-sub:hover > .molla-nav-dropdown--sub { display: block; }

/* Icons */
.cos-header-icons { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.cos-icon-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; text-decoration: none;
  color: var(--cos-dark); font-size: 17px; transition: color .15s;
}
.cos-icon-btn:hover { color: var(--molla-accent); }
.cos-icon-badge {
  position: absolute; top: 4px; right: 2px;
  background: var(--molla-accent); color: #fff;
  font-size: 9px; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ── Search Bar ── */
.cos-search-bar {
  background: #fdf9f5;
  border-top: 1px solid #f0e8de;
  max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease;
}
.cos-search-bar.open { max-height: 80px; padding: 14px 0; }
.cos-search-form {
  display: flex; align-items: center; gap: 0;
  border: 1px solid #ddd; background: #fff;
}
.cos-search-input {
  flex: 1; padding: 10px 16px; border: none; outline: none;
  font-size: 14px; color: var(--cos-dark); background: transparent;
}
.cos-search-input::placeholder { color: #bbb; }
.cos-search-btn {
  padding: 0 18px; height: 44px; background: var(--molla-accent); color: #fff;
  border: none; cursor: pointer; font-size: 15px; transition: background .2s;
}
.cos-search-btn:hover { background: #b08a18; }
.cos-search-close {
  padding: 0 14px; height: 44px; background: none; border: none;
  color: #aaa; font-size: 14px; cursor: pointer; transition: color .15s;
}
.cos-search-close:hover { color: var(--cos-dark); }

/* ── Responsive ── */
@media (max-width: 991px) {
  .cos-nav { display: none; }
  .cos-mobile-toggle { display: flex; }
}
@media (max-width: 767px) {
  .cos-header-topbar { display: none; }
  .cos-logo img { height: 34px !important; }
  .cos-logo-text { font-size: 18px; }
}
@media (max-width: 480px) {
  .cos-header-main { padding: 10px 0; }
}
