/* 買取情報表示スタイル - purchase-info.css */

/* 買取情報表示のスタイル */
.purchase-info {
  font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 15px;
  margin-top: 10px;
}

.item-header {
  display: flex;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.item-image {
  flex: 0 0 80px;
  margin-right: 15px;
}

.item-details {
  flex: 1;
}

.item-details h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
  color: #333;
}

.max-price {
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
}

.max-price span {
  font-size: 18px;
  font-weight: bold;
  color: #e53935;
}

.shop-list-container {
  margin-bottom: 20px;
}

.shop-list-container h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  color: #333;
}

.shop-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.shop-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.shop-list th, .shop-list td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.shop-list th {
  background-color: #f5f5f5;
  font-weight: normal;
  color: #666;
}

.shop-list .price {
  font-weight: bold;
  color: #e53935;
}

.shop-link {
  color: #2196F3;
  text-decoration: none;
}

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

.price-info {
  font-size: 12px;
  color: #999;
  text-align: right;
}

/* Amazonリンクスタイル */
.amazon-link-title {
  color: #0066cc !important;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.amazon-link-title:hover {
  color: #004499 !important;
  text-decoration: underline;
}

.amazon-link-image {
  display: inline-block;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.amazon-link-image:hover {
  border-color: #0066cc;
  box-shadow: 0 2px 8px rgba(0,102,204,0.3);
  transform: scale(1.02);
}

.amazon-link-image img {
  display: block;
}

/* iOS Safariでは「全て開く」ボタンを非表示 */
body.ios-safari .open-all-button,
body.ios-safari #open-all-container {
    display: none !important;
}

/* スマホビュー調整 */
@media screen and (max-width: 500px) {
  /* 商品ヘッダーを横並びに */
  .item-header {
    display: flex;
    flex-direction: row !important;
    align-items: flex-start;
  }
  
  .item-image {
    margin-right: 10px;
    margin-bottom: 0;
    flex: 0 0 50px;
  }
  
  .item-details h2 {
    font-size: 13px;
    margin-top: 0;
    margin-bottom: 3px;
    line-height: 1.2;
  }
  
  /* 商品詳細内の間隔調整 */
  .item-details p {
    margin: 1px 0;
    line-height: 1.2;
    font-size: 11px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* JANコードとボタンの行 - 折り返し対応 */
  .item-details p:first-of-type {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin-bottom: 3px;
  }
  
  /* JANテキスト部分 */
  .jan-text {
    flex: 1 1 100%;
    margin-bottom: 2px;
    font-size: 10px;
  }
  
  /* ボタンコンテナ */
  .button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    width: 100%;
  }
  
  .item-details .max-price {
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 11px;
    margin-bottom: 5px;
    line-height: 1.2;
    gap: 5px;
  }
  
  .max-price span {
    font-size: 13px;
    white-space: nowrap;
  }
  
  /* 買取価格一覧のヘッダー調整 */
  .shop-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .shop-list-header h3 {
    margin: 0;
    font-size: 14px;
  }
  
  .shop-list th, .shop-list td {
    padding: 5px 3px;
    font-size: 12px;
    word-break: break-word;
  }
  
  /* テーブル関連の修正 */
  .shop-list {
    width: 100%;
    font-size: 12px;
    table-layout: fixed;
  }
  
  /* 列の幅を調整 */
  .shop-list th:nth-child(1),
  .shop-list td:nth-child(1) {
    width: 40%;
  }
  
  .shop-list th:nth-child(2),
  .shop-list td:nth-child(2) {
    width: 25%;
  }
  
  .shop-list th:nth-child(3),
  .shop-list td:nth-child(3) {
    width: 35%;
  }
  
  /* 全体の余白調整 */
  .item-header {
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
  
  /* 購入情報コンテナの余白調整 */
  .purchase-info {
    padding: 10px;
    margin-top: 10px;
    overflow-x: hidden;
    word-wrap: break-word;
  }
}