/**
 * 商品カード・商品詳細ページ用スタイル
 */

/* 商品カード */
.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image-link {
    display: block;
    height: 100%;
    width: 100%;
}

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

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

.no-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f3f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.no-image-placeholder i {
    font-size: 32px;
    margin-bottom: 10px;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: #4a90e2;
}

.product-rating {
    margin-bottom: 10px;
    color: #f8b500;
}

.product-rating i {
    margin-right: 2px;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.btn-buy, .btn-detail {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-buy {
    background-color: #4CAF50;
    color: white;
}

.btn-buy:hover {
    background-color: #388E3C;
}

.btn-detail {
    background-color: #4a90e2;
    color: white;
}

.btn-detail:hover {
    background-color: #357ABD;
}

.btn-buy i, .btn-detail i {
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.btn-buy:hover i, .btn-detail:hover i {
    transform: translateX(3px);
}

/* 商品グリッド */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .product-description {
        font-size: 13px;
    }
    
    .price {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* 商品詳細ページ */
.single-product-content {
    display: flex;
    flex-wrap: wrap;
    margin: 40px 0;
}

.product-header {
    width: 100%;
    margin-bottom: 30px;
}

.product-details {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.product-gallery {
    flex: 0 0 450px;
}

.product-main-image {
    width: 100%;
    height: 450px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.product-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.thumbnail-item.active {
    border-color: #4a90e2;
}

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

.product-info-main {
    flex: 1;
    min-width: 300px;
}

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

.product-meta-data {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.product-price {
    margin-bottom: 20px;
    font-size: 24px;
}

.price-label {
    font-weight: 600;
    margin-right: 10px;
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.product-purchase .btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
}

.product-categories {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.product-categories span {
    font-weight: 600;
    margin-right: 10px;
}

.product-categories a {
    display: inline-block;
    margin: 5px;
    padding: 5px 10px;
    background: #f0f3f5;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
}

.product-categories a:hover {
    background: #4a90e2;
    color: white;
}

/* 関連商品セクション */
.related-products {
    margin-top: 60px;
}

.related-products h2 {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

.related-products h2:before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    height: 80%;
    width: 4px;
    background-color: #4a90e2;
    border-radius: 2px;
}

@media (max-width: 992px) {
    .product-details {
        gap: 30px;
    }
    
    .product-gallery {
        flex: 0 0 400px;
    }
    
    .product-main-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .product-gallery {
        flex: 0 0 100%;
    }
    
    .product-main-image {
        height: 350px;
    }
}
