* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Helvetica Neue", Arial, sans-serif; background-color: #e6edf5; color: #334155; }
header { background-color: #0f172a; color: #fff; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
header h1 { font-size: 20px; }
header h1 a { color: #fff; text-decoration: none; }

/* 右上ハンバーガーメニュー */
.menu-container { position: relative; }
.menu-btn {
    background: #ffffff; color: #0f172a; border: none; border-radius: 8px;
    padding: 6px 12px; cursor: pointer; text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); display: flex; flex-direction: column; align-items: center;
}
.menu-btn:hover { background: #f1f5f9; }
.menu-icon { font-size: 18px; font-weight: bold; line-height: 1; }
.menu-text { font-size: 10px; font-weight: bold; margin-top: 2px; }
.dropdown-menu {
    display: none; position: absolute; right: 0; top: 115%;
    background: white; border: 1px solid #cbd5e1; border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); width: 220px; z-index: 1000; overflow: hidden;
}
.dropdown-menu a {
    display: block; padding: 12px 16px; text-decoration: none; color: #334155; font-size: 14px; border-bottom: 1px solid #f1f5f9; font-weight: bold;
}
.dropdown-menu a:hover { background: #f8fafc; color: #0284c7; }
.show { display: block; }

/* 共通レイアウト容器 */
.page-container { max-width: 800px; margin: 30px auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.page-title { font-size: 20px; font-weight: bold; margin-bottom: 15px; border-bottom: 2px solid #0f172a; padding-bottom: 8px; }

/* カタログ画面レイアウト */
.container { display: flex; max-width: 1200px; margin: 20px auto; gap: 20px; padding: 0 10px; }
.sidebar { width: 260px; flex-shrink: 0; }
.filter-box { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 15px; margin-bottom: 15px; }
.filter-box h3 { font-size: 14px; color: #555; margin-bottom: 10px; border-bottom: 2px solid #eee; padding-bottom: 5px; }
.filter-box label { display: block; margin-bottom: 5px; font-size: 13px; cursor: pointer; }
.brand-group { margin-bottom: 5px; }
.brand-label { display: inline-block; margin-right: 10px; margin-bottom: 5px; font-size: 13px; cursor: pointer; }
.brand-divider { border-top: 1px dashed #ddd; margin: 8px 0; }
.filter-box input[type="text"], .filter-box select { width: 100%; padding: 6px; font-size: 13px; border: 1px solid #ccc; border-radius: 4px; }
.range-group { display: flex; align-items: center; gap: 5px; width: 100%; margin-top: 5px; }
.range-group input { flex: 1; min-width: 0; }
.range-group span.unit { font-size: 13px; color: #555; flex-shrink: 0; }
.search-btn-wrapper { margin-bottom: 15px; width: 100%; }
.btn-search { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100% !important; box-sizing: border-box; min-height: 42px; padding: 10px 24px !important; background-color: #1e293b; color: #ffffff !important; font-size: 16px; font-weight: bold; border: 1px solid #334155; border-radius: 8px; cursor: pointer; box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.25); transition: all 0.2s ease; }
.btn-search:hover { background-color: #0f172a; color: #ffffff !important; border-color: #475569; box-shadow: 0 6px 12px -1px rgba(15, 23, 42, 0.35); transform: translateY(-1px); }
.btn-search:active { transform: translateY(0); box-shadow: 0 2px 4px -1px rgba(15, 23, 42, 0.2); }
.btn-search svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: #ffffff !important; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.main-content { flex-grow: 1; display: flex; flex-direction: column; gap: 20px; }
.product-card { display: flex; background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 16px; gap: 20px; align-items: stretch; }

.product-img-wrapper { 
    width: 200px; min-width: 200px; height: 200px; flex-shrink: 0; 
    display: flex; align-items: center; justify-content: center; 
    background-color: #fafafa; border: 1px solid #eee; border-radius: 4px; overflow: hidden; position: relative;
}
.product-img-wrapper a { display: flex !important; align-items: center !important; justify-content: center !important; width: 100% !important; height: 100% !important; text-decoration: none !important; }
.product-img-wrapper img { max-width: 100% !important; max-height: 100% !important; width: auto !important; height: auto !important; object-fit: contain !important; margin: 0 !important; }

.product-details { flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.product-title { font-size: 18px; font-weight: bold; margin-bottom: 8px; }
.product-title a { color: #1a252f; text-decoration: none; }
.product-title a:hover { color: #0284c7; text-decoration: underline; }
.product-meta-primary { font-size: 14px; color: #555; margin-bottom: 12px; display: flex; gap: 20px; }
.product-meta-primary span.price { font-weight: bold; color: #333; }
.product-meta-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 10px; background-color: #f1f5f9; padding: 8px 12px; border-radius: 4px; font-size: 12px; }
.meta-item .label { color: #777; margin-bottom: 2px; }
.meta-item .val { font-weight: bold; color: #333; }
.product-bottom { border-top: 1px solid #eee; padding-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.shop-section-title { font-size: 12px; font-weight: bold; color: #666; margin-bottom: 8px; }
.shop-left { border-right: 1px dashed #ddd; padding-right: 15px; }
.shop-right { padding-left: 5px; }
.shop-btn-list { display: flex; flex-direction: column; gap: 6px; }
.shop-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
}
.btn-amazon { background-color: #fff8e7; color: #d97706; border: 1px solid #fcd34d; }
.btn-rakuten { background-color: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.btn-used { background-color: #f3f4f6; color: #4b5563; border: 1px solid #d1d5db; }
.shop-btn:hover { filter: brightness(0.95); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 10px; padding: 10px; }
.pagination button { padding: 6px 12px; font-size: 13px; border: 1px solid #cbd5e1; background-color: #fff; border-radius: 4px; cursor: pointer; color: #334155; }
.pagination button:hover:not(:disabled) { background-color: #f1f5f9; }
.pagination button.active { background-color: #0f172a; color: #fff; border-color: #0f172a; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* 詳細画面 */
.detail-container { max-width: 800px; margin: 30px auto; background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.back-link { display: inline-block; margin-bottom: 20px; color: #0284c7; text-decoration: none; font-weight: bold; }
.back-link:hover { text-decoration: underline; }
.detail-card { display: flex; gap: 25px; align-items: flex-start; }
.detail-img-wrapper { width: 300px; height: 300px; flex-shrink: 0; border: 1px solid #eee; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: #fafafa; overflow: hidden; }
.detail-img-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail-info { flex-grow: 1; }
.detail-title { font-size: 22px; font-weight: bold; color: #0f172a; margin-bottom: 15px; }
.product-id-tag { display: inline-block; background: #f1f5f9; padding: 4px 8px; border-radius: 4px; font-size: 13px; color: #64748b; font-weight: bold; }

.shop-btn.btn-amazon {
    border: 1px solid #fbd872;
    background-color: #fff9e6;
    color: #d97706;
}

/* 楽天系用ボタン（赤枠・薄ピンク背景・赤文字） */
.shop-btn.btn-rakuten {
    border: 1px solid #fca5a5;
    background-color: #fef2f2;
    color: #dc2626;
}

/* 店舗名（左寄せ） */
.shop-btn .store-name {
    text-align: left;
}

/* 価格（右寄せ） */
.shop-btn .store-price {
    text-align: right;
    margin-left: auto;
}
