/* =====================================================
   Design System - Premium UI
   ===================================================== */

/* カスタムプロパティ */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --secondary-color: #64748b;
    --success-color: #10b981;
    --success-light: #ecfdf5;
    --danger-color: #ef4444;
    --danger-light: #fef2f2;
    --warning-color: #f59e0b;
    --warning-light: #fffbeb;
    --background: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
    --shadow-primary: 0 4px 14px rgba(59, 130, 246, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition-fast: 0.15s ease;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Roboto, sans-serif;
}

/* リセット & ベース */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* コンテナ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

/* =====================================================
   ステップインジケーター (index.html)
   ===================================================== */
.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 3px;
    background: var(--border);
    z-index: 0;
    transform: translateY(-8px);
    border-radius: 2px;
}

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

.step-number {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--background);
    border: 2.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 6px;
    transition: all var(--transition);
}

.step.active .step-number {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), var(--shadow-primary);
    transform: scale(1.05);
}

.step.completed .step-number {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: var(--success-color);
    color: white;
}

.step-label {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
    transition: color var(--transition);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 700;
}

.step.completed .step-label {
    color: var(--success-color);
}

/* =====================================================
   ステップコンテンツ (index.html)
   ===================================================== */
.step-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: none;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.3s ease;
}

/* =====================================================
   ヒーローセクション - TOPページ (ステップ1)
   ===================================================== */
.step-content--hero {
    min-height: calc(100vh - 160px);
    justify-content: center;
    align-items: center;
    background: var(--surface);
    padding: 48px 40px;
    box-shadow: none;
    border-radius: 0;
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 680px;
    width: 100%;
}

/* ヒーローアイコン */
.hero-icon {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.3);
}

.hero-icon i {
    font-size: 42px;
    color: white;
}

/* ヒーロータイトル */
.hero-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* CTAボタン */
.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    font-family: inherit;
}

.hero-cta-btn:hover {
    background: var(--primary-dark);
}

.hero-cta-btn i {
    font-size: 16px;
}

/* 補足テキスト */
.hero-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-note i {
    font-size: 12px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 36px;
}

.step-header h1 {
    font-size: 26px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.step-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.step-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.step-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

/* =====================================================
   製品/パーツ選択カード
   ===================================================== */
.product-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.product-type-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow: hidden;
}

.product-type-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 0;
}

.product-type-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-primary);
}

.product-type-card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-type-card i {
    font-size: 52px;
    color: var(--primary-color);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-spring);
}

.product-type-card:hover i {
    transform: scale(1.1);
}

.product-type-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.product-type-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* =====================================================
   メーカーグリッド
   ===================================================== */
.manufacturer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 900px;
}

.manufacturer-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
    -webkit-user-select: none;
}

.manufacturer-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.manufacturer-card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.manufacturer-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.manufacturer-icon {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.manufacturer-icon img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.manufacturer-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* =====================================================
   型式入力
   ===================================================== */
.model-inputs {
    width: 100%;
    max-width: 800px;
}

.model-input-group {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.model-input-group:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.model-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.model-input-label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
}

.model-remove-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 18px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.model-remove-btn:hover {
    background: var(--danger-light);
}

.model-input-field {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.model-input-field input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--surface);
}

.model-input-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.model-input-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    padding: 10px 18px;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-icon:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.btn-icon i {
    margin-right: 5px;
}

/* 型式候補リスト */
.model-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--surface);
    border: 2px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    margin-top: -2px;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

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

.suggestion-item:hover {
    background: var(--primary-light);
}

.suggestion-model {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 2px;
}

.suggestion-name {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =====================================================
   画像アップロード
   ===================================================== */
.image-upload-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.image-upload-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.image-preview {
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    display: inline-block;
    width: 160px;
    height: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background var(--transition-fast);
}

.image-remove-btn:hover {
    background: var(--danger-color);
}

/* =====================================================
   フォーム
   ===================================================== */
.form {
    width: 100%;
    max-width: 560px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.required {
    color: var(--danger-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--surface);
    color: var(--text-primary);
    -webkit-appearance: none;
    appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 36px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* =====================================================
   確認セクション
   ===================================================== */
.confirmation-section {
    width: 100%;
    max-width: 700px;
    margin-bottom: 24px;
}

.confirmation-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
}

.confirm-value {
    padding: 12px 16px;
    background: var(--background);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.confirm-table {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.confirm-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    border-bottom: 1px solid var(--border);
}

.confirm-row:last-child {
    border-bottom: none;
}

.confirm-label {
    padding: 12px 16px;
    background: var(--background);
    font-weight: 600;
    border-right: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.confirm-row .confirm-value {
    padding: 12px 16px;
    background: var(--surface);
    border-radius: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* =====================================================
   完了メッセージ
   ===================================================== */
.completion-message {
    text-align: center;
    max-width: 560px;
    margin-bottom: 32px;
}

.completion-message i {
    font-size: 72px;
    color: var(--success-color);
    margin-bottom: 16px;
}

.completion-message h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.completion-message p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
}

.inquiry-number {
    background: var(--background);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    border: 1px solid var(--border);
}

.inquiry-number strong {
    color: var(--text-primary);
}

.completion-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* =====================================================
   ボタン
   ===================================================== */
.btn-primary,
.btn-secondary {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    line-height: 1;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-large {
    padding: 16px 40px;
    font-size: 17px;
    border-radius: var(--radius-md);
    min-height: 54px;
}

.btn-small {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 36px;
}

/* 共通ボタン（index2, index3で使用） */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
    font-family: inherit;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.btn-success:active {
    transform: translateY(0);
}

/* 管理画面用 btn-secondary */
.btn.btn-secondary {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-primary);
}

.btn.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn.btn-secondary:active {
    transform: translateY(0);
}

/* =====================================================
   モーダル
   ===================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--background);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* =====================================================
   検索入力
   ===================================================== */
.search-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    margin-bottom: 16px;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.search-result-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-result-item:hover {
    background: var(--primary-light);
}

.search-result-item:active {
    background: #bfdbfe;
}

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

.result-model {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.result-name {
    color: var(--text-secondary);
    font-size: 13px;
}

/* カテゴリブレッドクラム */
.category-breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb-item {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.breadcrumb-item:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

/* カテゴリコンテンツ */
.category-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.category-item {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
}

.category-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.category-item:active {
    transform: scale(0.98);
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

/* =====================================================
   レスポンシブ (index.html)
   ===================================================== */
@media (max-width: 768px) {
    body {
        font-size: 15px; /* Mobile readability update */
    }

    .container {
        padding: 12px;
    }

    .step-indicator {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 16px 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        scrollbar-width: none; /* Firefox */
    }

    .step-indicator::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .step-indicator::before {
        display: none;
    }

    .step {
        flex-shrink: 0;
        min-width: 60px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
        margin-bottom: 6px;
    }

    .step-label {
        font-size: 10px;
        max-width: 70px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 500;
        opacity: 0.7;
    }

    .step.active .step-label {
        opacity: 1;
        font-weight: 700;
    }

    .step-content {
        padding: 24px 16px;
        min-height: auto;
    }

    .step-header {
        margin-bottom: 24px;
    }

    .step-header h1 {
        font-size: 20px;
    }

    .step-header p {
        font-size: 13px;
    }

    .step-footer {
        gap: 10px;
        margin-top: 24px;
        padding-top: 16px;
    }

    .step-footer .btn-primary,
    .step-footer .btn-secondary {
        flex: 1;
        padding: 14px 16px;
        font-size: 15px;
        min-height: 48px; /* Touch target size */
    }

    .manufacturer-grid,
    .category-content {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .manufacturer-card {
        padding: 16px 10px;
    }

    .manufacturer-icon img {
        width: 64px;
        height: 64px;
    }

    .manufacturer-name {
        font-size: 14px;
    }

    .product-type-grid {
        gap: 14px;
    }

    .product-type-card {
        padding: 32px 16px;
    }

    .product-type-card i {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .product-type-card h3 {
        font-size: 17px;
    }

    .product-type-card p {
        font-size: 12px;
    }

    .model-input-group {
        padding: 14px;
    }

    .model-input-field input {
        font-size: 16px;
        /* iOS ズーム防止 */
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        /* iOS ズーム防止 */
        padding: 12px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form {
        max-width: 100%;
    }

    .image-preview-item {
        width: 120px;
        height: 120px;
    }

    .completion-buttons {
        flex-direction: column;
        width: 100%;
    }

    .completion-buttons .btn-primary,
    .completion-buttons .btn-secondary,
    .completion-buttons .btn-large {
        width: 100%;
    }

    .confirm-row {
        grid-template-columns: 1fr;
    }

    .confirm-label {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 10px 14px;
        font-size: 12px;
    }

    .confirm-row .confirm-value {
        padding: 10px 14px;
        font-size: 14px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .btn-large {
        padding: 14px 24px;
        font-size: 16px;
    }

    .category-item {
        padding: 12px;
    }

    .search-input {
        font-size: 16px;
        /* iOS ズーム防止 */
    }

    /* ヒーローセクション レスポンシブ */
    .step-content--hero {
        min-height: calc(100vh - 120px);
        padding: 32px 16px;
    }

    .hero-icon {
        width: 72px;
        height: 72px;
        border-radius: 20px;
        margin-bottom: 20px;
    }

    .hero-icon i {
        font-size: 32px;
    }

    .hero-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .hero-cta-btn {
        padding: 16px 36px;
        font-size: 16px;
        width: 100%;
        justify-content: center;
    }

    .hero-note {
        margin-top: 16px;
        font-size: 12px;
    }


}

/* 極小画面 */
@media (max-width: 375px) {
    .container {
        padding: 8px;
    }

    .step-content {
        padding: 20px 12px;
    }

    .step-header h1 {
        font-size: 18px;
    }

    .product-type-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .product-type-card {
        padding: 24px 14px;
    }

    .manufacturer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .step-content--hero {
        padding: 24px 12px;
    }

    .hero-title {
        font-size: 21px;
    }

    .hero-cta-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
}