/* 商品詳細ページ専用スタイル */

/* パンくずリスト */
.breadcrumb {
    background-color: var(--light-bg);
    padding: 0.75rem 0;
    font-size: 0.9rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '>';
    margin: 0 0.5rem;
    color: #999;
}

.breadcrumb a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb [aria-current="page"] {
    color: #666;
    font-weight: 500;
}

/* 商品詳細レイアウト */
.product-detail {
    padding: 2rem 0 4rem;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* 商品画像 */
.product-images {
    position: relative;
}

.main-image {
    position: relative;
    background-color: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.zoom-button {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-size: 1.2rem;
    transition: var(--transition);
}

.zoom-button:hover {
    transform: scale(1.1);
}

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

.thumbnail {
    background: none;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail:hover {
    border-color: var(--secondary-color);
}

.thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* 商品情報 */
.product-info {
    padding-top: 1rem;
}

.product-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.sku {
    color: #666;
    font-size: 0.9rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: #ffd700;
    font-size: 1.1rem;
}

.review-count {
    color: #666;
    font-size: 0.9rem;
}

/* 価格セクション */
.price-section {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 0;
}

.tax-info {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* 商品特徴 */
.product-features {
    margin-bottom: 2rem;
}

.product-features h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.product-features ul {
    list-style: none;
}

.product-features li {
    padding: 0.5rem 0;
    color: var(--text-color);
}

/* 購入セクション */
.purchase-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-selector select {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
}

.add-to-cart,
.buy-now {
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart {
    background-color: var(--primary-color);
    color: var(--white);
}

.add-to-cart:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.buy-now {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 配送情報 */
.shipping-info {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.shipping-info h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.shipping-info p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

/* タブナビゲーション */
.tab-navigation {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 2rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    color: #666;
    transition: var(--transition);
    position: relative;
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-button.active::after {
    transform: scaleX(1);
}

.tab-button:hover {
    color: var(--primary-color);
}

/* タブコンテンツ */
.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

.tab-panel h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tab-panel h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
}

/* 仕様テーブル */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.spec-table th,
.spec-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.spec-table th {
    width: 30%;
    font-weight: 500;
    color: var(--primary-color);
    background-color: var(--light-bg);
}

/* レビューセクション */
.review-summary {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.review {
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem 0;
}

.review:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.reviewer-name {
    font-weight: 500;
}

.review-date {
    color: #666;
    font-size: 0.9rem;
}

.review-text {
    line-height: 1.6;
    color: var(--text-color);
}

/* 関連商品 */
.related-products {
    margin-top: 4rem;
}

.related-products h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tab-navigation {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }
    
    .purchase-section {
        flex-direction: column;
    }
    
    .add-to-cart,
    .buy-now {
        width: 100%;
    }
    
    .spec-table {
        font-size: 0.9rem;
    }
    
    .spec-table th {
        width: 40%;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 1.5rem;
    }
    
    .price {
        font-size: 2rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
}