/* 地域ボタン */
.magazine-search {
    margin-top: 28px;
}

.magazine-product-wrap,
.magazine-store-search-wrap {
    margin-bottom: 14px;
}

.magazine-product-wrap select,
.magazine-store-search-wrap input {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    color: #222;
    font-size: 15px;
}

.magazine-region-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.magazine-region-buttons button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    color: #222;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.magazine-region-buttons button.selected {
    border-color: #C41E3A;
    background: #fff5f6;
}

/* 予約管理ページと同じ数字バッジ */
.reservation-store-count {
    display: inline-flex;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #C41E3A;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

#magazine-stock-results {
    display: grid;
    gap: 12px;
}


/* ページ全体 */
.stock-search-new {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 120px;
    box-sizing: border-box;
}

.stock-search-new-title {
    margin: 0 0 22px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: #222;
}

/* ジャンルカード：3列×2段 */
.stock-genre-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.stock-genre-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 150px;
    padding: 14px 8px;
    box-sizing: border-box;
    border: none;
    border-radius: 28px;
    box-shadow: none;
    color: #111;
    text-decoration: none;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s;
}

.stock-genre-card:active {
    opacity: 0.75;
}

.stock-genre-card svg {
    display: block;
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stock-genre-name {
    display: block;
    max-width: 100%;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* 6色 */
.genre-magazine { background: #FFF0D9; }
.genre-cd       { background: #E3F0FF; }
.genre-dvd      { background: #E3F4E8; }
.genre-movie    { background: #F0E5FF; }
.genre-goods    { background: #FFF5CC; }
.genre-other    { background: #FFE5E5; }

/* 選択中のジャンル */
.stock-genre-card.selected {
    outline: 3px solid #C41E3A;
    outline-offset: 3px;
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.45);
}

/* スマホでも3列を維持 */
@media (max-width: 600px) {
    .stock-search-new {
        padding: 16px 12px 120px;
    }

    .stock-search-new-title {
        margin-bottom: 16px;
        font-size: 21px;
    }

    .stock-genre-grid {
        gap: 9px;
    }

    .stock-genre-card {
        min-height: 80px;
        padding: 7px 4px;
        border-radius: 16px;
    }

    .stock-genre-card svg {
        width: 24px;
        height: 24px;
        margin-bottom: 6px;
    }

    .stock-genre-name {
        font-size: clamp(12px, 3.5vw, 17px);
    }
}


/* 在庫登録フォームの候補表示 */
.magazine-stock-suggest-wrap {
    position: relative;
    width: 100%;
}

.magazine-stock-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
}

.magazine-stock-suggestions[hidden] {
    display: none;
}

.magazine-stock-suggestion {
    display: block;
    width: 100%;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid #eee;
    background: #fff;
    color: #333;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.magazine-stock-suggestion:last-child {
    border-bottom: 0;
}

.magazine-stock-suggestion:hover,
.magazine-stock-suggestion:focus {
    background: #f7f7f7;
}

.magazine-stock-suggestion small {
    display: block;
    margin-top: 3px;
    color: #777;
    font-size: 12px;
}


/* ECサイト登録チェックボックス */
#ecSiteModeWrap {
    margin: 4px 0 18px;
    padding: 12px 14px;
    border: 1px solid #ead5d9;
    border-radius: 12px;
    background: #fff7f8;
}

#ecSiteModeWrap label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
}

#ecSiteModeWrap input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #C41E3A;
}
