header {
  width: 100%;
}
/* Badge (Cart Number) */
.cart-count {
  position: absolute;
  top: -8px;       /* move up */
  right: 137px;    /* move right */
  background: green;
  color: white;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 6px;
  line-height: 1;
  min-width: 12px;
  text-align: center;
  display: inline-block;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}
.top-bar {
  background-color: #f5f5f5;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

/* Pop animation when item is added */
.cart-count.added {
  animation: pop 0.4s ease-out;
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
/* Shake animation on update */
.cart-count.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}



.main-header {
  display: flex;
  
  align-items: center;
  padding: 10px 20px;
  background-color: white;
   
  justify-content: space-between;
  padding: 12px 20px;
  
}

.header-center {
  justify-content: center; /* SEARCH BAR CENTERED */
}

.header-left {
  justify-content: flex-start;
}

.header-right {
  justify-content: flex-end;
 
}

/* Three equal sections */
.header-left,
.header-center,
.header-right {
  flex: 1; /* equal width */
  display: flex;
  align-items: center;
}

/* Mobile: hide desktop search */
@media (max-width: 768px) {
  .header-center {
    display: none;
  }
}
.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}



/* Desktop summary text */
.cart-summary-text {
  font-size: 13px;
  color: #333;
  white-space: nowrap;
}

/* Hide summary text on mobile */
@media (max-width: 768px) {
  .cart-summary-text {
    display: none;
  }
  
 
}

@media (max-width: 768px) {
  .cart-count {
    right: -10px;
  }
}
.logo {
  width: 200px;
  
      height: 70px; 
      background-image: url('');
      background-size: contain; 
      background-repeat: no-repeat;
      background-position: center;
     
}

.search-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  max-width: 500px;
}

.search-bar input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 25px 0 0 25px;
  outline: none;
  font-size: 16px;
}

.search-bar button {
  background-color: #8CC63F;
  border: none;
  color: white;
  padding: 10px 18px;
  border-radius: 0 25px 25px 0;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.search-bar button:hover {
  background-color: #005fd1;
}


#cart {
  font-size: 14px;
  display: block;
}

.main-nav {
  background-color: #8CC63F;
  border-radius: 999px;
  
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.main-nav li a {
  font-family: 'Raleway', sans-serif;
  background-color: #F5F5F5;
  color: #4B256D;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 0 #cfc2e3;
  transition: all 0.2s ease;
  display: inline-block;
  font-size: 14px;
  border: none;
}
.main-nav li a:hover,
.main-nav li a:active {
  background-color: #B8B8B8;
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b79acb;
}




.search-bar{
  width: 100%;
}
#searchForm{
 display: flex;
  justify-content: center;
  margin-bottom: 20px;
  width: 80%;
 

}

.search-bar-input{

  width: 100%;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px; 
 

  
}

.search-bar-button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #f5f5f5;
 width: 20px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.search-bar-button:hover {
  background-color: greenyellow;
}






@media (max-width: 760px) {
  .top-bar {
    
    align-items: flex-start;
    font-size: 12px;
  }

  .main-header {
      display:flex;
    
   
    padding: 10px;
  }

  .logo {
    font-size: 20px;
    margin-bottom: 10px;
    FONT-SIZE: large;
        FONT-WEIGHT: bolder;
  }

  .search-bar {
    width: 100%;
    
    gap: 10px;
  }

  .search-bar input {
    width: 100%;
  }

  .search-bar select {
    width: 100%;
  }

  .main-nav ul {
   
    gap: 10px;
    padding: 5px;
    
  }

  .main-nav li {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .top-bar {
    font-size: 10px;
    padding: 5px;
  }

  .main-header {
    padding: 5px;
  }

  .logo {
    
  
  }

  .search-bar input,
  .search-bar select {
    font-size: 14px;
    padding: 4px;
  }

  #cart {
    font-size: 12px;
  }

  .main-nav ul {
  
    align-items: center;
    gap: 5px;
  }

  .main-nav li {
    font-size: 12px;
    padding: 5px;
  }
}



.search-container {
  position: relative;
  width: 300px;
}
input[type="text"] {
  padding: 10px;
  font-size: 16px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.suggestions {
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  border: 1px solid #ccc;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
.suggestion-item {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  cursor: pointer;
  gap: 10px;
}
.suggestion-item img {
  width: 30px;
  height: 30px;
  border-radius: 3px;
  object-fit: cover;
}
.suggestion-item:hover {
  background-color: #f0f0f0;
}
.results {
  margin-top: 20px;
}



  /* Hide menu button on desktop */
  @media (min-width: 1025px) {
    .openbtn, .sidepanel, #overlay {
      display: none;
    }
  }

  /* Overlay background */
  #overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 9;
  }

  /* Side panel menu */
  .sidepanel {
    height: 100%; 
    width: 0; 
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    background-color: #111;
    overflow-y: auto; /* Scrollable content */
    padding-top: 60px;
    transition: 0.3s;
    
  }

  .sidepanel a, .dropdown-btn {
    padding: 15px 30px;
    text-decoration: none;
    font-size: 18px;
    color: #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
    cursor: pointer;
  }

  .sidepanel a:hover, .dropdown-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
  }

  .sidepanel .closebtn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    color: white;
    cursor: pointer;
  }

  /* Dropdown container with animation */
  .dropdown-container {
    max-height: 0;
    overflow: hidden;
    background-color: #222;
    transition: max-height 0.3s ease-out;
  }



  .dropdown-container a {
    padding-left: 40px;
    font-size: 16px;
  }

  /* Arrow icon */
  .arrow {
    transition: transform 0.3s;
  }

  /* Rotate arrow when active */
  .dropdown-btn.active .arrow {
    transform: rotate(90deg);
  }

  /* Open button */
  .openbtn {
    font-size: 40px;
    cursor: pointer;
    background-color: white;
    color: black;
    padding: 10px 15px;
    border: none;
  }

  .openbtn:hover {
    background-color: #444;
  }

@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }
}

/* MOBILE SEARCH ICON - only show on mobile */
.mobile-search-icon {
  display: none;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .mobile-search-icon {
    display: block;
  }

  /* Hide big desktop search bar on mobile */
  .search-bar {
    display: none;
  }
}

/* Slide-in Search Page */
.search-page {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: #ffffff;
  z-index: 99999;
  transition: left 0.35s ease;
  padding: 20px;
  box-sizing: border-box;
}

/* When active */
.search-page.active {
  left: 0;
}

/* Header inside search overlay */
.search-page-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.close-btn {
  font-size: 18px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Search input */
.search-form input {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 16px;
}


#cart-summary{
    width:10px;
}



/* Cart Area Wrapper */
.cart-area {
  position: relative;
}
 .search-bar input,
  .search-bar select {
    font-size: 14px;
    padding: 4px;
  }

  #cart {
    font-size: 16px;
  }

  .main-nav ul {
  
    align-items: center;
    gap: 5px;
  }

  .main-nav li {
    font-size: 12px;
    padding: 5px;
  }
}



.search-container {
  position: relative;
  width: 300px;
}
input[type="text"] {
  padding: 10px;
  font-size: 16px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.suggestions {
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  border: 1px solid #ccc;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}
.suggestion-item {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  cursor: pointer;
  gap: 10px;
}
.suggestion-item img {
  width: 30px;
  height: 30px;
  border-radius: 3px;
  object-fit: cover;
}
.suggestion-item:hover {
  background-color: #f0f0f0;
}
.results {
  margin-top: 20px;
}



  /* Hide menu button on desktop */
  @media (min-width: 1025px) {
    .openbtn, .sidepanel, #overlay {
      display: none;
    }
  }

  /* Overlay background */
  #overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 9;
  }

  /* Side panel menu */
  .sidepanel {
    height: 100%; 
    width: 0; 
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    background-color: #111;
    overflow-y: auto; /* Scrollable content */
    padding-top: 60px;
    transition: 0.3s;
    
  }

  .sidepanel a, .dropdown-btn {
    padding: 15px 30px;
    text-decoration: none;
    font-size: 18px;
    color: #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
    cursor: pointer;
  }

  .sidepanel a:hover, .dropdown-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
  }

  .sidepanel .closebtn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    color: white;
    cursor: pointer;
  }

  /* Dropdown container with animation */
  .dropdown-container {
    max-height: 0;
    overflow: hidden;
    background-color: #222;
    transition: max-height 0.3s ease-out;
  }



  .dropdown-container a {
    padding-left: 40px;
    font-size: 16px;
  }

  /* Arrow icon */
  .arrow {
    transition: transform 0.3s;
  }

  /* Rotate arrow when active */
  .dropdown-btn.active .arrow {
    transform: rotate(90deg);
  }

  /* Open button */
  .openbtn {
    font-size: 40px;
    cursor: pointer;
    background-color: white;
    color: black;
    padding: 10px 15px;
    border: none;
  }

  .openbtn:hover {
    background-color: #444;
  }

@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }
}



