/* メルカリスタイルのメインCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* ヘッダー */
.header {
    background-color: #ea352d;
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    background-color: white;
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email,
.user-name {
    font-size: 14px;
    color: white;
}

.logout-btn {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

/* メニューボタン */
.menu-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.menu-btn {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.menu-btn:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

/* カテゴリーナビゲーション */
.category-nav {
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    overflow-x: auto;
}

.category-item {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.category-item:hover,
.category-item.active {
    background-color: #ea352d;
    color: white;
}

/* メインコンテンツ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 商品カード */
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.product-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image img {
    width: auto;
    height: 100%;
    object-fit: contain;
    background-color: #f8f9fa;
    max-width: 100%;
    max-height: 100%;
}

.product-info {
    padding: 16px;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #ea352d;
    margin-bottom: 8px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.seller {
    color: #999;
}

.rating {
    color: #ff9800;
}

/* フッター */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        margin: 0;
        max-width: 100%;
    }
    
    .user-menu {
        width: 100%;
        justify-content: center;
    }
    
    .nav-content {
        padding: 0 10px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 0 10px;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .product-image {
        height: 320px;
    }
    
    .product-image img {
        width: auto;
        height: 100%;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .category-item {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .product-image {
        height: 280px;
    }
    
    .product-image img {
        width: auto;
        height: 100%;
        object-fit: contain;
    }
} 