/* ===== gallery.php 専用スタイル ===== */

/* ===== ページヘッダー（price.php の .page-header に合わせる） ===== */
.gallery-hero {
    background-color: #f4f4f4;
    padding: 150px 20px 80px;
    text-align: center;
}

.gallery-hero .section-label {
    display: block;
    font-family: var(--font-en-sans);
    color: var(--accent-gold);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.gallery-hero h1 {
    font-family: var(--font-en-serif);
    font-size: 3rem;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    color: var(--text-main);
}

.gallery-hero p {
    font-family: var(--font-jp);
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 0.1em;
}

/* ===== フィルターバー ===== */
.filter-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
    border-top: 1px solid #eee;
    padding: 16px 20px;
}

.filter-bar .inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input[type="text"] {
    height: 40px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-main);
    background: #fafafa;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

.filter-bar select:focus,
.filter-bar input[type="text"]:focus {
    border-color: var(--accent-gold);
}

.filter-bar button {
    height: 40px;
    padding: 0 20px;
    background: var(--bg-dark);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: background 0.3s;
    font-family: inherit;
}

.filter-bar button:hover {
    background: #333;
}

.filter-count {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-light);
    font-family: var(--font-en-sans);
    white-space: nowrap;
}

/* ===== ギャラリーグリッド ===== */
.gallery-section {
    background: var(--bg-body);
    min-height: 60vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
}

.gallery-card::before {
    content: '';
    display: block;
    padding-top: 75%; /* 4:3 */
}

.gallery-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-model {
    font-family: var(--font-jp);
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
    line-height: 1.4;
}

.gallery-card-design {
    font-family: var(--font-en-sans);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.gallery-card-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

/* ===== ライトボックス ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox-inner {
    position: relative;
    max-width: 900px;
    width: 100%;
    padding: 0 60px;
    box-sizing: border-box;
}

.lightbox-img {
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-info {
    text-align: center;
    margin-top: 16px;
}

.lightbox-model {
    font-family: var(--font-jp);
    font-size: 1rem;
    color: #fff;
}

.lightbox-detail {
    font-family: var(--font-en-sans);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
    letter-spacing: 0.08em;
}

.lightbox-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.lightbox-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.2s;
    border: none;
}

.lightbox-dot.active {
    background: #fff;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox-close:hover { color: #fff; }

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 10px;
}

.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-prev:hover, .lightbox-next:hover { color: #fff; }

/* ===== ページネーション ===== */
.gallery-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 50px 20px;
}

.gallery-pagination a,
.gallery-pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    font-size: 0.85rem;
    color: var(--text-main);
    border-radius: 4px;
    transition: all 0.3s;
}

.gallery-pagination a:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.gallery-pagination .current {
    background: var(--bg-dark);
    color: #fff;
    border-color: var(--bg-dark);
}

/* ===== 空状態 ===== */
.gallery-empty {
    text-align: center;
    padding: 100px 20px;
}

.gallery-empty p {
    font-family: var(--font-jp);
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 110px 20px 50px;
    }
    .gallery-hero h1 { font-size: 2rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; }
    .gallery-card-overlay { opacity: 1; }
    .filter-bar .inner { gap: 8px; }
    .filter-bar select,
    .filter-bar input[type="text"] { width: 100%; }
    .lightbox-inner { padding: 0 44px; }
    .lightbox-prev { left: -4px; }
    .lightbox-next { right: -4px; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
}
