/* ----------------------- Navigation bar --------------------------------- */

body {
    background-color: hsl(0, 0%, 90%);
    margin: 0;
}

#navigation {
    background-color: hsl(0, 0%, 95%);
    margin-bottom: 1px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-elements {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 3rem;
    text-decoration: none;
    list-style: none;
    cursor: pointer;
    padding: 1rem;
    margin-top: 0;
    color: hsl(0, 0%, 15%);
}

.nav-elements a{
    text-decoration: none;
    color: black;
}

.nav-elements a:active{
    
    color: hsl(197, 64%, 40%);
}

.cart-search {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
}

.search-toggle:hover {
    color: hsl(197, 64%, 40%);
}

h1{
    text-align: center;
    margin-top: 3rem;
}

/* ---------------------- search + tags toolbar ---------------- */

.inventory-toolbar {
    max-width: 1400px;
    margin: 0 auto 1rem;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.inventory-search {
    display: flex;
    width: 100%;
    max-width: 520px;
    gap: 0.5rem;
}

.inventory-search input[type="search"] {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1px solid hsl(0, 0%, 75%);
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    background: white;
}

.inventory-search input[type="search"]:focus {
    border-color: hsl(197, 64%, 40%);
    box-shadow: 0 0 0 3px hsla(197, 64%, 40%, 0.15);
}

.inventory-search .search-btn {
    border: none;
    border-radius: 30px;
    background-color: hsl(0, 0%, 20%);
    color: white;
    font-weight: bold;
    padding: 0.65rem 1.25rem;
    cursor: pointer;
}

.inventory-search .search-btn:hover {
    background-color: hsl(0, 0%, 30%);
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.tag-btn {
    border: 1px solid hsl(0, 0%, 70%);
    background: white;
    color: hsl(0, 0%, 20%);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tag-btn:hover {
    border-color: hsl(197, 64%, 40%);
    color: hsl(197, 64%, 35%);
}

.tag-btn.active {
    background: hsl(197, 64%, 40%);
    border-color: hsl(197, 64%, 40%);
    color: white;
}

.filter-status {
    text-align: center;
    color: hsl(0, 0%, 35%);
    min-height: 1.25rem;
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.no-results {
    text-align: center;
    color: hsl(0, 0%, 35%);
    margin: 2rem auto;
    font-size: 1.05rem;
}

.item.hidden {
    display: none;
}

.item-tag {
    align-self: flex-start;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
    color: white;
}

.item-tag.desktop {
    background: hsl(220, 55%, 45%);
}

.item-tag.laptop {
    background: hsl(160, 45%, 35%);
}

.item-tag.phone {
    background: hsl(197, 64%, 40%);
}

.item-tag.watch {
    background: hsl(30, 70%, 45%);
}

/* --------------------- Message of the day -------------------------------------- */


#messageOfDay {
    text-align: center;
    margin-top: 0;
    padding: 0;
}

#messageOfDay a {
    color: hsl(216, 100%, 36%);
    cursor: pointer;
}

/* --------------------- footer ------------------------------------- */

footer{
    margin-top: 6rem;
    background-color: #222;
    padding: 8px 40px;
    color: white;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #333
}

/* ---------------------- inventory section ---------------- */

.inventory-items{
 display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.item {
   display: flex;
  flex-direction: column;
  background: hsl(0, 0%, 90%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 20px 10px;
}

.item img{
    border-radius: 1rem;
    width: 100%;
    height: 16rem;
    object-fit: cover;
    background: hsl(0, 0%, 95%);
}

.item:hover{
    transform: translateY(-3px);
}

.item h3{
    font-size: x-large;
}

.item p{
    margin-top: 2px;
    color: hsl(0, 0%, 20%);
}

.item button{
    border: none;
    border-radius: 30px;
    background-color: hsl(0, 0%, 20%);
    color: white;
    font-weight: bold;
    padding: 5px 30px;
}

.item button:hover{
     background-color: hsl(0, 0%, 30%);
     cursor: pointer;
}

/* --------------------- cart badge ------------------------------------- */

.cart-icon-wrapper {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: hsl(197, 64%, 40%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}