/* グッズページ専用CSS */
@import url('./partials/header.css');
@import url('./partials/page-title.css');
@import url('./partials/footer.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

/* 基本設定 */
body {
    font-family: Montserrat, 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #222;
    background: #fff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* メインコンテンツ */
main {
    padding-top: 80px;
    flex: 1;
}

.partner-footer,
footer {
    flex-shrink: 0;
}

/* セクション共通 */
.section {
    margin: 0 auto 4rem;
    max-width: 1200px;
    padding: 0 2rem;
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-family: Montserrat, 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    color: #c40000;
    letter-spacing: 0.04em;
    filter: drop-shadow(0 8px 16px rgba(196,0,0,0.18));
    transition: filter 0.3s;
}

.section:hover h2 {
    filter: drop-shadow(0 16px 32px rgba(196,0,0,0.28));
}

/* フェードインアニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fade-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* グッズギャラリー */
.goods-gallery {
    padding: 2rem 0;
    margin: 0 auto;
    max-width: 1200px;
}

.goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 350px);
    gap: 2.5rem;
    margin-top: 2rem;
    justify-content: center;
}

.goods-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid #e8e8e8;
    min-height: 610px;
    height: auto;
    display: flex;
    flex-direction: column;
}

.goods-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(196,0,0,0.05) 0%, rgba(196,0,0,0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.goods-item:hover {
    border-color: rgba(196,0,0,0.6);
}

.goods-item:hover::before {
    opacity: 1;
}

.goods-image {
    position: relative;
    width: 100%;
    height: 275px;
    min-height: 275px;
    max-height: 275px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f8f8 0%, #eee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    flex-grow: 0;
}

.goods-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    border-radius: 0;
}

.goods-image.no-image::before {
    content: attr(data-fallback);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    background: #f5f5f5;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: 2px dashed #ddd;
    z-index: 2;
}



.goods-info {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 335px;
    height: auto;
    flex-shrink: 0;
}

.goods-name {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #c40000 !important;
    margin-bottom: 0.8rem !important;
    line-height: 1.4 !important;
    font-family: Montserrat, 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif !important;
    text-align: left !important;
    min-height: 3.64rem !important;
    height: auto !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.goods-item:hover .goods-name {
    color: #900000;
}

.goods-description {
    color: #222;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    text-align: left;
    max-height: 76.8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-all;
    overflow-wrap: break-word;
    hyphens: auto;
}

.goods-details {
    margin-bottom: 1.5rem;
    padding: 0.8rem 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    min-height: 40px;
    height: auto;
    display: flex;
    align-items: center;
}

.goods-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #c40000;
    font-family: Montserrat, sans-serif;
    transition: color 0.3s ease;
}

.goods-item:hover .goods-price {
    color: #900000;
}

.goods-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #c40000 0%, #a00000 100%);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    letter-spacing: 0.02em;
    margin-top: auto;
    align-self: center;
}

.goods-link:hover {
    background: linear-gradient(135deg, #900000 0%, #700000 100%);
}

.goods-link:active {
    background: linear-gradient(135deg, #800000 0%, #600000 100%);
}

.goods-link i {
    font-size: 0.9rem;
}

/* 注意事項セクション */
.goods-notice {
    padding: 0 1rem 1rem;
    margin-top: 3rem;
    max-width: 1150px;
    margin-left: auto;
    margin-right: auto;
}

.notice-content {
    background: linear-gradient(135deg, #fff9f9 0%, #f8f8f8 100%);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid rgba(196,0,0,0.1);
}

.notice-content h3 {
    color: #c40000;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    font-family: Montserrat, 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
}

.notice-list {
    list-style: none;
    padding: 0;
    max-width: 550px;
    margin: 0 auto;
}

.notice-list li {
    position: relative;
    padding: 0.8rem 0 0.8rem 2rem;
    color: #222;
    line-height: 1.6;
    border-bottom: 1px solid rgba(196,0,0,0.1);
}

.notice-list li:last-child {
    border-bottom: none;
}

.notice-list li::before {
    content: '⚠️';
    position: absolute;
    left: 0;
    top: 0.8rem;
    font-size: 1rem;
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    .goods-grid {
        grid-template-columns: repeat(auto-fill, 320px);
        gap: 2rem;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* SP版ではヘッダー高さが60pxなので、padding-topを調整 */
    main {
        padding-top: 0;
    }
    
    .section {
        padding: 0 1rem;
        margin-bottom: 3rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .goods-intro {
        padding: 2rem 1.5rem;
        margin-bottom: 3rem;
    }
    
    .intro-description {
        font-size: 1rem;
    }
    
    .goods-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 1.5rem;
        justify-content: center;
    }
    
    .goods-item {
        border-radius: 12px;
        min-height: 540px;
        height: auto;
    }
    
    .goods-image {
        height: 240px;
        min-height: 240px;
        max-height: 240px;
        flex-shrink: 0;
        flex-grow: 0;
    }
    
    .goods-info {
        padding: 1.2rem;
        min-height: 300px;
        height: auto;
        flex-shrink: 0;
    }
    
    .goods-name {
        font-size: 1.2rem !important;
        min-height: 4.2rem !important;
        height: auto !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        line-height: 1.65 !important;
        margin-bottom: 0.8rem !important;
        padding-bottom: 0.3rem !important;
    }
    
    .goods-description {
        font-size: 0.9rem;
        max-height: 69.12px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        word-break: break-all;
        overflow-wrap: break-word;
        line-height: 1.6;
        margin-bottom: 1.2rem;
    }
    
    .goods-details {
        min-height: 40px;
        height: auto;
    }
    
    .goods-link {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 20px;
        margin-top: auto;
        display: inline-flex !important;
        align-items: center;
        gap: 0.5rem;
    }
    
    .notice-content {
        background: linear-gradient(135deg, #fff9f9 0%, #f8f8f8 100%);
        border: 1px solid rgba(196,0,0,0.1);
        border-radius: 12px;
        padding: 2rem 1rem;
    }
    
    .notice-content h3 {
        font-size: 1.2rem;
    }
    
    .notice-list li {
        padding: 0.6rem 0 0.6rem 1.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .goods-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        justify-content: center;
    }
    
    .goods-item {
        min-height: 470px;
        height: auto;
    }
    
    .goods-image {
        height: 210px;
        min-height: 210px;
        max-height: 210px;
        flex-shrink: 0;
        flex-grow: 0;
    }
    
    .goods-info {
        padding: 1rem;
        min-height: 260px;
        height: auto;
        flex-shrink: 0;
    }
    
    .goods-name {
        font-size: 1.1rem;
        height: auto;
        min-height: 2.86rem;
    }
    
    .goods-description {
        max-height: 57.6px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    
    .notice-list li {
        padding: 0.5rem 0 0.5rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .no-goods-content {
        padding: 2rem 1rem;
    }
    
    .no-goods-content h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .no-goods-content i {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
}

/* グッズなしの状態 */
.no-goods-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    margin: 2rem 0;
}

.no-goods-content {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.no-goods-content i {
    font-size: 4rem;
    color: #c40000;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.no-goods-content h3 {
    font-size: 1.8rem;
    color: #495057;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-goods-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #6c757d;
    max-width: 400px;
    margin: 0 auto;
}