/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #00c8e0 0%, #00a5bf 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

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

/* ヘッダー */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

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

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 言語切り替え */
.language-switcher {
    display: flex;
    gap: 0.25rem;
    margin-right: 1rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lang-btn.active {
    background: linear-gradient(135deg, #00a5bf 0%, #008c9e 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px 0 rgba(0, 165, 191, 0.4);
}

/* ボタン */
.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #00a5bf 0%, #008c9e 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(0, 165, 191, 0.5);
}

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

.btn-secondary:hover {
    background-color: #545b62;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* メイン */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* フォーム */
.form-group {
    margin-bottom: 1rem;
}

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

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

.demo-info {
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
}

/* 検索セクション */
.search-section {
    margin-bottom: 2rem;
}

.search-section h2 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.search-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-input, .filter-select {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input:focus, .filter-select:focus {
    outline: none;
    background: white;
    box-shadow: 0 6px 20px 0 rgba(0, 165, 191, 0.3);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    min-width: 200px;
}

/* コンテンツグリッド */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* 商品グリッド */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px 0 rgba(0, 165, 191, 0.4);
    border-color: rgba(0, 165, 191, 0.3);
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1rem;
    background-color: #e9ecef;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.product-price {
    background: linear-gradient(135deg, #00a5bf 0%, #008c9e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* サイドバー */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cart-section, .todo-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.cart-section h3, .todo-section h3 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-weight: 600;
    font-size: 1.3rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(135deg, #00a5bf 0%, #008c9e 100%) 1;
    padding-bottom: 0.75rem;
}

/* カート */
.cart-items {
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

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

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    font-size: 0.9rem;
}

.cart-item-price {
    color: #666;
    font-size: 0.8rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: #e9ecef;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #dee2e6;
}

.cart-total {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #00a5bf 0%, #008c9e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-align: right;
}

.empty-cart {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}

/* ToDoリスト */
.todo-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.todo-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.todo-list {
    list-style: none;
}

.todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

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

.todo-text {
    flex: 1;
    font-size: 0.9rem;
}

.todo-text.completed {
    text-decoration: line-through;
    color: #666;
}

.todo-controls {
    display: flex;
    gap: 0.25rem;
}

.todo-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.todo-btn:hover {
    background: #e9ecef;
}

/* フッター */
.footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        min-width: auto;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

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

    .modal-content {
        margin: 10% auto;
        padding: 1rem;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .cart-item-controls {
        align-self: flex-end;
    }
}

.checkout-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e9ecef;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #00a5bf 0%, #008c9e 100%);
    color: white;
    box-shadow: 0 4px 15px 0 rgba(0, 165, 191, 0.4);
}

.step-label {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.step.active .step-label {
    color: #2d3748;
    font-weight: 600;
}

.checkout-step-content {
    animation: fadeIn 0.3s ease-in;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-option {
    display: block;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
}

.payment-label i {
    font-size: 1.5rem;
    color: #00a5bf;
}

.payment-option input[type="radio"]:checked + .payment-label {
    border-color: #00a5bf;
    background: rgba(0, 165, 191, 0.05);
    box-shadow: 0 4px 15px 0 rgba(0, 165, 191, 0.2);
}

.payment-label:hover {
    border-color: #00a5bf;
    transform: translateY(-2px);
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.order-summary h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: #2d3748;
}

.order-summary h3:first-child {
    margin-top: 0;
}

#order-items-list {
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.order-total-section {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(0, 165, 191, 0.05);
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 1.2rem;
}

.info-box {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #00a5bf;
    margin-bottom: 1rem;
}

.info-box p {
    margin: 0.25rem 0;
    color: #2d3748;
}

.order-complete {
    text-align: center;
    padding: 2rem 0;
}

.order-complete i {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.order-complete h3 {
    font-family: 'Poppins', sans-serif;
    color: #2d3748;
    margin-bottom: 1rem;
}

.order-complete p {
    color: #666;
    margin-bottom: 1.5rem;
}

.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
}

#view-history-btn {
    margin-top: 0.5rem;
    width: 100%;
}

.order-history-list {
    max-height: 500px;
    overflow-y: auto;
}

.order-history-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border-left: 4px solid #00a5bf;
}

.order-history-item:last-child {
    margin-bottom: 0;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.order-id {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #2d3748;
}

.order-date-text {
    color: #666;
    font-size: 0.9rem;
}

.order-items-summary {
    margin-bottom: 0.75rem;
}

.order-item-line {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    color: #2d3748;
    font-size: 0.9rem;
}

.order-total-line {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 2px solid #e9ecef;
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
}

.order-shipping-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.85rem;
    color: #666;
}

.empty-history {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

@media (max-width: 768px) {
    .checkout-modal-content {
        max-width: 90%;
        padding: 1.5rem;
    }

    .checkout-steps {
        font-size: 0.8rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.7rem;
    }

    .checkout-actions {
        flex-direction: column-reverse;
    }

    .checkout-actions .btn {
        width: 100%;
    }
}