/* 제품 상세보기 모달 스타일 */
.product-detail-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.product-detail-modal-content {
    background-color: #fff;
    margin: 0;
    padding: 0;
    border-radius: 16px;
    width: 95%; /* QHD 해상도에 맞게 확대 */
    max-width: 1200px; /* 최대 너비 증가 */
    max-height: 90vh; /* 높이도 증가 */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.4s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

.product-detail-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e1e5e9;
    background: linear-gradient(135deg, #007aff 0%, #0056cc 100%);
    color: white;
}

.product-detail-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-detail-close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.product-detail-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.product-detail-modal-body {
    padding: 2rem;
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 상단 컨테이너 (이미지 + 정보) */
.product-detail-top-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* 제품 이미지 섹션 */
.product-detail-image-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-detail-main-image {
    position: relative;
    width: 100%;
    height: 400px; /* 고정 높이 설정 */
    max-width: 500px; /* QHD 해상도에 맞게 크기 증가 */
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* 비율 유지하면서 컨테이너에 맞춤 */
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
    /* 이미지가 컨테이너 안에서 최대한 크게 표시되도록 */
    min-width: 0;
    min-height: 0;
}
.product-detail-img:hover {
    transform: scale(1.05);
}

.product-detail-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-detail-img:hover {
    transform: scale(1.05);
}

.product-detail-placeholder-content {
    text-align: center;
    color: #6c757d;
}

.product-detail-placeholder-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #007aff;
}

.product-detail-placeholder-text {
    font-size: 1.1rem;
    font-weight: 500;
}

/* 제품 상태 표시 */
.product-detail-status {
    text-align: center;
}

.product-detail-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-detail-status-badge.available {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
}

.product-detail-status-badge.unavailable {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

/* 제품 정보 섹션 */
.product-detail-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-detail-title {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e5e9;
}

.product-detail-title h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.product-detail-number {
    font-size: 1.1rem;
    color: #007aff;
    font-weight: 600;
    background: rgba(0, 122, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

.product-detail-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-detail-detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.product-detail-detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-detail-detail-item i {
    font-size: 1.2rem;
    color: #007aff;
    width: 20px;
    text-align: center;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 60px;
}

.product-detail-detail-item span:last-child {
    color: #666;
    font-weight: 500;
}

/* 제품 설명 섹션 - 하단 전체 가로 */
.product-detail-description-section {
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    grid-column: 1 / -1;
}

.product-detail-description-section h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-detail-description-section h4 i {
    color: #007aff;
}

.product-detail-description {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

/* 액션 버튼들 - 대여하기 버튼 제거, 닫기 버튼만 유지 */
.product-detail-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.product-detail-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.product-detail-btn:active {
    transform: translateY(0);
}

.product-detail-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.product-detail-btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0) scale(1);
    }
}

/* 세로 모드 최적화 (LG 스탠바이미 2: 1440x2560) */
@media (min-width: 1440px) and (max-height: 2560px) and (orientation: portrait) {
    .product-detail-modal-content {
        width: 95%;
        max-width: 1200px;
        max-height: 95vh; /* 더 많은 공간 활용 */
        top: 20.5%; /* 상단 여백 조정 */
        transform: translate(-50%, 0); /* 상단 기준으로 위치 조정 */
    }
    
    .product-detail-modal-header {
        padding: 1.2rem 2rem; /* 헤더 높이 줄임 */
    }
    
    .product-detail-modal-header h2 {
        font-size: 1.6rem;
    }
    
    .product-detail-modal-body {
        padding: 1.5rem 2rem; /* 패딩 줄임 */
        gap: 1.5rem; /* 간격 줄임 */
        max-height: calc(95vh - 100px); /* 스크롤 최소화 */
    }
    
    /* 세로모드에서 2열 그리드로 최적화 */
    .product-detail-top-container {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2열로 복원 */
        gap: 1.5rem;
        align-items: start;
    }
    
    /* 이미지 섹션 최적화 */
    .product-detail-image-section {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    /* 상단 메인 이미지 최적화 */
    .product-detail-main-image {
        width: 100%;
        height: 350px; /* 세로모드에서 고정 높이 */
        max-width: 100%;
        margin: 0 auto;
    }
    
    .product-detail-img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* 비율 유지하면서 최대 크기 */
        width: auto;
        height: auto;
    }
    
    /* 정보 섹션 최적화 */
    .product-detail-info-section {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-detail-title {
        text-align: left; /* 왼쪽 정렬로 변경 */
        padding-bottom: 0.8rem;
    }
    
    .product-detail-title h3 {
        font-size: 1.5rem; /* 제목 크기 조정 */
        line-height: 1.2;
    }
    
    .product-detail-number {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* 상세 정보 컴팩트하게 */
    .product-detail-details {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2열 그리드 */
        gap: 0.8rem;
    }
    
    .product-detail-detail-item {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .product-detail-detail-item i {
        font-size: 1rem;
    }
    
    /* 설명 섹션 최적화 */
    .product-detail-description-section {
        padding: 1.2rem;
        margin-top: 1rem;
    }
    
    .product-detail-description-section h4 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .product-detail-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* 추가 콘텐츠 최적화 */
    .product-detail-additional-content {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .additional-content-item {
        margin-bottom: 1rem;
        padding: 0.8rem;
    }
    
    .additional-content-text {
        font-size: 0.9rem;
    }
    
    /* 하단 추가 콘텐츠 이미지 최적화 */
    .additional-content-image {
        max-width: 500px !important; /* 세로모드에서 더 크게 표시 */
        max-height: 400px !important; /* 높이 제한 조정 */
        object-fit: contain; /* 비율 유지 */
        width: auto;
        height: auto;
    }
    
    /* 상태 배지 최적화 */
    .product-detail-status {
        margin-bottom: 1rem;
    }
    
    .product-detail-status-badge {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* 액션 버튼 최적화 */
    .product-detail-actions {
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid #e1e5e9;
    }
    
    .product-detail-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* 가로 모드 QHD 해상도 최적화 */
@media (min-width: 2560px) and (orientation: landscape) {
    .product-detail-modal-content {
        width: 98%;
        max-width: 1400px;
        max-height: 95vh;
    }
    
    .product-detail-main-image {
        width: 100%;
        height: 500px; /* 가로모드에서 고정 높이 */
        max-width: 600px;
    }
    
    .product-detail-img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* 비율 유지하면서 최대 크기 */
        width: auto;
        height: auto;
    }
    
    .product-detail-top-container {
        gap: 3rem;
    }
    
    .product-detail-modal-header {
        padding: 2rem 3rem;
    }
    
    .product-detail-modal-header h2 {
        font-size: 2rem;
    }
    
    .product-detail-modal-body {
        padding: 3rem;
        gap: 3rem;
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .product-detail-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .product-detail-modal-body {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .product-detail-top-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-detail-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .product-detail-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .product-detail-main-image {
        height: 250px; /* 모바일에서 고정 높이 */
    }
    
    .product-detail-img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        width: auto;
        height: auto;
    }
    
    .product-detail-title h3 {
        font-size: 1.5rem;
    }
    
    .product-detail-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .product-detail-modal-content {
        width: 98%;
        max-height: 90vh;
    }
    
    .product-detail-modal-body {
        padding: 1rem;
        gap: 1rem;
    }
    
    .product-detail-top-container {
        gap: 1rem;
    }
    
    .product-detail-main-image {
        height: 200px; /* 작은 모바일에서 고정 높이 */
    }
    
    .product-detail-img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        width: auto;
        height: auto;
    }
    
    .product-detail-title h3 {
        font-size: 1.3rem;
    }
    
    .product-detail-detail-item {
        padding: 0.75rem;
    }
}

/* 추가 콘텐츠 영역 */
.product-detail-additional-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e5e9;
}

.additional-content-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #beddff;
    text-align: center;
}

.additional-content-item:last-child {
    margin-bottom: 0;
}

.additional-content-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

/* 하단 추가 콘텐츠 이미지 (별도 클래스) */
.additional-content-image {
    width: 100%;
    max-width: 530px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
    text-align: center;
    object-fit: contain;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .additional-content-item {
        padding: 0.75rem;
    }
    
    .additional-content-image {
        max-width: 100%;
    }
}
