@charset "UTF-8";
@import 'base.css';

/**
 * items-list.css - 商品一覧ページ専用スタイルシート
 * 
 * 概要:
 * checkout.css、product.css と統一されたデザインシステムで
 * 商品一覧ページをスタイリング。モダンなカードグリッドと
 * ホバーエフェクト、フィルター/検索UIを提供。
 * 
 * ブランドカラー: #001437
 * 背景色: #f7f9fb
 */

/* ==========================================================================
   メインコンテナ
   ========================================================================== */
.items-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ページタイトル */
.page-title {
    font-size: 28px;
    font-weight: bold;
    color: #001437;
    margin: 0 0 32px 0;
    text-align: center;
}

/* ==========================================================================
   フィルター/検索バー
   ========================================================================== */
.filter-bar {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

/* 検索ボックス */
.filter-bar__search {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.filter-bar__search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar__search-input:focus {
    outline: none;
    border-color: #001437;
    box-shadow: 0 0 0 3px rgba(0, 20, 55, 0.1);
}

.filter-bar__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

/* セレクトボックス */
.filter-bar__select {
    padding: 12px 36px 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    min-width: 140px;
    transition: border-color 0.2s ease;
}

.filter-bar__select:focus {
    outline: none;
    border-color: #001437;
}

/* 商品数表示 */
.filter-bar__count {
    color: #666;
    font-size: 14px;
    margin-left: auto;
}

/* ==========================================================================
   商品グリッド
   ========================================================================== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* タブレット: 2列 */
@media (max-width: 900px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* モバイル: 1列 */
@media (max-width: 560px) {
    .items-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ==========================================================================
   商品カード
   ========================================================================== */
.item-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ホバーエフェクト: 浮き上がり */
.item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.item-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 画像コンテナ */
.item-card__image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.item-card__image::before {
    content: "";
    display: block;
    padding-top: 100%;
    /* 1:1 アスペクト比 */
}

.item-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* ホバー時: 画像ズーム */
.item-card:hover .item-card__image img {
    transform: scale(1.05);
}

/* ラベル（NEW / SALE など） */
.item-card__label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #001437;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-card__label--sale {
    background: #fa5171;
}

.item-card__label--new {
    background: #11beae;
}

/* 情報セクション */
.item-card__info {
    padding: 16px;
}

.item-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card__price {
    font-size: 18px;
    font-weight: bold;
    color: #001437;
    margin: 0;
}

.item-card__price--sale {
    color: #fa5171;
}

.item-card__original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

/* カテゴリタグ */
.item-card__category {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    background: #f0f2f5;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
}

/* ==========================================================================
   結果なし表示
   ========================================================================== */
.items-empty {
    text-align: center;
    padding: 80px 24px;
    background: #fff;
    border-radius: 12px;
}

.items-empty__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.items-empty__text {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   ページネーション / もっと見るボタン
   ========================================================================== */
.load-more {
    text-align: center;
    margin-top: 48px;
}

.load-more__button {
    display: inline-block;
    padding: 16px 48px;
    background: #001437;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.load-more__button:hover {
    background: #002156;
    transform: translateY(-2px);
}

.load-more__button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   カテゴリセクション
   ========================================================================== */
.categories-section {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid #eee;
}

.categories-section__title {
    font-size: 24px;
    font-weight: bold;
    color: #001437;
    text-align: center;
    margin: 0 0 32px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.category-card {
    display: block;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    border: 1px solid #eee;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    border-color: #001437;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

/* ==========================================================================
   フッター
   ========================================================================== */
.site-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 40px 24px;
    margin-top: 64px;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #666;
    font-size: 12px;
    text-decoration: none;
}

.footer-nav a:hover {
    color: #001437;
}

.footer-copyright {
    color: #999;
    font-size: 12px;
    margin: 0;
}

/* ==========================================================================
   レスポンシブ調整
   ========================================================================== */
@media (max-width: 768px) {
    .items-container {
        padding: 24px 16px;
    }

    .page-title {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .filter-bar {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar__search {
        min-width: 100%;
    }

    .filter-bar__select {
        width: 100%;
    }

    .filter-bar__count {
        margin-left: 0;
        text-align: center;
    }

    .item-card__info {
        padding: 12px;
    }

    .item-card__title {
        font-size: 13px;
    }

    .item-card__price {
        font-size: 16px;
    }

}

/* ==========================================================================
   アニメーション
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-card {
    animation: fadeIn 0.4s ease forwards;
}

/* カードごとに少しずつ遅延 */
.item-card:nth-child(1) {
    animation-delay: 0.05s;
}

.item-card:nth-child(2) {
    animation-delay: 0.1s;
}

.item-card:nth-child(3) {
    animation-delay: 0.15s;
}

.item-card:nth-child(4) {
    animation-delay: 0.2s;
}

.item-card:nth-child(5) {
    animation-delay: 0.25s;
}

.item-card:nth-child(6) {
    animation-delay: 0.3s;
}

/* ==========================================================================
   ユーティリティ
   ========================================================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 非表示 */
[hidden] {
    display: none !important;
}