/* ============================================
   Before & After Page
   ============================================ */

.ba-page-tit {
    margin-bottom: 60px!important;
}

@media (max-width: 768px) {
    .ba-page-tit {
        margin-bottom: 30px!important;
    }
}

.common-page {
    padding: 40px 0 0
}

.before-after-page {
    margin-top: 130px;
    padding: 70px 0 0;
    text-align: center;
}


@media (max-width: 768px) {
    .before-after-page {
        margin-top: 70px;
        padding: 36px 0;
    }
}

.head-title {
    text-align: center;
    color: #333;
}

.head-title h4 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.head-title p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

.head-title hr {
    width: 20px;
    height: 4px;
    background-color: #e0e6e6;
    border: 0;
    margin: 20px auto 60px;
}

/* Category Tab List */
.ba-cat-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto 60px;
}

.ba-cat-nav.ba-cat-nav--grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}

.ba-cat-nav li {
    width: 200px;
    height: 60px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #ddd;
    border-left: 0;
    border-top: 0;
    box-sizing: border-box;
}

.ba-cat-nav li.active {
    background-color: #d4918e;
    color: #fff;
    border: 1px solid #d4918e;
}

.ba-cat-nav li span {
    font-size: 16px;
    font-weight: 700;
}

/* --- Section 2: Featured Photo --- */
section.ba-spotlight {
    background-color: #fafafa;
    padding: 80px 0;
}

section.ba-spotlight .container {
    opacity: 0;
    transition: opacity 0.4s ease;
}

section.ba-spotlight.show .container {
    opacity: 1;
}

/* Sub Category List */
.subList {
    width: 900px;
    margin: 0 auto;
}

section.ba-spotlight .subList {
    margin: 0 auto 30px;
}

section.ba-spotlight.active .subList {
    margin: 0 auto;
}

.subList .swiper-wrapper {
    gap: 10px;
    flex-wrap: wrap;
}

.subList li {
    border-radius: 24px;
    border: solid 1px #ddd;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 30px;
    cursor: pointer;
    width: max-content;
    text-align: center;
}

.subList li.active {
    border: 1px solid #d4918e;
    color: #d4918e;
    font-weight: 700;
}

.subList .swiper-button-prev,
.subList .swiper-button-next {
    display: none;
}

/* Photo Area */
.pic-section {
    margin: 0 auto;
    position: relative;
}

.pic-section.none {
    display: none;
}

.ba-viewer {
    display: flex;
    gap: 30px;
    margin: 0 auto;
    max-width: 1105px;
    align-items: center;
    user-select: none;
}

.ba-viewer > button {
    min-width: 72px;
    height: 72px;
    background: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba-viewer > button::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border-right: 3px solid #999;
    border-bottom: 3px solid #999;
}

.ba-viewer > button.next::after {
    transform: rotate(-45deg);
}

.ba-viewer > button.prev::after {
    transform: rotate(135deg);
}

.ba-viewer > button.disabled::after {
    border-color: #ddd;
}

.ba-viewer > button.disabled {
    pointer-events: none;
}

/* Photo Viewer */
.ba-frame {
    width: 900px;
}

.ba-frame .ba-photo {
    overflow: hidden;
    border-radius: 4px;
    position: relative;
    height: auto;
}

.ba-frame img {
    transition: all 0.5s ease-in-out;
    opacity: 1;
    vertical-align: bottom;
}

.ba-frame img.hide {
    opacity: 0;
}

/* Login Required Overlay */
.ba-frame .ba-photo.login-required img,
.ba-frame .ba-photo.login-required .img-placeholder,
.ba-thumb-grid .ba-photo.login-required img,
.ba-thumb-grid .ba-photo.login-required .img-placeholder {
    filter: blur(8px);
}

.ba-frame .ba-photo .login-overlay,
.ba-thumb-grid .ba-photo .login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ba-frame .ba-photo .login-overlay p {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin: 0;
    letter-spacing: 0.5px;
}

.ba-thumb-grid .ba-photo .login-overlay p {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Zoom Button */
button.zoom-btn {
    border-radius: 4px;
    background-color: rgba(17, 17, 17, 0.7);
    width: 24px;
    height: 24px;
    position: absolute;
    right: 0;
    z-index: 500;
    bottom: 0;
    padding: 3px;
    display: none;
}

/* Image Placeholder */
.img-placeholder {
    width: 100%;
    min-height: 150px;
    background-color: #e9e9e9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-weight: 400;
    border-radius: 4px;
}

.img-placeholder::after {
    content: attr(data-label);
}

.ba-frame .img-placeholder {
    min-height: 400px;
    font-size: 18px;
    background-color: #ddd;
}

/* Angle Tabs */
.ba-angles {
    display: flex;
    gap: 8px;
    justify-content: center;
    max-width: 800px;
    margin: 10px auto 30px;
}

.ba-angles li {
    border-radius: 4px;
    border: solid 1px #ddd;
    font-size: 13px;
    font-weight: 400;
    color: #333;
    min-width: 60px;
    max-height: 28px;
    line-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px 16px;
}

.ba-angles li.active {
    background-color: #333;
    color: #fff;
}

/* Description Box */
.ba-caption {
    padding: 24px 40px;
    object-fit: contain;
    border: solid 1px #d9d9d9;
    background-color: #fff;
    position: relative;
    border-radius: 4px;
    max-width: 800px;
    margin: 0 auto;
}

.ba-caption__head {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.ba-caption__head p {
    color: #d4918e;
}

.ba-desc {
    font-size: 14px;
    font-weight: 400;
    word-break: keep-all;
    color: #666;
    line-height: 1.6;
    white-space: pre-line;
    margin-top: 16px;
    display: block;
}

.ba-caption button {
    font-size: 12px;
    font-weight: 400;
    color: #d4918e;
    padding: 6px 20px;
    border: 1px solid #d4918e;
    border-radius: 20px;
    background-color: #fff;
    position: absolute;
    top: 20px;
    right: 40px;
    cursor: pointer;
}

.ba-caption button:hover {
    background-color: rgba(212, 145, 142, 0.1);
}

/* --- Section 3: Thumbnail Grid --- */
section.ba-gallery {
    display: block;
    padding: 60px 0 80px;
}

section.ba-gallery.none {
    display: none;
}

.ba-thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 20px;
    position: relative;
}

.ba-thumb-grid .ba-photo {
    overflow: hidden;
    cursor: pointer;
    position: relative;
    height: 150px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.ba-thumb-grid .ba-photo img {
    vertical-align: sub;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-thumb-grid .ba-tit {
    font-size: 14px;
    font-weight: 400;
    color: #333;
    padding: 10px;
}

.ba-thumb-grid .ba-tit > div {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ba-thumb-grid .tit-wrap {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.ba-thumb-grid .tit-wrap > div {
    font-size: 12px;
    color: #777;
    border-radius: 2px;
    border: solid 1px #ddd;
    height: 22px;
    padding: 0 6px;
    width: auto;
    display: flex;
    align-items: center;
}

.ba-thumb-grid p {
    font-size: 15px;
    font-weight: 400;
    margin: 10px 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ba-thumb-grid span {
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-size: 13px;
}

.ba-thumb-grid > div.active p {
    font-weight: 700;
}

.ba-thumb-grid > div.active span {
    color: #d4918e;
}

/* Pagination */
.ba-paging {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 80px;
}

.ba-paging button {
    background-color: transparent;
    border: 0;
    font-size: 14px;
    font-weight: 500;
    color: #000;
}

.ba-paging button.disabled {
    color: #ccc;
    pointer-events: none;
}

.ba-paging ul {
    display: flex;
    gap: 6px;
}

.ba-paging li {
    color: #999;
    font-size: 13px;
    font-weight: 400;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 12px;
    background-color: rgba(212, 145, 142, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ba-paging li.active {
    color: #fff;
    background-color: #d4918e;
    font-weight: 700;
}

/* --- Section 4: Notice --- */
section.ba-gallery.none + .ba-notes .ba-disclaimer {
    border: 0;
}

.ba-disclaimer {
    border-top: 1px solid #eee;
    padding: 60px 0 100px;
    display: flex;
    gap: 20px;
    flex-direction: column;
    align-items: center;
}

.ba-disclaimer > div {
    width: calc(100% - 400px);
}

.ba-disclaimer p {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.ba-disclaimer span {
    font-size: 13px;
    font-weight: 400;
    color: #777;
    line-height: 1.6;
    word-break: keep-all;
    white-space: pre-line;
}

/* Empty State */
.ba-empty {
    min-height: 660px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    display: none;
}

.ba-empty.active {
    display: flex;
}

.ba-empty p {
    margin-top: 30px;
    color: #666;
    font-size: 2rem;
    font-weight: 500;
}

/* ============================================
   Responsive - Tablet (max-width: 1199px)
   ============================================ */
@media (min-width: 1200px) {
    .ba-cat-nav li:nth-child(-n+6) {
        border-top: 1px solid #ddd;
    }

    .ba-cat-nav li:nth-child(6n+1) {
        border-left: 1px solid #ddd;
    }

    .ba-cat-nav li:last-child,
    .ba-cat-nav li:nth-child(6n) {
        border-right: 1px solid #ddd;
    }
}

@media (max-width: 1199px) {
    .head-title h4 {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .head-title p {
        font-size: 12px;
    }

    .head-title hr {
        display: none;
    }

    .ba-cat-nav,
    .ba-cat-nav.ba-cat-nav--grid {
        margin: 40px 0 30px;
        grid-template-columns: 1fr 1fr;
        display: grid;
    }

    .ba-cat-nav li {
        height: 40px;
        min-width: auto;
        width: 100%;
    }

    .ba-cat-nav li:nth-child(2n+1) {
        border-left: 1px solid #ddd;
    }

    .ba-cat-nav li:nth-child(-n+2) {
        border-top: 1px solid #ddd;
    }

    .ba-cat-nav li:last-child,
    .ba-cat-nav li:nth-child(2n) {
        border-right: 1px solid #ddd;
    }

    .ba-cat-nav li span {
        font-size: 13px;
    }

    section.ba-spotlight {
        padding: 30px 20px 30px;
    }

    section.ba-spotlight .swiper.subList {
        padding: 0 17px;
        max-width: 100%;
        width: calc(100% - 20px);
    }

    .subList.active,
    section.ba-spotlight .subList {
        margin-bottom: 20px;
    }

    .subList .swiper-wrapper {
        flex-wrap: initial;
        gap: 0;
        padding: 0;
        flex-wrap: nowrap;
    }

    .subList li {
        font-size: 12px;
        font-weight: 500;
        padding: 8px 16px;
    }

    .subList .swiper-button-prev,
    .subList .swiper-button-next {
        width: 17px;
        display: flex;
        background-color: #fafafa;
    }

    .subList .swiper-button-prev {
        justify-content: flex-start;
        left: 0;
    }

    .subList .swiper-button-next {
        justify-content: flex-end;
        right: 0;
    }

    .subList .swiper-button-prev:after,
    .subList .swiper-button-next:after {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 2px solid #999;
        border-bottom: 2px solid #999;
        background: none;
    }

    .subList .swiper-button-next:after {
        transform: rotate(-45deg);
    }

    .subList .swiper-button-prev:after {
        transform: rotate(135deg);
    }

    section.ba-spotlight .container {
        max-width: 100%;
        padding: 0;
    }

    .ba-viewer {
        gap: 0;
    }

    .ba-viewer > button {
        min-width: 24px;
        height: 24px;
    }

    .ba-viewer > button::after {
        width: 10px;
        height: 10px;
        border-width: 2px;
    }

    .ba-frame {
        width: 100%;
    }

    .ba-frame .ba-photo {
        height: auto;
    }

    button.zoom-btn {
        display: block;
    }

    .ba-angles {
        gap: 6px;
        margin: 8px auto 20px;
    }

    .ba-angles li {
        font-size: 12px;
        padding: 11px 10px;
        line-height: 24px;
        min-width: 48px;
        max-height: 24px;
    }

    .ba-caption {
        padding: 14px 16px 16px;
        max-width: 100%;
        display: flex;
        flex-direction: column;
    }

    .ba-caption__head {
        font-size: 13px;
        flex-direction: column;
        gap: 4px;
    }

    .ba-desc {
        font-size: 12px;
        font-weight: 300;
        margin-top: 12px;
    }

    .ba-caption button {
        font-size: 11px;
        position: initial;
        margin: 16px auto 0;
    }

    .ba-thumb-grid > div span {
        display: block;
        margin-bottom: 4px;
    }

    section.ba-gallery {
        padding: 30px 0 60px;
    }

    .ba-thumb-grid {
        width: 100%;
        grid-template-columns: calc(50% - 10px) calc(50% - 10px);
        gap: 20px;
    }

    .ba-thumb-grid p {
        font-size: 12px;
        margin: 8px 0 0 0;
        width: 100%;
        padding: 0 8px;
    }

    .ba-paging {
        gap: 20px;
        margin-top: 60px;
    }

    .ba-paging button {
        font-size: 12px;
        font-weight: 500;
    }

    .ba-paging li {
        font-size: 12px;
    }

    .ba-disclaimer {
        padding: 40px 0 80px;
    }

    .ba-disclaimer > div {
        width: 100%;
    }

    .ba-disclaimer p {
        font-size: 13px;
    }

    .ba-disclaimer span {
        font-size: 12px;
    }

    .ba-empty {
        min-height: 404px;
    }

    .ba-empty p {
        margin-top: 20px;
        font-size: 13px;
    }

}

