html, body {
    margin: 0;
    padding: 0;
}

:root {
    --nissan-red: #C3002F;
    --nissan-black: #111111;
    --accent-yellow: #FFD700;
    --gold-gradient: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    --metallic-red: linear-gradient(145deg, #C3002F 0%, #8A0021 45%, #E60039 50%, #8A0021 55%, #C3002F 100%);
    --bg-white: #ffffff;
}

/* =================================
   共通ベーススタイル
================================= */
body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--nissan-black);
    background:#fff8a5; /* 左右の背景色 */
    line-height: 1.4; /* 全体的に行間を少し詰める */
    overflow-x: hidden;
}

/* 新車ページ（薄い赤） */
body.newcar{
    background:#ffe5ea;
}

/* 中古車ページ（薄い青） */
body.usedcar{
    background:#e7f1ff;
}

/* メニュー開閉用のアニメーション */
#side-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

#side-menu.open {
    transform: translateY(0);
}

.menu-link {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* 各部門フェア案内のためのドットグリッド背景 */
.bg-grid-pattern {
    background-color: #ffffff;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
}

.hero-container {
    position: relative;
    width: 100%;
}

/* スクロールダウン装飾 */
.scroll-down {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    text-align: center;
    animation: scrollBounce 2s infinite;
}
.scroll-text {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: var(--nissan-black);
    display: block;
    margin-bottom: 8px;
}
.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--nissan-black), transparent);
    margin: 0 auto;
}

/* セクションタイトル */
.section-title h2 {
    font-weight: 900;
    font-size: 1.5rem;
    display: inline-block;
    position: relative;
    padding: 8px 30px;
    color: var(--nissan-black);
    background: var(--bg-white);
    transform: skewX(-15deg);
    border: 3px solid var(--nissan-black);
    box-shadow: 6px 6px 0px var(--nissan-red);
}

.section-title h2 span {
    display: inline-block;
    transform: skewX(15deg);
}

.card-frame {
    border: 1px solid var(--nissan-black);
    background: white;
    box-shadow: 6px 6px 0px var(--nissan-black);
    height: 100%;
}

.btn-black {
    background: var(--nissan-black);
    color: white !important;
    font-weight: 900;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--nissan-black);
    transition: 0.3s;
    text-decoration: none;
}

/* =================================
   背景デザイン
================================= */
.bg-metallic-red {
    background: var(--metallic-red);
    background-size: 300% 300%;
    animation: metallicShift 6s ease-in-out infinite;
}

.bg-gold-sparkle {
    background: var(--gold-gradient);
    background-size: 200% 200%;
    animation: metallicShift 10s ease-in-out infinite;
}

/* =================================
   新車・中古車ページ用デザイン定義
================================= */

/* 新車セクション */
.fair-yellow {
    background:#fff200;
}
.fair-red {
    background-color: var(--nissan-red);
}

/* 新車価格ボックス */
.price-box {
    background: var(--metallic-red);
    background-size: 300% 300%;
    animation: metallicShift 4s ease-in-out infinite;
    color: white;
}
.price-main {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

/* 中古車セクション */
.used-section-yellow {
    background: linear-gradient(135deg, #fff200, #ffd700);
}
.used-section-blue {
    background:#1767B2;
}
/* 超目玉車両用：ブルーメタリック背景 */
.used-section-metallic-blue {
    background: linear-gradient(
        145deg,
        #1a6dff 0%,
        #0d47a1 40%,
        #4da3ff 50%,
        #0d47a1 60%,
        #1a6dff 100%
    );
    background-size: 300% 300%;
    animation: metallicShift 6s ease-in-out infinite;
}

/* 中古車ボタン・価格ボックス */
.used-btn {
    background: #004aad;
    color: white !important;
    font-weight: 900;
    padding: 16px;
    border: 4px solid #002e6d;
    box-shadow: 4px 4px 0px #002e6d;
    transition: 0.2s;
}
.used-total-box {
    background: #004aad;
}

/* =================================
   アニメーション
================================= */
@keyframes metallicShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* アコーディオンコメント */
.comment-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}
.comment-content.open {
    max-height: 500px;
    opacity: 1;
}

/* Swiperナビゲーションの調整（小さく、透過に） */
.swiper-button-next, .swiper-button-prev {
    color: var(--nissan-black);
    background: rgba(255, 255, 255, 0.4); /* 背景を透過に */
    width: 32px; /* 小さく */
    height: 32px; /* 小さく */
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 30;
    transition: opacity 0.3s;
}
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 14px; /* 矢印アイコンも小さく */
    font-weight: bold;
}
.swiper-button-next:hover, .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ページネーション（ドット）を小さく透過に */
.swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: #fff;
    opacity: 0.3;
}
.swiper-pagination-bullet-active {
    opacity: 1;
    background: #fff;
}

/* スライダー自体の動作を妨げないための微調整 */
.swiper {
    width: 100%;
    height: auto;
}
.swiper-slide {
    display: flex;
    flex-direction: column; /* これを追加：中身を縦に並べる */
    justify-content: flex-start; /* 上詰めに変更 */
    align-items: center;
    height: auto !important;
    width: 100%; /* 横幅をいっぱいに使う */
}

/* モバイル向け全体的な余白の圧縮 */
@media (max-width: 768px) {
    /* セクション全体のパディングを縮小 */
    section, .py-10, .py-12, .py-16, .py-20 {
        padding-top: 1.5rem !important;
    }

    /* 各部門フェア案内タイトルの上下余白 */
    .mb-12, .mb-10 {
        margin-bottom: 1rem !important;
    }

    /* カードフレーム周り */
    .card-frame .p-8 {
        padding: 0.75rem 1rem 1rem !important;
    }
    .card-frame h3 {
        font-size: 1.875rem !important;
        margin-bottom: 0.25rem !important;
        margin-top: 0 !important;
    }
    
    /* 価格ボックス */
    .price-box {
        padding: 0.75rem !important;
    }
    .price-main {
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
        margin-bottom: 0.4rem !important;
    }
    .price-tag-main {
        font-size: 2.25rem !important;
    }

    /* 画像の高さ制限とマージン */
    .card-frame .relative.md\:w-1\/2 {
        height: auto !important;
        min-height: 120px; /* さらに少し小さく */
    }
    .card-frame img {
        object-fit: contain !important;
        background: #fff;
    }

    /* 車両名直上のマージンを排除 */
    .card-frame .flex-col.justify-center {
        justify-content: flex-start !important;
        padding-top: 0 !important;
    }
    
    /* 残クレ部分も圧縮 */
    .price-box .mb-4, .price-box .mb-2 {
        margin-bottom: 0.25rem !important;
    }

    /* 特典画像（image_cac9b8.png）周りのマージン圧縮 */
    .fair-yellow .fade-in img, .used-section-yellow .fade-in img {
        margin-top: -0.5rem;
        margin-bottom: -0.5rem;
    }
}

/* 既存のコードの末尾に追加してください */

/* Swiperのナビゲーションボタンとドットの視認性調整 */
.mySwiper, .usedSwiper {
    padding-bottom: 50px !important;
}

.swiper-button-next, .swiper-button-prev {
    color: #ffffff !important;
}

.swiper-pagination-bullet {
    background: #ffffff !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #ffffff !important;
}

.sp-wrapper {
    max-width: 750px;
    margin: 0 auto;
    overflow-x: hidden;
}

/* カルーセルを横幅いっぱいにする */
.mySwiper, .usedSwiper {
    width: 100% !important;
    padding-bottom: 50px !important;
}

.swiper-slide {
    width: 100% !important;
}