/* 基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    margin: 0;
    color: #333;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    color: inherit;
}

header {
    background-color: #38761d; /* ホームセンターらしい緑色 */
    color: white;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

main {
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

footer {
    background-color: #f2f2f2;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    color: #666;
    border-top: 1px solid #ddd;
}

/* 商品一覧 */
h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #444;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.1rem;
    margin: 1rem 0.5rem;
    height: 3.3em; /* 3行分の高さを確保 */
    line-height: 1.1em;
}

.product-card .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #d9534f;
    margin-bottom: 1rem;
}

/* 商品詳細 */
.product-main {
    padding-top: 2rem;
}
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: flex-start;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.product-detail img {
    width: 100%;
    border-radius: 8px;
}

.product-info h2 {
    font-size: 2.2rem;
    margin-top: 0;
    text-align: left;
}

.price-detail {
    font-size: 2rem;
    font-weight: bold;
    color: #d9534f;
    margin: 1rem 0;
}
.tax-info {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

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

.add-to-cart {
    background-color: #f0ad4e; /* オレンジ色 */
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 2rem;
    width: 100%;
    transition: background-color 0.2s;
}

.add-to-cart:hover {
    background-color: #ec971f;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    main {
        padding: 1rem;
    }
}