
/* Supplymark mini trend */

.mini-chart {
  margin-top: 35px;
}

.mini-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.mini-chart-head span {
  color: #777;
}

#trend-chart {
  display: block;
  width: 100%;
  height: 90px;
  margin-top: 10px;
  border-bottom: 1px solid #ddd;
  color: #333;
}

.mini-chart-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #999;
  font-size: 10px;
}

/* ===== Compact 30-day trend ===== */

.mini-chart {
  width: 100%;
  max-width: 420px;
  margin-top: 32px;
}

.mini-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.mini-chart-head span {
  color: #777;
}

#trend-chart {
  display: block;
  width: 100%;
  height: 75px;
  margin-top: 8px;
  border-bottom: 1px solid #ddd;
  color: #333;
}

.mini-chart-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: #999;
  font-size: 10px;
}

/* 30日平均・30日比 */
.trend-stats {
  display: flex;
  width: 100%;
  max-width: 420px;
  margin-top: 14px;
}

.trend-stat {
  flex: 1;
  text-align: center;
}

.trend-stat + .trend-stat {
  border-left: 1px solid #ddd;
}

.trend-stat span {
  display: block;
  color: #777;
  font-size: 12px;
  margin-bottom: 4px;
}

.trend-stat strong {
  font-size: 16px;
}


/* ===== Simple axes for mini chart ===== */

.trend-chart-wrap {
  position: relative;
  padding-left: 42px;
  margin-top: 8px;
}

/* 左Y軸 */
.trend-chart-wrap::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ddd;
}

/* Y軸 最大値 */
.trend-max {
  position: absolute;
  left: 0;
  top: -3px;
  width: 30px;
  text-align: right;
  color: #999;
  font-size: 10px;
  line-height: 1;
}

/* グラフ本体 */
.trend-chart-wrap #trend-chart {
  display: block;
  width: 100%;
  height: 75px;
  margin-top: 0;
  border-bottom: 1px solid #ddd;
  color: #333;
}

/* X軸の日付はグラフ左端に合わせる */
.mini-chart-foot {
  display: flex;
  justify-content: space-between;
  padding-left: 42px;
  margin-top: 4px;
  color: #999;
  font-size: 10px;
}


/* ===== Market summary ===== */

.market-summary {
  display: flex;
  width: 100%;
  max-width: 420px;
  margin-top: 34px;
  margin-bottom: 22px;
}

.market-summary > div {
  flex: 1;
  text-align: center;
}

.market-summary > div + div {
  border-left: 1px solid #ddd;
}

.market-summary span {
  display: block;
  margin-bottom: 4px;
  color: #888;
  font-size: 11px;
}

.market-summary strong {
  font-size: 15px;
  font-weight: 600;
}


/* ===== Compact market list ===== */

.markets {
  width: 100%;
  max-width: 280px;
}

.markets h3 {
  margin-bottom: 16px;
}

.markets > div {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto;
  column-gap: 18px;
  align-items: baseline;
  margin-bottom: 6px;
}

.markets > div span {
  min-width: 0;
}

.markets > div strong {
  white-space: nowrap;
  font-weight: 600;
}


/* ===== Price block spacing ===== */

.result .caption {
  margin-bottom: 4px;
}

.result .price {
  margin-top: 0;
  margin-bottom: 24px;
}


/* ===== Product search ===== */

.product-search-wrap {
  position: relative;
  display: inline-block;
  width: 220px;
}

#product-search {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  font: inherit;
}

.product-results {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  z-index: 20;

  width: 100%;
  max-height: 240px;
  overflow-y: auto;

  background: #fff;
  border: 1px solid #ccc;
}

.product-results.active {
  display: block;
}

.product-result-item {
  padding: 7px 9px;
  cursor: pointer;
  font-size: 13px;
}

.product-result-item:hover {
  background: #f2f2f2;
}


/* ===== Variant visibility ===== */

#variant-field {
  display: inline-block;
}

#variant-field.hidden {
  display: none;
}


/* ===== Taiwan beta mobile finish ===== */

@media (max-width: 600px) {

  .container {
    width: auto;
    margin: 0 18px;
  }

  .product-search-wrap,
  #variant-field,
  #variant {
    width: 100%;
    max-width: 100%;
  }

  #product-search {
    width: 100%;
  }

  .mini-chart,
  .trend-stats,
  .market-summary {
    max-width: 100%;
  }

  .markets {
    max-width: 280px;
  }

  .price strong {
    line-height: 1.05;
  }
}

