/* Order Form Styles */
.order-form-page {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
}

#page_order_form .ec-borderedDefs dl {
    padding: 15px 0 10px;
}

#page_order_form .ec-off1Grid {
    padding: 0;
}

#page_order_form .ec-borderedDefs dt {
    padding: 0;
}

#page_order_form .form-label {
    margin-bottom: 0;
}

#page_order_form .col-form-label {
    padding: 0;
}

#page_order_form .ec-required {
    font-size: 13px;
}

/* 発送までの流れセクション */
.shipping-flow-section {
    margin: 0px 0 30px 0;
    padding: 25px 50px;
}

.shipping-flow-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #8f7a37;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #8f7a37;
}

.shipping-flow-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.flow-step {
    flex: 1;
    text-align: center;
    position: relative;
    min-width: 200px;
    margin-bottom: 20px;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #8f7a37;
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.step-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.step-arrow {
    position: absolute;
    top: 20px;
    right: -15px;
    font-size: 24px;
    color: #8f7a37;
    font-weight: bold;
}

.flow-step:last-child .step-arrow {
    display: none;
}

.step-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.shipping-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    text-align: center;
    padding: 20px;
    background-color: white;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.feature-title {
    font-size: 16px;
    font-weight: bold;
    color: #8f7a37;
    margin-bottom: 10px;
}

.feature-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .shipping-flow-section {
        margin: 0px 0 30px 0;
        padding: 25px 5px;
    }
    
    .shipping-flow-steps {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        justify-items: center;
    }
    
    .flow-step {
        margin-bottom: 20px;
        min-width: auto;
        width: 100%;
    }
    
    .step-arrow {
        display: none;
    }
    
    .shipping-features {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .feature-item {
        padding: 15px 10px;
    }
    
    .feature-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .feature-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .feature-description {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* 注文部品セクション */
.parts-section {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fafafa;
}

.parts-section h3 {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    padding-bottom: 8px;
}

/* パーツヘッダー */
.parts-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: bold;
    color: #666;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #ccc;
}

.parts-header .parts-number {
    width: 50px;
    text-align: center;
}

.parts-header .parts-name {
    flex: 2;
    margin-right: 10px;
}

.parts-header .parts-quantity {
    width: 100px;
    margin-right: 10px;
}

.parts-header .parts-id {
    flex: 2;
}

/* パーツ行 */
.parts-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.parts-row .parts-number {
    width: 50px;
    text-align: center;
    font-weight: bold;
    color: #333;
}

.parts-row .parts-name {
    flex: 2;
    margin-right: 10px;
}

.parts-row .parts-quantity {
    width: 100px;
    margin-right: 10px;
}

.parts-row .parts-id {
    flex: 2;
}

.parts-row input[type="text"],
.parts-row input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.parts-row input[type="text"]:focus,
.parts-row input[type="number"]:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* 項目追加ボタンエリア */
.add-parts-area {
    margin-top: 15px;
    padding: 15px 0;
    text-align: center;
}

.add-parts-btn {
    background-color: #8f7a37;
    color: white;
    padding: 12px 24px;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-parts-btn:hover {
    background-color: #7a6530;
}

.add-parts-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.add-parts-description {
    margin-left: 15px;
    color: #666;
    font-size: 13px;
    vertical-align: middle;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .parts-header {
        display: none;
    }
    
    .parts-row {
        flex-direction: column;
        align-items: stretch;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 20px;
        background-color: white;
    }
    
    .parts-row .parts-number {
        width: 100%;
        text-align: left;
        font-size: 18px;
        font-weight: bold;
        color: #8f7a37;
        margin-bottom: 15px;
        padding-bottom: 8px;
        border-bottom: 1px solid #eee;
    }
    
    .parts-row .parts-name,
    .parts-row .parts-quantity,
    .parts-row .parts-id {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
        position: relative;
    }
    
    .parts-row .parts-name::before {
        content: "部品名称";
        display: block;
        font-size: 14px;
        font-weight: bold;
        color: #333;
        margin-bottom: 5px;
    }
    
    .parts-row .parts-quantity::before {
        content: "数量";
        display: block;
        font-size: 14px;
        font-weight: bold;
        color: #333;
        margin-bottom: 5px;
    }
    
    .parts-row .parts-id::before {
        content: "部品番号（未入力でも可）";
        display: block;
        font-size: 14px;
        font-weight: bold;
        color: #333;
        margin-bottom: 5px;
    }
    
    .add-parts-area {
        text-align: center;
    }
    
    .add-parts-description {
        display: block;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* フォーム全体のスタイル調整 */
.order-form-page .ec-borderedDefs {
    margin-bottom: 20px;
}

.order-form-page .ec-borderedDefs h3 {
    background-color: #f8f9fa;
    padding: 12px;
    margin: 0 0 15px 0;
    border-left: 4px solid #d4af37;
    font-size: 16px;
    font-weight: bold;
}

.order-form-page .ec-borderedDefs dt {
    margin-bottom: 0px;
    display: flex;
    align-items: center;
    min-height: 50px;
}

.order-form-page .ec-borderedDefs dd {
    margin-bottom: 0px;
    align-items: center;
    min-height: 50px;
}

/* ラジオボタンフィールドの特別な配置調整 */
.order-form-page .ec-borderedDefs dt.radio-field-label {
    align-items: flex-start;
    padding-top: 0px;
}

.order-form-page .ec-borderedDefs dt.radio-field-label + dd {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 0px;
}

.order-form-page .ec-borderedDefs dt.radio-field-label + dd > div:first-child {
    margin-top: 0px;
}

/* 入力フィールドの統一スタイル */
.order-form-page input[type="text"],
.order-form-page input[type="email"],
.order-form-page input[type="tel"],
.order-form-page input[type="number"],
.order-form-page textarea,
.order-form-page select {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

/* EC-CUBEのデフォルトクラスを上書き */
.order-form-page .ec-halfInput,
.order-form-page .ec-input {
    width: 100% !important;
    max-width: none !important;
}

.order-form-page .ec-halfInput input,
.order-form-page .ec-input input,
.order-form-page .ec-halfInput textarea,
.order-form-page .ec-input textarea,
.order-form-page .ec-halfInput select,
.order-form-page .ec-input select {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.order-form-page input[type="text"]:focus,
.order-form-page input[type="email"]:focus,
.order-form-page input[type="tel"]:focus,
.order-form-page input[type="number"]:focus,
.order-form-page textarea:focus,
.order-form-page select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* 送信ボタンのスタイル */
.order-form-page .ec-blockBtn--action {
    background-color: #8f7a37;
    border: none;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
}

.order-form-page .ec-blockBtn--action:hover {
    background-color: #7a6530;
}

/* ラジオボタンとラベルの配置調整 */
.order-form-page input[type="radio"] {
    margin-right: 8px;
    vertical-align: top;
    margin-top: 2px;
}

.order-form-page input[type="radio"] + label {
    display: inline-block;
    vertical-align: top;
    margin-right: 20px;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* EC-CUBEのフォーム構造に対応 */
.order-form-page .ec-borderedDefs dd > div {
    display: inline-block;
    margin-right: 20px;
}

.order-form-page .ec-borderedDefs dd > div input[type="radio"] {
    margin-right: 8px;
    vertical-align: top;
    margin-top: 2px;
}

.order-form-page .ec-borderedDefs dd > div label {
    display: inline;
    vertical-align: top;
    line-height: 1.4;
}

/* Symfonyフォームのラジオボタン対応 */
.order-form-page div[id*="form_"] > input[type="radio"] {
    margin-right: 8px;
    vertical-align: top;
    margin-top: 2px;
}

.order-form-page div[id*="form_"] > label {
    display: inline;
    vertical-align: top;
    line-height: 1.4;
    margin-right: 20px;
}

/* 必須マークの配置調整 */
.order-form-page .ec-borderedDefs dt {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.order-form-page .ec-borderedDefs dt > span:first-child {
    flex-shrink: 0;
}

.order-form-page .ec-borderedDefs dt .ec-required {
    flex-shrink: 0;
    margin-left: 0;
}

/* 決済方法選択の行間調整 */
.order-form-page .ec-borderedDefs dd > div[id*="form_payment_type"] {
    margin-bottom: 5px !important;
    line-height: 1.2 !important;
}

.order-form-page .ec-borderedDefs dd > div[id*="form_payment_type"] label {
    margin-bottom: 5px !important;
    line-height: 1.3 !important;
    display: block !important;
    margin-right: 0 !important;
}

.order-form-page .ec-borderedDefs dd > div[id*="form_payment_type"] input[type="radio"] {
    margin-bottom: 0 !important;
    margin-top: 1px !important;
}

/* 決済方法選択エリア全体の調整 */
.order-form-page .ec-borderedDefs dd:has(div[id*="form_payment_type"]) {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* 代理店決済の長いテキストの改行調整 */
.order-form-page .ec-borderedDefs dd > div[id*="form_payment_type"] label:last-child {
    word-break: break-all;
    white-space: normal;
    line-height: 1.4 !important;
}