:root {
  --cart-bg: linear-gradient(135deg, #1a0033 0%, #2d0052 100%);
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent-purple: #9d4edd;
  --accent-pink: #f4c2c2;
  --hover-purple: #b366ff;
}

/* ========== CART SECTION ========== */
.cart-section {
  background: var(--cart-bg);
  padding: 90px 6% 120px;
  min-height: 80vh;
}

/* ========== EMPTY CART STATE ========== */
.empty-cart {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 20px;
  animation: fadeIn 0.6s ease-in-out;
}

.empty-cart-icon {
  font-size: 6rem;
  color: var(--accent-purple);
  margin-bottom: 30px;
  opacity: 0.3;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-title {
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.empty-cart-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cart-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #b366ff 100%);
  color: #fff;
  padding: 16px 40px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 12px 28px rgba(157, 78, 221, 0.4);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(157, 78, 221, 0.6);
  background: linear-gradient(135deg, #b366ff 0%, var(--accent-purple) 100%);
}

.cart-login {
  margin-top: 32px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.cart-login-link {
  color: var(--accent-purple);
  font-weight: 700;
  transition: color 0.3s ease;
}

.cart-login-link:hover {
  color: var(--hover-purple);
  text-decoration: underline;
}

/* ========== CART WITH ITEMS ========== */
.cart-with-items {
  animation: fadeIn 0.6s ease-in-out;
}

.cart-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ========== CART ITEMS SECTION ========== */
.cart-items-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--card-border);
}

.cart-page-title {
  color: var(--text-primary);
  font-size: 2.2rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

.cart-item-count {
  color: var(--text-secondary);
  font-size: 1.1rem;
  background: rgba(157, 78, 221, 0.2);
  padding: 8px 20px;
  border-radius: 20px;
}

.cart-item-count span {
  color: var(--accent-purple);
  font-weight: 700;
}

/* ========== CART ITEMS LIST ========== */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  transition: all 0.3s ease;
  animation: slideIn 0.4s ease-out;
}

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

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.cart-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(157, 78, 221, 0.2);
}

.cart-item-image {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cart-item:hover .cart-item-image img {
  transform: scale(1.1);
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-name {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'Poppins', sans-serif;
}

.cart-item-category {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.cart-item-price {
  color: var(--accent-purple);
  font-size: 1.4rem;
  font-weight: 700;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.remove-item-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px;
}

.remove-item-btn:hover {
  color: #ff4757;
  transform: scale(1.2);
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 25px;
  padding: 8px 16px;
}

.quantity-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.quantity-btn:hover {
  background: var(--accent-purple);
  transform: scale(1.1);
}

.quantity-value {
  color: var(--text-primary);
  font-weight: 600;
  min-width: 30px;
  text-align: center;
  font-size: 1.1rem;
}

/* ========== CART SUMMARY ========== */
.cart-summary {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 35px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.summary-title {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 25px;
  font-family: 'Poppins', sans-serif;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.summary-row span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.shipping-info {
  font-size: 0.95rem;
  font-style: italic;
}

.summary-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-border), transparent);
  margin: 20px 0;
}

.summary-total {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--card-border);
}

.summary-total span {
  color: var(--accent-purple);
  font-size: 1.5rem;
}

.checkout-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #b366ff 100%);
  color: #fff;
  border: none;
  padding: 18px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.15rem;
  cursor: pointer;
  margin-top: 25px;
  box-shadow: 0 12px 28px rgba(157, 78, 221, 0.4);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(157, 78, 221, 0.6);
  background: linear-gradient(135deg, #b366ff 0%, var(--accent-purple) 100%);
}

.continue-shopping-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 20px;
  transition: all 0.3s ease;
  padding: 10px;
}

.continue-shopping-link:hover {
  color: var(--accent-purple);
  gap: 12px;
}

.payment-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--card-border);
  font-size: 1.8rem;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
  .cart-content-wrapper {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: relative;
    top: 0;
  }
}

@media (max-width: 768px) {
  .cart-section {
    padding: 60px 4% 80px;
  }

  .cart-title {
    font-size: 2.2rem;
  }

  .empty-cart-icon {
    font-size: 4.5rem;
  }

  .cart-items-section {
    padding: 25px;
  }

  .cart-page-title {
    font-size: 1.8rem;
  }

  .cart-item {
    grid-template-columns: 90px 1fr;
    gap: 15px;
  }

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

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .cart-item-name {
    font-size: 1.1rem;
  }

  .cart-item-price {
    font-size: 1.2rem;
  }

  .cart-summary {
    padding: 25px;
  }
}

@media (max-width: 480px) {
  .cart-title {
    font-size: 1.8rem;
  }

  .empty-cart-text {
    font-size: 1rem;
  }

  .cart-cta {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .cart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .checkout-btn {
    font-size: 1rem;
    padding: 16px 24px;
  }
}

/* ========== MODAL STYLES ========== */
.checkout-modal,
.success-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

.modal-content,
.success-content {
  background: linear-gradient(145deg, #1a0033 0%, #2d0052 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 95%;
  max-width: 420px;
  padding: 30px;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  right: 25px;
  top: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: #fff;
}

.modal-content h2 {
  color: #ffffff;
  margin-bottom: 8px;
  font-size: 1.6rem;
}

.modal-content p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  color: #ffffff;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #9d4edd;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(157, 78, 221, 0.3);
}

.order-summary-mini {
  background: rgba(157, 78, 221, 0.1);
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 15px;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.mini-row span:last-child {
  color: #ffffff;
  font-weight: 700;
}

.payment-method-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9d4edd;
  font-weight: 600;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.place-order-btn {
  width: 100%;
  background: linear-gradient(135deg, #9d4edd 0%, #b366ff 100%);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(157, 78, 221, 0.3);
}

.place-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(157, 78, 221, 0.5);
}

/* Success Content */
.success-content {
  text-align: center;
}

.success-icon {
  font-size: 5rem;
  color: #10b981;
  margin-bottom: 20px;
  animation: successIn 0.5s ease-out;
}

@keyframes successIn {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.success-content h2 {
  color: #fff;
  font-size: 2.22rem;
  margin-bottom: 15px;
}

.success-content p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.order-id {
  background: rgba(255, 255, 255, 0.05);
  display: inline-block;
  padding: 8px 20px;
  border-radius: 8px;
  margin: 20px 0;
  color: #fff !important;
  font-weight: 600;
}

.home-btn {
  background: transparent;
  border: 2px solid #9d4edd;
  color: #fff;
  padding: 14px 40px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 30px;
  transition: all 0.3s ease;
}

.home-btn:hover {
  background: #9d4edd;
  box-shadow: 0 10px 20px rgba(157, 78, 221, 0.3);
}