:root {
    --primary-color: #fd3008;
    --secondary-color: #00a896;
    --neutral-light-color: #f8f9fa;
    --neutral-dark-color: #2d2d2d;
    --accent-color: #ffd166;
    --snow: #fffafa;
    --anti-flash-white: #f4f6f6;
    --gray-shade-color: #dee7e7;
    --white-color: #ffffff;
    --timberwolf: #ced0ce;
}


/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Header Base */
header {
  margin: 0 auto;
  top: 0;
  position: fixed;
  width: 100%;
  max-width: 1600px;
  z-index: 100;
  background-color: var(--white-color);
}

/* Header Row */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5em 2em;
}

/* Logo */
.header .logo img { display: block; }

/* Search Bars */
.search-bar input {
  padding: .5em 1em;
  border-radius: 8px;
  border: 1px solid var(--neutral-dark-color);
  outline: none;
  color: var(--neutral-dark-color);
  font-size: .9rem;
}

.header .search-bar form {
  position: relative;
}

.header .search-bar.desktop input[type=search] {
  width: 400px;
  padding-left: 2em;
}

.header .search-bar .ri-search-line, .search-bar.mobile i {
  position: absolute;
  left: .5em;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-dark-color);
  font-size: 1rem;
}

.search-bar input[type=submit], .search-btn {
  cursor: pointer;
  background-color: var(--primary-color);
  color: var(--neutral-light-color);
  border: none;
  border-radius: 4px;
  padding: .4em .8em;
    font-size: .9rem;
}

/* Header Items */
.header .header-items {
  display: flex;
  gap: 1em;
  align-items: center;
  border: 1px solid var(--gray-shade-color);
  padding: .2em .5em;
  border-radius: 4px;
  background-color: #edf2f4;
}

.header .header-items i {
  font-size: 1.5rem;
  color: var(--neutral-dark-color);
  cursor: pointer;
}

.header .header-items a {
  text-decoration: none;
  color: var(--neutral-dark-color);
  font-size: 0.9rem;
}

/* Account Dropdown */
.header .account { position: relative; }
.header .account-dropdown {
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white-color);
  border-radius: 8px;
  padding: 1em;
  display: none;
}
.header .account:hover .account-dropdown { display: block; }

/* Cart Count */
.header .cart { position: relative; }
.header .cart-count {
  position: absolute;
  top: -8px; right: -10px;
  padding: 2px 7px;
  background-color: var(--primary-color);
  border-radius: 45%;
  color: var(--neutral-light-color);
  font-size: 0.8rem;
}

/* Mobile Search */
.search-bar.mobile {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  background: var(--neutral-light-color);
  padding: 0 0.5em;
  width: 100%;
}
.search-bar.mobile.active {
  max-height: 200px;
  opacity: 1;
  padding: 0.5em;
}
.search-bar.mobile form {
  display: flex;
  align-items: center;
  gap: 0.5em;
  position: relative;
}
.search-bar.mobile input[type=search] {
  width: 100%;
  padding-left: 2em;
}

/* Nav */
header nav {
  background: var(--anti-flash-white);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }
nav .nav-links {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}
nav .nav-links li { 
    margin: 0 20px; 
    list-style: none;
}
nav .nav-links li:last-child { padding-right: 20px;}
nav .nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
}
nav .nav-links a:hover { color: var(--secondary-color); }

/* Header spacer */
.header-after { margin-top: 6em; }

/* Mobile Tweaks */
.mobile-only { display: none; }
@media (max-width: 800px) {
    .header { padding: .5rem 1rem; }
  .header .search-bar.desktop { display: none; }
  .mobile-only { display: block; }
  nav .nav-links { justify-content: flex-start; }
  nav .nav-links li { margin: 0 10px; }
}

@media (max-width: 500px) {
  /* .header .header-items a { display: none; } */
  .header .header-items i { font-size: 1.3rem; font-weight: 400;}
  .header .header-items { gap: 0.5em; padding: .2em .3em; }
  .header .logo img { width: 65px; }
  header .search-bar.mobile button { display: none; }
  nav .nav-links a {
    font-size: 0.8rem;
}
}

