/* ========================================
   レイアウト基本設定
======================================== */

/* 2カラムレイアウト：標準的なコンテンツ幅 */
.layout-two-columns .container {
    max-width: 1280px;
    width: auto;
    padding: 0 20px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 3カラムレイアウト：幅設定 */
.layout-three-columns .container {
    max-width: 1280px;
    width: auto;
    padding: 0 20px;
    margin: 0 auto;
    box-sizing: border-box;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
}

/* フルワイドレイアウトでのヘッダー縦スクロール防止 */
.layout-full-width .site-wrapper {
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    overflow-y: visible !important;
}

/* フルワイドレイアウト：bodyの高さ制限も解除 */
.layout-full-width body {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    overflow-y: visible !important;
}

/* 全体の幅設定 */
html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* 横スクロールを防止 */
}

/* フルワイドレイアウト：htmlとbodyのoverflow設定を修正 */
.layout-full-width html,
.layout-full-width body {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

/* タブレット用の幅設定 */
@media (max-width: 1279px) {

    .layout-two-columns .container,
    .layout-three-columns .container,
    .layout-single-column .container {
        max-width: 768px;
        padding: 0 15px;
    }
}

.main-content {
    flex: 1;
    display: grid;
    gap: 10px;
    padding: 20px;
    /* デフォルトは1カラム（モバイル用） */
    grid-template-columns: 1fr;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--background-color);
}

/* 3カラムレイアウト時の基本設定 */
.layout-three-columns .main-content {
    width: 100%;
    margin: 0;
    padding: 40px 0;
    /* 上下のみ、左右はcontainerで制御 */
    box-sizing: border-box;
}
