/* ================================
   TOPページ専用スタイル
   ================================ */

/* ================================
   ヒーロースライダー
   ================================ */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: visible;
}

.hero-slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
}

/* スライドごとのグレー系グラデーション（画像がない場合） */
.hero-slider .slide:nth-child(1) { background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%); }
.hero-slider .slide:nth-child(2) { background: linear-gradient(135deg, #d5d5d5 0%, #a5a5a5 100%); }
.hero-slider .slide:nth-child(3) { background: linear-gradient(135deg, #cacaca 0%, #9a9a9a 100%); }
.hero-slider .slide:nth-child(4) { background: linear-gradient(135deg, #bfbfbf 0%, #8f8f8f 100%); }
.hero-slider .slide:nth-child(5) { background: linear-gradient(135deg, #b4b4b4 0%, #848484 100%); }
.hero-slider .slide:nth-child(6) { background: linear-gradient(135deg, #a9a9a9 0%, #797979 100%); }
.hero-slider .slide:nth-child(7) { background: linear-gradient(135deg, #9e9e9e 0%, #6e6e6e 100%); }
.hero-slider .slide:nth-child(8) { background: linear-gradient(135deg, #939393 0%, #636363 100%); }

/* ================================
   スライダーサムネイルナビゲーション
   ================================ */
.slider-dots {
    display: flex;
    gap: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.9);
    width: 100%;
    position: relative;
}

.slider-dots.thumbnail-nav {
    background: #000;
}

.slider-dots.thumbnail-nav .thumbnail {
    flex: 1;
    height: auto;
    aspect-ratio: 16/9;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0.6;
    border-radius: 0;
}

.slider-dots.thumbnail-nav .thumbnail:last-child {
    border-right: none;
}

.slider-dots.thumbnail-nav .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-dots.thumbnail-nav .thumbnail.active {
    opacity: 1;
    border-bottom: 3px solid var(--theme-color, #3d5a80);
}

.slider-dots.thumbnail-nav .thumbnail:hover {
    opacity: 0.9;
}

/* ================================
   Newsセクション
   ================================ */
.news-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.news-list {
    background: white;
    padding: 30px;
    border-radius: 0;
    box-shadow: var(--shadow-light);
}

.news-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    transition: all 0.3s ease;
}

.news-item:last-child {
    border-bottom: none;
}

/* 隠されたニュースアイテム */
.news-item.news-hidden {
    max-height: 0;
    opacity: 0;
    padding: 0;
    border-bottom: none;
    margin: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.news-item.news-visible {
    max-height: 100px;
    opacity: 1;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        max-height: 100px;
        opacity: 1;
        transform: translateY(0);
    }
}

/* もっとみるボタン */
.news-toggle-btn {
    display: block;
    margin: 20px auto 0;
    padding: 10px 30px;
    background: var(--theme-color);
    color: white;
    border: none;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.news-toggle-btn:hover {
    opacity: 0.8;
}

.news-toggle-btn.active {
    background: #666;
}

.news-date {
    color: var(--text-light);
    margin-right: 30px;
    min-width: 120px;
}

.news-title {
    font-size: 16px;
    font-weight: normal;
    color: var(--text-dark);
}

.news-title a {
    text-decoration: none;
    color: var(--text-dark);
    transition: opacity 0.3s ease;
}

.news-title a:hover {
    opacity: 0.7;
}

/* ================================
   Our Productsセクション
   ================================ */
.products-section {
    padding: 80px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.product-category {
    min-width: 0;
}

.product-category h3 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--text-dark);
}

/* カテゴリー別カラー */
.product-category:nth-child(1) h3 {
    color: #ff8c5a;
}

.product-category:nth-child(2) h3 {
    color: var(--color-stationery);
}

.product-category:nth-child(3) h3 {
    color: var(--color-others);
}

.product-slider {
    position: relative;
    overflow: hidden;
}

.product-slider-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
}

.product-slide {
    min-width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: #e0e0e0;
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 商品スライドの背景グラデーション */
.product-category .product-slide:nth-child(1) { background: linear-gradient(135deg, #e8e8e8 0%, #c8c8c8 100%); }
.product-category .product-slide:nth-child(2) { background: linear-gradient(135deg, #dedede 0%, #bebebe 100%); }
.product-category .product-slide:nth-child(3) { background: linear-gradient(135deg, #d4d4d4 0%, #b4b4b4 100%); }
.product-category .product-slide:nth-child(4) { background: linear-gradient(135deg, #cacaca 0%, #aaaaaa 100%); }

/* 商品サムネイル */
.product-thumbnails {
    display: flex;
    width: 100%;
    margin-top: 0;
    gap: 0;
}

.product-thumbnails .product-thumbnail {
    flex: 1;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, #b0b0b0 0%, #808080 100%);
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: none;
    border-radius: 0;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumbnails .product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-thumbnails .product-thumbnail.active {
    opacity: 1;
}

/* ================================
   About SplineTYO セクション
   ================================ */
.about-section {
    padding: 80px 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    line-height: 2;
}

.about-content p {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 2;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-brand {
    font-weight: 600;
    color: var(--theme-color);
    margin-top: 40px;
}

/* ================================
   レスポンシブ対応
   ================================ */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
    }

    /* News */
    .news-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-date {
        margin-right: 0;
        margin-bottom: 5px;
    }

    /* About SplineTYO */
    .about-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .about-brand {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .news-list {
        padding: 20px 15px;
    }

    /* スマホ幅でドットナビに切り替え */
    .slider-dots,
    .slider-dots.thumbnail-nav {
        justify-content: center;
        gap: 16px;
        padding: 12px 0;
        background: transparent !important;
    }

    .slider-dots.thumbnail-nav .thumbnail {
        flex: none !important;
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border: none !important;
        opacity: 1 !important;
    }

    .slider-dots.thumbnail-nav .thumbnail img {
        display: none !important;
    }

    .slider-dots.thumbnail-nav .thumbnail.active {
        background: var(--theme-color, #333) !important;
        border: none !important;
    }

    .slider-dots.thumbnail-nav .thumbnail:hover {
        background: rgba(0, 0, 0, 0.5) !important;
        border: none !important;
    }
}
