
/* ============================================
   配置产品页 v2.0 - 小票风格订单汇总
   ============================================ */

/* === 布局结构 === */
.cc-config-wrap {
  padding: 24px 32px;
  display: flex;
  gap: 28px;
  min-height: calc(100vh - 180px);
}

.cc-config-main {
  flex: 1;
  min-width: 0;
}

.cc-config-sidebar {
  width: 360px;
  flex-shrink: 0;
}

/* === 顶部面包屑导航 === */
.cc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}

.cc-breadcrumb a {
  color: var(--cc-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.cc-breadcrumb a:hover {
  color: var(--cc-blue);
}

.cc-breadcrumb-sep {
  color: #cbd5e1;
}

.cc-breadcrumb-current {
  color: var(--cc-text);
  font-weight: 600;
}

/* === 提示卡片 === */
.cc-config-tip {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid rgba(16, 185, 129, .25);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cc-config-tip-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cc-config-tip-text {
  font-size: 14px;
  color: #065f46;
  line-height: 1.6;
}

/* === 产品配置主卡片 === */
.cc-config-card {
  background: #fff;
  border: 1px solid var(--cc-border);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(15,23,42,.05);
  overflow: hidden;
}

.cc-config-header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

.cc-config-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%);
  pointer-events: none;
}

.cc-config-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
}

.cc-config-title-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.cc-config-subtitle {
  color: rgba(255,255,255,.8);
  font-size: 13px;
  margin-top: 4px;
  font-weight: 400;
}

.cc-config-body {
  padding: 28px;
}

/* === 错误提示 === */
.cc-alert {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  color: #dc2626;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cc-alert i {
  font-size: 20px;
  flex-shrink: 0;
}

/* === 配置区块 === */
.cc-config-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px dashed rgba(226, 232, 240, .8);
}

.cc-config-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.cc-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--cc-text);
  margin-bottom: 16px;
}

.cc-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--cc-blue), var(--cc-blue-600));
  border-radius: 2px;
}

/* === 表单行样式 === */
.cc-form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 18px;
}

.cc-form-row:last-child {
  margin-bottom: 0;
}

.cc-form-label {
  width: 130px;
  flex-shrink: 0;
  padding-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cc-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cc-form-label .help-icon {
  color: var(--cc-blue);
  cursor: help;
  font-size: 16px;
}

.cc-form-content {
  flex: 1;
  min-width: 0;
}

/* === 下拉选择框优化 === */
.cc-form-select {
  width: 260px;
  max-width: 100%;
  height: 46px;
  padding: 0 40px 0 16px;
  border: 2px solid var(--cc-border);
  border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 14px center/18px no-repeat;
  font-size: 14px;
  color: var(--cc-text);
  cursor: pointer;
  transition: all .2s ease;
  appearance: none;
}

.cc-form-select:hover {
  border-color: rgba(37, 99, 235, .4);
}

.cc-form-select:focus {
  outline: none;
  border-color: var(--cc-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

/* === 按钮组选项 - 全新设计 === */
.cc-option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cc-option-btn {
  position: relative;
  min-width: 90px;
  height: 44px;
  padding: 0 18px;
  border: 2px solid var(--cc-border);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--cc-text);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cc-option-btn:hover {
  border-color: rgba(37, 99, 235, .5);
  background: #f8faff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .1);
}

.cc-option-btn.active,
.cc-option-btn:has(input:checked) {
  border-color: var(--cc-blue);
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--cc-blue);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(37, 99, 235, .15);
}

.cc-option-btn input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  left: 0;
  top: 0;
}

/* === 周期选择器 - 卡片风格 === */
.cc-cycle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cc-cycle-card {
  position: relative;
  min-width: 110px;
  padding: 14px 20px;
  border: 2px solid var(--cc-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.cc-cycle-card:hover {
  border-color: rgba(37, 99, 235, .4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.cc-cycle-card.active,
.cc-cycle-card:has(input:checked) {
  border-color: var(--cc-blue);
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .2);
}

.cc-cycle-card input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  cursor: pointer;
}

.cc-cycle-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--cc-text);
}

.cc-cycle-discount {
  position: absolute;
  top: -10px;
  right: -10px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, .3);
}

/* === 输入框优化 === */
.cc-form-input {
  height: 46px;
  padding: 0 16px;
  border: 2px solid var(--cc-border);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  color: var(--cc-text);
  transition: all .2s ease;
}

.cc-form-input:hover {
  border-color: rgba(37, 99, 235, .4);
}

.cc-form-input:focus {
  outline: none;
  border-color: var(--cc-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.cc-form-input::placeholder {
  color: #94a3b8;
}

/* === 密码输入组 === */
.cc-password-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-password-input {
  width: 240px;
}

.cc-password-btn {
  width: 46px;
  height: 46px;
  border: 2px solid var(--cc-border);
  border-radius: 12px;
  background: #fff;
  color: var(--cc-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all .2s ease;
}

.cc-password-btn:hover {
  background: #eff6ff;
  border-color: var(--cc-blue);
  transform: translateY(-2px);
}

/* === 范围滑块样式 === */
.cc-range-container {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  position: relative;
  padding: 8px 0 !important;
}

/* 滑块轨道 */
input.configoption_range {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 200px;
  height: 10px;
  border-radius: 100px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  margin: 0;
  position: relative;
}

/* 轨道填充色 - 通过JS动态设置 */
input.configoption_range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 100px;
  background: linear-gradient(to right, #2563eb var(--range-progress, 0%), #e2e8f0 var(--range-progress, 0%));
}

/* Webkit 滑块按钮 */
input.configoption_range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -8px;
  background: linear-gradient(145deg, #fff, #f1f5f9);
  border: 3px solid #2563eb;
  border-radius: 50%;
  cursor: grab;
  box-shadow: 
    0 2px 8px rgba(37, 99, 235, .3),
    0 0 0 4px rgba(37, 99, 235, .08);
  transition: all .2s ease;
}

input.configoption_range::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 
    0 4px 14px rgba(37, 99, 235, .4),
    0 0 0 6px rgba(37, 99, 235, .12);
}

input.configoption_range::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  box-shadow: 
    0 2px 6px rgba(37, 99, 235, .35),
    0 0 0 8px rgba(37, 99, 235, .1);
}

/* Firefox 滑块 */
input.configoption_range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: linear-gradient(145deg, #fff, #f1f5f9);
  border: 3px solid #2563eb;
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}

input.configoption_range::-moz-range-track {
  height: 10px;
  border-radius: 100px;
  background: #e2e8f0;
}

input.configoption_range::-moz-range-progress {
  height: 10px;
  border-radius: 100px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
}

/* 数值输入框 */
input.configoption_range_val {
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
  height: 44px !important;
  padding: 0 !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #2563eb !important;
  text-align: center !important;
  transition: all .2s ease !important;
  flex-shrink: 0 !important;
}

input.configoption_range_val:hover {
  border-color: #cbd5e1 !important;
  background: #fff !important;
}

input.configoption_range_val:focus {
  border-color: #2563eb !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1) !important;
  outline: none !important;
}

/* 单位文字 */
.cc-range-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 44px;
  padding: 0 12px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
  white-space: nowrap;
}

/* 禁用区域 */
.range_none {
  position: absolute;
  height: 10px;
  display: block;
  background: repeating-linear-gradient(
    45deg,
    #cbd5e1,
    #cbd5e1 4px,
    #e2e8f0 4px,
    #e2e8f0 8px
  );
  cursor: not-allowed;
  border-radius: 100px;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
}

/* ============================================
   小票式订单汇总 - Receipt Style v2.0
   优化版：更大字体、更清晰的层次
   ============================================ */
.cc-receipt {
  position: sticky;
  top: 100px;
}

.cc-receipt-card {
  background: #fff;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(15,23,42,.1), 0 0 0 1px rgba(0,0,0,.03);
  overflow: visible;
  position: relative;
}

/* 小票顶部锯齿边 */
.cc-receipt-card::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(135deg, transparent 33.33%, #2563eb 33.33%, #2563eb 66.67%, transparent 66.67%),
              linear-gradient(225deg, transparent 33.33%, #2563eb 33.33%, #2563eb 66.67%, transparent 66.67%);
  background-size: 10px 12px;
  background-position: 0 -6px;
}

/* 小票底部锯齿边 */
.cc-receipt-card::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(45deg, transparent 33.33%, #fafafa 33.33%, #fafafa 66.67%, transparent 66.67%),
              linear-gradient(315deg, transparent 33.33%, #fafafa 33.33%, #fafafa 66.67%, transparent 66.67%);
  background-size: 10px 12px;
  background-position: 0 0;
}

/* 小票头部 */
.cc-receipt-header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  padding: 24px 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cc-receipt-header::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%);
  pointer-events: none;
}

.cc-receipt-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}

.cc-receipt-shop {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 2px;
}

.cc-receipt-slogan {
  font-size: 11px;
  color: rgba(255,255,255,.7);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* 小票打孔装饰 */
.cc-receipt-holes {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  margin: -6px 0;
  position: relative;
  z-index: 2;
}

.cc-receipt-hole {
  width: 12px;
  height: 12px;
  background: var(--cc-bg, #f7fbff);
  border-radius: 50%;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.1);
}

/* 小票分隔虚线 */
.cc-receipt-divider {
  border: none;
  border-top: 2px dashed #d1d5db;
  margin: 12px 0;
}

/* 小票内容区 */
.cc-receipt-body {
  padding: 20px 24px 6px;
}

/* 订单信息 */
.cc-receipt-info {
  text-align: center;
  margin-bottom: 12px;
}

.cc-receipt-orderid {
  font-size: 14px;
  color: var(--cc-muted);
  margin-bottom: 6px;
  letter-spacing: 1px;
  font-weight: 500;
}

.cc-receipt-date {
  font-size: 15px;
  color: var(--cc-text);
  font-weight: 600;
}

/* 商品清单标题 */
.cc-receipt-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 4px;
  margin-bottom: 8px;
  text-align: center;
  padding: 6px 0;
  border-top: 1px dashed #d1d5db;
  border-bottom: 1px dashed #d1d5db;
  background: transparent;
}

/* 商品列表 - 覆盖系统样式 */
.cc-receipt-items {
  margin-bottom: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

/* 覆盖 configoption_total 内部样式 */
.cc-receipt-items.configoption_total {
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.cc-receipt-items.configoption_total table {
  width: 100% !important;
  border-collapse: collapse !important;
}

.cc-receipt-items.configoption_total tr {
  border-bottom: 1px dashed #e5e7eb !important;
}

/* 隐藏总价行，只保留应付金额区域 */
.cc-receipt-items.configoption_total tr:last-child {
  display: none !important;
}

.cc-receipt-items.configoption_total td {
  padding: 8px 0 !important;
  font-size: 14px !important;
  vertical-align: top !important;
}

.cc-receipt-items.configoption_total td:first-child {
  color: #374151 !important;
  font-weight: 500 !important;
  padding-right: 16px !important;
}

.cc-receipt-items.configoption_total td:last-child {
  text-align: right !important;
  color: #1f2937 !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

/* 覆盖 div 结构的配置项 */
.cc-receipt-items > div {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  padding: 12px 0 !important;
  font-size: 15px !important;
  border-bottom: 1px dashed #e5e7eb !important;
  line-height: 1.6 !important;
}

.cc-receipt-items > div:last-child {
  border-bottom: none !important;
}

/* 隐藏总价行（div结构），只保留应付金额区域 */
.cc-receipt-items .total-row,
.cc-receipt-items > div:last-of-type {
  display: none !important;
}

/* 配置清单最后一个可见项去掉底部边框 */
.cc-receipt-items.configoption_total tr:nth-last-child(2) {
  border-bottom: none !important;
}

.cc-receipt-items > div:nth-last-of-type(2) {
  border-bottom: none !important;
}

/* 总计区域 - 强化视觉效果 */
.cc-receipt-total {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
  margin: 0 -24px;
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* 顶部锯齿装饰 */
.cc-receipt-total::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(135deg, transparent 33.33%, #fff 33.33%, #fff 66.67%, transparent 66.67%),
              linear-gradient(225deg, transparent 33.33%, #fff 33.33%, #fff 66.67%, transparent 66.67%);
  background-size: 12px 16px;
  background-position: 0 0;
}

/* 背景装饰圆点 */
.cc-receipt-total::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
  pointer-events: none;
}

.cc-receipt-total-label {
  font-size: 12px;
  color: rgba(255,255,255,.8);
  margin-bottom: 8px;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.cc-receipt-total-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.cc-receipt-currency {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.cc-receipt-amount {
  font-size: 52px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.cc-receipt-cycle {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  margin-left: 4px;
  font-weight: 500;
}

/* 小票底部信息 */
.cc-receipt-footer {
  padding: 20px 24px 24px;
  text-align: center;
  background: #fafafa;
  position: relative;
}

/* 底部顶部锯齿 */
.cc-receipt-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(45deg, #fafafa 33.33%, transparent 33.33%, transparent 66.67%, #fafafa 66.67%),
              linear-gradient(315deg, #fafafa 33.33%, transparent 33.33%, transparent 66.67%, #fafafa 66.67%);
  background-size: 12px 16px;
  background-position: 0 -8px;
  transform: translateY(-8px);
}

/* 条形码装饰 */
.cc-receipt-barcode {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-bottom: 10px;
  padding: 8px 0;
}

.cc-barcode-line {
  width: 2px;
  height: 40px;
  background: #1e293b;
}

.cc-barcode-line:nth-child(odd) { height: 32px; }
.cc-barcode-line:nth-child(3n) { width: 4px; }
.cc-barcode-line:nth-child(5n) { width: 1px; height: 28px; }

.cc-receipt-barcode-text {
  font-size: 11px;
  color: var(--cc-muted);
  letter-spacing: 4px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

/* 按钮区域 */
.cc-receipt-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.cc-receipt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.cc-receipt-btn i {
  font-size: 20px;
}

.cc-receipt-btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .3);
}

.cc-receipt-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, .4);
  color: #fff;
  text-decoration: none;
}

.cc-receipt-btn-outline {
  background: #fff;
  color: var(--cc-text);
  border: 2px solid var(--cc-border);
}

.cc-receipt-btn-outline:hover {
  border-color: var(--cc-blue);
  color: var(--cc-blue);
  background: #f8faff;
  text-decoration: none;
}

/* 小票提示 */
.cc-receipt-note {
  margin-top: 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid rgba(34, 197, 94, .2);
  border-radius: 12px;
  font-size: 14px;
  color: #166534;
  text-align: center;
  line-height: 1.6;
}

.cc-receipt-note i {
  color: #22c55e;
  margin-right: 8px;
  font-size: 16px;
}

/* 隐藏系统默认的浮动/固定购物车按钮 */
.float-cart-btn,
.cart-float-btn,
[class*="float"][class*="cart"],
.fixed-cart-btn,
.cart-fixed-bar,
.bottom-cart-bar,
.cart-bottom-bar,
.add-cart-fixed,
.fixed-bottom-cart,
.cart-action-bar,
[class*="fixed"][class*="cart"],
[class*="bottom"][class*="cart"],
.configoption_form > .fixed-bottom,
.configoption_form > [style*="fixed"],
body > .fixed-bottom,
.cart-submit-fixed,
.submit-cart-bar,
#addToCartBtn,
#addToCartBtnTwo,
.mobile-bottom-total,
.mobile-hide #addToCartBtn,
div[style*="position: absolute"] #addToCartBtn,
div[style*="position:absolute"] #addToCartBtn {
  display: none !important;
}

/* 隐藏ordersummary中的按钮区域 */
.ordersummary + div[style*="absolute"],
.ordersummary ~ div[style*="absolute"],
.text-sm-right #addToCartBtn,
.text-sm-right.mt-4 {
  display: none !important;
}

/* 移动端底部固定栏也隐藏 */
.mobile-bottom-total,
.mobile-cart-bar,
.m-cart-bar,
.m-bottom-bar,
.mobile-add-cart,
.mobile-checkout-bar {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 768px) {
  .mobile-bottom-total,
  .mobile-cart-bar,
  .m-cart-bar,
  .m-bottom-bar,
  #addToCartBtnTwo {
    display: none !important;
    visibility: hidden !important;
  }
}

/* === Bootstrap Select 覆盖 === */
.bootstrap-select {
  width: auto !important;
}

.bootstrap-select > .dropdown-toggle {
  height: 46px !important;
  padding: 0 40px 0 16px !important;
  border: 2px solid var(--cc-border) !important;
  border-radius: 12px !important;
  background: #fff !important;
  font-size: 14px !important;
  color: var(--cc-text) !important;
  display: flex !important;
  align-items: center !important;
}

.bootstrap-select > .dropdown-toggle .filter-option {
  display: flex !important;
  align-items: center !important;
  text-align: left !important;
}

.bootstrap-select > .dropdown-toggle .filter-option-inner {
  display: flex !important;
  align-items: center !important;
}

.bootstrap-select > .dropdown-toggle .filter-option-inner-inner {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  line-height: 1.4 !important;
}

/* 带图标的下拉项（如操作系统） */
.bootstrap-select .dropdown-item img,
.bootstrap-select .filter-option-inner-inner img {
  width: 20px !important;
  height: 20px !important;
  margin-right: 8px;
  vertical-align: middle;
}

.bootstrap-select > .dropdown-toggle:hover {
  border-color: rgba(37, 99, 235, .4) !important;
}

.bootstrap-select > .dropdown-toggle:focus {
  outline: none !important;
  border-color: var(--cc-blue) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1) !important;
}

.bootstrap-select .dropdown-menu {
  border-radius: 14px !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .15) !important;
  border: 1px solid var(--cc-border) !important;
  padding: 10px !important;
  margin-top: 8px !important;
  min-width: 100% !important;
}

.bootstrap-select .dropdown-menu .inner {
  max-height: 280px !important;
}

.bootstrap-select .dropdown-item,
.bootstrap-select .dropdown-menu li a {
  border-radius: 10px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
}

.bootstrap-select .dropdown-item:hover,
.bootstrap-select .dropdown-item.active,
.bootstrap-select .dropdown-menu li a:hover,
.bootstrap-select .dropdown-menu li.selected a {
  background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
  color: var(--cc-blue) !important;
}

.bootstrap-select .dropdown-item .text,
.bootstrap-select .dropdown-menu li a .text {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
}

/* === 按钮组样式覆盖 === */
.btn-group-toggle:not(.btn-custom-group) {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.btn-group-toggle:not(.btn-custom-group) .btn {
  position: relative;
  min-width: 80px;
  height: 44px;
  padding: 0 20px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  font-size: 14px;
  font-weight: 500;
  color: #334155 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-group-toggle:not(.btn-custom-group) .btn:hover {
  border-color: #cbd5e1 !important;
  background: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .1);
}

.btn-group-toggle:not(.btn-custom-group) .btn.active,
.btn-group-toggle:not(.btn-custom-group) .btn:has(input:checked) {
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, .3);
}

/* 带图片/图标的选项 */
.btn-group-toggle .btn img {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

/* === 周期按钮 === */
.btn-group.btn-custom-group,
.btn-group-toggle.btn-custom-group,
.btn-custom-group {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  overflow: visible !important;
  padding: 12px 0 !important;
  margin: 0 !important;
}

/* 重置 Bootstrap btn-group 的 overflow */
.configureproduct .btn-group,
.configureproduct .btn-group-toggle {
  overflow: visible !important;
}

.btn-custom-group .btn-custom,
.btn-custom-group > label.btn,
label.btn.btn-custom {
  position: relative !important;
  min-width: 80px;
  height: 48px;
  padding: 0 28px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin: 0 !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  overflow: visible !important;
}

.btn-custom-group .btn-custom:hover,
.btn-custom-group > label.btn:hover {
  border-color: #cbd5e1 !important;
  background: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}

.btn-custom-group .btn-custom.active,
.btn-custom-group .btn-custom:has(input:checked),
.btn-custom-group > label.btn.active,
.btn-custom-group > label.btn:has(input:checked) {
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, .3);
}

/* 周期折扣标签 */
.cycle-select-discount {
  position: absolute !important;
  top: -10px !important;
  right: 0 !important;
  display: inline-block !important;
  padding: 0px 5px !important;
  height: 15px !important;
  background: #F70302 !important;
  border-radius: 5px 5px 5px 0px !important;
  color: #ffffff !important;
  font-size: 12px !important;
  text-align: center !important;
  line-height: 15px !important;
  z-index: 999 !important;
  white-space: nowrap !important;
}

/* === 单选组件样式 (form-check) === */
.configureproduct .form-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  margin-right: 12px;
  margin-bottom: 8px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.configureproduct .form-check:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.configureproduct .form-check:has(input:checked) {
  background: #eff6ff;
  border-color: #2563eb;
}

.configureproduct .form-check-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  margin: 0;
  margin-right: 10px;
  flex-shrink: 0;
}

.configureproduct .form-check-input:checked {
  border-color: #2563eb;
  background: #2563eb;
}

.configureproduct .form-check-input:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
}

.configureproduct .form-check-label {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  margin: 0;
  line-height: 1.4;
}

.configureproduct .form-check:has(input:checked) .form-check-label {
  color: #1d4ed8;
}

/* === 使用全局下拉框样式 (cc-form-select) === */
.configureproduct select.form-control,
.configureproduct .cc-form-select {
  width: 100%;
  max-width: 320px;
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 14px center;
  background-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #334155;
}

.configureproduct select.form-control:hover,
.configureproduct .cc-form-select:hover {
  border-color: #cbd5e1;
  background-color: #fff;
}

.configureproduct select.form-control:focus,
.configureproduct .cc-form-select:focus {
  outline: none;
  border-color: #2563eb;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Bootstrap Select 使用全局样式 */
.configureproduct .bootstrap-select > .dropdown-toggle {
  height: 44px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
}

.configureproduct .bootstrap-select > .dropdown-toggle:hover {
  border-color: #cbd5e1 !important;
  background: #fff !important;
}

.configureproduct .bootstrap-select > .dropdown-toggle:focus {
  border-color: #2563eb !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.configureproduct .col-md-4 .bootstrap-select,
.configureproduct .col-md-4 select.form-control {
  width: 100% !important;
  max-width: 320px;
}

/* 多个下拉框并排 */
.configureproduct .col-md-10 .bootstrap-select,
.configureproduct .col-md-10 select.form-control {
  width: auto !important;
  min-width: 160px !important;
  flex: 0 0 auto !important;
}

/* === 配置项行 === */
.configureproduct {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(226, 232, 240, .5);
}

.configureproduct:last-of-type {
  border-bottom: none;
}

.configureproduct .col-form-label {
  font-weight: 600;
  color: var(--cc-text);
  font-size: 14px;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.configureproduct .col-md-10 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.configureproduct .col-md-4 {
  display: block;
}

/* === 表单验证 === */
.form-control.is-invalid {
  border-color: #ef4444 !important;
}

.error-tip {
  color: #ef4444;
  margin: 0;
  padding: 0;
  line-height: 36px;
  display: none;
  font-size: 13px;
}

/* === Footer 覆盖 === */
.cc-footer { margin: 32px 0 24px !important; padding: 0 !important; width: 100% !important; }
.cc-footer-container { max-width: 100% !important; margin: 0 32px !important; }

/* === 响应式设计 === */
@media (max-width: 1200px) {
  .cc-config-wrap {
    flex-direction: column;
  }
  
  .cc-config-sidebar {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
  
  .cc-receipt {
    position: static;
  }
}

@media (max-width: 768px) {
  .cc-config-wrap {
    padding: 16px;
    gap: 20px;
  }
  
  .cc-config-header {
    padding: 20px;
  }
  
  .cc-config-body {
    padding: 20px;
  }
  
  .cc-config-title {
    font-size: 17px;
  }
  
  .cc-form-row {
    flex-direction: column;
  }
  
  .cc-form-label {
    width: 100%;
    padding-top: 0;
    margin-bottom: 10px;
  }
  
  .cc-form-select,
  .cc-password-input {
    width: 100%;
  }
  
  /* 移动端小票优化 */
  .cc-receipt-header {
    padding: 24px 20px 20px;
  }
  
  .cc-receipt-logo {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  
  .cc-receipt-shop {
    font-size: 20px;
  }
  
  .cc-receipt-body {
    padding: 20px;
  }
  
  .cc-receipt-section-title {
    font-size: 12px;
    padding: 8px 0;
  }
  
  .cc-receipt-items.configoption_total,
  .cc-receipt-items.configoption_total td {
    font-size: 14px !important;
  }
  
  .cc-receipt-items.configoption_total td {
    padding: 10px 0 !important;
  }
  
  .cc-receipt-total {
    padding: 24px 20px;
    margin: 0 -20px;
  }
  
  .cc-receipt-total-label {
    font-size: 14px;
  }
  
  .cc-receipt-currency {
    font-size: 22px;
  }
  
  .cc-receipt-amount {
    font-size: 40px;
  }
  
  .cc-receipt-footer {
    padding: 20px;
  }
  
  .cc-receipt-btn {
    height: 52px;
    font-size: 16px;
  }
  
  .cc-receipt-barcode {
    gap: 2px;
  }
  
  .cc-barcode-line {
    width: 2px;
    height: 36px;
  }
  
  .cc-footer { margin: 24px 12px !important; }
  .cc-footer-container { margin: 0 !important; }
}

/* === 动画 === */
@keyframes receiptSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cc-receipt {
  animation: receiptSlideIn 0.5s ease forwards;
}

.cc-config-card {
  animation: receiptSlideIn 0.4s ease forwards;
}

/* 按钮加载状态 */
.cc-receipt-btn.is-loading {
  background: linear-gradient(135deg, #64748b, #475569) !important;
  pointer-events: none;
  cursor: not-allowed;
}

.cc-receipt-btn.is-loading .cc-btn-spinner {
  display: inline-block;
}

.cc-btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cc-spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes cc-spin {
  to { transform: rotate(360deg); }
}
