/* =========================================
   豊津商店会ホームページ 共通スタイル
========================================= */

:root {
    --color-bg: #f7f2ed;
    --color-text: #666666;
    --color-header: #835f39;
    --color-header-light: #a97c50;
    --color-accent: #b4623e;
    --color-white: #ffffff;
    --color-border: #e0d8ce;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    line-height: 1.7;
}

a {
    color: var(--color-header);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- ヘッダー ---------- */
.site-header {
    background-color: var(--color-header);
    color: var(--color-white);
    padding: 16px 0;
}

.site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-header .header-contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--color-white);
    flex-shrink: 0;
}

.site-header .header-contact-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

.site-header .header-contact-label {
    font-size: 0.7rem;
    white-space: nowrap;
}

.site-header .logo {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: transparent;
}

.site-header .logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-header .site-title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.site-header .site-subtitle {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 2px;
}

/* ---------- フッター ---------- */
.site-footer {
    background-color: var(--color-header);
    color: var(--color-white);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.85rem;
}

/* ---------- セクション共通 ---------- */
.section {
    padding: 40px 0;
}

.section-title {
    font-size: 1.4rem;
    color: var(--color-header);
    border-bottom: 3px solid var(--color-header-light);
    padding-bottom: 8px;
    margin-bottom: 24px;
}

/* ---------- スライドショー ---------- */
.slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background-color: #ddd;
}

.slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow .slide.active {
    opacity: 1;
    z-index: 1;
}

.slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideshow .slide-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.slideshow .slide-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    display: inline-block;
}

.slideshow .slide-dots span.active {
    background-color: var(--color-white);
    box-shadow: 0 0 0 2px var(--color-header);
}

/* 個別ページの小さめスライドショー */
.slideshow.shop-slideshow {
    max-width: 640px;
    margin: 0 auto 24px;
}

/* ---------- イベント一覧 ---------- */
.event-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.event-item {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-left: 5px solid var(--color-header);
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.event-item .event-date {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: bold;
    margin-bottom: 4px;
}

.event-item .event-title {
    font-size: 1.1rem;
    color: #4a3a2a;
    font-weight: bold;
    margin-bottom: 6px;
}

/* ---------- 正会員一覧（カード） ---------- */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.member-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.member-card:hover {
    box-shadow: 0 4px 12px rgba(131, 95, 57, 0.2);
}

.member-card a.member-photo-link {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #eee;
}

.member-card a.member-photo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-card .member-info {
    padding: 14px 16px;
}

.member-card .member-name a {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4a3a2a;
}

.member-card .member-meta {
    font-size: 0.88rem;
    margin-top: 6px;
}

.member-card .member-meta div {
    margin-bottom: 2px;
}

.member-card .member-meta .label {
    color: var(--color-header-light);
    font-weight: bold;
    margin-right: 4px;
}

/* ---------- 協賛店一覧（グリッド） ---------- */
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.sponsor-item {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-header-light);
    border-radius: 4px;
    padding: 14px 16px;
    font-size: 0.95rem;
    text-align: center;
}

/* スマホ版：1行に1列 */
@media (max-width: 600px) {
    .sponsor-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- 店舗個別ページ ---------- */
.shop-detail {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 24px 28px;
    max-width: 640px;
    margin: 0 auto;
}

.shop-detail dl {
    margin: 0;
}

.shop-detail dt {
    font-weight: bold;
    color: var(--color-header);
    margin-top: 14px;
}

.shop-detail dt:first-child {
    margin-top: 0;
}

.shop-detail dd {
    margin: 4px 0 0 0;
}

.payment-check-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0 0;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.payment-check-list li {
    font-size: 1rem;
}

.payment-check-list .check-box {
    display: inline-block;
    margin-right: 6px;
    font-size: 1.1rem;
}

.payment-check-list .checked .check-box {
    color: var(--color-accent);
}

.payment-check-list .unchecked .check-box {
    color: #bbb;
}

.shop-map {
    margin: 20px 0 0 0;
}

.shop-map-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
}

.shop-map-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
}

/* ---------- お問い合わせフォーム ---------- */
.contact-intro {
    margin-bottom: 24px;
}

.contact-form-wrap {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 28px 32px;
    max-width: 640px;
    margin: 0 auto;
}

.contact-form label {
    display: block;
    font-weight: bold;
    color: #4a3a2a;
    margin-bottom: 6px;
}

.contact-form .form-field {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border);
}

.contact-form .form-field:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.contact-form .field-half input {
    width: 50%;
}

.contact-form .field-full input,
.contact-form .field-full textarea {
    width: 100%;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: var(--color-bg);
}

.contact-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.contact-form .captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.contact-form .captcha-question {
    background-color: var(--color-bg);
    border: 1px dashed var(--color-header-light);
    border-radius: 4px;
    padding: 8px 14px;
    font-weight: bold;
    font-size: 1.05rem;
    color: var(--color-header);
}

.contact-form input.captcha-input {
    width: 100px;
    flex: none;
}

.contact-form .form-note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 8px;
}

.contact-form .submit-row {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border);
}

.contact-form .btn-submit {
    background-color: var(--color-header);
    color: var(--color-white);
    border: none;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.contact-form .btn-submit:hover {
    background-color: #6d4c2c;
}

/* スマホ版：50%幅の項目もフル幅にして見やすくする */
@media (max-width: 600px) {
    .contact-form .field-half input {
        width: 100%;
    }
}

.form-errors {
    background-color: #fdeeee;
    border: 1px solid #e6b8b8;
    color: #a33;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.form-errors ul {
    margin: 0;
    padding-left: 20px;
}

.form-success {
    background-color: #eef7ee;
    border: 1px solid #b8dcb8;
    color: #2e6b2e;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
}

/* =========================================
   管理画面用スタイル
========================================= */
.admin-body {
    background-color: #efe9e2;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 36px 32px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 4px 16px rgba(74, 58, 42, 0.12);
}

.login-title {
    text-align: center;
    color: var(--color-header);
    font-size: 1.2rem;
    margin: 0 0 20px 0;
}

.admin-header {
    background-color: #4a3a2a;
    color: var(--color-white);
    padding: 14px 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header a {
    color: var(--color-white);
}

.admin-nav {
    background-color: var(--color-header);
    padding: 10px 0;
}

.admin-nav .container {
    display: flex;
    gap: 20px;
}

.admin-nav a {
    color: var(--color-white);
    font-size: 0.92rem;
}

.admin-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.admin-panel {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
}

.admin-panel h2 {
    color: var(--color-header);
    margin-top: 0;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 8px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.admin-table th,
.admin-table td {
    border: 1px solid var(--color-border);
    padding: 8px 10px;
    font-size: 0.9rem;
    text-align: left;
}

.admin-table th {
    background-color: #f0e9e0;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-header);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #6d4c2c;
    text-decoration: none;
}

.btn-danger {
    background-color: #b4423e;
    color: var(--color-white);
}

.btn-danger:hover {
    background-color: #922f2c;
    text-decoration: none;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.admin-form label {
    display: block;
    font-weight: bold;
    margin-top: 14px;
    margin-bottom: 4px;
    color: #4a3a2a;
}

.admin-form input[type="text"],
.admin-form input[type="tel"],
.admin-form input[type="url"],
.admin-form input[type="date"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
}

.admin-form textarea {
    min-height: 100px;
    resize: vertical;
}

.admin-form .checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.admin-form .checkbox-row input {
    width: auto;
}

.admin-form .image-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.admin-form .image-row input {
    flex: 1;
}

.admin-form .form-actions {
    margin-top: 24px;
    display: flex;
    gap: 10px;
}

.alert-info {
    background-color: #fff8e6;
    border: 1px solid #e6d8a8;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.empty-message {
    color: #999;
    font-style: italic;
    padding: 10px 0;
}
