/* ============================================
   merchant-store.css - 商家店铺详情页样式
   ============================================ */

:root {
  --primary: #002b5c;
  --primary-dark: #001736;
  --accent: #fea619;
  --text-main: #191c1d;
  --text-sub: #43474f;
  --bg-page: #f8f9fa;
  --border: #c4c6d0;
}

body.page-merchant-store { background: var(--bg-page); }

.page-merchant-store-main.main-content { padding: 32px 0 60px; }
.page-merchant-store .page-container { max-width: 1500px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 32px; min-width: 0; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; }
.bc-link { font-size: 16px; color: #43474f; transition: color 0.15s; }
.bc-link:hover { color: var(--primary); }
.bc-arrow { width: 5px; height: 8px; flex-shrink: 0; }
.bc-current { font-size: 16px; font-weight: 700; color: var(--primary-dark); }

/* ============== MERCHANT HERO ============== */
.merchant-hero {
  background: var(--primary); border-radius: 8px;
  overflow: hidden; position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.hero-bg-img { position: absolute; inset: 0; overflow: hidden; }
.hero-bg { width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.hero-bg-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--primary) 0%, rgba(0,43,92,0.8) 50%, rgba(0,43,92,0) 100%);
}
.hero-content { position: relative; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; padding: 40px; gap: 32px; }
.hero-info { flex: 1; display: flex; flex-direction: column; gap: 16px; max-width: 768px; min-width: 0; }

.hero-badges-row { display: flex; align-items: center; gap: 16px; }
.hero-badge-gold { background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 2px; letter-spacing: 1.1px; }
.hero-stars { display: flex; align-items: center; }
.hero-stars img { width: 20px; height: 19px; }
.hero-certified { display: flex; align-items: center; gap: 4px; }
.hero-certified img { width: 16.5px; height: 15.75px; }
.hero-certified span { font-size: 14px; font-weight: 700; color: rgba(117,148,203,0.8); }

.hero-company-name { font-size: 16px; color: #fff; line-height: 1.5; }

.hero-cert-labels { display: flex; flex-wrap: wrap; gap: 12px; }
.hcl { font-size: 14px; font-weight: 700; padding: 5px 13px; border: 1px solid; border-radius: 2px; }
.hcl-orange { background: rgba(254,166,25,0.1); border-color: rgba(254,166,25,0.4); color: var(--accent); }
.hcl-blue { background: rgba(170,199,255,0.1); border-color: rgba(170,199,255,0.4); color: #aac7ff; }
.hcl-green { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.4); color: #22c55e; }
.hcl-lightblue { background: rgba(96,165,250,0.1); border-color: rgba(96,165,250,0.4); color: #60a5fa; }
.hcl-amber { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.4); color: #f59e0b; }
.hcl-slate { background: rgba(148,163,184,0.1); border-color: rgba(148,163,184,0.4); color: #94a3b8; }

.hero-desc { display: flex; flex-direction: column; gap: 16px; padding-bottom: 16px; }
.hero-desc-row { display: flex; gap: 16px; align-items: flex-start; }
.hdesc-label { font-size: 16px; font-weight: 700; color: #7594cb; white-space: nowrap; flex-shrink: 0; }
.hdesc-content { font-size: 16px; color: rgba(117,148,203,0.9); line-height: 1.6; }

.hero-stats { display: flex; gap: 48px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 33px; }
.hero-stat-item { display: flex; flex-direction: column; gap: 4px; }
.hstat-num { font-size: 16px; font-weight: 400; color: var(--accent); line-height: 1.5; }
.hstat-label { font-size: 16px; color: #7594cb; }

/* Contact Panel */
.hero-contact-panel {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 33px 33px 33px 36px;
  width: 320px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 24px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}
.contact-header { display: flex; align-items: center; gap: 8px; }
.contact-header img { width: 24px; height: 18px; }
.contact-header span { font-size: 16px; color: var(--primary-dark); }
.contact-body { display: flex; flex-direction: column; gap: 24px; }
.contact-phone-row { display: flex; flex-direction: column; gap: 4px; }
.contact-phone-label { font-size: 12px; font-weight: 700; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.55px; }
.contact-phone-num { font-size: 16px; color: var(--primary-dark); line-height: 1.5; }
.btn-tel-contact, .btn-wechat-contact {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: 4px; border: none;
  font-size: 16px; font-weight: 700; color: #fff; cursor: pointer;
  transition: opacity 0.2s;
}
.btn-tel-contact { background: var(--primary-dark); }
.btn-tel-contact img { width: 15px; height: 15px; }
.btn-wechat-contact { background: #28c445; }
.btn-wechat-contact img { width: 16.67px; height: 16.67px; }
.btn-tel-contact:hover, .btn-wechat-contact:hover { opacity: 0.9; }
.contact-address { border-top: 1px solid var(--border); padding-top: 25px; display: flex; flex-direction: column; gap: 7px; }
.contact-address-label { font-size: 12px; font-weight: 700; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.55px; }
.contact-address-text { font-size: 14px; font-weight: 500; color: var(--text-main); line-height: 1.7; }

/* ============== STORE FILTER BAR ============== */
.store-filter-bar {
  background: #fff; border: 2px solid var(--accent); border-radius: 8px;
  padding: 26px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}
.store-filter-left { display: flex; align-items: center; gap: 16px; }
.store-filter-title { font-size: 16px; color: var(--primary-dark); }
.store-count-badge { background: #edeeef; color: var(--text-sub); font-size: 16px; padding: 4px 12px; border-radius: 12px; }
.store-filter-right { display: flex; align-items: center; gap: 16px; }
.store-sort-tabs { display: flex; background: #edeeef; border-radius: 4px; padding: 4px; gap: 0; }
.sst { background: transparent; border: none; font-size: 16px; padding: 8px 16px; border-radius: 2px; cursor: pointer; color: var(--text-sub); transition: all 0.15s; }
.sst.active { background: #fff; color: var(--primary-dark); font-weight: 700; box-shadow: 0 1px 1px rgba(0,0,0,0.05); }
.store-search-wrap { position: relative; display: flex; align-items: center; }
.store-search-input { background: #edeeef; border: none; border-radius: 4px; padding: 8px 16px 8px 40px; font-size: 16px; color: #6b7280; width: 256px; height: 46px; outline: none; }
.store-search-icon { position: absolute; left: 12px; width: 18px; height: 18px; pointer-events: none; }

/* ============== STORE PRODUCT GRID ============== */
.page-merchant-store .store-product-grid,
.page-merchant-store .store-equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-items: stretch;
  gap: 24px;
  min-width: 0;
  margin-top: 8px;
  margin-bottom: 40px;
}

.page-merchant-store .sp-card {
  background: #fff; border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column;
  color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.2s;
  min-width: 0;
}
.page-merchant-store .sp-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }
.page-merchant-store .sp-img-wrap { position: relative; overflow: hidden; background: #f3f4f6; }
.page-merchant-store .sp-img { width: 100%; height: 258.75px; object-fit: cover; display: block; transition: transform 0.3s; }
.page-merchant-store .sp-img-empty {
  display: flex; align-items: center; justify-content: center;
  height: 258.75px; color: #9ca3af; font-size: 14px;
}
.page-merchant-store .sp-card:hover .sp-img { transform: scale(1.04); }
.page-merchant-store .sp-new-badge {
  position: absolute; top: 16px; left: 16px; z-index: 1;
  background: var(--primary-dark); color: #fff; font-size: 10px; font-weight: 700;
  padding: 4px 8px; letter-spacing: -0.5px; text-transform: uppercase;
}
.page-merchant-store .sp-fav-btn {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 40px; height: 40px; padding: 0;
  background: rgba(255,255,255,0.8); backdrop-filter: blur(4px);
  border-radius: 12px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.page-merchant-store .sp-fav-btn .eq-fav-icon {
  display: block;
  width: 20px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 16' fill='none'%3E%3Cpath d='M8.5 14.5l-1.1-1C3.7 10.1 1 7.6 1 4.6 1 2.4 2.7.7 4.9.7c1.2 0 2.4.6 3.1 1.5.7-.9 1.9-1.5 3.1-1.5 2.2 0 3.9 1.7 3.9 3.9 0 3-2.7 5.5-6.4 8.9l-1.1 1z' stroke='%23D1D5DB' stroke-width='1.2' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}
.page-merchant-store .sp-fav-btn.faved .eq-fav-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 16'%3E%3Cpath d='M8.5 14.5l-1.1-1C3.7 10.1 1 7.6 1 4.6 1 2.4 2.7.7 4.9.7c1.2 0 2.4.6 3.1 1.5.7-.9 1.9-1.5 3.1-1.5 2.2 0 3.9 1.7 3.9 3.9 0 3-2.7 5.5-6.4 8.9l-1.1 1z' fill='%23E02020'/%3E%3C/svg%3E");
}
.page-merchant-store .sp-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.page-merchant-store .sp-title {
  font-size: 16px; font-weight: 500; color: var(--primary-dark); line-height: 1.5;
  margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.page-merchant-store .sp-meta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-bottom: 8px; min-width: 0;
}
.page-merchant-store .sp-meta { font-size: 14px; color: var(--text-sub); white-space: nowrap; flex-shrink: 0; }
.page-merchant-store .sp-meta-empty { visibility: hidden; }
.page-merchant-store .sp-location {
  display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-sub);
  min-width: 0; flex-shrink: 1;
}
.page-merchant-store .sp-location span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.page-merchant-store .sp-location img { width: 10.67px; height: 13.33px; flex-shrink: 0; }
.page-merchant-store .sp-footer {
  border-top: 1px solid #e1e3e4; padding-top: 17px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-top: auto; min-width: 0;
}
.page-merchant-store .sp-price-block { display: flex; flex-direction: column; gap: 3.5px; min-width: 0; }
.page-merchant-store .sp-price-label {
  font-size: 12px; font-weight: 700; color: var(--text-sub);
  letter-spacing: 0.55px; line-height: 1;
}
.page-merchant-store .sp-price { font-size: 24px; font-weight: 700; color: #ef4444; line-height: 1.4; }
.page-merchant-store .sp-price-negotiable { font-size: 20px; }
.page-merchant-store .sp-detail-link {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  font-size: 16px; font-weight: 700; color: var(--primary-dark);
}
.page-merchant-store .sp-detail-link img { width: 12px; height: 12px; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; }
.page-btn { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--border); background: #fff; border-radius: 4px; font-size: 14px; cursor: pointer; transition: all 0.15s; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:hover:not(.active):not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn:disabled { cursor: default; opacity: 0.5; }
.page-ellipsis { font-size: 16px; color: var(--text-sub); }

.page-merchant-store .store-empty { padding: 48px 24px; text-align: center; color: #9ca3af; background: #fff; border-radius: 8px; }
.page-merchant-store .store-pagination { text-align: center; margin-top: 24px; }

/* ============== Responsive ============== */
@media (max-width: 1200px) {
  .page-merchant-store .store-product-grid,
  .page-merchant-store .store-equipment-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }
  .page-merchant-store .hero-contact-panel { width: 280px; }
}
@media (max-width: 1024px) {
  .page-merchant-store .store-product-grid,
  .page-merchant-store .store-equipment-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
  .page-merchant-store .hero-content { flex-direction: column; }
  .page-merchant-store .hero-contact-panel { width: 100%; }
}
@media (max-width: 768px) {
  .page-merchant-store .page-container { padding: 0 16px; }
  .page-merchant-store .store-filter-bar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .page-merchant-store .store-filter-right { flex-wrap: wrap; width: 100%; }
  .page-merchant-store .store-search-input { width: 100%; min-width: 0; }
  .page-merchant-store .hero-stats { flex-wrap: wrap; gap: 24px; }
  .page-merchant-store .store-product-grid,
  .page-merchant-store .store-equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }
  .page-merchant-store .sp-img,
  .page-merchant-store .sp-img-empty { height: 180px; }
  .page-merchant-store .sp-body { padding: 14px; }
  .page-merchant-store .sp-title { font-size: 14px; }
  .page-merchant-store .sp-meta,
  .page-merchant-store .sp-location { font-size: 12px; }
  .page-merchant-store .sp-price { font-size: 20px; }
  .page-merchant-store .sp-detail-link { font-size: 14px; }
  .page-merchant-store .sp-fav-btn { width: 34px; height: 34px; top: 10px; right: 10px; }
  .page-merchant-store .sp-fav-btn .eq-fav-icon { width: 16px; height: 15px; }
}
@media (max-width: 480px) {
  .page-merchant-store .store-product-grid,
  .page-merchant-store .store-equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .page-merchant-store .sp-img,
  .page-merchant-store .sp-img-empty { height: 140px; }
  .page-merchant-store .sp-body { padding: 10px; gap: 6px; }
  .page-merchant-store .sp-title { font-size: 13px; -webkit-line-clamp: 2; }
  .page-merchant-store .sp-meta-row { flex-direction: column; align-items: flex-start; gap: 4px; padding-bottom: 6px; }
  .page-merchant-store .sp-footer { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 10px; }
  .page-merchant-store .sp-price { font-size: 18px; }
  .page-merchant-store .sp-price-label { font-size: 11px; }
  .page-merchant-store .hero-content { padding: 24px 16px; }
  .page-merchant-store .hero-company-name { font-size: 22px; }
}
