/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* User Menu */
.user-menu {
  margin-left: auto;
}

.user-menu a {
  white-space: nowrap;
}

/* Main Content */
main {
  padding: 2rem 0;
  flex: 1;
}

.page-title {
  text-align: center;
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 3rem;
  animation: fadeIn 0.5s ease;
}

/* Cart Container */
.cart-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  animation: fadeIn 0.5s ease;
}

/* Cart Items Section */
.cart-items-section {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cart-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.cart-header-bar h2 {
  font-size: 1.8rem;
  color: #2c3e50;
}

.clear-cart-btn {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.clear-cart-btn:hover {
  background: linear-gradient(135deg, #ff5252, #ff4444);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

/* Empty Cart Message */
.empty-cart-message {
  display: none;
  text-align: center;
  padding: 4rem 2rem;
  color: #7f8c8d;
}

.empty-cart-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.empty-cart-message h3 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.empty-cart-message p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.empty-cart-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.continue-shopping-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
}

.continue-shopping-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.continue-shopping-btn.secondary {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.continue-shopping-btn.secondary:hover {
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

/* Cart Items */
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 1.5rem;
  align-items: center;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  animation: slideIn 0.3s ease;
}

.cart-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateX(5px);
}

.item-image {
  font-size: 3.5rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.item-details h4 {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 0.3rem;
}

.item-breed {
  color: #667eea;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.item-quantity {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.item-price {
  font-size: 1.4rem;
  font-weight: bold;
  color: #27ae60;
  min-width: 100px;
  text-align: right;
}

.remove-btn {
  background: #e74c3c;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background: #c0392b;
  transform: scale(1.1);
}

/* Order Summary Section */
.order-summary-section {
  display: flex;
  flex-direction: column;
}

.summary-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease;
}

.summary-card h2 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #555;
}

.summary-row.total {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
  margin-top: 1rem;
}

.summary-row.total span:last-child {
  color: #27ae60;
  font-size: 1.8rem;
}

.summary-divider {
  height: 2px;
  background: linear-gradient(to right, #667eea, #764ba2);
  margin: 1.5rem 0;
}

.checkout-btn {
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1.5rem;
}

.checkout-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #229954, #27ae60);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.checkout-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
}

.payment-methods {
  margin-top: 1.5rem;
  text-align: center;
}

.payment-methods p {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.payment-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 2rem;
}

/* Footer */
footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.close:hover {
  transform: scale(1.2);
}

.modal-body {
  padding: 2rem;
}

.auth-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.auth-tab {
  flex: 1;
  padding: 0.8rem;
  border: none;
  background: #f8f9fa;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.auth-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.forgot-password {
  text-align: center;
  margin-top: 1rem;
}

.forgot-password a {
  color: #667eea;
  text-decoration: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .cart-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .order-summary-section {
    position: sticky;
    bottom: 0;
    background: #f8f9fa;
    padding: 1rem 0;
    z-index: 10;
  }
}

@media (max-width: 768px) {
  .nav-links {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  .page-title {
    font-size: 2rem;
  }

  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    position: relative;
    padding: 1rem;
  }

  .item-image {
    width: 60px;
    height: 60px;
    font-size: 2.5rem;
  }

  .item-price {
    grid-column: 2;
    text-align: left;
    margin-top: 0.5rem;
    font-size: 1.2rem;
  }

  .remove-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }

  .empty-cart-actions {
    flex-direction: column;
    align-items: center;
  }

  .continue-shopping-btn {
    width: 100%;
    max-width: 300px;
  }

  .cart-header-bar {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .clear-cart-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .cart-items-section,
  .summary-card {
    padding: 1.5rem;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .nav-links {
    gap: 0.3rem;
  }

  .nav-links a {
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
  }
}