/**
 * デザインギャラリーページ
 */

.page-gallery.gallery-section {
    padding-top: 0;
}

.page-gallery .gallery-hero {
    --category-hero-min-h: clamp(220px, 34vw, 340px);
}

.page-gallery .gallery-hero .category-hero__overlay {
    background: linear-gradient(
        180deg,
        rgba(8, 18, 32, 0.25) 0%,
        rgba(8, 18, 32, 0.55) 100%
    );
}

.page-gallery .gallery-shell {
    padding-top: clamp(24px, 4vw, 40px);
    padding-bottom: clamp(32px, 5vw, 48px);
}

.page-gallery .gallery-new-style {
    max-width: 900px;
    margin: 0 auto clamp(28px, 5vw, 40px);
    padding: clamp(18px, 3vw, 24px);
    text-align: center;
    border: 1px solid #fe2d9d;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #fff7fc 100%);
    box-shadow: 0 2px 12px rgba(254, 45, 157, 0.08);
}

.page-gallery .gallery-new-style__badge {
    display: inline-block;
    margin: 0 0 10px;
    padding: 6px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    border-radius: 6px;
    background: #fe2d9d;
}

.page-gallery .gallery-new-style__title {
    margin: 0 0 8px;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 700;
    color: #ff66c4;
    letter-spacing: 0.04em;
}

.page-gallery .gallery-new-style__subtitle {
    display: block;
    margin-top: 4px;
    font-size: 0.82em;
    font-weight: 600;
    color: #c2187a;
}

.page-gallery .gallery-new-style__lead {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--home-muted, #5a6b7d);
}

.page-gallery .gallery-index__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 3vw, 28px);
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.page-gallery .gallery-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    border: 1px solid var(--home-border, #e2e6ec);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(12, 28, 48, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-gallery .gallery-card:hover,
.page-gallery .gallery-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(12, 28, 48, 0.12);
    outline: none;
}

.page-gallery .gallery-card__figure {
    margin: 0;
    padding: 16px 16px 0;
    text-align: center;
    background: #f8f9fb;
}

.page-gallery .gallery-card__image {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    aspect-ratio: 200 / 330;
    object-fit: contain;
}

.page-gallery .gallery-card__label {
    display: block;
    margin-top: auto;
    padding: 14px 12px;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: #fff;
}

.page-gallery .gallery-card--poster .gallery-card__label {
    background: linear-gradient(135deg, #eb6e86 0%, #d44d68 100%);
}

.page-gallery .gallery-card--sign .gallery-card__label {
    background: linear-gradient(135deg, #bf783a 0%, #9a5f2a 100%);
}

.page-gallery .gallery-card--tasuki .gallery-card__label {
    background: linear-gradient(135deg, #19448e 0%, #12356f 100%);
}

.page-gallery .gallery-cta {
    max-width: 640px;
    margin: clamp(32px, 5vw, 48px) auto 0;
    text-align: center;
}

.page-gallery .gallery-cta__lead {
    margin: 0 0 16px;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--home-muted, #5a6b7d);
}

@media (max-width: 767px) {
    .page-gallery .gallery-index__grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
}

@media (min-width: 768px) and (max-width: 959px) {
    .page-gallery .gallery-index__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-gallery .gallery-index__item:last-child {
        grid-column: 1 / -1;
        max-width: 280px;
        margin: 0 auto;
        width: 100%;
    }
}

/* カテゴリページ（見本一覧） */
.page-gallery-category .gallery-category__intro {
    max-width: 820px;
    margin: 0 auto clamp(24px, 4vw, 32px);
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--home-text, #1c2d42);
    text-align: center;
}

.page-gallery-category .gallery-category__section {
    margin-bottom: clamp(28px, 5vw, 40px);
}

.page-gallery-category .gallery-category__section-title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    font-size: clamp(1rem, 2.4vw, 1.15rem);
    font-weight: 700;
    color: var(--home-text, #1c2d42);
    border-bottom: 2px solid var(--home-accent, #b50400);
}

.page-gallery-category .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-gallery-category .gallery-grid__button {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--home-border, #e2e6ec);
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fb;
    cursor: zoom-in;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.page-gallery-category .gallery-grid__button:hover,
.page-gallery-category .gallery-grid__button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(12, 28, 48, 0.12);
    outline: none;
}

.page-gallery-category .gallery-grid__thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: contain;
}

.page-gallery-category .gallery-category__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: clamp(32px, 5vw, 48px);
}

.page-gallery-category .gallery-lightbox {
    width: min(96vw, 900px);
    max-width: 96vw;
    max-height: 96vh;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
}

.page-gallery-category .gallery-lightbox::backdrop {
    background: rgba(8, 18, 32, 0.82);
}

.page-gallery-category .gallery-lightbox__inner {
    position: relative;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
}

.page-gallery-category .gallery-lightbox__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.page-gallery-category .gallery-lightbox__figure {
    margin: 0;
}

.page-gallery-category .gallery-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    object-fit: contain;
}

.page-gallery-category .gallery-lightbox__caption {
    margin-top: 10px;
    font-size: 0.88rem;
    text-align: center;
    color: var(--home-muted, #5a6b7d);
}

.page-gallery-category .gallery-lightbox__nav {
    position: absolute;
    top: 46%;
    z-index: 2;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.page-gallery-category .gallery-lightbox__nav--prev {
    left: 8px;
}

.page-gallery-category .gallery-lightbox__nav--next {
    right: 8px;
}

.page-gallery-category .gallery-lightbox__nav:hover,
.page-gallery-category .gallery-lightbox__nav:focus-visible {
    background: rgba(0, 0, 0, 0.72);
    outline: none;
}

.page-gallery-category .gallery-lightbox__counter {
    margin: 4px 0 0;
    font-size: 0.8rem;
    text-align: center;
    color: #8896a6;
}

@media (min-width: 768px) {
    .page-gallery-category .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
}
