@charset "UTF-8";

/* ====== コンテナ ====== */
/* 商品詳細ページ専用のコンテナ（layout_container内の.containerにスコープを限定） */
.breadcrumb-section .container,
.product-detail-section .container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ====== パンくずリスト ====== */
.breadcrumb-section {
  background: #f8f9fa;
  padding: 15px 0;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.breadcrumb-section .container {
  padding: 0 20px;
}

.breadcrumb-nav ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-nav li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-nav a {
  color: #495057;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.breadcrumb-nav a:hover {
  background: #e9ecef;
  color: #e74c3c;
}

.breadcrumb-separator {
  color: #adb5bd;
  font-weight: bold;
}

/* ====== 商品詳細セクション ====== */
.product-detail-section {
  padding: 40px 0;
  background: #f8f9fa;
  box-sizing: border-box;
}

.product-header {
  margin-bottom: 40px;
  text-align: center;
}

.product-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  line-height: 1.4;
  position: relative;
  padding-bottom: 15px;
}

.product-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  border-radius: 2px;
}

/* ====== メインコンテンツ ====== */
.product-main-content {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 30px;
  margin-bottom: 40px;
}

/* ====== 商品画像 ====== */
.product-image-section {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.product-image-main {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #f8f9fa;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.main-image {
  width: 100%;
  height: auto;
  max-height: 700px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-image-main:hover .main-image {
  transform: scale(1.02);
}

.product-image-thumbnails {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.product-image-thumbnails ul {
  display: flex;
  flex-direction: row;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.thumbnail-item {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  background: white;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.thumbnail-item:hover,
.thumbnail-item.active {
  border-color: #e74c3c;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ====== 商品情報カード ====== */
.product-info-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: sticky;
  top: 100px;
  align-self: start;
}

.product-info-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.info-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  position: relative;
}

.info-card-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 50px;
  height: 3px;
  background: #e74c3c;
  border-radius: 2px;
}

.product-spec-list {
  margin-bottom: 25px;
}

.spec-item {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px solid #e9ecef;
  align-items: flex-start;
  gap: 20px;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  width: 140px;
  font-weight: 600;
  color: #2c3e50;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.spec-value {
  flex: 1;
  color: #555;
  line-height: 1.6;
}

/* 価格表示 */
.price-item .spec-value {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-display {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.product-sales {
  font-size: 2rem;
  font-weight: 700;
  color: #e74c3c;
  line-height: 1.2;
}

.product-discount {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.original-price {
  text-decoration: line-through;
  color: #95a5a6;
  font-size: 1rem;
}

.regular-price {
  color: #e74c3c;
  font-weight: 600;
  font-size: 1.1rem;
}

/* 在庫バッジ */
.stock-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.stock-badge.in-stock {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.stock-badge.out-of-stock {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* オプション選択 */
.option-select {
  width: 100%;
  max-width: 300px;
  padding: 10px 15px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  background: white;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.option-select:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

.text-input {
  width: 100%;
  max-width: 300px;
  padding: 10px 15px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.text-input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

/* 数量コントロール */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  background: white;
  font-size: 1.5rem;
  font-weight: 700;
  color: #495057;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.quantity-btn:hover {
  background: #f8f9fa;
  border-color: #3498db;
  color: #3498db;
  transform: scale(1.05);
}

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity-btn-minus {
  border-radius: 8px 0 0 8px;
}

.quantity-btn-plus {
  border-radius: 0 8px 8px 0;
}

.quantity-input {
  width: 80px;
  padding: 10px 5px;
  border: 2px solid #dee2e6;
  border-left: none;
  border-right: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  appearance: textfield;
  -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
  border-left: 2px solid #3498db;
  border-right: 2px solid #3498db;
}

.quantity-unit {
  color: #7f8c8d;
  font-size: 0.95rem;
  font-weight: 500;
  margin-left: 5px;
}

/* ステータスメッセージ */
.status-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.soldout-message {
  background: linear-gradient(135deg, #fdf2f2, #fee2e2);
  color: #991b1b;
  border: 2px solid #fecaca;
}

.member-only-message {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 2px solid #fcd34d;
}

.status-icon {
  font-size: 1.2rem;
}

/* ====== 商品アクション ====== */
.product-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.add-to-cart-btn,
.quick-order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.add-to-cart-btn {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.quick-order-btn {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
}

.quick-order-btn:hover {
  background: linear-gradient(135deg, #e67e22, #d35400);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.btn-icon {
  font-size: 1.3rem;
}

.btn-text {
  font-weight: 700;
}

/* ====== 商品説明 ====== */
.product-description-section {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-bottom: 40px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  border-radius: 2px;
}

.product-description {
  line-height: 1.8;
  color: #555;
  font-size: 1rem;
}

.product-description p {
  margin-bottom: 1em;
}

.product-description img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
}

/* ====== オプション選択 ====== */
.product-options-section {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-bottom: 40px;
}

.product-option-table {
  overflow-x: auto;
  margin-top: 20px;
}

.product-option-table table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.product-option-table th,
.product-option-table td {
  padding: 15px;
  text-align: left;
  border: 1px solid #e9ecef;
}

.product-option-table th {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  font-weight: 700;
  color: #2c3e50;
}

.product-option-table td {
  background: white;
}

.product-option-table tr:hover td {
  background: #f8f9fa;
}

/* ====== サイドバー ====== */
.product-sidebar-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.sidebar-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.sidebar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.sidebar-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
  position: relative;
}

.sidebar-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: #e74c3c;
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links li {
  margin-bottom: 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: #495057;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.95rem;
}

.sidebar-link:hover {
  background: #f8f9fa;
  color: #e74c3c;
  border-left-color: #e74c3c;
  transform: translateX(5px);
}

.link-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.social-buttons > * {
  margin: 0 !important;
  flex-shrink: 0;
}

/* ====== トラックバック ====== */
.trackback-section {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-bottom: 40px;
}

.subsection-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 25px 0 15px;
}

.trackback-list {
  margin-bottom: 25px;
}

.trackback-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trackback-item {
  padding: 20px;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  margin-bottom: 15px;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.trackback-item:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.trackback-date {
  font-weight: 600;
  margin-bottom: 10px;
  color: #2c3e50;
}

.trackback-date a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.trackback-date a:hover {
  color: #e74c3c;
  text-decoration: underline;
}

.trackback-message {
  color: #555;
  line-height: 1.6;
}

.trackback-url {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  background: #f8f9fa;
  font-family: monospace;
  font-size: 0.9rem;
  color: #495057;
}

/* ====== 関連商品 ====== */
.related-products-section {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-bottom: 40px;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.related-product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.related-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.related-product-link {
  display: block;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.related-product-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image {
  transform: scale(1.05);
}

.related-product-name {
  padding: 15px;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.4;
}

.related-product-name a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-product-name a:hover {
  color: #e74c3c;
}

/* ====== 商品なし表示 ====== */
.product-unavailable {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.unavailable-icon {
  font-size: 4rem;
  margin-bottom: 25px;
  opacity: 0.7;
}

.unavailable-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
}

.unavailable-message {
  color: #7f8c8d;
  line-height: 1.8;
  font-size: 1rem;
}

/* ====== レスポンシブデザイン ====== */
@media (max-width: 1024px) {
  .product-main-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .product-info-card {
    position: static;
  }
  
  .product-image-main {
    min-height: 350px;
  }
  
  .main-image {
    max-height: 500px;
  }
  
  .thumbnail-item {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 768px) {
  .product-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .product-info-card,
  .product-description-section,
  .product-options-section,
  .trackback-section,
  .related-products-section {
    padding: 25px;
  }
  
  .product-sales {
    font-size: 1.5rem;
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .add-to-cart-btn,
  .quick-order-btn {
    width: 100%;
  }
  
  .spec-item {
    flex-direction: column;
    gap: 8px;
  }
  
  .spec-label {
    width: 100%;
  }
  
  .related-products-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .product-sidebar-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  /* product-detail-sectionのpadding調整（共通レイアウトに影響しない） */
  .product-detail-section {
    padding: 20px 0;
  }
  
  .product-title {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .product-info-card,
  .product-description-section,
  .product-options-section {
    padding: 20px;
  }
  
  .main-image {
    max-height: 350px;
  }
  
  .thumbnail-item {
    width: 60px;
    height: 60px;
  }
  
  .quantity-btn {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }
  
  .quantity-input {
    width: 70px;
  }
  
  .product-sales {
    font-size: 1.3rem;
  }
  
  .related-products-grid {
    grid-template-columns: 1fr;
  }
}

/* ====== アニメーション ====== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-info-card,
.product-description-section,
.product-options-section,
.sidebar-card,
.related-products-section {
  animation: fadeInUp 0.6s ease forwards;
}

/* ====== アクセシビリティ ====== */
.add-to-cart-btn:focus,
.quick-order-btn:focus,
.thumbnail-item:focus,
.option-select:focus,
.text-input:focus,
.quantity-input:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* ====== 印刷用スタイル ====== */
@media print {
  .product-actions,
  .product-sidebar-section,
  .social-buttons {
    display: none;
  }
  
  .product-main-content {
    grid-template-columns: 1fr;
  }
  
  .product-image-section {
    grid-template-columns: 1fr;
  }
}

