/* ベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
.shop-header {
    background-color: #1976d2;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.shop-logo a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
}

.shop-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.shop-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.shop-nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

.cart-link {
    background-color: #ff9800 !important;
    font-weight: bold;
}

.cart-link:hover {
    background-color: #f57c00 !important;
}

/* メインコンテンツ */
.shop-main {
    min-height: calc(100vh - 180px);
    padding: 2rem 0;
}

/* ヒーローセクション */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    background-color: #ff6b6b;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-block;
}

.btn-hero:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
}

.btn-hero-outline {
    background-color: transparent;
    border: 2px solid white;
}

.btn-hero-outline:hover {
    background-color: white;
    color: #667eea;
}

/* フィーチャーセクション */
.features-section {
    padding: 3rem 0;
    background-color: white;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.features-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 8px;
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1976d2;
}

/* ログインフォーム */
.login-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem 0;
}

.login-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
}

.login-form-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1976d2;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.2);
}

.btn-login {
    width: 100%;
    background-color: #1976d2;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #1565c0;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin-bottom: 1rem;
}

.login-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.login-info h3 {
    margin-bottom: 1rem;
    color: #555;
}

.test-user-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 商品一覧 */
.products-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.products-header h2 {
    color: #1976d2;
}

.sort-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background-color: white;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    text-align: center;
    margin-bottom: 1rem;
}

.product-image img {
    width: 100%;
    max-width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.product-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 1rem;
}

.btn-add-to-cart, .btn-remove-from-cart {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-add-to-cart {
    background-color: #4caf50;
    color: white;
}

.btn-add-to-cart:hover {
    background-color: #45a049;
}

.btn-remove-from-cart {
    background-color: #f44336;
    color: white;
}

.btn-remove-from-cart:hover {
    background-color: #da190b;
}

/* カート */
.cart-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem 0;
}

.cart-section h2 {
    color: #1976d2;
    margin-bottom: 2rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cart-item-description {
    color: #666;
    font-size: 0.9rem;
}

.cart-item-price {
    font-weight: bold;
    color: #1976d2;
}

.quantity-select {
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-remove-item {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.cart-summary {
    margin-top: 2rem;
    padding: 1rem;
    border-top: 2px solid #ddd;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cart-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn-continue-shopping, .btn-checkout, .btn-back, .btn-continue, .btn-finish {
    padding: 0.75rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s;
}

.btn-continue-shopping {
    background-color: #6c757d;
    color: white;
}

.btn-checkout, .btn-continue, .btn-finish {
    background-color: #1976d2;
    color: white;
}

.btn-back {
    background-color: #6c757d;
    color: white;
}

.cart-empty {
    text-align: center;
    padding: 3rem 0;
}

/* チェックアウト */
.checkout-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem 0;
}

.checkout-form-container {
    max-width: 500px;
    margin: 0 auto;
}

.checkout-overview {
    max-width: 800px;
    margin: 0 auto;
}

.checkout-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.checkout-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* 完了ページ */
.checkout-complete-section {
    background-color: white;
    border-radius: 8px;
    padding: 2rem 0;
}

.completion-message {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.completion-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.completion-message h2 {
    color: #4caf50;
    margin-bottom: 1rem;
}

.btn-back-home {
    background-color: #1976d2;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    display: inline-block;
    margin-top: 2rem;
}

/* テストアカウントテーブル */
.test-accounts-section {
    background-color: white;
    padding: 2rem 0;
    margin-top: 2rem;
    border-radius: 8px;
}

.test-accounts-section h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #1976d2;
}

.accounts-table {
    max-width: 800px;
    margin: 0 auto;
}

.accounts-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.accounts-table th,
.accounts-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.accounts-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

/* フッター */
.shop-footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.shop-footer a {
    color: #4fc3f7;
    text-decoration: none;
}

.shop-footer a:hover {
    text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .shop-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .cart-actions {
        flex-direction: column;
    }

    .checkout-actions {
        flex-direction: column;
        gap: 1rem;
    }
}