/* リセット・共通 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: sans-serif;
    background: #fafafa;
    padding-top: 60px;
    /* ヘッダー分 */
    padding-bottom: 60px;
    /* フッター分 */
}

/* ヘッダー固定 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: url('/_common/_image/background_footer.gif');
    background-size: cover;
    color: white;
}

.logo img {
    height: 40px;
    max-width: 100%;
    object-fit: contain;
}

/* フッター固定 */
.fixed-footer {
    background: url('/_common/_image/background_footer.gif');
    background-size: cover;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0;
    z-index: 9999;
}

.fixed-footer a {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: #fff;
    text-decoration: none;
}

.fixed-footer a i {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
}

/* グリッド構成 */
.grid {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(3, 1fr);
    /* スマホ */
}

@media (min-width: 576px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
        /* タブレット */
    }
}

@media (min-width: 992px) {
    .grid {
        grid-template-columns: repeat(6, 1fr);
        /* PC */
    }
}

/* 各アイテム正方形 */
.item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 正方形のため */
    overflow: hidden;
    background: #eee;
}

.item a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
    color: inherit;
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* オーバーレイ共通 */
.overlay {
    position: absolute;
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    z-index: 10;
    padding: 6px 8px;
    box-sizing: border-box;
    overflow: hidden;
}

/* ▼ 中央表示パターン */
.overlay-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    border-radius: 8px;
    width: 90%;
    /* short-text 用 */

    width: fit-content;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-height: 1.2em;
}

/* ▼ 文字数に応じたパターン */
.overlay-center.short-text {
    font-size: 1.2rem;
    -webkit-line-clamp: 1;
    max-height: 1.5em;
    width: 70%;
}

.overlay-center.medium-text {
    font-size: 1rem;
    -webkit-line-clamp: 5;
    max-height: calc(1.2em * 5);
    width: 85%;

}

.overlay-center.long-text {
    font-size: 0.75rem;
    -webkit-line-clamp: 7;
    max-height: calc(1.2em * 7);
    width: 85%;
}


/* medium と long は白背景・黒文字・強めの透過 */
.overlay-center.medium-text,
.overlay-center.long-text {
    background: rgba(255, 255, 255, 0.55);
    /* 白背景・強めの透過 */
    color: #000;
    /* 黒文字 */
    border-radius: 8px;
    text-shadow: none;

    /* 白背景なので影は不要 */
    text-shadow:
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white;


}


.overlay-center.long-text {
    height: 70%;

}


/* ▼ 下部オーバーレイ（例: 価格） */
.overlay-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    text-align: center;
    font-size: 0.9rem;
}

/* ホバー時の透明度アップ */
.item:hover .overlay {
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.2s ease-in-out;
}
a.grid-item.glightbox{
  display:block;
  position:relative;
  aspect-ratio: 1 / 1;   /* 正方形 */
  overflow:hidden;
}

/* 中のvideoを全面フィル */
a.grid-item.glightbox > video{
  position:absolute;
  inset:0;               /* top:0; right:0; bottom:0; left:0; の省略 */
  width:100% !important; /* 800x600属性を上書き */
  height:100% !important;
  object-fit:cover;      /* はみ出しをトリミング */
  object-position:center;
  display:block;
}

