/* Product Detail Page Styles */

/* Breadcrumb (reusing from products.css) */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 20px 60px;
  margin-top: 20px;
}

.breadcrumb-link {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #313131;
  text-decoration: none;
  transition: opacity 0.3s;
}

.breadcrumb-link:hover {
  opacity: 0.7;
}

.breadcrumb-icon {
  flex-shrink: 0;
}

.breadcrumb-current {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #313131;
}

/* Product Detail Section */
.product-detail-section {
  padding: 20px 60px 40px;
}

.product-detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Product Images */
.product-images {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.main-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background-color: #EFF0F5;
  border-radius: 17px;
  overflow: hidden;
  border: 1px solid #DBDBDB;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.favorite-btn:hover {
  background-color: #FFF;
  transform: scale(1.1);
}

.favorite-btn svg path {
  transition: all 0.3s;
}

.favorite-btn:hover svg path {
  stroke: #DC4D4D;
  fill: #DC4D4D;
}

.thumbnail-images {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.thumbnail {
  width: 87px;
  height: 87px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  object-fit: cover;
}

.thumbnail:hover {
  border-color: #AB7C53;
  opacity: 0.8;
}

.thumbnail.active {
  border-color: #AB7C53;
}

/* Product Info */
.product-info-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-jan {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #333;
  letter-spacing: 0.7px;
}

.product-name {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #303030;
  letter-spacing: 0.6px;
  line-height: 1.5;
}

.product-price-detail {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.price-amount {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #AB7C53;
  letter-spacing: 1.3px;
}

.price-tax {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: rgba(48, 48, 48, 0.75);
  letter-spacing: 0.7px;
}

/* Product Options */
.product-option {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.option-label {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.6px;
}

.color-options,
.size-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-option {
  padding: 8px 20px;
  background-color: #FFF;
  border: 1px solid #AAA;
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #000;
  cursor: pointer;
  transition: all 0.3s;
}

.color-option:hover {
  border-color: #AB7C53;
  background-color: #FFFCF3;
}

.color-option.active {
  border: 2px solid #AB7C53;
  background-color: #FFFCF3;
}

/* 颜色选择 - 图片样式（与参考图一致） */
.color-options-image {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-option-image {
  padding: 0;
  width: auto;
  height: auto;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid #E0E0E0;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.color-option-image:hover {
  border-color: #D0D0D0;
}

.color-option-image .color-option-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 92px;
  border-radius: 8px;
  background-color: #FFF;
  overflow: hidden;
  padding: 0;
}

.color-option-img-wrap {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  overflow: hidden;
  order: 1;
}

.color-option-image .color-option-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 名称在上、图片在下（与参考图一致） */
.color-option-image .color-option-name {
  order: 0;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #303030;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.4;
  padding: 8px 6px 6px;
  min-height: 28px;
  width: 100%;
  box-sizing: border-box;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 选中：粗而明显的浅棕色/金色圆角边框 */
.color-option-image.active {
  border: 3px solid #C8A27D;
  background: transparent;
  box-shadow: 0 0 0 0 transparent;
}

/* 未选中：细而不明显的浅灰色边框（默认已设） */
.color-option-image:not(.active) {
  border: 1px solid #E0E0E0;
}

.size-option {
  width: 91px;
  height: 33px;
  background-color: #FFF;
  border: 1px solid #AAA;
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #000;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.size-option:hover {
  border-color: #AB7C53;
  background-color: #FFFCF3;
}

.size-option.active {
  border: 2px solid #AB7C53;
  background-color: #FFFCF3;
}

/* Quantity Selector */
.product-quantity {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.quantity-label {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.quantity-selector {
  display: flex;
  align-items: center;
  width: fit-content;
  background-color: #FFF;
  border: 1px solid #AAA;
  border-radius: 5px;
  overflow: hidden;
}

.quantity-btn {
  width: 33px;
  height: 33px;
  background-color: #FFF;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #333;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background-color: #F5F5F5;
}

.quantity-input {
  width: 60px;
  height: 33px;
  border: none;
  border-left: 1px solid #AAA;
  border-right: 1px solid #AAA;
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: #000;
  outline: none;
}

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

/* Product Color Images */
.product-color-images {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.color-image {
  width: 92px;
  height: 92px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  object-fit: cover;
}

.color-image:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Action Buttons */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
  transition: all 0.3s;
}

.product-actions.fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #FFFCF3;
  padding: 15px 60px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  margin-top: 0;
}

.product-actions.fixed .btn-add-cart,
.product-actions.fixed .btn-buy-now {
  max-width: 600px;
  margin: 0 auto;
}

.btn-add-cart,
.btn-buy-now {
  width: 100%;
  height: 48px;
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid;
}

.btn-add-cart {
  background-color: #FFFCF3;
  border-color: #000;
  color: #303030;
}

.btn-add-cart:hover {
  background-color: #F5F0E5;
}

.btn-buy-now {
  background: linear-gradient(180deg, #D7BF9E 0%, #AF936E 100%);
  border-color: #AB7C53;
  color: #FFF;
}

.btn-buy-now:hover {
  background: linear-gradient(180deg, #E0C9A8 0%, #B89D78 100%);
}

/* Product Details Tabs */
.product-details-tabs {
  padding: 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.tabs-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.tabs-title {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: #303030;
  letter-spacing: 0.6px;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid #6D6D6D;
}

.tab-btn {
  flex: 1;
  max-width: 363px;
  height: 35px;
  background-color: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #303030;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.tab-btn:hover {
  background-color: #F5F0E5;
}

.tab-btn.active {
  background-color: #EBE5D9;
}

.tabs-content {
  padding: 20px 0;
}

.tab-panel {
  display: none;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #303030;
  line-height: 2.3;
}

.tab-panel.active {
  display: block;
}

/* Recommended Products */
.recommended-products {
  padding: 40px 60px;
}

.recommended-products .section-header {
  margin: 20px 0 40px;
}

.recommended-products .section-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: #333;
  text-align: center;
}

.product-grid-recommended {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 11px;
  margin-bottom: 20px;
}

.product-grid-recommended .product-card {
  cursor: pointer;
  transition: transform 0.3s;
}

.product-grid-recommended .product-card:hover {
  transform: translateY(-5px);
}

.product-grid-recommended .product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.product-grid-recommended .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #CCC;
  border-radius: 10px;
}

.product-grid-recommended .badge-reserve {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: #FFF;
  border: 1px solid #AB7C53;
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 10px;
  color: #AB7C53;
}

.product-grid-recommended .product-title {
  font-size: 12px;
  font-weight: 600;
  color: #000;
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-grid-recommended .product-price {
  font-size: 12px;
  font-weight: 500;
  color: #8B7A6C;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .breadcrumb,
  .product-detail-section,
  .product-details-tabs,
  .recommended-products {
    padding-left: 40px;
    padding-right: 40px;
  }

  .product-detail-container {
    gap: 40px;
  }

  .product-grid-recommended {
    grid-template-columns: repeat(4, 1fr);
  }

  .product-actions.fixed {
    padding: 15px 40px;
  }
}

@media (max-width: 992px) {
  .breadcrumb,
  .product-detail-section,
  .product-details-tabs,
  .recommended-products {
    padding-left: 30px;
    padding-right: 30px;
  }

  .product-detail-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .product-grid-recommended {
    grid-template-columns: repeat(3, 1fr);
  }

  .tabs-nav {
    flex-wrap: wrap;
  }

  .tab-btn {
    max-width: none;
  }

  .product-actions.fixed {
    padding: 15px 30px;
  }
}

@media (max-width: 768px) {
  .breadcrumb,
  .product-detail-section,
  .product-details-tabs,
  .recommended-products {
    padding-left: 20px;
    padding-right: 20px;
  }

  .breadcrumb {
    padding-top: 15px;
    padding-bottom: 15px;
    margin-top: 10px;
  }

  .product-detail-section {
    padding-top: 15px;
    padding-bottom: 30px;
  }

  .product-name {
    font-size: 20px;
  }

  .price-amount {
    font-size: 20px;
  }

  .product-grid-recommended {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .tabs-title {
    font-size: 20px;
  }

  .tab-btn {
    font-size: 14px;
  }

  .thumbnail-images {
    gap: 8px;
  }

  .thumbnail {
    width: 70px;
    height: 70px;
  }

  .product-actions.fixed {
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .breadcrumb,
  .product-detail-section,
  .product-details-tabs,
  .recommended-products {
    padding-left: 15px;
    padding-right: 15px;
  }

  .breadcrumb {
    font-size: 12px;
    gap: 5px;
  }

  .breadcrumb-link,
  .breadcrumb-current {
    font-size: 12px;
  }

  .breadcrumb-icon {
    width: 14px;
    height: 14px;
  }

  .product-name {
    font-size: 18px;
  }

  .price-amount {
    font-size: 18px;
  }

  .option-label,
  .quantity-label {
    font-size: 14px;
  }

  .size-option {
    width: 70px;
    height: 30px;
    font-size: 12px;
  }

  .color-option {
    padding: 6px 15px;
    font-size: 12px;
  }

  .color-option-image .color-option-inner {
    width: 70px;
  }

  .color-option-img-wrap {
    width: 70px;
    height: 70px;
  }

  .btn-add-cart,
  .btn-buy-now {
    height: 44px;
    font-size: 14px;
  }

  .tabs-title {
    font-size: 18px;
  }

  .tab-btn {
    font-size: 13px;
    height: 32px;
  }

  .tab-panel {
    font-size: 14px;
    line-height: 2;
  }

  .product-grid-recommended {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .recommended-products .section-header h2 {
    font-size: 20px;
  }

  .thumbnail {
    width: 60px;
    height: 60px;
  }

  .product-actions.fixed {
    padding: 10px 15px;
  }

  .product-actions.fixed .btn-add-cart,
  .product-actions.fixed .btn-buy-now {
    height: 40px;
    font-size: 13px;
  }
}
