/* ========== 공통 스타일 ========== */

/* === MAIN LAYOUT === */
.main-content {
    margin: 0 auto;
    margin-top: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* === TITLE SECTION === */
.title-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.main-title {
    font-weight: 700;
    color: white;
}

.subtitle {
    font-weight: 700;
    color: var(--zinc-200);
}

.subtitle-normal {
    font-weight: 400;
}

/* === LOCATION CARDS === */
.location-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.location-card {
    background-color: var(--zinc-900);
    border-radius: 0.75rem;
    border: 0.0625rem solid var(--zinc-800);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.location-card-content {
    display: flex;
    align-items: center;
}

.location-image {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.location-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.location-title {
    font-weight: 700;
    color: white;
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 0.746rem;
}

.location-detail {
    display: flex;
    align-items: center;
    gap: 0.746rem;
}

.location-icon {
    width: 1.4rem;
    height: 1.4rem;
}

.location-icon img {
    display: block;
    max-width: none;
    width: 100%;
    height: 100%;
}

.location-text {
    font-weight: 400;
    font-size: 1rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.location-link {
    font-weight: 400;
    font-size: 1rem;
    color: var(--gray-text);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.location-link:hover {
    color: white;
}

/* === FITTING INFO SECTION === */
.fitting-info-section {
    background-color: transparent;
    border: 0.0625rem solid var(--zinc-800);
    border-radius: 0.75rem;
    width: 100%;
    padding: 2.052rem 2.239rem;
    margin-bottom: 2.052rem;
}

.fitting-info-title {
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 1.493rem;
}

.fitting-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fitting-info-list li {
    position: relative;
    padding-left: 0.7rem;
    font-weight: 400;
    font-size: 0.938rem;
    margin-bottom: 0.0rem;
    color: white;
    line-height: 180%;
}

.fitting-info-list li:before {
    content: "-";
    position: absolute;
    left: 0;
    color: white;
}

/* Disabled State */
.location-card.disabled {
    background-color: var(--bg-main);
}

.location-card.disabled .location-card-content {
    opacity: 0.5;
}

.closed-badge {
    position: absolute;
    background-color: #52525c;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.closed-badge-text {
    font-weight: 500;
    font-size: 0.813rem;
    color: white;
}

/* === BOOKING SECTION === */
.location-group {
    margin-bottom: 0;
}

.booking-section {
    margin: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.4s ease-in-out;
}

.booking-section.active {
    opacity: 1;
    margin: 0.75rem 0;
}

.booking-grid {
    display: grid;
}

/* === CALENDAR SECTION === */
.calendar-section {
    background-color: var(--zinc-900);
    padding: 1.5rem;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.calendar-title {
    font-weight: 700;
    color: white;
}

.calendar-nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.calendar-nav-btn {
    width: 1.75rem;
    height: 1.75rem;
    cursor: pointer;
}

.calendar-nav-btn img {
    display: block;
    max-width: none;
    width: 100%;
    height: 100%;
}

.calendar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    color: var(--zinc-300);
    text-align: center;
}

.calendar-weekday {
    padding: 0.313rem 0;
}

.calendar-dates {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
}

.calendar-date {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-date span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.calendar-date.available {
    color: white;
}

.calendar-date.available::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    z-index: 0;
    background-color: transparent;
    transition: all 0.15s ease;
}

.calendar-date.available:hover:not(.selected)::before {
    background-color: var(--zinc-700);
    width: 2.4rem;
    height: 2.4rem;
}

.calendar-date.selected::before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    width: 2.5rem;
    height: 2.5rem;
}

.calendar-date.selected span {
    color: black;
    font-weight: 600;
}

.calendar-date.disabled {
    color: var(--zinc-700);
    cursor: not-allowed;
}

.calendar-title {
    font-size: 1.306rem;
}

.calendar-weekdays {
    color: var(--zinc-300);
    font-size: 0.933rem;
}

.calendar-date {
    font-size: 0.933rem;
}

/* === TIME SECTION === */
.time-section {
    display: flex;
    flex-direction: column;
    background-color: var(--zinc-900);
    padding: 1.25rem;
}

.time-title {
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
}

.time-slots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.time-row {
    display: flex;
    gap: 0.5rem;
}

.time-slot {
    background-color: rgba(63, 63, 70, 0.2);
    border: 0.0625rem solid var(--zinc-700);
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-slot:hover {
    background-color: rgba(63, 63, 70, 0.4);
}

.time-slot.selected {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.time-slot.disabled {
    background-color: var(--zinc-700);
    opacity: 0.2;
    cursor: not-allowed;
}

.time-slot.disabled:hover {
    background-color: var(--zinc-700);
}

.time-slot-text {
    font-weight: 500;
    color: white;
}

.time-slot.selected .time-slot-text {
    font-weight: 600;
    color: var(--zinc-800);
}

/* === SUMMARY SECTION === */
.summary-section {
    display: flex;
    flex-direction: column;
    background-color: var(--zinc-900);
}

.summary-content {
    flex: 1;
    padding: 1.5rem;
}

.summary-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-title {
    font-weight: 700;
    color: white;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-label {
    font-weight: 500;
    color: var(--gray-text);
}

.summary-value {
    font-weight: 600;
    color: white;
}

.summary-divider {
    border-top: 0.0625rem solid var(--zinc-800);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.summary-price {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-label {
    font-weight: 700;
    color: var(--gray-text);
}

.price-value {
    font-weight: 700;
    color: white;
}

.payment-btn {
    background-color: var(--primary-color);
    padding: 0.875rem 0.5rem;
}

.payment-btn-text {
    font-weight: 700;
    color: var(--zinc-950);
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.payment-btn:hover {
    background-color: #4aa5d1;
    transform: translateY(-0.0625rem);
}

.payment-btn.disabled{background:#2a2f3a; color:#666; cursor:not-allowed;pointer-events: none;}

/* === LEGEND === */
.legend {
    margin-top: auto;
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: right;
}

.legend-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.legend-box {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

.legend-box.available {
    background-color: rgba(63, 63, 70, 0.2);
    border: 0.0625rem solid var(--zinc-700);
}

.legend-box.completed {
    background-color: #202024;
}

.legend-text {
    font-weight: 500;
}

.legend-text.available {
    color: white;
}

.legend-text.completed {
    color: #71717b;
}

/* === SERVICE SECTION === */
.service-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.service-title {
    font-weight: 700;
    color: white;
}

.service-description {
    font-weight: 400;
    color: white;
    line-height: 1.6;
}

.service-description p {
    margin-bottom: 0;
}

.mobile-br {
    display: none;
}

/* Service Images */
.service-images {
    display: flex;
    gap: 1.563rem;
    align-items: center;
    justify-content: center;
}

.service-image {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 0.375rem;
    border: 0.125rem solid rgba(255, 255, 255, 0.2);
}

/* ========== 데스크탑 (64rem 이상) ========== */
@media (min-width: 64.01rem) {
    .main-content {
        max-width: 78.75rem;
    }

    .title-section {
        padding: 4rem 0 3.545rem 0;
    }

    .main-title {
        font-size: 2.75rem;
        margin-bottom: 1rem;
    }

    .subtitle {
        font-size: 1.25rem;
    }

    .location-cards {
        gap: 1rem;
        margin-bottom: 11.25rem;
    }

    .location-card {
        width: 78.75rem;
    }

    .location-card-content {
        gap: 2rem;
    }

    .location-image {
        height: 11.938rem;
        width: 15.938rem;
    }

    .location-info {
        gap: 1.5rem;
    }

    .location-title {
        font-size: 1.75rem;
    }

    .location-detail {
        gap: 0.75rem;
    }

    .closed-badge {
        bottom: 0.75rem;
        right: 0.75rem;
    }

    .booking-section.active {
        max-height: 62.5rem;
    }

    .booking-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .calendar-section {
        border-top-left-radius: 0.75rem;
        border-bottom-left-radius: 0.75rem;
        border-right: 0.0625rem solid var(--zinc-800);
    }

    .time-section {
        border-right: 0.0625rem solid var(--zinc-800);
    }

    .time-title {
        font-size: 1.125rem;
    }

    .time-slot {
        width: 7.25rem;
    }

    .time-slot-text {
        font-size: 0.875rem;
    }

    .summary-section {
        border-top-right-radius: 0.75rem;
        border-bottom-right-radius: 0.75rem;
    }

    .summary-title {
        font-size: 1.125rem;
    }

    .summary-label {
        font-size: 0.75rem;
    }

    .summary-value {
        font-size: 0.875rem;
    }

    .price-label {
        font-size: 0.875rem;
    }

    .price-value {
        font-size: 1.25rem;
    }

    .payment-btn {
        border-bottom-right-radius: 0.75rem;
    }

    .payment-btn-text {
        font-size: 0.938rem;
    }

    .legend-text {
        font-size: 0.75rem;
    }

    .service-section {
        margin-bottom: 4rem;
    }

    .service-title {
        font-size: 2rem;
        margin-bottom: 1.25rem;
    }

    .service-description {
        font-size: 1.25rem;
        max-width: 64rem;
    }

    .service-images {
        margin-bottom: 16.791rem;
    }

    .service-image {
        height: 22.313rem;
        width: 35.688rem;
    }
}

/* ========== 태블릿 (64rem 이하) ========== */
@media (max-width: 64rem) {
    .main-content {
        max-width: 100%;
        padding: 0 1.25rem;
        margin-top: 4rem;
        margin-bottom: 3.918rem;
    }

    .title-section {
        padding: 3rem 0 2.5rem;
    }

    .main-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .fitting-info-section {
        margin-bottom: 0.75rem;
        padding: 1.306rem;
    }

    .fitting-info-title {
        font-size: 1.119rem;
        margin-bottom: 0.373rem;
    }

    .fitting-info-list li {
        font-size: 0.746rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .location-cards {
        width: 100%;
        margin-bottom: 3rem;
        gap: 0.75rem;
    }

    .location-group{
        width: 100%;
    }

    .location-card-content {
        gap: 1.25rem;
    }

    .location-image {
        height: 8.396rem;
        width: 11.625rem;
    }

    .location-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .location-text {
        font-size: 0.875rem;
    }

    .location-link {
        font-size: 0.875rem;
    }

    .location-details {
        gap: 0.4rem;
    }
    
    .location-icon {
        width: 1.2rem;
        height: 1.2rem;
    }

    .closed-badge {
        bottom: 0.75rem;
        right: 0.75rem;
    }

    .booking-section.active {
        max-height: 100rem;
    }

    .booking-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "calendar time"
            "summary summary";
        gap: 0;
    }

    .calendar-section {
        grid-area: calendar;
        border-top-left-radius: 0.75rem;
        border-bottom-left-radius: 0.75rem;
        border-right: 0.0625rem solid var(--zinc-800);
    }

    .time-section {
        grid-area: time;
        border-top-right-radius: 0.75rem;
        border-bottom-right-radius: 0.75rem;
    }

    .time-title {
        font-size: 1.306rem;
        margin-bottom: 1.25rem;
    }

    .time-slots {
        gap: 0.746rem;
        width: 100%;
    }

    .time-row {
        gap: 0.746rem;
        width: 100%;
        display: flex;
    }

    .time-slot {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        padding: 0.75rem 0.5rem;
    }

    .time-slot-text {
        font-size: 0.933rem;
    }

    .summary-section {
        grid-area: summary;
        margin-top: 1rem;
        border-radius: 0.75rem;
    }

    .summary-title {
        font-size: 1.306rem;
    }

    .summary-label {
        font-size: 0.933rem;
    }

    .summary-value {
        font-size: 1.119rem;
    }

    .price-value {
        font-size: 1.25rem;
    }

    .payment-btn-text {
        font-size: 1.306rem;
    }

    .payment-btn {
        border-bottom-right-radius: 0.75rem;
        border-bottom-left-radius: 0.75rem;
    }

    .payment-btn-text {
        font-size: 0.875rem;
    }

    .service-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .service-description {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }

    .service-images {
        flex-direction: column;
        width: 100%;
    }

    .service-image {
        width: 65%;
        height: auto;
        aspect-ratio: 571/357;
    }
}

/* ========== 모바일 (640px 이하) ========== */
@media (max-width: 640px) {
    .main-content {
        padding: 0 1rem;
    }

    .title-section {
        align-items: flex-start;
        padding: 2.0rem 0 1rem;
    }

    .main-title {
        font-size: 1.493rem;
    }

    .fitting-info-section {
        padding: 1.306rem 1.679rem;
    }

    .location-cards {
        margin-bottom: 2.5rem;
        gap: 0.5rem;
    }

    .location-card-content {
        gap: 1rem;
    }
    
    .location-detail {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .location-text {
        min-width: 0;
        font-size: 0.813rem;
    }
    
    .location-link {
        flex-shrink: 0;
        font-size: 0.813rem;
        white-space: nowrap;
        padding-right: 0.5rem;
    }

    .location-image {
        height: 8.209rem;
        width: 8.209rem;
        flex-shrink: 0;
    }

    .location-info {
        gap: 0.5rem;
    }

    .location-title {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
    }
    
    .location-icon {
        width: 1.1rem;
        height: 1.1rem;
    }

    .closed-badge {
        bottom: 5rem;
        border-radius: 20rem;
    }

    .booking-section.active {
        max-height: 120rem;
    }

    .booking-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "calendar"
            "time"
            "summary";
    }

    .calendar-section {
        grid-area: calendar;
        border-top-right-radius: 0.75rem;
        border-top-left-radius: 0.75rem;
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
        padding: 1.25rem;
        border-bottom: 0.0625rem solid var(--zinc-800);
        border-right: none;
    }

    .time-section {
        grid-area: time;
        border-radius: 0;
        padding: 1.25rem;
        border-bottom: 0.0625rem solid var(--zinc-800);
    }

    .time-title {
        font-size: 1.119rem;
        margin-bottom: 1rem;
    }

    .time-slots {
        gap: 0.746rem;
        width: 100%;
    }

    .time-row {
        gap: 0.746rem;
        width: 100%;
        display: flex;
    }

    .time-slot {
        flex: 1;
        min-width: 0;
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }

    .time-slot-text {
        /*font-size: 1.026rem;*/
    }

    .legend {
        /*display: none;*/
        padding-top: 30px;
    }

    .legend-text {
        /*font-size: 1.119rem;*/
    }

    .summary-section {
        border-top-right-radius: 0;
        border-top-left-radius: 0;
        border-bottom-right-radius: 0.75rem;
        border-bottom-left-radius: 0.75rem;
        grid-area: summary;
        margin-top: 0;
        padding: 0rem;
    }

    .summary-title {
        font-size: 1.306rem;
    }

    .summary-label {
        font-size: 0.933rem;
    }

    .summary-value {
        font-size: 1.119rem;
    }

    .price-value {
        font-size: 1.25rem;
    }

    .payment-btn-text {
        font-size: 1.306rem;
    }

    .service-title {
        font-size: 1.493rem;
        margin-bottom: 1rem;
    }

    .service-description {
        font-size: 1rem;
        margin-bottom: 2.5rem;
        background-color: var(--zinc-900);
        padding: 0.746rem;
        border-radius: 0.75rem;
        width: 100%;
        margin-bottom: 0;
    }

    .service-section {
        margin-bottom: 0.746rem;
    }

    .service-images {
        gap: 0.746rem;
    }

    .service-image {
        width: 100%;
        height: auto;
        aspect-ratio: 571/357;
    }

    .mobile-br {
        display: inline;
    }
}

/* ========== 모달 스타일 ========== */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    position: relative;
}

/* 데스크탑: 3개 모달 동시 표시 */
.desktop-modal-group {
    display: flex;
    gap: 2.985rem;
    padding: 0;
    transform: translateY(-4.5rem);
}

.mobile-modal-wrapper {
    display: none;
}

.modal-slide {
    flex: 0 0 auto;
    width: 22.5rem;
    transition: opacity 0.3s ease;
}

.modal-content {
    width: 100%;
    background: transparent;
    position: relative;
    line-height: 0;
    font-size: 0;
}

.modal-image {
    width: 100%;
    display: block;
}

.modal-image-container {
    position: relative;
    overflow: hidden;
    border-top-right-radius: 0.75rem;
    border-top-left-radius: 0.75rem;
}

.modal-image-slider {
    display: flex;
    width: 300%;
    transition: transform 0.3s ease;
}

/* 모바일 모달 내의 이미지 슬라이더 스타일 */
.modal-image-slider .modal-image {
    width: 33.333%;
    
    flex-shrink: 0;
    display: block;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: var(--zinc-950);
    border-top-right-radius: 0.75rem;
    border-top-left-radius: 0.75rem;
}

.modal-footer {
    background-color: var(--zinc-700);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.933rem;
    border-bottom-right-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
}

.dont-show-btn {
    background: none;
    border: none;
    padding: 0;
    font-weight: 400;
    font-size: 0.933rem;
    color: var(--gray-text);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.dont-show-btn:hover {
    color: white;
}

.close-btn {
    background-color: var(--zinc-700);
    border: none;
    border-radius: 0.375rem;
    font-weight: 400;
    font-size: 0.933rem;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

.pagination-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination-dot.active {
    background-color: white;
}

/* 태블릿/모바일 스타일 */
@media (max-width: 64rem) {
    .desktop-modal-group {
        display: none;
    }
    
    .mobile-modal-wrapper {
        display: block;
        width: 22.5rem;
        max-width: 100%;
    }
    
    .modal-image-container .image-placeholder {
        border-radius: 0;
        border-top-right-radius: 0.75rem;
        border-top-left-radius: 0.75rem;
    }

    .legend {
        /*display: none;*/
        padding-top: 20px;
    }

}

/* 모바일 스타일 */
@media (max-width: 640px) {
    .mobile-modal-wrapper {
        width: 22.5rem;
        max-width: calc(100vw - 2rem);
    }
    
    .welcome-modal {
        padding: 1rem;
    }
}