/* ============================================
   kobakoya.com Cart3 モダンスタイル
   ============================================ */

:root {
    --cart-primary: #8c4f30;
    --cart-primary-gradient: linear-gradient(135deg, #8c4f30, #a0654a);
    --cart-primary-dark: #4c1800;
    --cart-primary-light: #f8ece2;
    --cart-primary-border: #e8ddd3;
    --cart-accent: #e85922;
    --cart-accent-hover: #c94d1c;
    --cart-error: #d32f2f;
    --cart-text: #333;
    --cart-text-light: #666;
    --cart-bg: #fff;
    --cart-shadow: 0 2px 8px rgba(88, 56, 34, 0.15);
}

/* ステップ進捗バー
   ============================================ */
.cart-steps {
    display: flex;
    width: 100%;
    margin: 0 0 20px 0;
    background: #f5f0eb;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--cart-primary-border);
}
.cart-steps .step {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    font-size: 13px;
    color: var(--cart-text-light);
    position: relative;
}
.cart-steps .step.active {
    background: var(--cart-primary);
    color: #fff;
    font-weight: bold;
}
.cart-steps .step.completed {
    background: var(--cart-primary-light);
    color: var(--cart-primary);
}

/* 商品テーブル
   ============================================ */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    border: 1px solid var(--cart-primary-border);
}
.cart-table thead th {
    background: var(--cart-primary-light);
    color: var(--cart-primary-dark);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    border: 1px solid var(--cart-primary-border);
}
.cart-table tbody td {
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid var(--cart-primary-border);
    background: #fff;
    text-align: center;
}
.cart-table tbody tr:last-child td {
    border-bottom: none;
}
.cart-table td.price,
.cart-table td.subtotal {
    text-align: right;
}
.cart-table .delete-link {
    color: var(--cart-error);
    text-decoration: none;
    font-weight: bold;
    margin-left: 8px;
}
.cart-table .delete-link:hover {
    text-decoration: underline;
}

/* 合計表示カード
   ============================================ */
.cart-summary {
    max-width: 350px;
    margin: 20px auto;
    border: 2px solid var(--cart-primary);
    border-radius: 8px;
    overflow: hidden;
}
.cart-summary-row {
    display: flex;
    border-bottom: 1px solid var(--cart-primary-border);
}
.cart-summary-row:last-child {
    border-bottom: none;
}
.cart-summary-label {
    width: 140px;
    min-width: 140px;
    padding: 10px 15px;
    background: var(--cart-primary-light);
    color: var(--cart-primary-dark);
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-summary-value {
    flex: 1;
    padding: 10px 15px;
    text-align: right;
    font-size: 13px;
}
.cart-summary-row.total .cart-summary-label {
    background: var(--cart-primary);
    color: #fff;
}
.cart-summary-row.total .cart-summary-value {
    font-weight: bold;
    font-size: 15px;
}

/* フォーム情報テーブル
   ============================================ */
.cart-form-table {
    width: 100%;
    margin: 15px 0;
    border: 1px solid var(--cart-primary-border);
    border-radius: 8px;
    overflow: hidden;
}
.cart-form-row {
    display: flex;
    border-bottom: 1px solid var(--cart-primary-border);
}
.cart-form-row:last-child {
    border-bottom: none;
}
.cart-form-label {
    width: 160px;
    min-width: 160px;
    padding: 12px 16px;
    background: var(--cart-primary-light);
    color: var(--cart-primary-dark);
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.cart-form-value {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.7;
}
.cart-form-label .required {
    color: var(--cart-error);
    margin-left: 4px;
}

/* 支払方法選択カード
   ============================================ */
.payment-option {
    border: 2px solid var(--cart-primary-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.payment-option:hover {
    border-color: var(--cart-primary);
}
.payment-option-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--cart-primary-light);
    cursor: pointer;
}
.payment-option-header input[type="radio"] {
    margin-right: 10px;
}
.payment-option-header label {
    font-weight: bold;
    font-size: 14px;
    color: var(--cart-primary-dark);
    cursor: pointer;
}
.payment-option-body {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--cart-text-light);
}

/* ボタン類
   ============================================ */
/* フォントリセット: button/input/aで統一 */
.cart-btn-group button,
.cart-btn-group input[type="submit"],
.cart-btn-group a {
    font-family: 'メイリオ', Meiryo, 'Hiragino Kaku Gothic Pro', sans-serif;
    line-height: 1.4;
    box-sizing: border-box;
}
.cart-btn-primary {
    display: inline-block;
    background: var(--cart-accent);
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
}
.cart-btn-primary:hover {
    background: var(--cart-accent-hover);
    transform: translateY(-1px);
}
.cart-btn-secondary {
    display: inline-block;
    background: var(--cart-primary-light);
    color: var(--cart-primary);
    border: 1px solid var(--cart-primary-border);
    padding: 10px 24px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}
.cart-btn-secondary:hover {
    background: #edddd0;
}
.cart-btn-home,
a.cart-btn-home,
a.cart-btn-home:link,
a.cart-btn-home:visited {
    display: inline-block;
    background: var(--cart-primary-light);
    color: var(--cart-primary);
    border: 1px solid var(--cart-primary-border);
    padding: 10px 24px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}
.cart-btn-home:hover,
a.cart-btn-home:hover {
    background: #edddd0;
    color: var(--cart-primary);
}
/* ボタングループ: セカンダリ横並び（上段）→ プライマリ（下段） */
.cart-btn-group {
    text-align: center;
    margin: 25px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}
.cart-btn-group > form {
    display: contents;
}
.cart-btn-group .cart-btn-primary {
    order: 10;
    flex-basis: 100%;
    max-width: 50%;
}

/* 注意書きカード
   ============================================ */
.cart-notice {
    background: #fff8e1;
    border: 1px solid #ffe0b2;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    font-size: 13px;
    color: var(--cart-text-light);
    line-height: 1.7;
}
.cart-notice strong {
    color: var(--cart-primary-dark);
}
.cart-notice .warning {
    color: var(--cart-error);
    font-weight: bold;
}

/* セクション見出し
   ============================================ */
.cart-section-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--cart-primary-dark);
    padding: 8px 0;
    margin: 15px 0 10px;
    border-bottom: 2px solid var(--cart-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--cart-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

/* 空カートメッセージ
   ============================================ */
.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--cart-text-light);
    font-size: 15px;
}

/* 汎用カード（完了ページ等）
   ============================================ */
.cart-card {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border: 2px solid var(--cart-primary);
    border-radius: 8px;
    box-shadow: var(--cart-shadow);
    overflow: hidden;
}
.cart-card-header {
    background: var(--cart-primary-gradient);
    color: #fff;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
}
.cart-card-body {
    padding: 20px;
    line-height: 1.8;
}

/* フォーム入力要素の統一スタイル
   ============================================ */
.cart-form-value input[type="text"],
.cart-form-value input[type="email"],
.cart-form-value input[type="tel"],
.cart-form-value input[type="password"],
.cart-form-value select,
.cart-form-value textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    transition: border-color 0.2s;
}
.cart-form-value input[type="text"]:focus,
.cart-form-value input[type="email"]:focus,
.cart-form-value input[type="tel"]:focus,
.cart-form-value input[type="password"]:focus,
.cart-form-value select:focus,
.cart-form-value textarea:focus {
    border-color: var(--cart-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(140, 79, 48, 0.15);
}

/* ログイン・登録選択カード
   ============================================ */
.cart-login-card {
    max-width: 600px;
    margin: 15px auto;
    border: 1px solid var(--cart-primary-border);
    border-radius: 8px;
    overflow: hidden;
}
.cart-login-option {
    padding: 16px 20px;
    border-bottom: 1px solid var(--cart-primary-border);
}
.cart-login-option:last-child {
    border-bottom: none;
}
.cart-login-option label {
    font-size: 14px;
    cursor: pointer;
}
.cart-login-option .option-sub {
    margin: 8px 0 0 24px;
    font-size: 13px;
    color: var(--cart-text-light);
}
.cart-login-detail {
    margin: 12px 0 0 24px;
    padding: 12px 16px;
    border: 1px solid var(--cart-primary-border);
    border-radius: 6px;
    background: #faf8f5;
}
.cart-login-detail .password-link {
    font-size: 12px;
    margin-bottom: 10px;
}
.cart-login-field {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.cart-login-field:last-child {
    margin-bottom: 0;
}
.cart-login-field .field-label {
    width: 90px;
    min-width: 90px;
    font-size: 13px;
    font-weight: bold;
    color: var(--cart-primary);
}
.cart-login-field input[type="text"],
.cart-login-field input[type="password"] {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    flex: 1;
    max-width: 260px;
    transition: border-color 0.2s;
}
.cart-login-field input[type="text"]:focus,
.cart-login-field input[type="password"]:focus {
    border-color: var(--cart-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(140, 79, 48, 0.15);
}

/* レスポンシブ対応
   ============================================ */
@media screen and (max-width: 679px) {
    .cart-steps {
        font-size: 11px;
    }
    .cart-steps .step {
        padding: 10px 4px;
    }
    .cart-form-row {
        flex-direction: column;
    }
    .cart-form-label {
        width: 100%;
        min-width: 100%;
        padding: 8px 12px;
    }
    .cart-form-value {
        padding: 10px 12px;
    }
    .cart-summary {
        max-width: 100%;
    }
    .cart-summary-row {
        flex-direction: column;
    }
    .cart-summary-label {
        width: 100%;
        min-width: 100%;
        padding: 8px 12px;
    }
    .cart-summary-value {
        padding: 8px 12px;
        text-align: left;
    }
    .cart-table {
        font-size: 12px;
    }
    .cart-table thead th,
    .cart-table tbody td {
        padding: 8px 6px;
    }
    .cart-btn-primary {
        width: 100%;
        box-sizing: border-box;
    }
    .cart-btn-secondary,
    .cart-btn-home {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
    }
    .payment-option-header {
        padding: 10px 12px;
    }
    .cart-card {
        margin: 0 10px;
    }
    .cart-login-card {
        margin: 15px 0;
    }
    .cart-login-option {
        padding: 12px 14px;
    }
    .cart-login-detail {
        margin-left: 0;
        margin-top: 10px;
    }
    .cart-login-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .cart-login-field .field-label {
        width: auto;
        min-width: auto;
    }
    .cart-login-field input[type="text"],
    .cart-login-field input[type="password"] {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
}
