/**
 * 洋服カードとモーダル表示のスタイル
 *
 * @package collemi
 */

/* 洋服グリッドの調整 - 既存のスタイルを上書き */
.clothes-grid.archive-grid {
    display: grid;
    grid-gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-auto-rows: unset; /* 固定高さを解除 */
    margin-bottom: 30px;
}

/* カードのスタイル調整 */
.clothes-card {
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    background: #fff;
    position: relative; /* 位置基準を追加 */
    min-height: 300px; /* 最小高さを設定して、ボタンが見えるようにする */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.clothes-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color-light, #E67E9D);
}

.clothes-card .clothes-info {
    padding: 12px 17px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 90px; /* 最小高さを確保 */
}

.clothes-card .clothes-category {
    font-size: 0.7rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 3px;
    /* background-color: #f0f0f0; */
    display: inline-block;
    padding: 2px 0;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.clothes-card .clothes-brand {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-color, #C44569);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clothes-card .clothes-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0;
    line-height: 1.4;
    flex-grow: 1;
    max-height: 2.6rem; /* 2行分の高さに制限 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 着用シーン確認ボタン */
.clothes-view-scene {
    padding: 0 17px 19px; /* 左右に12px、下部に15pxの余白を追加 */
    margin-top: auto; /* フレックスボックスの末尾に固定 */
    width: 100%;
    box-sizing: border-box;
}

.view-scene-btn {
    background: var(--accent-color, #C44569);
    color: white;
    border: none;
    border-radius: 5px; /* ボタンの角を少し丸く */
    padding: 8px 0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
    width: 88%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.view-scene-btn:hover {
    background: var(--accent-color, #C44569);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ボタンのアクティブ状態 */
.view-scene-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.view-scene-btn .modal-icon {
    margin-right: 6px;
    font-size: 1rem;
}

/* モーダルスタイル */
.clothes-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.clothes-modal .modal-content {
    position: relative;
    background-color: #fff;
    margin: 4vh auto;
    padding: 30px;
    border-radius: 12px;
    width: 92%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalContentZoom 0.3s ease;
}

@keyframes modalContentZoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.clothes-modal .close-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 30px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    padding: 0;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.clothes-modal .close-modal:hover {
    color: var(--accent-color, #C44569);
    background-color: rgba(0,0,0,0.05);
}

.clothes-modal h3 {
    margin-top: 0;
    /* margin-bottom: 20px;
    padding-bottom: 12px; */
    /* border-bottom: 2px solid var(--accent-color-light, #E67E9D); */
    color: var(--accent-color, #C44569);
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
}

/* 着用画像 */
.wearing-image {
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.wearing-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.wearing-celebrity {
    margin-top: 10px;
    padding: 8px;
    font-size: 0.9em;
    color: var(--accent-color, #C44569);
    font-weight: 500;
    background-color: #f8f8f8;
    border-radius: 4px;
    display: inline-block;
}

/* 埋め込みコンテンツ */
.embed-container {
    margin-bottom: 25px;
    width: 100%;
    overflow: hidden;
}

.embed-container iframe,
.embed-container div {
  margin-left: auto !important;
  margin-right: auto !important;
}

.embed-container h4 {
    margin-bottom: 12px;
    color: var(--accent-color, #C44569);
    font-weight: 600;
    font-size: 1.1rem;
    border-left: 3px solid var(--accent-color, #C44569);
    padding-left: 10px;
}

.embed-container.twitter-embed {
    margin: 0 auto 25px;
}

.instagram-embed {
    margin: 0 auto 25px;
}

/* ソースリンク */
.source-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color, #e0e0e0);
}

.source-link a {
    display: inline-block;
    background: #C44569;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.source-link a:hover {
    background: var(--accent-color-dark, #B33C5D);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.source-link a i {
    margin-left: 5px;
}

/* レスポンシブ調整 */
@media (min-width: 576px) {
    .clothes-grid.archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        grid-gap: 20px;
    }
    
    .view-scene-btn {
        padding: 10px 0;
    }
}

@media (min-width: 768px) {
    .clothes-grid.archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .clothes-modal .modal-content {
        padding: 35px;
        max-width: 700px;
    }
    
    .clothes-card .clothes-title {
        font-size: 0.9em;
    }
    
    .clothes-card {
        min-height: 320px;
    }
    

}

@media (min-width: 992px) {
    .clothes-grid.archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        grid-gap: 25px;
    }
    
    .clothes-modal .modal-content {
        padding: 40px;
        max-width: 750px;
    }
}

@media (min-width: 1200px) {
    .clothes-grid.archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    
    .clothes-card {
        min-height: 340px;
    }
}
