/* CSS変数の定義 */
:root {
    --primary-color: #4a90e2;
    --primary-color-dark: #2d5aa0;
    --secondary-color: #5a9de5;
    --accent-color: #ff6b6b;
    --success-color: #4CAF50;
    --warning-color: #ff9800;
    --text-color: #333;
    --text-color-light: #666;
    --border-color: #ddd;
    --admin-bg: #f5f5f5;
    --price-color: #e74c3c;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'メイリオ', 'Meiryo', 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', sans-serif;
    background-color: var(--background-secondary);
    color: var(--text-color);
    line-height: 1.6;
}

/* ヘッダー */
.header {
    background: var(--primary-color);
    color: var(--background-secondary, #ffffff);
    padding: 8px 0;
}

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

.logo {
    font-size: 18px;
    font-weight: bold;
    color: var(--background-secondary, #ffffff);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--background-secondary, #ffffff);
    text-decoration: none;
    font-size: 12px;
}

.search-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    padding: 4px 8px;
    border: none;
    font-size: 12px;
    width: 180px;
}

.search-btn {
    background: var(--price-color);
    color: white;
    border: none;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 12px;
}

/* メインコンテナ */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    padding: 20px;
}

/* サイドバー */
.sidebar {
    width: 200px;
    background: var(--admin-bg);
    padding: 15px;
    border: 1px solid var(--border-color);
}

.sidebar h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.sidebar ul {
    list-style: none;
    margin-bottom: 20px;
}

.sidebar li {
    padding: 3px 0;
    font-size: 12px;
    color: var(--text-color-light);
}

.sidebar a {
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar a:hover {
    text-decoration: underline;
}

/* メインコンテンツ */
.main-content {
    flex: 1;
}

.breadcrumb {
    font-size: 12px;
    color: var(--text-color-light);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.intro-text {
    background: #f0f8ff;
    padding: 15px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
    font-size: 14px;
    line-height: 1.8;
}

/* 商品セクション */
.product-section {
    margin-bottom: 40px;
}

.section-title {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: white;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.subsection-title {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    margin: 20px 0 15px 0;
    border-radius: 4px;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, var(--admin-bg), #ffffff);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-border-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover .product-image {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-color);
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-price {
    color: var(--price-color);
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

.product-details {
    font-size: 11px;
    color: var(--text-color-light);
    line-height: 1.4;
}

.product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: calc(100% - 16px);
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.15);
    border: 2px solid white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
    line-height: 1.1;
    white-space: nowrap;
}

.product-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-size: 8px;
    font-weight: 700;
    border-radius: 50%;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
    line-height: 1.1;
    padding: 0;
}

.badge::before,
.product-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.badge:hover::before,
.product-badge:hover::before {
    left: 100%;
}

.badge:hover,
.product-badge:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.badge-new {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 50%, #2a5f99 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(74, 144, 226, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-new:hover {
    box-shadow: 0 5px 16px rgba(74, 144, 226, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-popular {
    background: linear-gradient(135deg, var(--price-color) 0%, #ff8e53 50%, #ff4757 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(255, 107, 107, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-popular:hover {
    box-shadow: 0 5px 16px rgba(255, 107, 107, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-premium {
    background: linear-gradient(135deg, #ffd93d 0%, #ffb700 50%, #ff9500 100%);
    color: var(--text-color);
    box-shadow: 0 3px 12px rgba(255, 217, 61, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-premium:hover {
    box-shadow: 0 5px 16px rgba(255, 217, 61, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-budget {
    background: linear-gradient(135deg, #6bcf7f 0%, #4caf50 50%, #43a047 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(107, 207, 127, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-budget:hover {
    box-shadow: 0 5px 16px rgba(107, 207, 127, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-pro {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2e5d8b 50%, #1e3f5c 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(74, 144, 226, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-pro:hover {
    box-shadow: 0 5px 16px rgba(74, 144, 226, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-special {
    background: linear-gradient(135deg, #8e44ad 0%, #6a1b9a 50%, #512e65 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(142, 68, 173, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-special:hover {
    box-shadow: 0 5px 16px rgba(142, 68, 173, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* フィルター機能 */
.filter-section {
    background: var(--admin-bg);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color-light);
}

.filter-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 16px;
}

.filter-group {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--gray-medium);
    font-size: 14px;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--background-secondary);
    font-size: 14px;
    min-width: 150px;
}

.filter-group button {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.filter-group button:hover {
    background: #5a6268;
}

.no-products {
    text-align: center;
    padding: 40px;
    color: var(--text-color-light);
    font-size: 16px;
    background: var(--admin-bg);
    border-radius: 8px;
    margin: 20px 0;
}

/* 追加のバッジスタイル */
.badge-budget {
    background: var(--success-color);
    color: white;
}

.badge-standard {
    background: #6c757d;
    color: white;
}

.badge-light {
    background: #17a2b8;
    color: white;
}

.badge-battery {
    background: #ffc107;
    color: #212529;
}

.badge-slim {
    background: #6f42c1;
    color: white;
}

.badge-bluetooth {
    background: #007bff;
    color: white;
}

.badge-roland {
    background: #dc3545;
    color: white;
}

.badge-cabinet {
    background: #795548;
    color: white;
}

.badge-pedal {
    background: #607d8b;
    color: white;
}

.badge-hifi {
    background: #ff9800;
    color: white;
}

.badge-damper {
    background: #9c27b0;
    color: white;
}

.badge-premium-sound {
    background: linear-gradient(135deg, var(--secondary-color), var(--admin-gradient-purple));
    color: white;
}

.badge-auto-accomp {
    background: #4caf50;
    color: white;
}

.badge-deal {
    background: #f44336;
    color: white;
}

.badge-backrest {
    background: #8bc34a;
    color: white;
}

.badge-gas {
    background: #2196f3;
    color: white;
}

.badge-japan {
    background: #e91e63;
    color: white;
}

.badge-x-leg {
    background: #9e9e9e;
    color: white;
}

.badge-luxury {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: var(--text-color);
}

.badge-beginner {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 50%, #17a2b8 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(40, 167, 69, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-beginner:hover {
    box-shadow: 0 5px 16px rgba(40, 167, 69, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-recommended {
    background: linear-gradient(135deg, var(--price-color) 0%, #ff8e53 50%, #ffa726 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(255, 107, 107, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-recommended:hover {
    box-shadow: 0 5px 16px rgba(255, 107, 107, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-advanced {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(30, 58, 138, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-advanced:hover {
    box-shadow: 0 5px 16px rgba(30, 58, 138, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-professional {
    background: linear-gradient(135deg, #312e81 0%, #3730a3 50%, #4338ca 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(49, 46, 129, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-professional:hover {
    box-shadow: 0 5px 16px rgba(49, 46, 129, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-concert {
    background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #4b5563 100%);
    color: #fbbf24;
    box-shadow: 0 3px 12px rgba(31, 41, 55, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #fbbf24;
}

.badge-concert:hover {
    box-shadow: 0 5px 16px rgba(31, 41, 55, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-default {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 50%, #d1d5db 100%);
    color: #374151;
    box-shadow: 0 3px 12px rgba(107, 114, 128, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-default:hover {
    box-shadow: 0 5px 16px rgba(107, 114, 128, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-防音対策 {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(5, 150, 105, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-防音対策:hover {
    box-shadow: 0 5px 16px rgba(5, 150, 105, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-床保護 {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-床保護:hover {
    box-shadow: 0 5px 16px rgba(124, 58, 237, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-初心者向け {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(34, 197, 94, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-初心者向け:hover {
    box-shadow: 0 5px 16px rgba(34, 197, 94, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.badge-プロ仕様 {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(30, 64, 175, 0.4), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.badge-プロ仕様:hover {
    box-shadow: 0 5px 16px rgba(30, 64, 175, 0.5), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.sale-badge {
    background: #ff4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    display: inline-block;
    margin-bottom: 5px;
}

/* 詳細情報セクション */
.detail-section {
    background: var(--admin-bg);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.detail-title {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    font-size: 16px;
    font-weight: bold;
    margin: -20px -20px 20px -20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.detail-item {
    background: var(--background-secondary);
    padding: 15px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.detail-item h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.detail-item p {
    font-size: 12px;
    color: var(--text-color-light);
    line-height: 1.5;
}

/* フッター */
.footer {
    background: var(--primary-color-dark);
    color: var(--background-secondary);
    padding: 30px 0;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer h4 {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--background-secondary);
}

.footer ul {
    list-style: none;
}

.footer li {
    margin-bottom: 5px;
    font-size: 12px;
}

.footer a {
    color: var(--text-color-light);
    text-decoration: none;
}

.footer a:hover {
    color: white;
}

/* チャットボットボタン */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #5a9de5 0%, var(--primary-color) 60%, #2d5aa0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    color: white;
    font-size: 24px;
    border: none;
    animation: pulse 2s infinite;
    backdrop-filter: blur(10px);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chat-button:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 35px rgba(74, 144, 226, 0.5), 0 6px 16px rgba(0, 0, 0, 0.2);
    animation-play-state: paused;
}

/* チャットオーバーレイ */
.chat-overlay {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 2000;
    display: none;
    /* 幅・高さは子の .chat-container に任せる */
}

.chat-container {
    width: 450px;
    height: 650px;
    background: var(--background-secondary);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border-color-light);
    backdrop-filter: blur(20px);
    pointer-events: auto; /* 本体のみクリック可能 */
}

@keyframes slideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-header {
    background: linear-gradient(135deg, #5a9de5 0%, var(--primary-color) 60%, #2d5aa0 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}
.chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd, #90caf9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.chat-info h3 {
    font-size: 16px;
    margin-bottom: 2px;
}

.chat-status {
    font-size: 12px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 5px;
}
.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: linear-gradient(180deg, var(--admin-bg) 0%, #ffffff 100%);
    position: relative;
}

.chat-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: messageSlideIn 0.3s ease-out;
    transition: transform 0.2s ease;
}

.message:hover {
    transform: translateX(2px);
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, #e3f2fd, #90caf9);
    color: #1565c0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.message.user .message-avatar {
    background: var(--admin-border-light);
    color: #64748b;
}

.message-content {
    max-width: 280px;
    padding: 12px 16px;
    border-radius: 16px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.message.bot .message-content {
    background: var(--background-color);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.message.bot .message-content:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.message.user .message-content {
    background: linear-gradient(135deg, #5a9de5 0%, var(--primary-color) 60%, #2d5aa0 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.choice-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.choice-btn {
    background: linear-gradient(135deg, #5a9de5 0%, var(--primary-color) 60%, #2d5aa0 100%);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    min-width: 120px;
    max-width: calc(50% - 4px);
    height: 40px;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.choice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.choice-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.25), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.qa-result {
    background: var(--background-color);
    border: 1px solid var(--admin-border-light);
    border-radius: 12px;
    padding: 15px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.qa-result:hover {
    background: var(--primary-color-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.qa-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.03), transparent);
    transition: left 0.5s ease;
}

.qa-result:hover::before {
    left: 100%;
}

.qa-category-tag {
    background: linear-gradient(135deg, #5a9de5 0%, var(--primary-color) 60%, #2d5aa0 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 10px;
    margin-bottom: 8px;
    display: inline-block;
    font-weight: 600;
}

.qa-question {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.qa-preview {
    color: var(--text-color-light);
    font-size: 12px;
    line-height: 1.3;
}

.search-input-area {
    padding: 20px;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-color-light);
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color-light);
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--background-color);
    color: var(--text-color);
    backdrop-filter: blur(5px);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1), 0 2px 8px rgba(74, 144, 226, 0.15);
    background: var(--background-secondary);
    transform: translateY(-1px);
}

.send-btn {
    background: linear-gradient(135deg, #5a9de5 0%, var(--primary-color) 60%, #2d5aa0 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3), 0 2px 6px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.send-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4), 0 3px 8px rgba(0, 0, 0, 0.12);
}

.send-btn:active {
    transform: scale(0.95) translateY(0px);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.send-btn:disabled {
    background: var(--gray-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 10px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--gray-light);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-10px); opacity: 1; }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-container {
        width: 90vw;
        height: 80vh;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}
