/* ============================================
   供物オンライン注文ページ - デザインシステム
   ============================================ */

/* --- デザイントークン（CSS変数） --- */
:root {
    /* 配色 */
    --primary: #1A237E;        /* 深い紺 - メインアクセント */
    --primary-light: #283593;  /* やや明るい紺 */
    --primary-pale: #E8EAF6;   /* 薄い紺（背景用） */
    --text-main: #333333;      /* 本文テキスト */
    --text-sub: #666666;       /* サブテキスト */
    --text-muted: #999999;     /* 控えめテキスト */
    --bg-white: #FFFFFF;       /* 白背景 */
    --bg-light: #F5F5F5;       /* 薄いグレー背景 */
    --bg-section: #FAFAFA;     /* セクション背景 */
    --border: #E0E0E0;         /* ボーダー */
    --border-light: #EEEEEE;   /* 薄いボーダー */
    --error: #D32F2F;          /* エラー赤 */
    --success: #388E3C;        /* 成功緑 */
    --gold: #B8860B;           /* ゴールド（価格用） */

    /* フォント */
    --font-mincho: 'Shippori Mincho', 'Yu Mincho', serif;
    --font-gothic: 'Noto Sans JP', 'Hiragino Sans', sans-serif;

    /* 影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* 角丸 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* トランジション */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-gothic);
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    text-decoration: underline;
}

/* --- レイアウトユーティリティ --- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section--alt {
    background-color: var(--bg-section);
}

.section-title {
    font-family: var(--font-mincho);
    font-size: 1.6rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--primary);
}

/* ============================================
   ① ヒーローエリア
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--bg-white);
    text-align: center;
    padding: 60px 20px 50px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.9;
}

.hero__title {
    font-family: var(--font-mincho);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.hero__subtitle {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 8px;
}

.hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-top: 12px;
    backdrop-filter: blur(4px);
}

/* ============================================
   ② 注文の流れ（3STEP）
   ============================================ */
.steps {
    padding: 50px 0;
    background: var(--bg-section);
}

.steps__list {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    list-style: none;
    max-width: 700px;
    margin: 0 auto;
}

.steps__item {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 10px;
}

/* ステップ間の矢印 */
.steps__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    right: -8px;
    width: 16px;
    height: 16px;
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    transform: rotate(-45deg);
}

.steps__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
    transition: var(--transition);
}

.steps__item.active .steps__number {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-white);
    box-shadow: 0 3px 10px rgba(26, 35, 126, 0.3);
}

.steps__item.completed .steps__number {
    background: var(--success);
    border-color: var(--success);
    color: var(--bg-white);
}

.steps__label {
    font-size: 0.85rem;
    color: var(--text-sub);
    font-weight: 500;
}

.steps__item.active .steps__label {
    color: var(--primary);
    font-weight: 700;
}

/* ============================================
   ③ 商品カタログ
   ============================================ */
.catalog {
    padding: 50px 0;
}

.catalog__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: row;
    min-height: 180px;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.product-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary), var(--shadow-md);
}

.product-card__img {
    width: 150px;
    height: auto;
    min-height: 160px;
    object-fit: contain;
    background: var(--bg-light);
    flex-shrink: 0;
}

.product-card__body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__name {
    font-family: var(--font-mincho);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.product-card__price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
}

.product-card__price small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* 個数コントロール */
.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: auto;
    padding: 10px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

.qty-control__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.qty-control__btn:hover {
    background: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
}

.qty-control__btn:active {
    transform: scale(0.92);
}

.qty-control__value {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

/* 合計バー（カタログセクション下部） */
.catalog__summary {
    margin-top: 30px;
    padding: 20px 24px;
    background: var(--primary-pale);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(26, 35, 126, 0.15);
}

.catalog__summary-label {
    font-size: 1rem;
    color: var(--text-sub);
}

.catalog__summary-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.catalog__summary-total small {
    font-size: 0.85rem;
    font-weight: 400;
}

/* ============================================
   ④ 注文フォーム
   ============================================ */
.order-form {
    padding: 50px 0;
    background: var(--bg-section);
}

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

.form-group__title {
    font-family: var(--font-mincho);
    font-size: 1.15rem;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group__title-icon {
    font-size: 1.2rem;
}

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

.form-row label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-row label .required {
    color: var(--error);
    font-size: 0.75rem;
    margin-left: 4px;
    font-weight: 400;
}

.form-row label .optional {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 4px;
    font-weight: 400;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-gothic);
    font-size: 1rem;
    color: var(--text-main);
    background: var(--bg-white);
    transition: var(--transition);
    line-height: 1.6;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.form-row input.error,
.form-row select.error,
.form-row textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-row .error-message {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 4px;
    display: none;
}

.form-row .error-message.show {
    display: block;
}

.form-row .help-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* ラジオボタングループ */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-white);
}

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

.radio-item input[type="radio"] {
    margin-right: 10px;
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.radio-item label {
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 500;
}

/* 横並びフォーム用 */
.form-row--inline {
    display: flex;
    gap: 16px;
}

.form-row--inline > * {
    flex: 1;
}

/* ============================================
   ⑤ 確認・送信
   ============================================ */
.confirm {
    padding: 50px 0;
}

.confirm__box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.confirm__section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.confirm__section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.confirm__section-title {
    font-family: var(--font-mincho);
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.confirm__table {
    width: 100%;
    border-collapse: collapse;
}

.confirm__table th {
    text-align: left;
    font-weight: 500;
    color: var(--text-sub);
    font-size: 0.85rem;
    padding: 8px 12px;
    width: 35%;
    vertical-align: top;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
}

.confirm__table td {
    padding: 8px 12px;
    font-size: 0.95rem;
    border: 1px solid var(--border-light);
}

/* 注文確定ボタン */
.confirm__actions {
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ============================================
   ⑥ 運営情報フッター
   ============================================ */
.site-footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 20px 24px;
    text-align: center;
}

.site-footer__company {
    font-family: var(--font-mincho);
    font-size: 1.1rem;
    color: var(--bg-white);
    margin-bottom: 12px;
}

.site-footer__info {
    font-size: 0.85rem;
    line-height: 2;
}

.site-footer__copy {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ============================================
   汎用ボタン
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-family: var(--font-gothic);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 8px;
}

.btn--primary {
    background: var(--primary);
    color: var(--bg-white);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.25);
}

.btn--primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26, 35, 126, 0.3);
}

.btn--secondary {
    background: var(--bg-white);
    color: var(--text-sub);
    border: 1px solid var(--border);
}

.btn--secondary:hover {
    background: var(--bg-light);
}

.btn--large {
    padding: 16px 48px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn--full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   完了画面
   ============================================ */
.completion {
    text-align: center;
    padding: 80px 20px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.completion__icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeInScale 0.6s ease;
}

.completion__title {
    font-family: var(--font-mincho);
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.completion__message {
    font-size: 1rem;
    color: var(--text-sub);
    line-height: 2;
    max-width: 500px;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   表示制御
   ============================================ */
.hidden {
    display: none !important;
}

/* セクション表示のフェードイン */
.section-fade {
    animation: fadeIn 0.4s ease;
}

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

/* ============================================
   レスポンシブ（768px以下）
   ============================================ */
@media (max-width: 768px) {
    .hero__title {
        font-size: 1.5rem;
    }

    .hero__icon {
        font-size: 2rem;
    }

    .steps__list {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .steps__item:not(:last-child)::after {
        top: auto;
        bottom: -14px;
        right: 50%;
        transform: translateX(50%) rotate(45deg);
    }

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

    .product-card__img {
        height: 180px;
    }

    .product-card {
        flex-direction: column;
    }

    .product-card__img {
        width: 100%;
        height: 200px;
        min-height: auto;
    }

    .form-row--inline {
        flex-direction: column;
        gap: 0;
    }

    .confirm__table th {
        width: 40%;
        font-size: 0.8rem;
    }

    .confirm__actions {
        flex-direction: column;
    }

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

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .catalog__summary {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* 480px以下のさらに小さな画面 */
@media (max-width: 480px) {
    .hero {
        padding: 40px 16px 36px;
    }

    .hero__title {
        font-size: 1.3rem;
    }

    .container {
        padding: 0 16px;
    }

    .confirm__box {
        padding: 20px 16px;
    }
}
