/* 장터형 게시판 스타일 */

/* Alert 메시지 스타일 */
.board-container .alert {
    padding: 15px 50px 15px 20px;
    margin-bottom: 25px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    display: block;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.board-container .alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    border-left: 4px solid #28a745;
}

.board-container .alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    border-left: 4px solid #dc3545;
}

.board-container .alert .close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    padding: 0;
    color: inherit;
    opacity: 0.6;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.board-container .alert .close:hover {
    opacity: 1;
}

.v_guide {border:#ccc solid 1px;background: #f1f1f1;padding:12px 20px;font-size:14px;}

/* 컨테이너 */
.board-mart-container {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 20px;
}

/* 장터 그리드 */
.mart-grid {
    display: grid;
    gap: 25px;
    margin: 20px 0;
}

/* 장터 아이템 */
.mart-item {
    transition: transform 0.3s ease;
}

.mart-item:hover {
    transform: translateY(-5px);
}

.mart-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.mart-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.mart-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 장터 이미지 */
.mart-image {
    position: relative;
    width: 100%;
    padding-top: 70%; /* 1:1 비율 */
    overflow: hidden;
    border: #ddd solid 1px;
    background: #f8f9fa;
}

.mart-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mart-card:hover .mart-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    color: #9e9e9e;
    font-size: 48px;
}

/* 장터 정보 */
.mart-info {
    padding: 20px;
}

.mart-category {
    margin-bottom: 8px;
}

.badge-category {
    display: inline-block;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.mart-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mart-excerpt {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mart-spec {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #495057;
    margin-bottom: 12px;
}

.mart-spec i {
    color: #777;
}

/* 거래상태 */
.mart-trade-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

.mart-trade-status.trade-active {
    background: #ff4444;
    color: white;
}

.mart-trade-status.trade-completed {
    background: #555;
    color: white;
}

/* 장터 상세보기 */
.mart-view {
    max-width: var(--site-width);
    margin: 0 auto;
    background: white;
    overflow: hidden;
}

.mart-detail {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 40px;
    padding: 0px;
}

/* 장터 갤러리 */
.mart-gallery {
    position: sticky;
    top: 20px;
}

.mart-main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    position: relative;
}

.mart-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.mart-main-image:hover img {
    transform: scale(1.02);
}

.no-image-large {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    color: #9e9e9e;
}

.no-image-large i {
    font-size: 64px;
    margin-bottom: 10px;
}

/* 썸네일 리스트 */
.mart-thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.mart-thumbnail-list .thumbnail-item {
    width: 80px;
    height: 80px;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    background: #f8f9fa;
}

.mart-thumbnail-list .thumbnail-item:hover {
    border-color: #3498db;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.mart-thumbnail-list .thumbnail-item.active {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.mart-thumbnail-list .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 장터 요약 정보 */
.mart-summary {
    display: flex;
    flex-direction: column;
}

.mart-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.mart-view-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

/* 거래상태 배지 (상세보기) */
.mart-trade-status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.mart-trade-status-badge.trade-status-active {
    background: #ff4444;
    color: white;
}

.mart-trade-status-badge.trade-status-completed {
    background: #555;
    color: white;
}

/* 장터 정보 테이블 */
.mart-info-table {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    border-bottom: 1px solid #dee2e6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    flex: 0 0 150px;
    padding: 15px 20px;
    background: #f8f9fa;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid #dee2e6;
    font-weight: 600;
}

.info-value {
    flex: 1;
    padding: 15px 20px;
    color: #212529;
}

.price-amount {
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

/* 장터 상세 설명 */
.mart-content-section {
    margin-top: 40px;
    padding-top: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-align: left !important;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #4498db;
}

.mart-content {
    font-size: 16px;
    line-height: 1.8;
    color: #495057;
}

.mart-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.mart-content p {
    margin-bottom: 15px;
}

/* 하단 버튼 */
.post-actions {
    justify-content: right;
    border-top: #ccc solid 1px;
    padding-top: 20px;
    margin-top: 30px;
}

.post-action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-outline-primary {
    background: transparent;
    color: #3498db;
    border: 1px solid #3498db;
}

.btn-outline-primary:hover {
    background: #3498db;
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 리스트 헤더 */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
}

.total-count {
    font-weight: 600;
    color: #495057;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
}

/* 반응형 */
@media (max-width: 992px) {
    .mart-detail {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
    
    .mart-gallery {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .board-mart-container {
        padding: 15px;
    }
    
    .mart-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .mart-info {
        padding: 15px;
    }
    
    .mart-title {
        font-size: 16px !important;
        letter-spacing: -1px;
        line-height: 24px;
        height: 26px;
        overflow: hidden;
    }
    
    .mart-detail {
        padding: 20px;
    }
    
    .mart-view-title {
        font-size: 22px;
    }
    
    .info-label {
        flex: 0 0 100px;
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .info-value {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .mart-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mart-trade-status-badge {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .mart-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
}

