/* ================================================================
   Curtain Theme — shared between fabric & sheer
   ================================================================ */

/* --- Page Layout --- */
.category-page { padding-top: calc(var(--nav-height) + 24px); }

/* --- Hero --- */
.curtain-page .page-hero {
  text-align: center;
  padding: 48px 20px 24px;
  background: linear-gradient(180deg, rgba(139,109,82,0.06) 0%, transparent 100%);
}
.curtain-page .page-hero h1 {
  font-size: 2rem;
  color: #3e2723;
  margin-bottom: 6px;
}
.curtain-page .page-hero p {
  color: #888;
  font-size: 0.95rem;
}

/* --- Filter Bar --- */
.curtain-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--bd, #e0e0e0);
  margin-bottom: 20px;
}
.curtain-filter-bar .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.curtain-filter-bar .filter-label {
  font-size: 0.78rem;
  color: var(--tx2, #888);
  white-space: nowrap;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.curtain-filter-bar .filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.curtain-filter-bar .filter-opt {
  padding: 5px 14px;
  border: 1px solid var(--bd, #ddd);
  border-radius: 20px;
  background: transparent;
  color: var(--tx2, #666);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.curtain-filter-bar .filter-opt:hover {
  border-color: #8d6e63;
  color: #5d4037;
}
.curtain-filter-bar .filter-opt.active {
  background: #5d4037;
  border-color: #5d4037;
  color: #fff;
}

/* --- Product Area --- */
.product-area {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 20px 60px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* --- Product Card --- */
.curtain-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.curtain-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
.curtain-card .card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f5f5f5;
}
.curtain-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.curtain-card .no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #ccc;
  background: linear-gradient(135deg, #fafafa, #f0f0f0);
}
.curtain-card .card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  color: #fff;
}
.curtain-card .card-badge.hot { background: #e53935; }
.curtain-card .card-badge.new { background: #43a047; }
.curtain-card .card-body {
  padding: 14px 16px;
}
.curtain-card .card-model {
  font-size: 0.72rem;
  color: #aaa;
  margin-bottom: 4px;
}
.curtain-card .card-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.3;
}
.curtain-card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.curtain-card .card-tags span {
  padding: 2px 8px;
  background: #f5f0eb;
  color: #8d6e63;
  font-size: 0.68rem;
  border-radius: 3px;
}
.curtain-card .card-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: #c62828;
}
.curtain-card .card-price small {
  font-size: 0.7rem;
  color: #999;
  font-weight: 400;
}

/* --- Detail Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.show {
  display: flex;
  align-items: center;
}
.modal-container {
  background: #fff;
  border-radius: 10px;
  width: clamp(800px, 70vw, 1400px);
  height: min(80vh, 800px);
  min-height: 500px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 12px 48px rgba(0,0,0,0.12), 0 24px 80px rgba(0,0,0,0.06);
  position: relative;
  display: grid;
  grid-template-columns: 48fr 52fr;
}

/* 右：一列滚动 */
.modal-scroll {
  padding: 22px 26px;
  overflow-y: auto;
  min-width: 0;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  color: #5d4037;
  border: 1px solid rgba(0,0,0,0.08);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: all 0.2s ease;
}
.modal-close:hover { background: #5d4037; color: #fff; border-color: #5d4037; transform: scale(1.08); }

/* Gallery */
.modal-gallery {
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  min-height: 0;
  min-width: 0;
}
.modal-main-img {
  flex: 1;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.modal-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal-thumbs {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  overflow-x: auto;
  flex-shrink: 0;
  background: #fff;
}
.modal-thumbs img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.2s;
  flex-shrink: 0;
}
.modal-thumbs img.active,
.modal-thumbs img:hover {
  border-color: #5d4037;
  opacity: 1;
}

/* Info */
.modal-info {
  padding: 0 0 12px;
}
.modal-info h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}
.modal-model {
  font-size: 0.7rem;
  color: #bbb;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.modal-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #c62828;
  margin-bottom: 12px;
  line-height: 1;
}
.modal-price small {
  font-size: 0.65rem;
  color: #999;
  font-weight: 400;
}

/* 参数色块卡 */
.spec-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.spec-card {
  background: #faf8f6;
  border: 1px solid #eee5db;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.sc-label {
  font-size: 0.72rem;
  color: #5d4037;
  font-weight: 600;
}
.sc-icon {
  font-size: 0.85rem;
  margin-right: 4px;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}
.sc-value {
  font-size: 0.9rem;
  color: #333;
  font-weight: 700;
  margin-top: 3px;
}

/* --- 价格计算器卡片 --- */
.calc-box {
  background: #eef3f8;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.calc-title {
  font-size: 0.8rem;
  color: #5d4037;
  font-weight: 600;
  margin-bottom: 10px;
}

/* 输入行 */
.calc-fields {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.calc-field {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.calc-field label {
  font-size: 0.66rem;
  color: #222;
}
.calc-field input {
  width: 56px;
  padding: 5px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.74rem;
  text-align: center;
  color: #333;
  background: #fff;
}
.calc-field input:focus {
  outline: none;
  border-color: #8d6e63;
  box-shadow: 0 0 0 2px rgba(139,109,82,0.1);
}
.calc-field-unit {
  font-size: 0.6rem;
  color: #222;
}

/* 褶皱选择器 */
.pleat-selector {
  display: flex;
}
.pleat-opt {
  padding: 4px 9px;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.pleat-opt:first-child { border-radius: 3px 0 0 3px; }
.pleat-opt:last-child { border-radius: 0 3px 3px 0; }
.pleat-opt:hover {
  border-color: #8d6e63;
  color: #5d4037;
}
.pleat-opt.active {
  background: #5d4037;
  border-color: #5d4037;
  color: #fff;
}

/* 计价信息 */
.calc-pricing-info {
  font-size: 0.62rem;
  color: #222;
  margin-bottom: 10px;
}

/* 计算结果 */
.calc-result {
  border-top: 1px dashed #cfe0ee;
  padding-top: 10px;
}
.calc-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.calc-total-label {
  font-size: 0.68rem;
  color: #222;
}
.calc-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: #c62828;
}
.calc-formula {
  font-size: 0.62rem;
  color: #222;
  margin-top: 2px;
}
.calc-hint {
  font-size: 0.62rem;
  color: #8d6e63;
  margin-top: 6px;
}
.calc-disc {
  font-size: 0.56rem;
  color: #222;
  margin-top: 4px;
}

/* Description */
.modal-desc {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* CTA 立即询价 */
.modal-cta {
  padding: 0;
}
.btn-inquire {
  display: block;
  width: 100%;
  padding: 12px;
  background: #5d4037;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.btn-inquire:hover {
  background: #3e2723;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(61,39,27,0.25);
}

/* Loading */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: #aaa;
  font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .modal-container {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: 90vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    border-radius: 12px 12px 0 0;
    margin-top: 20px;
  }
  .modal-gallery {
    max-height: 260px;
    border-radius: 12px 12px 0 0;
  }
  .modal-main-img {
    aspect-ratio: 16/9;
  }
  .modal-scroll {
    overflow-y: visible;
    padding: 14px 16px;
  }
  .calc-fields {
    gap: 8px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .curtain-filter-bar {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .curtain-card .card-body {
    padding: 10px 12px;
  }
  .curtain-card .card-name {
    font-size: 0.82rem;
  }
  .curtain-card .card-price {
    font-size: 1rem;
  }
  .modal-info h2 {
    font-size: 1.05rem;
  }
}
