/*************** Figures Page Layout ***************/

/* Hide right sidebar */
body.figures-page #right {
    display: none;
}

/* Expand main content */
body.figures-page #main-contain {
    grid-template-areas:
        "header header header"
        "left main main";
    grid-template-columns: 200px auto;
}

body.figures-page main {
    grid-column: 2 / 4;
}

/*************** Figures Sidebar ***************/

/* Hide default left sidebar content on figures page */
body.figures-page #left > *:not(.figures-sidebar) {
    display: none;
}

/* Show figures-specific sidebar content */
.figures-sidebar {
    display: none;
}

body.figures-page .figures-sidebar {
    display: block;
}

.figures-sidebar h3 {
    color: #ff69b4;
    border-bottom: 2px dashed #ffb6c1;
    padding-bottom: 5px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.figures-sidebar h3:first-child {
    margin-top: 0;
}

.figures-sidebar ul {
    list-style: none;
    padding: 0;
}

.figures-sidebar li {
    margin-bottom: 5px;
}

.figures-sidebar a {
    color: #ff69b4;
    text-decoration: none;
}

.figures-sidebar a:hover {
    text-decoration: underline;
}

/*************** Figures Main Content ***************/

/*************** Figures Intro Section ***************/

.figures-intro {
    text-align: center;
    margin-bottom: 30px;
}

.figures-intro h2 {
    color: #ff69b4;
    margin-bottom: 15px;
}

.collection-photo {
    margin: 15px auto;
    max-width: 600px;
}

.collection-photo img {
    width: 100%;
    border: 4px solid #ffb6c1;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

.figures-intro .box {
    max-width: 600px;
    margin: 15px auto;
    text-align: left;
}

/*************** Figure Gallery ***************/

.figures-gallery h3 {
    color: #ff69b4;
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 2px dashed #ffb6c1;
    padding-bottom: 10px;
}

.figure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px;
}

.figure-card {
    background: #fff0fa;
    border: 2px solid #ffb6c1;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.figure-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(255, 105, 180, 0.3);
}

.figure-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.figure-info {
    padding: 8px;
    text-align: center;
}

.figure-name {
    font-weight: bold;
    color: #ff69b4;
    font-size: 0.9rem;
    margin: 0 0 3px 0;
}

.figure-brand {
    color: #999;
    font-size: 0.75rem;
    margin: 0;
}

/*************** Figures Intro Section - 3 Column Layout ***************/

.figures-intro {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 15px;
    margin-bottom: 30px;
    padding: 10px;
}

/* Big photo on the left */
.intro-main-photo {
    background: #ff1493;
    padding: 15px;
    border-radius: 10px;
}

.intro-main-photo img {
    width: 100%;
    height: auto;
    display: block;
}

/* Two stacked photos in the middle */
.intro-side-photos {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-photo {
    background: #ff1493;
    padding: 15px;
    border-radius: 10px;
    flex: 1;
}

.side-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Introduction text box on the right */
.intro-text {
    background: #fff;
    border: 4px solid #ff00ff;
    border-radius: 10px;
    padding: 20px;
}

.intro-text h2 {
    color: #ff00ff;
    margin-top: 0;
    margin-bottom: 10px;
}

.intro-text p {
    margin: 0;
    line-height: 1.6;
}

/*************** Figure Gallery ***************/

.figures-gallery {
    padding: 10px;
}

.figures-gallery h3 {
    color: #ff00ff;
    text-align: center;
    margin-bottom: 15px;
}

.figure-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 10px;
}

.figure-card {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.figure-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.figure-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive - fewer columns on smaller screens */
@media (max-width: 900px) {
    .figure-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .figures-intro {
        grid-template-columns: 1fr 1fr;
    }
    
    .intro-text {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .figure-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .figures-intro {
        grid-template-columns: 1fr;
    }
}

/*************** Figure Modal ***************/

.figure-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.figure-modal.show {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.figure-modal-content {
    background: #fff;
    border: 4px solid #ff69b4;
    border-radius: 15px;
    padding: 25px;
    max-width: 850px;
    width: 100%;
    position: relative;
    margin: 20px auto;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #ff69b4;
    cursor: pointer;
}

.modal-close:hover {
    color: #ff1493;
}

.figure-modal-content h2 {
    color: #ff69b4;
    text-align: center;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px dashed #ffb6c1;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Modal Gallery */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-main-image {
    background: #fff0fa;
    border: 3px solid #ffb6c1;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.modal-main-image img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}

.modal-thumbnails {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid #ffb6c1;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.modal-thumbnails img:hover {
    transform: scale(1.1);
    border-color: #ff69b4;
}

/* Modal Info */
.modal-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-info .info-box {
    background: #fff0fa;
    border: 2px dashed #ff7acb;
    border-radius: 10px;
    padding: 15px;
}

.modal-info .info-box h3 {
    color: #ff69b4;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #ffb6c1;
}

.modal-info .info-box p {
    margin: 0;
    line-height: 1.6;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 5px 0;
    border-bottom: 1px dotted #ffb6c1;
}

.info-table td:first-child {
    font-weight: bold;
    color: #ff69b4;
    width: 40%;
}

.star-rating {
    color: #ffcc00;
    font-size: 1.5rem;
    letter-spacing: 3px;
}

.modal-info .link-btn {
    text-align: center;
    padding: 10px;
}

/* Modal Navigation */
.modal-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dashed #ffb6c1;
}

.modal-nav button {
    background: linear-gradient(to bottom, #ffeffb 0, #ffbbdb 50%, #ffa5cc 51%, #ffb1d5 100%);
    border: 2px solid #ff69b4;
    border-radius: 8px;
    padding: 10px 20px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    text-shadow: -1px -1px 0 #ff69b4, 1px -1px 0 #ff69b4, -1px 1px 0 #ff69b4, 1px 1px 0 #ff69b4;
}

.modal-nav button:hover {
    filter: brightness(1.1);
}

/* Responsive */
@media (max-width: 700px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .figure-modal-content {
        padding: 15px;
    }
}