/* =========================================
   全体レイアウト & 商品グリッド
========================================= */
.product-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px; /* 左右パディングを少し確保 */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-card {
    cursor: pointer;
}

.product-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.series-name {
    margin-top: 12px;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lens-name {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* =========================================
   フィルターエリア
========================================= */
.filter-area {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap; /* スマホで折り返せるように */
    align-items: center;
    gap: 30px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-title {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.1em;
}

/* 1DAY / 1MONTH スイッチ */
.type-switch {
    display: flex;
    border: 1px solid #000;
    border-radius: 4px;
    overflow: hidden;
}

.type-switch button {
    border: none;
    background: #fff;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: .3s;
}

.type-switch button.active {
    background: #000;
    color: #fff;
}

/* レンズ / 目 スイッチ */
.image-switch {
    display: flex;
    background: #f5f5f5;
    border-radius: 20px;
    overflow: hidden;
    width: 100px;
    height: 40px;
    padding: 2px;
}

.image-switch button {
    flex: 1;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content:center;
    border-radius: 18px;
    transition: .3s;
    font-size: 0; /* テキストの「lens」「eye」を非表示にする */
}

.image-switch button.active {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* レンズアイコン（ボタンが active の時のデザイン変化用） */
.lens-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #111;
    background: #fff;
    position: relative;
}
.lens-icon::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #111;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 目アイコン（フォントではなく簡易的な円で代用、またはアイコンフォント用） */
.eye-icon {
    width: 20px;
    height: 12px;
    border: 2px solid #111;
    border-radius: 50% / 50%;
    position: relative;
}
.eye-icon::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    background: #111;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* カラードット */
.hide-checkbox {
    display: none;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: block;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

/* --- 9色カラーバリエーション --- */
.black  { background: #111111; } /* ブラック */
.brown  { background: #8B4513; } /* ブラウン */
.green  { background: #556B2F; } /* グリーン（オリーブ風の深みのある色） */
.gray   { background: #9C9C9C; } /* グレー */
.pink   { background: #F3B0BD; } /* ピンク */
.beige  { background: #E8D3B9; } /* ベージュ */
.blue   { background: #8FAEC4; } /* ブルー */
.yellow { background: #DFBA73; } /* イエロー（ヘーゼル用のゴールド系） */

/* クリア（白背景に薄い水色のグラデーションでレンズ感を演出） */
.clear  { 
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%); 
    border: 1px solid #b2ebf2;
}

/* 共通：チェック（選択）された時の外枠エフェクト */
.hide-checkbox:checked + .color-dot {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* RESET ボタン */
.reset-btn {
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: .2s;
}
.reset-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* =========================================
   noUiSlider (LEVELスライダー) カスタマイズ
========================================= */
.level-filter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.level-filter span {
    font-size: 13px;
    font-weight: bold;
    min-width: 10px;
}

#level-slider.noUi-target {
    width: 150px;
    height: 6px;
    border: none;
    box-shadow: none;
    background: #f0e6e1; /* 柔らかいピンクベージュ */
    border-radius: 3px;
    margin: 0 10px;
}

#level-slider .noUi-connect {
    background: linear-gradient(90deg, #ffb3a7 0%, #ffdfc4 100%);
}

#level-slider .noUi-handle {
    width: 18px !important;
    height: 18px !important;
    right: -9px !important;
    top: -6px !important;
    border: 2px solid #ffb3a7;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}

#level-slider .noUi-handle:before,
#level-slider .noUi-handle:after {
    display: none;
}

/* =========================================
   詳細モーダル & Swiper
========================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    width: min(900px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    padding: 50px 40px 40px;
    position: relative;
    border-radius: 8px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    border: none;
    background: none;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    z-index: 10;
}

.modal-swiper {
    width: 100%;
    margin-bottom: 30px;
    position: relative;
}

.swiper-slide img,
.swiper-slide video {
    width: 100%;
    max-height: 50vh;
    object-fit: contain;
    display: block;
    background: #fafafa;
}

/* Swiperの矢印とドットの色・位置調整 */
.modal-swiper .swiper-button-next,
.modal-swiper .swiper-button-prev {
    color: #000 !important;
    scale: 0.7;
}

.modal-swiper .swiper-pagination-bullet-active {
    background: #000 !important;
}

.modal-detail {
    display: flex;
    gap: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.lens-image {
    width: 160px;
    height: 160px;
    object-fit: contain;
    flex-shrink: 0;
}

.modal-detail h2 {
    font-size: 22px;
    margin: 5px 0 15px;
}

.modal-detail p {
    font-size: 14px;
    color: #444;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* =========================================
   レスポンシブ（スマホ・タブレット対応）
========================================= */
@media (max-width: 960px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* スマホ・タブレットは2列 */
        gap: 16px;
        padding: 20px 16px;
    }
}

@media (max-width: 768px) {
    .filter-area {
        gap: 20px;
        margin: 20px auto;
    }

    .modal-content {
        padding: 40px 20px 20px;
    }

    .modal-detail {
        flex-direction: column;
        gap: 20px;
    }

    .lens-image {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
}

/* =========================================
   BRAND スイッチ（1DAY/1MONTHと完全同期）
========================================= */
.brand-switch {
    display: flex;
    border: 1px solid #000;
    border-radius: 8px; /* 1DAY側と同じ丸みに調整 */
    overflow: hidden;
    background: #fff;
}

.brand-switch button {
    border: none;
    background: #fff;
    color: #000;
    padding: 10px 20px; /* 縦横の余白を合わせて押しやすく */
    font-size: 14px; /* 文字サイズを1DAY側に同期 */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    outline: none;
    -webkit-appearance: none; /* ブラウザ固有のボタンデザインをリセット */
}

/* アクティブ（選択中）のスタイル：黒背景に白文字 */
.brand-switch button.active {
    background: #000;
    color: #fff;
}

/* ボタンとボタンの間に縦線を入れる場合（不要なら削除してOKです） */
.brand-switch button:not(:last-child) {
    border-right: 1px solid #000;
}

/* =========================================
   G.DIA ソートボタン カスタマイズ
========================================= */
.sort-btn {
    border: 1px solid #000;
    background: #fff;
    color: #000;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    letter-spacing: 0.05em;
    transition: background-color 0.2s, color 0.2s;
    outline: none;
    -webkit-appearance: none; /* ブラウザ標準スタイルを解除 */
    
    display: inline-flex;
    align-items: center;
    gap: 6px; /* 文字と矢印の間の余白 */
}

/* ホバーした時にさりげなく黒背景にする（RESETボタンと統一感を出します） */
.sort-btn:hover {
    background: #000;
    color: #fff;
}

/* 矢印（▲▼）の部分だけ少し小さくして上品に見せる */
.sort-btn span {
    font-size: 10px;
    line-height: 1;
}