/* BESS Marketplace v0.4.0 — Gurin Energy (#42AB49 green / #253745 navy / #39837D teal) */

/* ============================================================
   1. Wrapper
   ============================================================ */
.bess-archive, .bess-single {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 16px;
}
.bess-archive-head h1, .bess-single-head h1 { color: #253745; font-weight: 700; }
.bess-archive-head p { color: #606A7F; }

/* ============================================================
   2. Filter Panel
   ============================================================ */
.bess-filter-panel {
  border: 1px solid #d4dce4;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
  background: #fff;
}
.bess-filter-rows { display: flex; flex-direction: column; }
.bess-filter-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #e8edf1;
}
.bess-filter-row-last { border-bottom: none; }
.bess-filter-label {
  flex: 0 0 92px;
  background: #f4f7f9;
  border-right: 1px solid #e8edf1;
  font-size: .8rem;
  font-weight: 700;
  color: #253745;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  white-space: nowrap;
}
.bess-filter-radios,
.bess-filter-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 10px 14px;
  flex: 1;
}
.bess-filter-radios label,
.bess-filter-checks label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  color: #253745;
  cursor: pointer;
  white-space: nowrap;
}
.bess-filter-radios input[type="radio"],
.bess-filter-checks input[type="checkbox"] {
  accent-color: #42AB49;
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.bess-filter-divider {
  width: 1px;
  background: #e8edf1;
  flex-shrink: 0;
  margin: 6px 0;
}
.bess-filter-footer {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f4f7f9;
  border-top: 1px solid #e8edf1;
}
.bess-btn-reset {
  background: #fff;
  color: #606A7F;
  border: 1px solid #cfd8df;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: .84rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.bess-btn-reset:hover { border-color: #42AB49; color: #42AB49; }
.bess-btn-search {
  background: #253745;
  color: #fff;
  border: none;
  padding: 9px 24px;
  border-radius: 6px;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.bess-btn-search:hover { background: #42AB49; }
.bess-search-arrow { font-size: .95rem; }

/* ============================================================
   3. Listings toolbar (count + sort)
   ============================================================ */
.bess-listings-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 14px;
}
.bess-result-meta { color: #253745; font-size: .9rem; font-weight: 600; }
.bess-result-meta #bess-result-count { color: #42AB49; font-size: 1.2rem; font-weight: 700; }
.bess-sort { display: flex; align-items: center; gap: 6px; color: #606A7F; font-size: .82rem; }
.bess-sort select {
  padding: 6px 10px;
  border: 1px solid #cfd8df;
  border-radius: 6px;
  font-size: .85rem;
  color: #253745;
  background: #fff;
  cursor: pointer;
}

/* ============================================================
   4. Card grid — 3 columns
   ============================================================ */
.bess-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  transition: opacity .2s;
}
.bess-empty { grid-column: 1 / -1; color: #606A7F; padding: 50px 0; text-align: center; }

.bess-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #d4dce4;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .15s, transform .1s;
}
.bess-card:hover { box-shadow: 0 6px 22px rgba(37,55,69,.12); transform: translateY(-2px); }

/* Media */
.bess-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e8edf1;
  overflow: hidden;
}
.bess-card-media-link { display: block; width: 100%; height: 100%; }
.bess-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bess-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 150px;
  background: linear-gradient(135deg, #dce6ec 0%, #c8d6df 100%);
}
.bess-ph-label { color: #9fb2c0; font-weight: 700; font-size: .8rem; letter-spacing: .12em; }

/* Badges over media */
.bess-badge-no {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(37,55,69,.92); color: #fff;
  font-size: .72rem; font-weight: 700; padding: 3px 9px;
  border-radius: 4px; letter-spacing: .02em;
}
.bess-badge-status {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: #42AB49; color: #fff;
  font-size: .72rem; font-weight: 700; padding: 3px 11px;
  border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

/* Favorite heart */
.bess-fav-heart {
  position: absolute; bottom: 10px; right: 10px; z-index: 3;
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #c2ccd4;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.18rem; line-height: 1;
  box-shadow: 0 1px 5px rgba(0,0,0,.18);
  transition: transform .12s, color .15s;
}
.bess-fav-heart:hover { transform: scale(1.12); color: #e8607a; }
.bess-fav-heart.is-fav { color: #e8607a; }
.bess-fav-heart.is-busy { opacity: .5; pointer-events: none; }

/* 商談中 overlay */
.bess-nego-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: rgba(37,55,69,.55);
  display: flex; align-items: center; justify-content: center;
}
.bess-nego-text {
  background: #253745; color: #fff; border: 2px solid #fff;
  padding: 6px 24px; border-radius: 6px;
  font-weight: 700; font-size: 1.05rem; letter-spacing: .1em;
  transform: rotate(-6deg);
}

/* Card body */
.bess-card-body { display: flex; flex-direction: column; gap: 9px; padding: 14px 16px; flex: 1; }
.bess-card-loc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bess-card-pref { font-size: 1.06rem; font-weight: 700; color: #253745; }
.bess-card-area-tag {
  font-size: .72rem; font-weight: 600; color: #39837D;
  background: #e6f0ef; padding: 2px 8px; border-radius: 4px;
}
.bess-card-saletype {
  align-self: flex-start; font-size: .76rem; font-weight: 600; color: #fff;
  background: #606A7F; padding: 2px 10px; border-radius: 4px;
}

.bess-card-specs { margin: 2px 0 0; display: flex; flex-direction: column; border-top: 1px solid #eef2f5; }
.bess-card-specs .bess-spec {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid #eef2f5;
}
.bess-card-specs dt { margin: 0; color: #606A7F; font-size: .77rem; white-space: nowrap; }
.bess-card-specs dd { margin: 0; color: #253745; font-size: .86rem; font-weight: 600; text-align: right; }
.bess-spec-price dd { font-size: 1rem; }
.bess-spec-price dd strong { color: #42AB49; }
.bess-members-only { color: #39837D; font-weight: 700; font-size: .82rem; }
.bess-locked { color: #9aa6b1; font-weight: 600; font-size: .8rem; }

.bess-card-foot { margin-top: auto; padding-top: 6px; }
.bess-card-detail {
  display: block; text-align: center;
  background: #253745; color: #fff;
  padding: 9px; border-radius: 6px;
  text-decoration: none; font-weight: 600; font-size: .86rem;
  transition: background .15s;
}
.bess-card-detail:hover { background: #42AB49; color: #fff; }

/* ============================================================
   5. Pagination
   ============================================================ */
.bess-pagination { margin-top: 26px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.bess-pagination .page-numbers {
  padding: 6px 12px; border: 1px solid #cfd8df; border-radius: 6px;
  text-decoration: none; color: #253745; transition: background .12s; cursor: pointer;
}
.bess-pagination .page-numbers:hover { background: #E8EEF2; }
.bess-pagination .current { background: #42AB49; color: #fff; border-color: #42AB49; }

/* ============================================================
   6. Single listing page
   ============================================================ */
.bess-single-head { margin-bottom: 18px; }
.bess-single-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.bess-single-head h1 { color: #253745; font-weight: 700; font-size: 1.6rem; margin: .25em 0; line-height: 1.35; }
.bess-single-loc { display: flex; gap: 10px; align-items: center; color: #606A7F; flex-wrap: wrap; }
.bess-loc-pref { font-weight: 700; color: #253745; font-size: 1.02rem; }
.bess-loc-area { font-size: .8rem; color: #39837D; background: #e6f0ef; padding: 2px 10px; border-radius: 4px; }
.bess-chip-nego { background: #253745; color: #fff; padding: 3px 12px; border-radius: 4px; font-weight: 700; font-size: .76rem; }
.bess-chip-sale { background: #606A7F; color: #fff; padding: 3px 12px; border-radius: 4px; font-weight: 600; font-size: .76rem; }

.bess-single-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-bottom: 22px; }
.bess-single-media { position: relative; border-radius: 12px; overflow: hidden; background: #e8edf1; }
.bess-single-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bess-single-ph { aspect-ratio: 4 / 3; }

.bess-single-keyfacts { background: #fff; border: 1px solid #e3e8ec; border-radius: 12px; padding: 18px 20px; align-self: start; }
.bess-keyfacts-dl { margin: 0 0 14px; }
.bess-keyfacts-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eef2f5; }
.bess-keyfacts-dl > div:last-child { border-bottom: none; }
.bess-keyfacts-dl dt { margin: 0; color: #606A7F; font-size: .84rem; }
.bess-keyfacts-dl dd { margin: 0; font-weight: 600; color: #253745; font-size: .9rem; text-align: right; }
.bess-kf-price dd strong { color: #42AB49; font-size: 1.1rem; }
.bess-btn-block { display: block; width: 100%; box-sizing: border-box; text-align: center; margin: 8px 0 0; }

.bess-single-teaser { background: #E8EEF2; border-left: 4px solid #42AB49; border-radius: 8px; padding: 14px 18px; margin-bottom: 22px; color: #37474f; line-height: 1.7; }

.bess-detail h2, .bess-inquiry-wrap h2 { color: #42AB49; border-bottom: 2px solid #42AB49; padding-bottom: 6px; }
.bess-spec-table { width: 100%; border-collapse: collapse; margin: 12px 0 24px; }
.bess-spec-table th, .bess-spec-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #e3e8ec; font-size: .92rem; }
.bess-spec-table th { width: 36%; color: #606A7F; font-weight: 600; }
.bess-group-row th { background: #253745; color: #fff; font-weight: 700; }
.bess-detail-body { margin: 12px 0 20px; line-height: 1.8; color: #37474f; }

/* Gate */
.bess-gate-box { background: #E8EEF2; border: 1px dashed #42AB49; border-radius: 12px; padding: 30px; text-align: center; }
.bess-gate-box h2 { color: #253745; border: 0; }
.bess-gate-pending { color: #856404; background: #fff3cd; border-radius: 6px; padding: 10px 14px; display: inline-block; }
.bess-btn { display: inline-block; background: #42AB49; color: #fff; padding: 11px 24px; border-radius: 8px; text-decoration: none; font-weight: 600; margin: 4px; transition: background .15s; }
.bess-btn:hover { background: #56D14F; color: #fff; }
.bess-btn-outline { background: #fff; color: #42AB49; border: 2px solid #42AB49; }
.bess-btn-outline:hover { background: #f0faf1; color: #42AB49; }
.bess-btn-large { padding: 13px 32px; font-size: 1rem; }

/* ============================================================
   7. Inquiry form
   ============================================================ */
.bess-inquiry label { display: block; font-weight: 600; color: #253745; margin-bottom: 12px; }
.bess-inquiry input[type="text"],
.bess-inquiry input[type="email"],
.bess-inquiry textarea { width: 100%; padding: 9px 11px; border: 1px solid #cfd8df; border-radius: 6px; font-weight: 400; margin-top: 4px; box-sizing: border-box; }
.bess-inquiry .req { color: #d9534f; }
.bess-inquiry .bess-nda label { font-weight: 400; }
.bess-inquiry button { background: #42AB49; color: #fff; border: 0; padding: 12px 26px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.bess-inquiry button:hover { background: #56D14F; }
.bess-notice-ok { background: #eafaf0; border: 1px solid #42AB49; color: #2c7a36; padding: 14px 18px; border-radius: 8px; }

/* ============================================================
   8. Badges / Notices
   ============================================================ */
.bess-badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: .82rem; font-weight: 600; }
.bess-badge-ok      { background: #eafaf0; color: #2c7a36; }
.bess-badge-pending { background: #fff3cd; color: #856404; }
.bess-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; line-height: 1.6; }
.bess-notice-error  { background: #fdf3f3; border: 1px solid #e8b4b8; color: #843534; }

/* ============================================================
   9. Mypage / Registration
   ============================================================ */
.bess-mypage h2 { color: #253745; }
.bess-mypage-section { margin-bottom: 32px; }
.bess-mypage-section h3 { color: #253745; border-bottom: 2px solid #42AB49; padding-bottom: 6px; }
.bess-spec-table { width: 100%; border-collapse: collapse; }
.bess-fav-empty { color: #606A7F; padding: 24px; text-align: center; background: #f4f7f9; border-radius: 10px; }

.bess-reg-form { max-width: 640px; }
.bess-reg-section { background: #fff; border: 1px solid #e3e8ec; border-radius: 10px; padding: 20px 24px; margin-bottom: 16px; }
.bess-reg-section h3 { margin: 0 0 14px; color: #253745; font-size: 1rem; border-bottom: 2px solid #42AB49; padding-bottom: 6px; }
.bess-reg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bess-reg-form label { display: block; font-weight: 600; color: #253745; margin-bottom: 12px; font-size: .9rem; }
.bess-reg-form label small { display: block; font-weight: 400; color: #606A7F; margin-top: 2px; font-size: .78rem; }
.bess-reg-form input[type="text"],
.bess-reg-form input[type="email"],
.bess-reg-form input[type="password"],
.bess-reg-form input[type="tel"],
.bess-reg-form select,
.bess-reg-form textarea { display: block; width: 100%; padding: 9px 11px; border: 1px solid #cfd8df; border-radius: 6px; font-weight: 400; margin-top: 5px; box-sizing: border-box; font-size: .92rem; }
.bess-reg-form input:focus,
.bess-reg-form select:focus,
.bess-reg-form textarea:focus { outline: none; border-color: #42AB49; box-shadow: 0 0 0 2px rgba(66,171,73,.15); }
.bess-reg-policy { margin: 4px 0 16px; }
.bess-reg-policy label { font-weight: 400; color: #253745; }
.bess-reg-note { color: #606A7F; font-size: .82rem; margin-top: 8px; }
.bess-reg-form .req { color: #d9534f; }

/* ============================================================
   10. Responsive
   ============================================================ */
@media (max-width: 900px) {
  .bess-grid-3col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .bess-single-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .bess-grid-3col { grid-template-columns: 1fr; }
  .bess-filter-row { flex-wrap: wrap; }
  .bess-filter-label { flex: 0 0 100%; border-right: none; border-bottom: 1px solid #e8edf1; }
  .bess-filter-divider { display: none; }
  .bess-reg-row { grid-template-columns: 1fr; }
}
