/* ========================================
   共通スタイル
======================================== */

/* minneボタン */
.minne {
  width: calc(100% - 40px);
  max-width: 500px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 20px;
  font-weight: normal;
  padding: 15px 10px;
  background-color: #ffa200;
  display: block;
  color: #000;
  text-align: center;
  margin: 20px auto 0;
  padding-left: 20px;
  padding-right: 20px;
}

.minne:hover {
  text-decoration: none;
  background-color: #ffba63;
}

/* ボタン共通 */
.c-btn-cart:hover {
  background-color: #f5f5f5;
}

/* 売り切れボタン */
.sold-button {
  padding: 10px;
  text-align: center;
  font-size: 16px;
  background: #fff;
  border-radius: 3px;
  color: #db425b;
  letter-spacing: 4px;
  border: 1px solid #db425b;
  margin: 30px 0 30px;
}

/* 販売情報 */
.hanbai-info {
  display: block;
  margin: 20px 0 0;
}

.hanbai-info a {
  display: block;
  padding: 2px 0;
}

/* 送料無料 */
.soryo {
  font-size: 18px;
  display: block;
}

/* 価格表示 */
.p-product-price p {
  display: block;
  color: #575757;
  font-size: 12px;
  padding: 2px 0;
}

/* レビュー表示ボタン */
#show-more-reviews {
  display: block;
  padding: 8px 30px;
  color: #fff;
  text-align: left;
  margin: 10px 10px;
  background: #1D74B3;
  border-radius: 5px;
  border: 0px solid #fff;
}

/* イベントコンテナ */
.event-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
}

.edit-link {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}

.edit-link:hover {
  text-decoration: underline;
}

/* カレンダー関連 */
.fc-wrapper-unique {
  position: relative;
  max-height: 248px;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.fc-wrapper-unique.expanded {
  max-height: none;
  opacity: 1;
}

.fc-more-btn-unique {
  display: block;
  width: fit-content;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: #444;
  color: #fff;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  user-select: none;
  z-index: 100;
}

.fc-more-btn-unique:hover {
  background-color: #666;
}

/* ========================================
   PC（649px以上）
======================================== */

@media screen and (min-width: 649px) {
  /* クーポン */
  .minne-coupon {
    display: block;
    margin: 5px 0 30px;
    width: 95%;
    border-radius: 6px;
    box-sizing: border-box;
    background: #f2f2f2;
    padding: 15px;
  }
  
  .minne-coupon span {
    font-size: 1.5em;
    font-weight: bold;
  }

  /* イベント案内 */
  .event-guidance {
    padding: 15px;
    margin: 15px 0 0;
    font-size: 13px;
    background: #f2f2f2;
    line-height: 1.5;
  }

  /* PC幅調整 */
  .pc-wide {
    padding: 30px 60px 0;
  }

  /* カートボタン */
  .c-btn-cart {
    width: calc(100% - 20px);
    max-width: 500px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: normal;
    padding: 20px 10px;
    background-color: #fff;
    display: block;
    border: 1px solid #ccc;
    color: #000;
    text-align: center;
    margin: 10px 0 0;
  }

  /* 商品メイン */
  .p-product-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 100px;
  }

  /* 商品画像 */
  .p-product-img {
    width: 500px;
  }

  .p-product-img__main {
    text-align: center;
    margin: 10px 0 0;
  }

  .p-product-img__main-item {
    position: relative;
    text-align: center;
  }

  .p-product-img__main-item:before {
    content: "";
    display: block;
    padding-top: 100%;
  }

  .p-product-img__main-item img {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    width: auto !important;
    max-width: 100%;
    max-height: 100%;
    text-align: center;
  }

  /* サムネイル */
  .p-product-thumb-list {
    display: flex;
    flex-wrap: wrap;
    margin-left: -4px;
    margin-right: -4px;
    margin-top: 8px;
  }

  .p-product-thumb-list__item {
    box-sizing: border-box;
    margin-bottom: 8px;
    padding-left: 4px;
    padding-right: 4px;
    width: 20%;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .p-product-thumb-list__item:hover,
  .p-product-thumb-list__item.is-current {
    opacity: 0.7;
    cursor: pointer;
  }

  .p-product-thumb-list__img {
    position: relative;
    text-align: center;
  }

  .p-product-thumb-list__img:before {
    content: "";
    display: block;
    padding-top: 100%;
  }

  .p-product-thumb-list__img img {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    width: auto !important;
    max-width: 100%;
    max-height: 100%;
    text-align: center;
  }

  /* 商品情報 */
  .p-product-info {
    width: 430px;
    color: #212121;
    border: 0px solid #ccc;
  }

  .p-product-info__ttl {
    margin: 20px 0 10px;
    font-size: 16px;
    font-weight: bold;
  }

  .p-product-price {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .p-product-price span {
    font-size: 24px;
    margin: 5px 0;
    font-weight: bold;
  }

  /* 商品説明 */
  .p-product-explain {
    width: 410px;
  }

  .p-product-explain-line {
    border-top: 1px dashed #8c8b8b;
    border-bottom: 1px dashed #fff;
  }

  .p-product-explain__body {
    white-space: pre-wrap;
  }

  /* レビュー（蚤の市） */
  .p-product-review {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .p-product-review__item {
    width: calc(33.33% - 20px);
    margin: 20px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 15px;
    box-sizing: border-box;
  }

  .p-product-review__image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    margin: 0 auto 15px;
  }

  .p-product-review__comment {
    flex: 1;
    padding: 5px 5px 10px;
    font-size: 13px;
    height: 170px;
    overflow: hidden;
    position: relative;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* レビュー（ショップ） */
  .p-product-review-shop {
    display: block;
  }

  .p-product-review__shop {
    margin: 20px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
  }

  .p-product-review__top {
    display: flex;
    flex-direction: row;
  }

  .p-product-review__image__shop {
    flex: 0 0 100px;
    margin-right: 15px;
  }

  .p-product-review__image__shop img {
    width: 100px;
    height: 100px;
    margin: 10px 0 0;
    object-fit: cover;
  }

  .p-product-review__comment__shop {
    flex-grow: 1;
    padding: 5px 5px 10px;
  }

  .p-product-review-reply {
    margin: 10px 0 0;
    background: #f7f7f7;
    padding: 15px;
  }

  .p-product-review__stars {
    display: block;
  }

  .p-product-review__stars i {
    color: #FFD700;
    margin-right: 2px;
  }

  .p-product-review-reply__ttl {
    margin: 0 0 10px;
  }

  /* ショップ画像 */
  .image-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
  }

  .image-container img {
    width: 49%;
    height: auto;
    aspect-ratio: 1.618 / 1;
    object-fit: cover;
  }
}

/* ========================================
   スマホ（648px以下）
======================================== */

@media screen and (max-width: 648px) {
  /* クーポン */
  .minne-coupon {
    display: block;
    margin: 5px 0 30px;
    border-radius: 6px;
    background: #f2f2f2;
    padding: 15px;
  }
  
  .minne-coupon span {
    font-size: 1.5em;
    font-weight: bold;
  }

  /* イベント案内 */
  .event-guidance {
    background: #f2f2f2;
    padding: 10px;
    margin: 15px 0 0;
    font-size: 12px;
    height: 40px;
    line-height: 1.5;
  }

  /* カートボタン */
  .c-btn-cart {
    width: calc(100% - 0px);
    max-width: 500px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: normal;
    padding: 20px 10px;
    background-color: #fff;
    display: block;
    border: 1px solid #ccc;
    color: #000;
    text-align: center;
    margin: 10px auto 0;
  }

  /* 商品メイン */
  .p-product-main {
    display: block;
    margin-bottom: 100px;
  }

  /* 商品画像 */
  .p-product-img {
    width: auto;
    margin: 10px -10px 45px;
  }

  .p-product-img__main {
    width: auto;
  }

  .p-product-img__main-item {
    text-align: center;
    position: relative;
  }

  .p-product-img__main-item img {
    display: block;
    width: 100% !important;
    height: auto;
    max-width: 100%;
    text-align: center;
  }

  /* サムネイル */
  .p-product-thumb-list {
    margin-left: 0;
    margin-right: 0;
    flex-wrap: nowrap;
    display: flex;
    flex-wrap: wrap;
    margin-left: -4px;
    margin-right: -4px;
    margin-top: 8px;
  }

  .p-product-thumb-list__item {
    margin-right: 5px;
    padding-left: 0;
    padding-right: 0;
    width: 60px;
    box-sizing: border-box;
    margin-bottom: 8px;
    padding-left: 4px;
    padding-right: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .p-product-thumb-list__item:hover,
  .p-product-thumb-list__item.is-current {
    opacity: 0.7;
    cursor: pointer;
  }

  .p-product-thumb-list__item img {
    width: 60px;
    height: auto;
  }

  .p-product-thumb-list__img {
    width: 60px;
    text-align: center;
    position: relative;
  }

  .p-product-thumb-list__img img {
    display: block;
    width: 100% !important;
    height: auto;
    max-width: 100%;
    text-align: center;
  }

  /* 商品情報 */
  .p-product-info {
    width: auto;
    padding: 0 10px;
    color: #212121;
    border: 0px solid #ccc;
  }

  .p-product-info__ttl {
    font-size: 16px;
    margin: 20px 0 10px;
    font-weight: bold;
  }

  .p-product-price {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .p-product-price span {
    font-size: 24px;
    margin: 5px 0;
    font-weight: bold;
  }

  /* 商品説明 */
  .p-product-explain {
    width: auto;
  }

  .p-product-explain-line {
    border-top: 1px dashed #8c8b8b;
    border-bottom: 1px dashed #fff;
  }

  .p-product-explain__body {
    white-space: pre-wrap;
  }

  /* レビュー（蚤の市） */
  .p-product-review {
    display: block;
    padding: 5px;
  }

  .p-product-review__item {
    width: 100%;
    border: 1px solid #ccc;
    margin: 20px 0;
    padding: 10px;
    border-radius: 5px;
    box-sizing: border-box;
  }

  .p-product-review__image img {
    width: 100%;
    display: block;
    margin: 0 auto 5px;
  }

  .p-product-review__comment {
    flex: 1;
    padding: 5px 5px 20px;
    font-size: 12px;
    height: 140px;
    position: relative;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* レビュー（ショップ） */
  .p-product-review-shop {
    display: block;
  }

  .p-product-review__shop {
    margin: 20px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
  }

  .p-product-review__top {
    display: flex;
    flex-direction: row;
  }

  .p-product-review__image__shop {
    flex: 0 0 70px;
    margin-right: 10px;
  }

  .p-product-review__image__shop img {
    width: 70px;
    height: 70px;
    object-fit: cover;
  }

  .p-product-review__comment__shop {
    flex-grow: 1;
    font-size: 11px;
    padding: 5px 5px 10px;
  }

  .p-product-review-reply {
    margin: 10px 0 0;
    background: #f2f2f2;
    padding: 15px;
  }

  .p-product-review-reply__body {
    font-size: 11px;
    margin: 5px 0 0;
  }

  .p-product-review__stars {
    display: flex;
    margin: 0 0 10px;
  }

  .p-product-review__stars i {
    color: #FFD700;
    margin-right: 2px;
  }

  /* ショップ画像 */
  .image-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
  }

  .image-container img {
    width: 49%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }
}

/* ========================================
   商品詳細ページ全体
======================================== */

.p-product {
  margin-bottom: 90px;
}

.p-product-info img {
  margin: 0 0 5px;
}

.p-product-info p {
  display: block;
  margin: 2px 0 !important;
}

.p-product-info__ttl img {
  vertical-align: middle;
}

.p-product-form__error-message {
  color: #DB5656;
  margin-top: 15px;
}

/* フォーム要素 */
.p-product select {
  box-sizing: border-box;
  padding: 5px;
  height: 40px;
  border: 1px solid #bfbfbf;
  font-size: 16px;
}

.p-product input[type=text] {
  box-sizing: border-box;
  padding: 5px;
  height: 40px;
  border: 1px solid #bfbfbf;
  font-size: 16px;
}

/* スライダー矢印 */
.p-product-img__main .slick-track {
  margin-left: 0;
  margin-right: 0;
}

.p-product-img__main .slick-prev,
.p-product-img__main .slick-next {
  top: 50%;
  width: 30px;
  height: 30px;
  transition: all 0.4s ease;
  z-index: 1;
}

.p-product-img__main .slick-prev:before,
.p-product-img__main .slick-next:before {
  content: "";
  position: absolute;
  top: 7px;
  left: 10px;
  width: 15px;
  height: 15px;
  border-left: 1px solid #000000;
  border-top: 1px solid #000000;
  transition: all 0.4s ease;
  z-index: 1;
}

.p-product-img__main .slick-prev {
  left: 15px;
}

.p-product-img__main .slick-prev:before {
  transform: rotate(-45deg);
}

.p-product-img__main .slick-next {
  right: 15px;
}

.p-product-img__main .slick-next:before {
  left: 4px;
  transform: rotate(135deg);
}

/* スマホ用スライダー矢印 */
@media screen and (max-width: 648px) {
  .p-product-img__main .slick-prev,
  .p-product-img__main .slick-next {
    width: 45px;
    height: 45px;
  }

  .p-product-img__main .slick-prev:before,
  .p-product-img__main .slick-next:before {
    top: 15px;
  }

  .p-product-img__main .slick-prev {
    left: 0px;
  }

  .p-product-img__main .slick-prev:before {
    left: 17px;
  }

  .p-product-img__main .slick-next {
    right: 0px;
  }

  .p-product-img__main .slick-next:before {
    left: 13px;
  }
}

/* ========================================
  蚤の市個別ページのインスタ表示（PC安定配置）
======================================== */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.nominoichi-post{
  --surface:#fff;--border:#e5e7eb;--text:#111827;--muted:#6b7280;
  background:var(--surface);color:var(--text);border:1px solid var(--border);
  border-radius:12px;padding:16px;margin:16px auto;max-width:920px;
  box-shadow:0 2px 10px rgba(0,0,0,.04);font-size:14px;line-height:1.7;
}

/* 画像 */
.nominoichi-post img{display:block;max-width:100%;height:auto;border-radius:10px;margin:6px 0}

/* blockquote リセット（縦バー等を消す） */
.nominoichi-post blockquote{margin:0;padding:0;font-style:normal;border:none;background:none}

/* テキスト共通（改行保持） */
.nominoichi-post p,.nominoichi-post .caption{line-height:1.7;margin:8px 0;white-space:pre-wrap;font-size:14px}

/* キャプション幅（PCのみ絞る） */
.nominoichi-post .caption{max-width:62ch}
@media (max-width:648px){.nominoichi-post .caption{max-width:none}}

/* 折りたたみ：空白が出ないよう max-height でカット */
.collapsible{
  max-height:calc(1.7em * 10);  /* 初期は10行表示 */
  overflow:hidden;
  position:relative;
  transition:max-height .3s ease;
}
.collapsible::after{
  content:"";position:absolute;bottom:0;left:0;height:2.4em;width:100%;
  background:linear-gradient(to bottom, rgba(255,255,255,0), #fff);
  pointer-events:none;
}
.collapsible.expanded{max-height:none}
.collapsible.expanded::after{display:none}

/* ボタン：キャプションの上に配置 */
.toggle-btn{
  display:inline-block;
  margin: 5px 0 15px 0px;
  background:none;border:none;color:#2563eb;cursor:pointer;font-size:14px;padding:0
}
.toggle-btn:hover{text-decoration:underline}

/* リンク共通 */
.nominoichi-post a{color:#2563eb;text-decoration:none;border-bottom:1px dotted currentColor}
.nominoichi-post a:hover,.nominoichi-post a:focus{text-decoration:underline}

/* PCレイアウト：画像左／右カラムは meta（縦積み） */
@media (min-width:649px){
  .nominoichi-post{
    display:grid;
    grid-template-columns:360px 1fr;
    gap:18px;
    align-items:start;
  }
  /* 見出しは全幅上段 */
  .nominoichi-post>b{grid-column:1 / -1;display:block;margin-bottom:6px}

  /* 左カラム：画像 */
  .nominoichi-post>img{grid-column:1 / 2}

  /* 右カラム：metaコンテナにまとめる */
  .nominoichi-post>.meta{
    grid-column:2 / 3;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
  }
}

/* ダーク */
@media (prefers-color-scheme:dark){
  .nominoichi-post{--surface:#0f1115;--border:#1f2937;--text:#e5e7eb;--muted:#a1a1aa;box-shadow:none}
  .collapsible::after{background:linear-gradient(to bottom, rgba(15,17,21,0), #0f1115)}
}

/* 関連リンク */
.related-links{margin-top:14px}
.related-links h4{
  font-size:13px;
  margin:0 0 8px;
  color:#333;
}
.related-links ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.related-links li{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:6px;
  padding:8px 14px;
  font-size:12px; /* ← 少し小さく */
  box-shadow:0 1px 3px rgba(0,0,0,0.08);
  transition:transform .2s, box-shadow .2s;
}
.related-links li:hover{
  transform:translateY(-2px);
  box-shadow:0 3px 6px rgba(0,0,0,0.12);
}
.related-links a {
  text-decoration: none !important;  /* 下線を強制的に消す */
  border-bottom: none !important;    /* 点線ボーダーも消す */
  color: #111;                       /* 黒文字 */
  font-weight: 400;                  /* 標準ウェイト */
  font-size: inherit;                /* li に揃える */
}

.related-links a:hover {
  text-decoration: none !important;  /* hoverでも下線を出さない */
  border-bottom: none !important;
  color: #000;                       /* hover時も黒 */
}
