/* 商品一覧ページ専用スタイル */

/* 商品一覧レイアウト */
.item-list-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.item-list-content-area {
    flex: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.product-card {
    text-align: center;
    padding: 20px;
}

.product-card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s;
}

.product-card .product-image {
    margin-bottom: 15px;
    aspect-ratio: 6 / 4;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .product-name {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.5;
}

.product-card .product-quantity {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.product-card .product-price {
    font-size: 14px;
    font-weight: bold;
    color: #C30202;
}

/* ページャー */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    border: none;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.page-btn-nav {
    background-color: #2E8B57;
    color: white;
}

.page-btn-nav:hover {
    background-color: #228B22;
}

.page-btn-number {
    background-color: #EBF3EF;
    color: #2E8B57;
}

.page-btn-number:nth-of-type(3) {
    background-color: #D9E8E0;
}

.page-btn-number.active {
    background-color: #90BEA8;
    color: white;
}

.page-btn-number:hover {
    background-color: #D9E8E0;
}

/* 商品詳細ページ */
.product-detail {
    font-family: 'Noto Sans JP', sans-serif;
}

.product-detail-main {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.product-detail-image {
    flex: 0 0 400px;
}

.product-main-image {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    background-color: #FFF;
    aspect-ratio: 6 / 4;
    overflow: hidden;
}

.product-main-image .main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease-in-out;
}

.product-main-image .main-img.active {
    opacity: 1;
    position: relative;
}

.product-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumbnail-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-row:first-child .thumbnail-item {
    flex: 1;
}

.thumbnail-row:last-child .thumbnail-item {
    flex: 0 0 calc(25% - 7.5px);
}

.thumbnail-item {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s, opacity 0.3s;
    opacity: 0.7;
}

.thumbnail-item:hover {
    opacity: 1;
}

.thumbnail-item.active {
    border-color: #4CAF50;
    opacity: 1;
}

.thumbnail-item img {
    width: 100%;
    height: auto;
    display: block;
}

.product-detail-info {
    flex: 1;
}

.product-detail-name {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5;
    font-family: 'Noto Serif JP', serif;
}

.product-detail-price {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 30px;
    text-align: right;
}

/* 購入セクション */
.product-purchase {
    margin-bottom: 30px;
}

.product-quantity {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.product-quantity label {
    font-size: 14px;
    color: #333;
    font-family: 'Noto Sans JP', sans-serif;
}

.quantity-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background-color: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-input {
    width: 60px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 14px;
    color: #333;
    font-family: 'Noto Sans JP', sans-serif;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    width: 100%;
    padding: 15px 0;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Noto Sans JP', sans-serif;
    transition: background-color 0.3s;
    margin-bottom: 20px;
    text-align: center;
    text-decoration: none;
}

.add-to-cart-btn:hover {
    background-color: #45a049;
}

.shipping-notice {
    border: 2px solid #C30202;
    padding: 15px;
    background-color: #fff;
    font-size: 12px;
    line-height: 1.8;
    color: #333;
    font-family: 'Noto Sans JP', sans-serif;
}

.shipping-notice p {
    margin: 0 0 10px 0;
}

.shipping-notice p:last-child {
    margin-bottom: 0;
}

.shipping-phone {
    font-weight: 600;
    font-size: 14px;
}

/* アコーディオン形式の特徴 */
.product-features {
    margin-bottom: 30px;
}

.feature-item {
    background-color: #FFF;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 20px;
    position: relative;
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    font-size: 18px;
    font-family: 'Noto Serif JP', serif;
}

.feature-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin: 0;
    font-family: 'Noto Serif JP', serif;
}

.feature-icon {
    font-size: 20px;
    background: #F5F5F5;
    width: 25px;
    height: 25px;
    font-weight: 300;
    text-align: center;
    line-height: 25px;
    position: absolute;
    top: 0;
    right: 0;
}

.feature-content {
    display: none;
    padding-bottom: 20px;
}

.feature-item.active .feature-content {
    display: block;
}

.feature-content p {
    font-size: 14px;
    color: #000;
    line-height: 1.8;
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
}
.feature-content img,
.certification-text img{
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
}

.feature-content i,
.certification-text i{
    color: #7A7A7A;
    font-size: 13px;
    padding-bottom: 1.5em;
    font-style: normal;
    display: block;
    text-align: center;
}

/* 認証情報 */
.product-certifications {
    margin-bottom: 30px;
}

.certification-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.certification-item:last-child {
    margin-bottom: 0;
}

.certification-icon {
    flex: 0 0 60px;
}

.certification-icon img {
    width: 100%;
    height: auto;
}

.certification-content {
    flex: 1;
}

.certification-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Noto Serif JP', serif;
}

.certification-text {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
}

/* 栄養成分表示 */
.product-nutrition {
    margin-bottom: 30px;
    border-top: 1px solid #C8C8C8;
    padding-top: 30px;
}

.nutrition-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-family: 'Noto Serif JP', serif;
}

.nutrition-list {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.8;
}

/* 商品仕様 */
.product-specs {
    margin-bottom: 30px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Noto Sans JP', sans-serif;
}

.specs-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.specs-table tr:last-child {
    border-bottom: none;
}

.spec-label {
    padding: 15px 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    width: 30%;
    vertical-align: top;
}

.spec-value {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
    vertical-align: top;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .item-list-layout {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-detail-main {
        flex-direction: column;
    }
    
    .product-detail-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .product-main-image {
        margin-bottom: 15px;
    }
    
    .thumbnail-row:last-child .thumbnail-item {
        flex: 0 0 calc(25% - 7.5px);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail-main {
        gap: 30px;
    }
    
    .product-detail-name {
        font-size: 20px;
    }
    .product-card .product-price{
        font-size: 16px;
    }
    .product-detail-price {
        font-size: 18px;
    }
    .item-list-layout.item-details-page .sidebar{
        display: none !important;
    }
}

