/* Cart Page */
.cart-page {
  min-height: 100vh;
  padding: 2rem 0;
}

.cart-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.cart-header h1 {
  color: #2c3e50;
  margin-bottom: 1rem;
  position: relative;
}

.cart-header h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-radius: 2px;
}

.cart-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding: 0 20px;
}

/* Cart Items */
.cart-items {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cart-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f3f4;
}

.cart-items-header h2 {
  color: #2c3e50;
  margin: 0;
}

.cart-items-count {
  color: #666;
  font-size: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.3s ease;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item:hover {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 0 -1.5rem;
}

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.cart-item-platform {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  width: fit-content;
}

.cart-item-platform.xbox {
  background: linear-gradient(135deg, #107c10, #0f5f0f);
  color: white;
}

.cart-item-platform.pc {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.cart-item-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: #27ae60;
}

.cart-item-price.original {
  text-decoration: line-through;
  color: #95a5a6;
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

/* Quantity Controls */
.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 2px solid #e1e8ed;
  border-radius: 25px;
  overflow: hidden;
  background: white;
}

.quantity-btn {
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 1.2rem;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
}

.quantity-btn:hover {
  background: #f8f9fa;
  color: #3498db;
}

.quantity-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.quantity-btn:disabled:hover {
  background: none;
  color: #ccc;
}

.quantity-display {
  padding: 8px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  min-width: 50px;
  text-align: center;
  border-left: 1px solid #e1e8ed;
  border-right: 1px solid #e1e8ed;
}

.cart-item-total {
  font-size: 1.3rem;
  font-weight: 700;
  color: #27ae60;
  text-align: right;
  min-width: 100px;
}

/* Remove Button */
.remove-item-btn {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.remove-item-btn:hover {
  background: #e74c3c;
  color: white;
  transform: scale(1.1);
}

/* Cart Summary */
.cart-summary {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.cart-summary h2 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  text-align: center;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f3f4;
}

.summary-item:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: #2c3e50;
}

.summary-label {
  color: #666;
}

.summary-value {
  font-weight: 600;
  color: #2c3e50;
}

.summary-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: #27ae60;
}

.cart-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.continue-shopping-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.continue-shopping-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
  color: white;
}

/* Empty Cart */
.empty-cart {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 0 auto;
}

.empty-cart-content h2 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.empty-cart-content p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.browse-games-btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.browse-games-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
  color: white;
}

/* Cart Item Animations */
.cart-item {
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.cart-item.removing {
  animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* Responsive Design */
@media (max-width: 1280px) {
  .cart-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .cart-page {
    padding: 1rem 0;
  }

  .cart-header {
    margin-bottom: 2rem;
    padding: 1rem 0;
  }

  .cart-header h1 {
    font-size: 2rem;
  }

  .cart-content {
    padding: 0 15px;
  }

  .cart-items {
    padding: 1.5rem;
  }

  .cart-item {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "image details"
      "image quantity"
      "image total"
      "image remove";
    padding: 1rem 0;
    gap: 0.5rem 1rem;
  }

  .cart-item-image {
    width: 80px;
    height: 80px;
  }

  .cart-item-details {
    grid-area: details;
  }

  .cart-item-quantity {
    grid-area: quantity;
  }

  .cart-item-total {
    grid-area: total;
    text-align: left;
    margin-left: 0;
  }

  .cart-item-remove {
    grid-area: remove;
    align-self: end;
  }

  .remove-item-btn {
    width: 100%;
    padding: 10px;
    margin: 0;
    text-align: center;
  }

  .cart-summary {
    position: static;
    margin-top: 2rem;
  }

  .empty-cart {
    padding: 3rem 1.5rem;
    margin: 0 15px;
  }

  .empty-cart-content h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 360px) {
  .cart-header h1 {
    font-size: 1.8rem;
  }

  .cart-items {
    padding: 1rem;
  }

  .cart-item {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "details"
      "quantity"
      "total"
      "remove";
    text-align: center;
  }

  .cart-item-image {
    margin: 0 auto 1rem;
  }

  .cart-item-details {
    grid-area: details;
  }

  .cart-item-quantity {
    grid-area: quantity;
    justify-self: center;
  }

  .cart-item-total {
    grid-area: total;
    text-align: center;
    margin-bottom: 1rem;
  }

  .cart-item-remove {
    grid-area: remove;
  }

  .cart-summary {
    padding: 1.5rem;
  }

  .empty-cart {
    padding: 2rem 1rem;
  }

  .empty-cart-content h2 {
    font-size: 1.5rem;
  }
}
