/* Custom Styles for Hinoki Theme */
:root {
    --sidebar-width: 250px;
    --main-color: #282321;
    --accent-color: #BB1D1E;
    --bg-color: #FAF7F2;
    --secondary-color: #284B3E;
    --surface-color: #FFFFFF;

    /* Override standard Publii Simple theme variables */
    --text-color: var(--main-color);
    --headings-color: var(--main-color);
    --link-color: var(--main-color);
    --link-color-hover: var(--accent-color);
    --nav-link-color: var(--main-color);
    --nav-link-color-hover: var(--accent-color);
    --page-bg: var(--bg-color);
    --color: var(--accent-color);
    --white: var(--surface-color);
    --black: var(--main-color);

    --font-serif: 'Shippori Mincho', 'Noto Serif JP', '游明朝', 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', 'ヒラギノ明朝 Pro', serif;
    --body-font: var(--font-serif);
    --heading-font: var(--font-serif);
    --menu-font: var(--font-serif);
    --logo-font: var(--font-serif);
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.sidebar__nav-link,
.search__input,
.store-card__name,
.section__title {
    font-family: var(--font-serif) !important;
}

body {
    background-color: var(--bg-color) !important;
    color: var(--main-color) !important;
}

/* Sidebar toggles and overlay */
.sidebar__toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.sidebar__toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #333;
    position: relative;
}

.sidebar__toggle-bar::before,
.sidebar__toggle-bar::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #333;
    left: 0;
}

.sidebar__toggle-bar::before {
    top: -6px;
}

.sidebar__toggle-bar::after {
    bottom: -6px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.is-visible {
    display: block;
}

/* Site Wrapper & Layout */
.site-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface-color);
    border-right: 1px solid #eaeaea;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    transition: transform 0.3s ease;
}

.sidebar__logo {
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    text-decoration: none;
    gap: 0.5rem;
}

.sidebar__logo-icon {
    width: 48px;
    height: 48px;
}

.sidebar__logo-text {
    font-weight: bold;
    color: var(--main-color);
    font-size: 1.1rem;
}

.sidebar__nav {
    flex: 1;
}

.sidebar__nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar__nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--main-color);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.sidebar__nav-link:hover {
    background: #f5f5f5;
}

.sidebar__nav-link--active {
    background: #f0f0f0;
}

.sidebar__nav-link--highlight {
    color: var(--accent-color);
    font-weight: bold;
}

.sidebar__copyright {
    padding: 1.5rem;
    font-size: 0.8rem;
    color: #888;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar__toggle {
        display: block;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
}

.hero--noimage {
    height: auto;
    min-height: 0;
    padding: 6rem 2rem 2rem;
    background: transparent;
}

.hero__image {
    position: absolute;
    inset: 0;
    margin: 0;
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.hero__subtitle {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: #fff;
}

.hero__title {
    font-size: 3rem;
    line-height: 1.4;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

/* Intro */
.intro {
    padding: 4rem 2rem;
    text-align: center;
}

.intro__text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.intro__text em {
    color: var(--accent-color);
    font-style: normal;
    font-weight: bold;
}

/* News */
.news {
    background: var(--bg-color);
    padding: 4rem 2rem;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.section__label {
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section__title {
    font-size: 2rem;
    margin: 0;
}

.news__list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news__item {
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eaeaea;
    gap: 1rem;
}

.news__date {
    color: #666;
    font-size: 0.9rem;
}

.news__tag {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
    background: var(--surface-color);
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    white-space: nowrap;
}

.news__empty {
    text-align: center;
    padding: 2rem 0;
    color: #999;
}

.news__tag--store {
    background: var(--secondary-color);
    color: var(--surface-color);
}

.news__tag--new {
    background: var(--accent-color);
    color: var(--surface-color);
}

.news__tag--online {
    background: var(--main-color);
    color: var(--surface-color);
}

.news__tag--other {
    background: var(--surface-color);
    color: var(--secondary-color);
}

.news__title {
    margin: 0;
}

.news__title a {
    color: var(--main-color);
    text-decoration: none;
    font-weight: 500;
}

.news__title a:hover {
    color: var(--accent-color);
}

.news__more {
    display: block;
    text-align: center;
    margin-top: 2rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.news__more:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .news__item {
        flex-wrap: wrap;
    }
}

/* Stores */
.stores {
    padding: 4rem 2rem;
}

.stores__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.store-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.store-card__image {
    aspect-ratio: 4/3;
    margin-bottom: 0;
    overflow: hidden;
}

.store-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    margin: 0;
}

.store-card:hover .store-card__image img {
    transform: scale(1.05);
}

.store-card__name {
    font-size: 1.25rem;
    margin: 1rem 1rem 0.25rem;
    color: var(--main-color);
}

.store-card__genre {
    font-size: 0.9rem;
    color: #666;
    margin: 0 1rem 0.5rem;
}

.store-card__desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    margin: 0 1rem 1rem;
}

/* Footer */
.site-footer {
    background: var(--main-color);
    color: #fff;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    border-top: none;
}

.site-footer p {
    margin: 0;
    color: #fff;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.fade-in-up--delay-1 {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix image visibility without scripts.min.js lazyloading */
img[loading] {
    opacity: 1 !important;
}

/* ===========================
   Store Detail Page Styles
   =========================== */

/* Store Hero - Full Bleed Image */
.store-detail__hero {
    position: relative;
    height: 50vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
}

.store-detail__hero-image {
    position: absolute;
    inset: 0;
}

.store-detail__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-detail__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.55) 100%);
}

.store-detail__hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.store-detail__label {
    font-size: 0.95rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.store-detail__name {
    font-size: 3rem;
    margin: 0 0 0.75rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
}

.store-detail__catch {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.6;
}

/* Concept Section */
.store-concept {
    padding: 5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.store-concept__inner {
    max-width: 700px;
    margin: 0 auto;
}

.store-concept__title {
    color: var(--accent-color);
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.store-concept__heading {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    line-height: 1.5;
    color: var(--main-color);
}

.store-concept__text {
    line-height: 2;
    color: #555;
    font-size: 1.05rem;
}

/* Gallery Section */
.store-gallery {
    padding: 4rem 2rem;
    background: var(--bg-color);
}

.store-gallery__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.store-gallery__label {
    color: var(--accent-color);
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.store-gallery__heading {
    font-size: 2rem;
    margin: 0;
    color: var(--main-color);
}

.store-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.store-gallery__item {
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.store-gallery__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.store-gallery__item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    margin: 0;
    display: block;
    transition: transform 0.4s;
}

.store-gallery__item:hover img {
    transform: scale(1.05);
}

.store-gallery__caption {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
    margin: 0;
}

/* Menu Section */
.store-menu {
    padding: 5rem 2rem;
    background: var(--surface-color);
    text-align: center;
}

.store-menu__inner {
    max-width: 1100px;
    margin: 0 auto;
}

.store-menu__label {
    color: var(--accent-color);
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.store-menu__heading {
    font-size: 2rem;
    margin: 0 0 0.5rem;
    color: var(--main-color);
}

.store-menu__desc {
    color: #666;
    margin-bottom: 3rem;
    font-size: 1rem;
}

.store-menu__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.store-menu__card {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: left;
}

.store-menu__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.store-menu__card-image {
    overflow: hidden;
}

.store-menu__card-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
    margin: 0;
    transition: transform 0.4s;
}

.store-menu__card:hover .store-menu__card-image img {
    transform: scale(1.05);
}

.store-menu__card-body {
    padding: 1.25rem 1.25rem 1.5rem;
}

.store-menu__card-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 0.5rem;
    color: var(--main-color);
}

.store-menu__card-price {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
}

.store-menu__card-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

.store-menu__links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    color: #888;
    align-items: center;
}

.store-menu__link {
    color: #666;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.store-menu__link:hover {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

.store-menu__links-separator {
    color: #ccc;
}

/* Access Section */
.store-access {
    padding: 5rem 2rem;
    background: var(--bg-color);
}

.store-access__inner {
    max-width: 1000px;
    margin: 0 auto;
}

.store-access__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.store-access__label {
    color: var(--accent-color);
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.store-access__heading {
    font-size: 2rem;
    margin: 0;
    color: var(--main-color);
}

.store-access__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.store-access__map {
    min-height: 350px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.store-access__info {
    background: var(--surface-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ===========================
   Post (Blog) Page Styles
   =========================== */

.post-detail__body {
    padding: 4rem 2rem;
    background: var(--surface-color);
}

.post-detail__inner {
    max-width: 800px;
    margin: 0 auto;
}

.post-detail__tags {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Post Main Content Entry */
.content__entry {
    font-size: 1.05rem;
    line-height: 2;
    color: #333;
}

/* Subtle separator styling (if HR is used by block editor) */
.content__entry hr {
    border: none;
    border-top: 1px solid #eaeaea;
    margin: 3rem auto;
    width: 60px;
}

/* Style images in blocks for consistency */
.content__entry img {
    border-radius: 6px;
    margin: 2rem 0 !important;
    max-width: 100%;
    height: auto;
}

/* Style headings inside block editor */
.content__entry h2 {
    font-size: 1.75rem;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--main-color);
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 0.5rem;
}

.content__entry h3 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    color: var(--main-color);
}

.content__entry p {
    margin-bottom: 1.5rem;
}

.store-access__info dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1.25rem 1rem;
    margin: 0;
    text-align: left;
}

.store-access__info dt {
    font-weight: bold;
    color: var(--main-color);
    margin: 0;
    font-size: 0.9rem;
    padding-top: 2px;
}

.store-access__info dd {
    margin: 0;
    color: #555;
    line-height: 1.7;
}

/* Back to Top Section */
.store-back {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--surface-color);
}

.store-back__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--main-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border: 2px solid var(--main-color);
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 1rem;
}

.store-back__link:hover {
    background: var(--main-color);
    color: #fff;
}

.store-back__arrow {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.store-back__link:hover .store-back__arrow {
    transform: translateX(-4px);
}

/* Responsive: Store Detail Page */
@media (max-width: 768px) {
    .store-detail__name {
        font-size: 2rem;
    }

    .store-concept__heading {
        font-size: 1.6rem;
    }

    .store-gallery__grid {
        grid-template-columns: 1fr;
    }

    .store-menu__cards {
        grid-template-columns: 1fr;
    }

    .store-access__content {
        grid-template-columns: 1fr;
    }

    .store-menu__links {
        flex-direction: column;
    }

    .store-menu__links-separator {
        display: none;
    }
}

/* ===========================
   Lightbox Styles
   =========================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    /* Dim the main page */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.is-active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox__image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
}

.lightbox__close:hover {
    background: #eee;
    transform: scale(1.05);
}

.lightbox__prev,
.lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
}

.lightbox__prev {
    left: 20px;
}

.lightbox__next {
    right: 20px;
}

.lightbox__prev:hover:not(:disabled),
.lightbox__next:hover:not(:disabled) {
    background: #eee;
    transform: translateY(-50%) scale(1.05);
}

.lightbox__prev:disabled,
.lightbox__next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Ensure images have pointers for zooming */
.content__entry img,
.store-gallery__item img,
.post-detail__body img {
    cursor: zoom-in;
}