/* ===== NAVBAR CART ICON ===== */
.navbar-cart-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.navbar-cart-btn {
  position: relative;
  background: rgba(0, 255, 255, 0.1);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #00ffff;
  font-size: 22px;
}

.navbar-cart-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  border-color: #00ffff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

.navbar-cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ff4757, #ee5a6f);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  border: 2px solid #212121;
  animation: bounceIn 0.5s ease;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}

.navbar-cart-badge:empty {
  display: none;
}

/* ===== NAVBAR CART DROPDOWN ===== */
.navbar-cart-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 20px;
  width: 420px;
  max-height: 600px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
}

.navbar-cart-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Arrow pointer */
.navbar-cart-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid rgba(0, 255, 255, 0.3);
}

.navbar-cart-dropdown::after {
  content: '';
  position: absolute;
  top: -8px;
  right: 21px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid #2a2a2a;
}

/* ===== CART DROPDOWN HEADER ===== */
.cart-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 255, 255, 0.05);
}

.cart-dropdown-header h3 {
  font-size: 18px;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.cart-dropdown-header h3 i {
  color: #00ffff;
  font-size: 20px;
}

.cart-dropdown-count {
  background: rgba(0, 255, 255, 0.2);
  color: #00ffff;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 600;
}

.cart-dropdown-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: 0.3s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cart-dropdown-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ff4757;
  transform: rotate(90deg);
}

/* ===== CART DROPDOWN ITEMS ===== */
.cart-dropdown-items {
  max-height: 380px;
  overflow-y: auto;
  padding: 15px 20px;
}

.cart-dropdown-items::-webkit-scrollbar {
  width: 8px;
}

.cart-dropdown-items::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin: 5px;
}

.cart-dropdown-items::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(0, 255, 255, 0.5));
  border-radius: 10px;
}

.cart-dropdown-items::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.5), rgba(0, 255, 255, 0.7));
}

.cart-dropdown-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-dropdown-item:hover {
  background: rgba(0, 255, 255, 0.05);
  border-color: rgba(0, 255, 255, 0.2);
  transform: translateX(5px);
}

.cart-dropdown-item-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #1a1a1a;
  border-radius: 10px;
  padding: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-dropdown-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-dropdown-item-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.cart-dropdown-item-details {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #888;
}

.cart-dropdown-item-details span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-dropdown-item-details i {
  color: #00ffff;
}

.cart-dropdown-item-price {
  font-size: 17px;
  font-weight: bold;
  color: #00ffff;
}

.cart-dropdown-item-quantity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.quantity-btn-cart {
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 6px;
  color: #00ffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  transition: 0.3s;
}

.quantity-btn-cart:hover {
  background: rgba(0, 255, 255, 0.2);
  transform: scale(1.1);
}

.quantity-btn-cart:active {
  transform: scale(0.95);
}

.quantity-value-cart {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  min-width: 30px;
  text-align: center;
}

.cart-dropdown-item-remove {
  background: transparent;
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff4757;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
  padding: 8px;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
}

.cart-dropdown-item-remove:hover {
  background: rgba(255, 71, 87, 0.2);
  border-color: #ff4757;
  transform: scale(1.1);
}

/* ===== EMPTY CART STATE ===== */
.cart-dropdown-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.cart-dropdown-empty i {
  font-size: 80px;
  color: rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.cart-dropdown-empty h4 {
  font-size: 18px;
  color: #aaa;
  margin: 0 0 10px 0;
}

.cart-dropdown-empty p {
  font-size: 14px;
  margin: 0 0 20px 0;
  color: #666;
}

.btn-start-shopping {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #00ffff, #00cccc);
  color: #000;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  transition: 0.3s;
  border: none;
  cursor: pointer;
}

.btn-start-shopping:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

/* ===== CART DROPDOWN FOOTER ===== */
.cart-dropdown-footer {
  padding: 20px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.cart-dropdown-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-dropdown-subtotal-label {
  font-size: 15px;
  color: #aaa;
  font-weight: 500;
}

.cart-dropdown-subtotal-value {
  font-size: 24px;
  font-weight: bold;
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.cart-dropdown-actions {
  display: flex;
  gap: 12px;
}

.btn-view-full-cart,
.btn-checkout-now {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-view-full-cart {
  background: transparent;
  border: 2px solid #00ffff;
  color: #00ffff;
}

.btn-view-full-cart:hover {
  background: rgba(0, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-checkout-now {
  background: linear-gradient(135deg, #00ffff, #00cccc);
  color: #000;
  box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

.btn-checkout-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.5);
}

/* ===== ANIMATIONS ===== */
@keyframes bounceIn {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.navbar-cart-btn.shake {
  animation: shake 0.5s ease;
}

/* ===== ITEM ADD ANIMATION ===== */
@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.cart-dropdown-item.new-item {
  animation: slideInRight 0.5s ease;
}

/* ===== NOTIFICATION TOAST ===== */
.cart-toast {
  position: fixed;
  top: 90px;
  right: 30px;
  background: linear-gradient(135deg, #00ffff, #00cccc);
  color: #000;
  padding: 15px 25px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
  z-index: 10001;
  box-shadow: 0 8px 30px rgba(0, 255, 255, 0.5);
  animation: slideInRight 0.5s ease;
}

.cart-toast i {
  font-size: 24px;
}

.cart-toast.hiding {
  animation: slideOutRight 0.5s ease;
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar-cart-dropdown {
    width: calc(100vw - 40px);
    right: 20px;
    left: 20px;
  }

  .navbar-cart-dropdown::before,
  .navbar-cart-dropdown::after {
    right: 60px;
  }

  .cart-dropdown-items {
    max-height: 300px;
  }

  .cart-dropdown-item {
    padding: 12px;
    gap: 12px;
  }

  .cart-dropdown-item-image {
    width: 70px;
    height: 70px;
  }

  .cart-toast {
    right: 20px;
    left: 20px;
    top: 80px;
  }
}

@media (max-width: 480px) {
  .navbar-cart-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .navbar-cart-badge {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .cart-dropdown-header,
  .cart-dropdown-footer {
    padding: 15px;
  }

  .cart-dropdown-items {
    padding: 10px;
    max-height: 250px;
  }

  .cart-dropdown-item {
    padding: 10px;
    gap: 10px;
  }

  .cart-dropdown-item-image {
    width: 60px;
    height: 60px;
  }

  .cart-dropdown-item-name {
    font-size: 14px;
  }

  .cart-dropdown-subtotal-value {
    font-size: 20px;
  }

  .btn-view-full-cart,
  .btn-checkout-now {
    padding: 12px;
    font-size: 13px;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .navbar-cart-dropdown {
    border-width: 3px;
  }

  .cart-dropdown-item {
    border-width: 2px;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .navbar-cart-dropdown,
  .cart-dropdown-item,
  .navbar-cart-btn,
  .cart-toast {
    transition: none;
    animation: none;
  }
}