* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #f5f5f5;
  color: #111111;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

/* Mobile Header - Larger for mobile */
.mobile-header {
  background: linear-gradient(135deg, #111111 0%, #2d2d2d 100%);
  padding: 25px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 5%;
}

.logo {
  font-size: 32px;
  font-weight: 900;
  color: white;
  text-decoration: none;
  letter-spacing: -1px;
}

.logo span {
  color: #ff6b35;
}

.header-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

.cart-icon {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff6b35;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.back-btn {
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Main Content - Full width on mobile */
.cart-container {
  padding: 20px;
  max-width: 100%;
}

.cart-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 30px;
  color: #111111;
  padding-left: 10px;
}

/* Empty Cart State - Mobile Optimized */
.empty-cart {
  background: white;
  border-radius: 20px;
  padding: 60px 30px;
  text-align: center;
  margin: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.empty-cart i {
  font-size: 80px;
  margin-bottom: 30px;
  color: #ff6b35;
  opacity: 0.8;
}

.empty-cart h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #111111;
}

.empty-cart p {
  color: #666;
  font-size: 18px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.continue-btn {
  display: inline-block;
  background: #111111;
  color: white;
  padding: 20px 40px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  border-radius: 15px;
  transition: all 0.3s;
  width: 100%;
  max-width: 300px;
}

.continue-btn:hover {
  background: #ff6b35;
  transform: translateY(-2px);
}

/* Login Prompt - Mobile Optimized */
.login-prompt {
  background: white;
  border-radius: 20px;
  padding: 60px 30px;
  text-align: center;
  margin: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.login-prompt i {
  font-size: 80px;
  color: #ff6b35;
  margin-bottom: 30px;
}

.login-prompt h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #111111;
}

.login-prompt p {
  color: #666;
  font-size: 18px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.login-btn {
  display: inline-block;
  background: #ff6b35;
  color: white;
  padding: 20px 40px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  border-radius: 15px;
  transition: all 0.3s;
  width: 100%;
  max-width: 300px;
}

.login-btn:hover {
  background: #ff8535;
  transform: translateY(-2px);
}

/* Cart Items - Mobile Optimized */
.cart-items-container {
  margin-bottom: 30px;
}

.cart-item {
  background: white;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.item-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.item-image {
  width: 120px;
  height: 120px;
  border-radius: 15px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

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

.item-info {
  flex: 1;
}

.item-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #111111;
  line-height: 1.3;
}

.item-details {
  color: #666;
  font-size: 16px;
  margin-bottom: 15px;
}

.item-price {
  font-size: 24px;
  font-weight: 800;
  color: #111111;
}

/* Item Actions - Mobile Optimized */
.item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.remove-btn {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 18px;
  font-weight: 600;
  padding: 15px 25px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.remove-btn:active {
  background: rgba(220, 53, 69, 0.1);
  transform: scale(0.95);
}

/* Order Summary - Mobile Optimized */
.order-summary {
  background: white;
  border-radius: 20px;
  padding: 30px;
  margin-top: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  bottom: 20px;
  margin-bottom: 20px;
}

.summary-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 25px;
  color: #111111;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.summary-row.total {
  font-size: 24px;
  font-weight: 800;
  color: #111111;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 30px;
}

.checkout-btn {
  width: 100%;
  padding: 25px;
  background: #111111;
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.checkout-btn:active {
  background: #ff6b35;
  transform: translateY(-2px);
}

.checkout-btn {
  transition: 0.5s ease-in-out;
}

.checkout-btn:hover {
  background-color: rgba(156, 241, 139, 0.265);
  color: black;
}

/* Loading State */
.loading-container {
  text-align: center;
  padding: 100px 20px;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f5f5f5;
  border-top-color: #ff6b35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 30px;
}

.loading-text {
  font-size: 20px;
  color: #666;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error State */
.error-container {
  text-align: center;
  padding: 100px 20px;
}

.error-icon {
  font-size: 80px;
  color: #ff6b35;
  margin-bottom: 30px;
}

.error-text {
  font-size: 20px;
  color: #111111;
  margin-bottom: 30px;
}

.retry-btn {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 20px 40px;
  border-radius: 15px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.retry-btn:active {
  transform: scale(0.95);
}

/* Desktop Responsive */
@media (min-width: 768px) {
  .cart-container {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 5%;
    padding: 40px 20px;
  }

  .cart-title {
    font-size: 42px;
  }

  .cart-item {
    flex-direction: row;
    align-items: center;
  }

  .item-header {
    flex: 1;
  }

  .item-actions {
    border-top: none;
    padding-top: 0;
    width: 300px;
  }

  .order-summary {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
  }
}

/* Large Mobile */
@media (min-width: 480px) and (max-width: 767px) {
  .cart-item {
    padding: 30px;
  }

  .item-image {
    width: 140px;
    height: 140px;
  }

  .item-name {
    font-size: 22px;
  }
}
