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

.product-detail-page {
    background-color: #FFF;
}

.product-detail-wrapper {
    display: flex;
    gap: 40px;
    margin-bottom: 80px;
    padding-top: 40px;
    align-items: flex-start;
}

/* ============================================
   商品画像エリア（左側）
   ============================================ */
.product-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 0 0 50%;
    max-width: 50%;
}

.product-thumbnails {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.thumbnail-item {
    width: 100px;
    height: 100px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    flex-shrink: 0;
}

.thumbnail-item:hover {
    border-color: #4CAF50;
}

.thumbnail-item.active {
    border-color: #4CAF50;
    border-width: 3px;
}

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

.product-main-image {
    width: 100%;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
}

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

/* ============================================
   商品情報エリア（右側）
   ============================================ */
.product-info {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: 20px;
}

.product-brand {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.product-header-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.product-header-info {
    flex: 1;
}

.product-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.product-award {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.product-award-logo {
    max-width: 120px;
    height: auto;
    display: block;
}

.product-award-name {
    font-size: 12px;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars .star {
    font-size: 18px;
    color: #ddd;
    line-height: 1;
}

.rating-stars .star.filled {
    color: #ffd700;
}

.review-count {
    font-size: 14px;
    color: #666;
}

.related-products-section {
    margin-top: 40px;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.related-products-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0 0 20px 0;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.related-product-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-product-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #4CAF50;
}

.related-product-link {
    display: block;
    text-decoration: none;
    color: #333;
}

.related-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
}

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

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

.related-product-info {
    padding: 15px;
}

.related-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.related-product-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 12px;
    background-color: #f0f0f0;
    color: #666;
    line-height: 1.2;
}

.related-product-tag-cat {
    background-color: #E5E5E5;
    color: #878787;
}

.related-product-tag-type {
    background-color: beige;
    color: #948168;;
}

.related-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.related-product-price {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

@media (max-width: 768px) {
    .related-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .related-product-image {
        height: 180px;
    }
    
    .related-products-title {
        font-size: 18px;
    }
}

.product-quantity {
    margin-bottom: 30px;
}

.product-quantity label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: fit-content;
}

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

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

.quantity-btn.minus {
    border-right: 1px solid #e0e0e0;
    border-radius: 4px 0 0 4px;
}

.quantity-btn.plus {
    border-left: 1px solid #e0e0e0;
    border-radius: 0 4px 4px 0;
}

#productQuantity {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    background-color: #fff;
    -moz-appearance: textfield;
}

#productQuantity::-webkit-outer-spin-button,
#productQuantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-delivery {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.delivery-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.delivery-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.delivery-option span {
    cursor: pointer;
}

.add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 18px 30px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 25px;
    text-align: center;
    text-decoration: none;
}

.add-to-cart-btn:hover {
    background-color: #333;
    color: #fff;
    text-decoration: none;
}

.product-share {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.share-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.share-icon:hover {
    background-color: #4CAF50;
    color: #fff;
}

.product-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hashtag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f5f5f5;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
}

/* ============================================
   下部セクション
   ============================================ */
.product-bottom-section {
    width: 100%;
    margin-bottom: 30px;
}

/* ============================================
   商品説明セクション（左側）
   ============================================ */
.product-description-section {
    width: 100%;
}

.description-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 24px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #4CAF50;
}

.tab-btn.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    font-weight: bold;
}

.tab-content {
    display: none;
}

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

.product-description-text,
.product-features-text,
.product-details-text,
.product-reviews {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.product-description-text p,
.product-features-text p,
.product-details-text p {
    margin-bottom: 15px;
}

/* ============================================
   よく一緒に購入されている商品（右側）
   ============================================ */
.product-buy-with {
    flex: 0 0 40%;
    max-width: 40%;
}

.buy-with-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 5px 0;
}

.buy-with-subtitle {
    font-size: 12px;
    color: #666;
    margin-bottom: 25px;
    letter-spacing: 0.1em;
}

.buy-with-products {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 25px;
}

.buy-with-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.buy-with-image {
    position: relative;
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
}

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

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background-color: #4CAF50;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 1;
}

.buy-with-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.buy-with-brand {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.buy-with-title-item {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin: 0;
    line-height: 1.4;
}

.buy-with-price {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.buy-with-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.buy-with-rating .rating-stars {
    gap: 1px;
}

.buy-with-rating .rating-stars .star {
    font-size: 12px;
}

.buy-with-rating .review-count {
    font-size: 12px;
}

.buy-with-add-btn {
    padding: 8px 16px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
    margin-top: auto;
}

.buy-with-add-btn:hover {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.egift-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.egift-btn:hover {
    background-color: #f5f5f5;
    border-color: #4CAF50;
    color: #4CAF50;
}

.egift-icon {
    font-size: 18px;
}

/* ============================================
   レスポンシブ対応
   ============================================ */
@media (max-width: 1024px) {
    .product-detail-wrapper {
        flex-direction: column;
    }
    
    .product-images {
        flex: 1;
        max-width: 100%;
        flex-direction: column;
    }
    
    .product-thumbnails {
        flex-direction: row;
        flex-wrap: wrap;
        flex: 0 0 auto;
    }
    
    .product-info {
        flex: 1;
        max-width: 100%;
        padding-left: 0;
    }
    
    .product-bottom-section {
        width: 100%;
    }
    
    .product-description-section {
        width: 100%;
    }
    
    .product-buy-with {
        flex: 1;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .product-detail-page {
    }
    
    .product-detail-wrapper {
        gap: 30px;
        margin-bottom: 50px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .product-price {
        font-size: 20px;
    }
    
    .buy-with-item {
        flex-direction: column;
    }
    
    .buy-with-image {
        width: 100%;
        height: 200px;
    }
}

