

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
  width: 40px;
}

.logo .brand {
  font-weight: 700;
  font-size: 18px;
  color: #009846;
}

/* ========== Desktop Menu ========== */
.menu {
  flex: 1;
  display: flex;
  justify-content: center;
}

.menu ul {
  display: flex;
  list-style: none;
  gap: 25px;
}

.menu ul li a {
  text-decoration: none;
  color: #333;
  padding: 8px 15px;
  border-radius: 20px;
  transition: 0.3s;
}

.menu ul li a.active,
.menu ul li a:hover {
  background: #009846;
  color: #fff;
}

/* ========== Search Product ========== */
.search-product {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 20px;
  flex-shrink: 0;
}

.search-product input {
  padding: 10px 45px 10px 18px;
  border: 1.5px solid #e0e0e0;
  border-radius: 25px;
  outline: none;
  width: 250px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fafafa;
}

.search-product input:focus {
  border-color: #aee2c9;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(174, 226, 201, 0.15);
  width: 280px;
}

.search-product input::placeholder {
  color: #999;
}

/* Simple Search Button */
.search-product .search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.search-product .search-btn:hover {
  background: #f0f0f0;
}

.search-product .search-btn i {
  color: #666;
  font-size: 15px;
  transition: color 0.2s ease;
}

.search-product .search-btn:hover i {
  color: #009846;
}

/* ========== Icons ========== */
.icon {
  display: flex;
  gap: 15px;
  align-items: center;
}

.icon i {
  cursor: pointer;
  font-size: 18px;
  color: #333;
}

.cart-icon {
  position: relative;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  animation: bounce 0.3s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* ========== Burger Button ========== */
.burger-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  z-index: 1100;
  position: relative;
  width: 32px;
  height: 32px;
}

.burger-btn i {
  font-size: 22px;
  color: #333;
  transition: all 0.3s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.burger-btn i.fa-bars {
  opacity: 1;
  visibility: visible;
}

.burger-btn i.fa-times {
  opacity: 0;
  visibility: hidden;
}

.burger-btn.open i.fa-bars {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) rotate(90deg);
}

.burger-btn.open i.fa-times {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) rotate(0deg);
}

/* ========== Mobile Menu ========== */
.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  z-index: 999;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

.mobile-menu.open {
  max-height: 500px;
  opacity: 1;
  overflow: visible;
}

/* Mobile Search */
.mobile-menu .mobile-search {
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.mobile-menu .mobile-search input {
  width: 100%;
  padding: 10px 45px 10px 15px;
  border: 1.5px solid #e0e0e0;
  border-radius: 25px;
  outline: none;
  font-size: 14px;
  background: #fafafa;
  transition: all 0.3s ease;
}

.mobile-menu .mobile-search input:focus {
  border-color: #aee2c9;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(174, 226, 201, 0.15);
}

.mobile-menu .mobile-search .search-btn {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mobile-menu .mobile-search .search-btn:hover {
  background: #f0f0f0;
}

.mobile-menu .mobile-search .search-btn i {
  color: #666;
  font-size: 15px;
}

.mobile-menu .mobile-search .search-btn:hover i {
  color: #009846;
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 10px 0;
}

.mobile-menu ul li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-menu ul li a {
  display: block;
  text-decoration: none;
  color: #333;
  font-size: 16px;
  padding: 15px 20px;
  transition: all 0.2s ease;
}

.mobile-menu ul li a.active,
.mobile-menu ul li a:hover {
  background: #009846;
  color: #fff;
  border-radius: 8px;
  margin: 5px 15px;
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
  .search-product input {
    width: 200px;
  }
  
  .search-product input:focus {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .menu {
    display: none;
  }

  .search-product {
    display: none;
  }

  .burger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .icon {
    gap: 10px;
  }

  .logo .brand {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .logo img {
    height: 35px;
    width: 35px;
  }

  .logo .brand {
    font-size: 14px;
  }
}

/* ================= CART SIDEBAR ================= */
.cart-sidebar {
  position: fixed;
  right: -450px;
  top: 70px;
  width: 400px;
  height: calc(100vh - 70px);
  background: white;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-sidebar.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Header */
.cart-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-sidebar-header h2 {
  font-size: 1.5rem;
  color: #009846;
  margin: 0;
}

.cart-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.cart-close-btn:hover {
  color: #009846;
}

/* Items Container */
.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.empty-cart-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  text-align: center;
}

.empty-cart-message i {
  font-size: 3rem;
  margin-bottom: 10px;
  opacity: 0.3;
}

/* Cart Item */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 15px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fafafa;
  transition: all 0.2s;
}

.cart-item:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-name {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  margin: 0 0 5px 0;
}

.cart-item-price {
  color: #009846;
  font-weight: 700;
  font-size: 0.95rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn:hover {
  border-color: #009846;
  color: #009846;
}

.qty-display {
  width: 30px;
  text-align: center;
  font-weight: 600;
}

.remove-btn {
  color: #e74c3c;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
  padding: 0;
  margin-left: auto;
  align-self: flex-start;
}

.remove-btn:hover {
  color: #c0392b;
}

/* Footer */
.cart-sidebar-footer {
  border-top: 1px solid #eee;
  padding: 20px;
  background: #fafafa;
}

.cart-summary {
  margin-bottom: 15px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #666;
  font-size: 0.9rem;
}

.summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #009846;
  border-top: 1px solid #ddd;
  padding-top: 8px;
  margin-top: 8px;
}

.btn-checkout {
  width: 100%;
  padding: 12px;
  background: #009846;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  transition: background 0.2s;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-checkout:hover {
  background: #006a31;
}

.btn-checkout:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-continue-shopping {
  width: 100%;
  padding: 12px;
  background: white;
  color: #009846;
  border: 2px solid #009846;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-continue-shopping:hover {
  background: #f9f9f9;
}

/* Scrollbar Styling */
.cart-items-container::-webkit-scrollbar {
  width: 6px;
}

.cart-items-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.cart-items-container::-webkit-scrollbar-thumb {
  background: #009846;
  border-radius: 3px;
}

/* Account Icon Styling */
.account-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  color: #333;
  transition: color 0.3s ease;
}

.account-icon i {
  font-size: 18px;
}

.account-icon:hover i {
  color: #009846;
}

/* Responsive Cart Sidebar */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
}