/* 메인 스타일시트 */

/* 서치바 숨기기 */
.search-bar {
    display: none !important;
}

/* 상품 카드 그리드 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* 상품 카드 */
.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 상품 이미지 */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* 상품 정보 */
.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #03c75a;
    margin-bottom: 8px;
}

.product-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 상태 배지 */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.status-판매중 {
    background-color: #e8f5e9;
    color: #03c75a;
}

.status-예약중 {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-판매완료 {
    background-color: #f5f5f5;
    color: #999;
}

/* 폼 스타일 */
form {
    max-width: 600px;
    margin: 20px 0;
}

form div {
    margin-bottom: 15px;
}

form label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

form input[type="text"],
form input[type="email"],
form input[type="number"],
form textarea,
form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

form textarea {
    min-height: 100px;
    resize: vertical;
}

/* 버튼 스타일은 base.html에 이미 정의됨 */

/* 테이블 스타일 */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
    margin-top: 20px;
}

table thead {
    background-color: #f0f0f0;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    font-weight: 600;
    color: #333;
}

table tbody tr:hover {
    background-color: #f9f9f9;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background-color: #03c75a;
    color: white;
    border-color: #03c75a;
}

.pagination .current {
    background-color: #03c75a;
    color: white;
    border-color: #03c75a;
}

/* 필터 섹션 */
.filters {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filters form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters form div {
    margin-bottom: 0;
}

/* 대시보드 통계 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 32px;
    font-weight: bold;
    color: #03c75a;
}

/* 결제 페이지 스타일 */
.payment-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payment-header h1 {
    margin: 0;
    color: #333;
}

.payment-amount {
    text-align: right;
}

.amount-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.amount-value {
    font-size: 24px;
    font-weight: bold;
    color: #03c75a;
}

.order-details {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payment-methods {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payment-methods h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.payment-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
}

.payment-btn:hover {
    border-color: #03c75a;
    background-color: #f8fff8;
}

.naver-pay-btn {
    border-color: #03c75a;
    color: #03c75a;
}

.naver-pay-btn:hover {
    background-color: #03c75a;
    color: #fff;
}

.general-pay-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.payment-icon {
    font-size: 20px;
    font-weight: bold;
}

/* 네이버페이 알람 모달 */
.naver-pay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0 0 20px 0;
}

.modal-message {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    margin: 0 0 30px 0;
}

.naver-pay-text {
    font-weight: bold;
    color: #03c75a;
}

.modal-confirm-btn {
    width: 100%;
    padding: 15px;
    background-color: #03c75a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-confirm-btn:hover {
    background-color: #02a84a;
}

.modal-confirm-btn:active {
    transform: translateY(1px);
}

/* 결제하기 팝업 모달 */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.payment-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: paymentModalSlideIn 0.3s ease-out;
}

@keyframes paymentModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.payment-modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.payment-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.payment-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.bank-transfer-section {
    padding: 0 20px 20px 20px;
}

.bank-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.bank-info-item:last-child {
    border-bottom: none;
}

.bank-info-label {
    width: 80px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.bank-info-value {
    flex: 1;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    margin-right: 10px;
}

.account-number {
    font-weight: bold;
}

.copy-btn {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background-color: #03c75a;
    color: #fff;
    border-color: #03c75a;
}

.depositor-name-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-right: 10px;
}

.depositor-name-input:focus {
    outline: none;
    border-color: #03c75a;
    box-shadow: 0 0 0 2px rgba(3, 199, 90, 0.1);
}

.warning-message {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 20px;
    font-size: 13px;
    color: #856404;
    line-height: 1.5;
}

.product-amount-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    margin: 0 20px 20px 20px;
    border-radius: 8px;
}

.product-amount-section .amount-label {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.product-amount-section .amount-value {
    font-size: 20px;
    font-weight: bold;
    color: #ff6b35;
}

.payment-submit-btn {
    width: calc(100% - 40px);
    margin: 0 20px 20px 20px;
    padding: 15px;
    background-color: #03c75a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.payment-submit-btn:hover {
    background-color: #02a84a;
}

.payment-submit-btn:active {
    transform: translateY(1px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-bar {
        margin: 10px 0 !important;
        max-width: 100% !important;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 8px;
    }
    
    .payment-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .payment-amount {
        text-align: center;
    }
    
    .payment-options {
        flex-direction: column;
    }
    
    .payment-btn {
        min-width: auto;
    }
    
    .modal-content {
        padding: 30px 20px;
        max-width: 280px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-message {
        font-size: 14px;
    }
    
    .payment-modal-content {
        max-width: 350px;
        margin: 20px;
    }
    
    .payment-modal-header {
        padding: 15px 15px 0 15px;
    }
    
    .payment-modal-title {
        font-size: 18px;
    }
    
    .bank-transfer-section {
        padding: 0 15px 15px 15px;
    }
    
    .bank-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .bank-info-label {
        width: auto;
        font-size: 13px;
    }
    
    .bank-info-value {
        font-size: 15px;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .copy-btn {
        align-self: flex-end;
    }
    
    .depositor-name-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .warning-message {
        margin: 15px;
        font-size: 12px;
    }
    
    .product-amount-section {
        margin: 0 15px 15px 15px;
        padding: 15px;
    }
    
    .payment-submit-btn {
        width: calc(100% - 30px);
        margin: 0 15px 15px 15px;
    }
}
