:root {
    --color-primary: #E53935;
    --color-primary-dark: #C62828;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-bg: #F8F8F8;
    --color-white: #FFF;
    --color-border: #E0E0E0;
    --color-star: #FFB300;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --color-error: #E53935;
    --color-success: #43A047;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body { font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif; background-color: var(--color-bg); color: var(--color-text); line-height: 1.6; min-height: 100vh; }

.header { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: var(--spacing-md); background: var(--color-white); box-shadow: var(--shadow-sm); }
.header-title { font-size: 1.25rem; font-weight: 700; color: var(--color-text); }
.search-btn { position: absolute; right: var(--spacing-md); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: none; background: transparent; border-radius: 50%; color: var(--color-text); text-decoration: none; cursor: pointer; }
.search-btn:hover { background: var(--color-bg); }

.main { padding: var(--spacing-md); padding-bottom: var(--spacing-lg); }

.site-intro { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.site-intro__text { font-size: 14px; line-height: 1.7; color: #333; margin-bottom: 12px; }
.site-intro__note { font-size: 12px; line-height: 1.6; color: #888; padding-top: 12px; border-top: 1px dashed #ddd; }

.site-intro__promo { display: block; margin-bottom: 16px; padding: 16px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; text-decoration: none; color: #fff; transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden; }
.site-intro__promo:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102,126,234,0.4); }
.site-intro__promo::before { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: shine 3s ease-in-out infinite; }
@keyframes shine { 0% { left: -100%; } 50%, 100% { left: 150%; } }
.site-intro__promo-badge { display: inline-block; background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; margin-left: 8px; vertical-align: middle; }
.site-intro__promo-title { display: block; font-size: 18px; font-weight: bold; margin-bottom: 6px; }
.site-intro__promo-desc { display: block; font-size: 13px; line-height: 1.5; opacity: 0.95; }
.site-intro__promo-cta { display: block; margin-top: 12px; font-size: 14px; font-weight: bold; text-align: center; }
.site-intro__promo-cta .arrow { display: inline-block; animation: arrowMove 1s ease-in-out infinite; }
@keyframes arrowMove { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

/* フィルターボタン */
.filter-buttons { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-buttons::-webkit-scrollbar { display: none; }
.filter-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; background: #fff; border: 1.5px solid #ddd; border-radius: 50px; font-size: 13px; color: #333; text-decoration: none; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.filter-btn:hover { border-color: #999; }
.filter-btn.active { background: #333; border-color: #333; color: #fff; }
.filter-btn__arrow { font-size: 8px; margin-left: 2px; }

/* ボトムシート */
.sheet-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 9998; }
.sheet-overlay.show { display: block; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; z-index: 9999; transform: translateY(100%); transition: transform 0.3s ease, visibility 0s 0.3s; max-height: 70vh; overflow-y: auto; visibility: hidden; }
.sheet.show { transform: translateY(0); visibility: visible; transition: transform 0.3s ease, visibility 0s 0s; }
.sheet__header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; }
.sheet__title { font-size: 16px; font-weight: bold; }
.sheet__close { width: 32px; height: 32px; border: none; background: #f0f0f0; border-radius: 50%; font-size: 20px; cursor: pointer; color: #666; }
.sheet__body { padding: 8px 0; overflow-y: auto; max-height: calc(70vh - 60px); -webkit-overflow-scrolling: touch; }
.sheet__item { display: block; padding: 14px 20px; font-size: 15px; color: #333; text-decoration: none; border-bottom: 1px solid #f5f5f5; }
.sheet__item:hover { background: #f9f9f9; }
.sheet__item.active { color: var(--color-primary); font-weight: bold; }
.sheet__divider { padding: 12px 20px 8px; font-size: 12px; color: #999; font-weight: bold; background: #f9f9f9; }
.sheet__form { padding: 12px 20px 20px; }
.sheet__form-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.sheet__input { flex: 1; min-width: 0; padding: 10px 12px; border: 1.5px solid #ddd; border-radius: 8px; font-size: 14px; text-align: center; }
.sheet__input:focus { outline: none; border-color: var(--color-primary); }
.sheet__form-sep { color: #999; }
.sheet__form-btn { width: 100%; padding: 12px 16px; background: var(--color-primary); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; color: var(--color-text-muted); text-align: center; }

.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--spacing-md); }
.product { display: flex; flex-direction: column; background: var(--color-white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; overflow: hidden; transition: transform 0.2s; cursor: pointer; }
.product:active { transform: scale(0.98); }
.product__image-wrap { position: relative; width: 100%; padding-top: 100%; background: #F5F5F5; overflow: hidden; }
.product__image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; transition: transform 0.3s; }
.product:hover .product__image { transform: scale(1.05); }
.product__info { display: flex; flex-direction: column; padding: var(--spacing-sm); overflow: hidden; }
.product__name { font-size: 0.75rem; font-weight: 500; line-height: 1.4; color: var(--color-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 2px; }
.product__meta { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.product__price { font-size: 1rem; font-weight: 700; color: var(--color-primary); }
.product__rating { display: flex; align-items: center; gap: var(--spacing-xs); }
.product__stars { font-size: 0.625rem; color: var(--color-star); letter-spacing: -1px; }
.product__review-count { font-size: 0.625rem; color: var(--color-text-muted); }
.product__review { font-size: 0.625rem; color: var(--color-text-light); line-height: 1.4; margin-top: var(--spacing-xs); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.footer { padding: var(--spacing-lg); text-align: center; font-size: 0.75rem; color: var(--color-text-muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: var(--spacing-sm) var(--spacing-lg); border: none; border-radius: var(--radius-sm); font-size: 1rem; font-weight: 500; cursor: pointer; }
.btn--primary { background: var(--color-primary); color: var(--color-white); }

@media (min-width: 480px) { .products { gap: var(--spacing-lg); } .product__info { padding: var(--spacing-md); } .product__name { font-size: 0.875rem; } }
@media (min-width: 768px) { .products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .products { grid-template-columns: repeat(3, 1fr); } }

/* 商品グリッド間の余白（自動広告用） */
.products + .products { margin-top: var(--spacing-lg); }

.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000; }
.modal.show { display: flex; align-items: center; justify-content: center; }
.modal__overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.modal__content { position: relative; width: 90%; max-width: 400px; max-height: 90vh; background: var(--color-white); border-radius: var(--radius-lg); box-shadow: 0 4px 16px rgba(0,0,0,0.12); overflow: hidden; overflow-y: auto; animation: modalIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal__close { position: absolute; top: var(--spacing-sm); right: var(--spacing-sm); width: 36px; height: 36px; border: none; background: rgba(0,0,0,0.5); color: var(--color-white); border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 10; }
.modal__close:hover { background: rgba(0,0,0,0.7); }
.modal__image-wrap { width: 100%; aspect-ratio: 1; background: #F5F5F5; display: flex; align-items: center; justify-content: center; }
.modal__image { max-width: 100%; max-height: 100%; object-fit: contain; }
.modal__info { padding: var(--spacing-md); }
.modal__name { font-size: 0.9rem; font-weight: 500; line-height: 1.5; color: var(--color-text); margin-bottom: var(--spacing-sm); }
.modal__price { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); margin-bottom: var(--spacing-sm); }
.modal__rating { display: flex; align-items: center; gap: var(--spacing-xs); margin-bottom: var(--spacing-md); }
.modal__stars { color: var(--color-star); font-size: 1rem; letter-spacing: 1px; }
.modal__review-box { background: var(--color-bg); border-radius: var(--radius-sm); padding: var(--spacing-md); margin-bottom: var(--spacing-md); }
.modal__review-label { font-size: 0.7rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--spacing-xs); }
.modal__review-text { font-size: 0.9rem; line-height: 1.6; color: var(--color-text); }
.modal__btn { display: block; width: 100%; padding: var(--spacing-md); background: var(--color-primary); color: var(--color-white); text-align: center; text-decoration: none; font-size: 1rem; font-weight: 700; border-radius: var(--radius-sm); }
.modal__btn:hover { background: var(--color-primary-dark); }

/* ============================================
   管理画面・ログイン画面
   ============================================ */
.admin-body { background: #F0F0F0; }
.admin-main { max-width: 600px; margin: 0 auto; padding: 16px; }
.admin-section { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.admin-section__title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid #f0f0f0; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 4px; color: #333; }
.form-input, .form-textarea { width: 100%; padding: 10px 14px; border: 2px solid #ddd; border-radius: 8px; font-size: 1rem; font-family: inherit; transition: border-color 0.2s; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: #E53935; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 8px; align-items: center; }
.form-row .form-input { flex: 1; }
.form-row .btn { flex-shrink: 0; width: auto; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-label { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: #f5f5f5; border-radius: 6px; font-size: 0.875rem; cursor: pointer; }
.checkbox-label:hover { background: #eee; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: #E53935; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 500; font-family: inherit; cursor: pointer; transition: background 0.2s; }
.btn--primary { width: 100%; background: #E53935; color: #fff; }
.btn--primary:hover { background: #C62828; }
.btn--danger { background: transparent; color: #E53935; border: 1px solid #E53935; padding: 6px 12px; font-size: 0.875rem; }
.btn--danger:hover { background: #E53935; color: #fff; }
.btn--small { padding: 6px 12px; font-size: 0.75rem; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.875rem; }
.alert--success { background: #E8F5E9; color: #43A047; }
.alert--error { background: #FFEBEE; color: #E53935; }

.admin-products { display: flex; flex-direction: column; gap: 12px; }
.admin-product { display: flex; gap: 12px; padding: 12px; background: #f9f9f9; border-radius: 8px; }
.admin-product__image-wrap { flex-shrink: 0; width: 70px; height: 70px; background: #fff; border-radius: 6px; overflow: hidden; }
.admin-product__image { width: 100%; height: 100%; object-fit: contain; }
.admin-product__info { flex: 1; min-width: 0; }
.admin-product__name { font-size: 0.8rem; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.admin-product__price { font-size: 0.875rem; font-weight: 700; color: #E53935; }
.admin-product__review { font-size: 0.7rem; color: #666; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.admin-product__date { font-size: 0.625rem; color: #999; margin-top: 4px; }
.admin-product__actions { flex-shrink: 0; display: flex; align-items: flex-start; }
.admin-product__categories { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #ddd; }

.category-list { display: flex; flex-direction: column; gap: 8px; }
.category-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f5f5f5; border-radius: 6px; }
.category-item__name { font-size: 0.9rem; }
.category-item__count { font-size: 0.75rem; color: #999; margin-left: 4px; }

.empty-text { color: #999; text-align: center; padding: 20px; }

/* ログイン画面 */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-box { width: 100%; max-width: 360px; background: #fff; border-radius: 12px; padding: 32px 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.login-title { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }

/* ヘッダー（管理画面用） */
.header--admin { background: #333; }
.header--admin .header-title, .header--admin .header__title { color: #fff; padding-right: 140px; }
.header--admin .header__links { position: absolute; right: 16px; display: flex; gap: 16px; align-items: center; } .header--admin .header__link { color: #fff; opacity: 0.9; text-decoration: none; font-size: 0.875rem; }

/* 検索ページ用 */
.header__back { position: absolute; left: 16px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #333; text-decoration: none; }
.header__back:hover { background: #f5f5f5; }
.search-form { flex: 1; display: flex; align-items: center; margin: 0 50px; background: #f5f5f5; border-radius: 24px; overflow: hidden; }
.search-input { flex: 1; padding: 10px 16px; border: none; background: transparent; font-size: 1rem; outline: none; }
.search-input::placeholder { color: #999; }
.search-result-text { padding: 16px; font-size: 0.875rem; color: #666; }

/* ハンバーガーメニューボタン */
.menu-btn { position: absolute; left: 16px; display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: transparent; border: none; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; width: 24px; height: 2px; background: #333; border-radius: 1px; transition: 0.3s; }

/* サイドメニュー */
.menu-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 9998; }
.menu-overlay.show { display: block; }
.side-menu { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; background: #fff; z-index: 9999; transform: translateX(-100%); transition: transform 0.3s ease; overflow-y: auto; }
.side-menu.show { transform: translateX(0); }
.side-menu__header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; background: #fff; position: sticky; top: 0; }
.side-menu__title { font-size: 16px; font-weight: bold; }
.side-menu__close { width: 32px; height: 32px; border: none; background: #f0f0f0; border-radius: 50%; font-size: 20px; cursor: pointer; color: #666; }
.side-menu__body { padding: 8px 0; }
.side-menu__item { display: block; padding: 14px 20px; font-size: 14px; color: #333; text-decoration: none; border-bottom: 1px solid #f5f5f5; }
.side-menu__item:hover { background: #f9f9f9; }
.side-menu__divider { padding: 12px 20px 8px; font-size: 12px; color: #999; font-weight: bold; background: #f9f9f9; margin-top: 8px; }

/* 記事ページ用スタイル */
.article { max-width: 640px; margin: 0 auto; padding: 20px 16px; }
.article__header { margin-bottom: 24px; }
.article__title { font-size: 1.25rem; font-weight: 700; line-height: 1.5; margin-bottom: 12px; }
.article__meta { font-size: 0.8rem; color: #999; }
.article__image { width: 100%; max-width: 300px; display: block; margin: 0 auto 24px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.article__body { font-size: 1rem; line-height: 1.8; color: #333; }
.article__body p { margin-bottom: 1.5em; }
.article__cta { display: block; width: 100%; max-width: 400px; margin: 32px auto; padding: 16px; background: #E53935; color: #fff; text-align: center; text-decoration: none; font-size: 1rem; font-weight: 700; border-radius: 8px; }
.article__cta:hover { background: #C62828; }
.article__back { display: inline-block; margin-top: 24px; color: #666; text-decoration: none; font-size: 0.9rem; }
.article__back:hover { color: #333; }

/* 固定ページ用スタイル */
.page { max-width: 640px; margin: 0 auto; padding: 20px 16px; }
.page__title { font-size: 1.25rem; font-weight: 700; margin-bottom: 24px; }
.page__body { font-size: 0.95rem; line-height: 1.8; color: #333; }
.page__body h2 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 2px solid #eee; }
.page__body p { margin-bottom: 1em; }
.page__body ul { margin: 0 0 1em 1.5em; }
.page__body li { margin-bottom: 0.5em; }
