:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --light: #f8f9fa;
  --dark: #212529;
  --accent: #f72585;
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

body {
  /* background-color: #f5f7ff;
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: linear-gradient(135deg, #f5f7ff 0%, #e6e9ff 100%);
  min-height: 100vh;
  transition: all 0.3s ease;*/
}

body.cart-open {
  overflow: hidden;
}

.header {
  background: var(--gradient);
  color: white;
  padding: 30px 0;
  margin-bottom: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(67, 97, 238, 0.3);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: rotate(30deg);
}

.card {
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s;
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: none;
  background: white;
  height: 100%;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  height: 180px;
  object-fit: cover;
  padding: 20px;
  background: linear-gradient(45deg, #f0f4ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-top img {
  max-height: 140px;
  max-width: 100%;
  transition: all 0.3s;
}

.card:hover .card-img-top img {
  transform: scale(1.05);
}

.cart-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 4px;
  background: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
}

.cart-item-image {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 15px;
  background: #efefef;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px;
}

.cart-item-image img {
  max-width: 100%;
  max-height: 100%;
}

.cart-item-content {
  flex: 1;
}

.empty-cart {
  text-align: center;
  padding: 50px 20px;
  color: #6c757d;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
}

.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1050;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.summary-card {
  border-radius: 15px;
  /* padding: 25px;
      background: white;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
            border-top: 4px solid var(--success);*/
}

.product-price {
  color: var(--primary);
  font-weight: bold;
  font-size: 1.3rem;
}

.quantity-control {
  display: flex;
  align-items: center;
  margin-top: 12px;
}

.btn-quantity {
  color: #000;
  border: none;
  background: #efefef;
  font-size: 16px;
}
.btn-quantity:hover {
  background: rgba(0, 90, 255, 0.1);
  color: rgba(0, 90, 255, 1);
}
.btn-quantity:hover i {
  color: #005aff;
}

.quantity-input {
  width: 50px;
  text-align: center;
  margin: 0 10px;
  border: 1px solid #fff;
  border-radius: 6px;
  font-weight: bold;
  font-size: 12px;
}

.item-subtotal {
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
}

.cart-product-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--dark);
}

.product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.cart-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-quantity {
  padding: 3px 7px;
}

.feature-badge {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-content {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border: none;
}

.modal-header {
  background: var(--gradient);
  color: white;
}

.email-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 15px;
  background: rgba(67, 97, 238, 0.1);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.progress-container {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin: 15px 0 10px 0;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  width: 0%;
  transition: width 0.5s;
}

.shopping-bag {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.3);
}

.feature-highlight {
  background: rgba(67, 97, 238, 0.08);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  border-left: 4px solid var(--primary);
}

.category-badge {
  cursor: pointer;
  transition: all 0.3s;
}

.category-badge:hover,
.category-badge.active {
  background: var(--primary);
  transform: translateY(-2px);
}

.search-container {
  position: relative;
  margin-bottom: 20px;
}

.search-container i {
  position: absolute;
  left: 15px;
  top: 12px;
  color: #6c757d;
}

.search-container input {
  padding-left: 40px;
  border-radius: 30px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-card {
  height: 100%;
}

.section-title {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 20px;
  color: var(--dark);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.logo {
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 1px;
}

.logo i {
  color: var(--accent);
  margin-right: 10px;
}

.navbar {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 10px 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.discount-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent);
  color: white;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  z-index: 2;
}

.product-meta {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 10px;
}

.btn-primary {
  background: rgba(40, 120, 255, 1);
  border-color: rgba(40, 120, 255, 1);
}
.remove-item {
  background: rgba(239, 239, 239, 1);
  border: none;
  color: #000;
}
.remove-item:hover {
  background-color: rgba(239, 239, 239, 1) !important;
  border: none;
  color: #000;
}
.btn-primary:hover {
  background: rgba(40, 120, 255, 1);
  border-color: rgba(40, 120, 255, 1);
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  background: rgba(0, 90, 255, 1);
  border-radius: 20px;
  width: 200px;
  margin: auto;
}

.btn-success:hover {
  background: rgba(0, 90, 255, 1);
  border-color: rgba(0, 90, 255, 1);
}

.btn-outline-danger:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  z-index: 10000;
  pointer-events: none;
}

/* 右侧购物车样式 */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background-color: #efefef;
  z-index: 1000;
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
  background: #000;
  z-index: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.close-cart {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fcfcfc;
  margin-right: 15px;
  transition: all 0.3s;
  padding: 15px 10px;
  background: #005aff;
}

.cart-title {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 10px;
}

.cart-title-badge {
  background-color: var(--accent);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.clear-cart-top {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
  padding: 15px;
}

/* 购物车列表带滚动条 */
.cart-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px;
  margin-top: 10px;
}

.cart-list {
  padding-bottom: 20px;
}

.cart-footer {
  padding: 10px;
}

.fs-7 {
  font-size: 12px;
}
.cat_cent .c_t_l {
  line-height: 30px;
  padding: 10px;
}

.email-form {
  padding: 20px 10px 20px 20px;
  background: rgba(255, 255, 255, 1);
  border-radius: 4px;
}
.md-text {
  text-align: left;
}
.md-text h5 {
  font-size: 14px;
  font-weight: 700;
}

.form-control::placeholder {
  font-size: 12px;
}
/* 滚动条样式 */
.cart-list-container::-webkit-scrollbar {
  width: 8px;
}

.cart-list-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.cart-list-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.cart-list-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

@media (max-width: 992px) {
  .sticky-top {
    position: relative;
    top: 0;
  }

  .cart-sidebar {
    width: 90%;
    right: -90%;
  }
}

@media (max-width: 576px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .cart-item-image {
    width: 60px;
    height: 60px;
  }
}
.enmail-title {
  font-size: 14px;
  color: #000;
}
/* 购物车图标容器 */
.cart-icon-container {
  position: relative;
  display: inline-block;
  margin-right: 5px;
  color: #005aff;
  cursor: pointer;
}

.cart-icon-badge {
  position: absolute;
  top: -0px;
  right: -8px;
  background-color: rgba(250, 47, 47, 1);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* 新增成功模态框样式 */
.success-modal .modal-content {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border: none;
}

.success-modal .modal-header {
  background: var(--gradient);
  color: white;
  border-bottom: none;
  padding: 20px;
}

.success-modal .modal-body {
  padding: 30px 0 0 0;
  text-align: center;
}

.success-icon {
  font-size: 4rem;
  color: #28a745;
  margin-bottom: 20px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.success-modal .modal-footer {
  border-top: none;
  justify-content: center;
  padding: 0 0 30px 0;
}

.success-modal .btn-continue {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 30px;
  padding: 8px 25px;
  transition: all 0.3s;
}

.success-modal .btn-continue:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}
