/* Cart Page Specific Styles */

/* Cart Hero Section */
.cart-hero {
  background: var(--sqube-red);
  position: relative;
  overflow: hidden;
}

.cart-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

/* Cart Items */
.cart-item {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cart-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.cart-item:hover::before {
  left: 100%;
}

.cart-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.cart-item img {
  transition: transform 0.3s ease;
}

.cart-item:hover img {
  transform: scale(1.05);
}

/* Remove Button */
.cart-remove-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cart-remove-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.cart-remove-btn:hover::before {
  left: 100%;
}

.cart-remove-btn:hover {
  transform: scale(1.1);
  background: #dc2626;
}

/* Quantity Controls */
.quantity-control {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quantity-control::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.quantity-control:hover::before {
  left: 100%;
}

.quantity-control:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quantity-control button {
  transition: all 0.3s ease;
}

.quantity-control button:hover {
  background: var(--sqube-red);
  color: white;
  transform: scale(1.1);
}

/* Order Summary */
.order-summary {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.order-summary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.order-summary:hover::before {
  left: 100%;
}

.order-summary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Checkout Button */
.checkout-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.checkout-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.checkout-btn:hover::before {
  left: 100%;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.3);
}

/* Coupon Code Section */
.coupon-section {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.coupon-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.coupon-section:hover::before {
  left: 100%;
}

.coupon-section input {
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

.coupon-section input:focus {
  border-color: var(--sqube-red);
  box-shadow: 0 0 0 3px rgba(138, 0, 0, 0.1);
  transform: translateY(-1px);
}

.coupon-section button {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.coupon-section button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.coupon-section button:hover::before {
  left: 100%;
}

.coupon-section button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.3);
}

/* Continue Shopping */
.continue-shopping {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.continue-shopping::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.continue-shopping:hover::before {
  left: 100%;
}

.continue-shopping:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.continue-shopping a {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.continue-shopping a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(138, 0, 0, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.continue-shopping a:hover::before {
  left: 100%;
}

.continue-shopping a:hover {
  transform: translateX(4px);
  background: var(--sqube-cream);
}

/* Recommended Products */
.recommended-product {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.recommended-product::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.recommended-product:hover::before {
  left: 100%;
}

.recommended-product:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.recommended-product img {
  transition: transform 0.3s ease;
}

.recommended-product:hover img {
  transform: scale(1.05);
}

.recommended-product button {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.recommended-product button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.recommended-product button:hover::before {
  left: 100%;
}

.recommended-product button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.3);
}

/* Empty Cart State */
.empty-cart {
  transition: all 0.3s ease;
}

.empty-cart button {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.empty-cart button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.empty-cart button:hover::before {
  left: 100%;
}

.empty-cart button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.3);
}

/* Loading Animation for Cart Items */
.cart-item.loading {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered Animation for Cart Grid */
.cart-item:nth-child(1) {
  animation-delay: 0.1s;
}
.cart-item:nth-child(2) {
  animation-delay: 0.2s;
}
.cart-item:nth-child(3) {
  animation-delay: 0.3s;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .order-summary {
    position: static;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .cart-hero {
    padding: 3rem 0;
  }

  .cart-hero h1 {
    font-size: 2rem;
  }

  .cart-item {
    flex-direction: column;
    gap: 1rem;
  }

  .cart-item img {
    width: 100%;
    height: 200px;
  }

  .quantity-control {
    justify-content: center;
  }

  .recommended-product {
    margin-bottom: 1rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .cart-item {
    background: #1f2937;
    border: 1px solid #374151;
  }

  .cart-item:hover {
    background: #111827;
    border-color: var(--sqube-red);
  }

  .order-summary {
    background: #1f2937;
    border: 1px solid #374151;
  }

  .coupon-section {
    background: #1f2937;
    border: 1px solid #374151;
  }

  .continue-shopping {
    background: #1f2937;
    border: 1px solid #374151;
  }

  .recommended-product {
    background: #1f2937;
    border: 1px solid #374151;
  }
}

/* Print Styles */
@media print {
  .cart-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .cart-item:hover {
    transform: none;
  }

  .cart-remove-btn,
  .quantity-control,
  .checkout-btn {
    display: none;
  }

  .recommended-products {
    display: none;
  }

  .continue-shopping {
    display: none;
  }
}
