/**
 * WooCommerce Product Meta Display - Frontend Styles
 * Badge Manager 스타일 기반
 */

/* 기본 컨테이너 */
.wc-pmd-meta-display {
    margin: 20px 0;
    padding: 0;
    box-sizing: border-box;
}

.wc-pmd-meta-display * {
    box-sizing: border-box;
}

/* 리스트 형식 */
.wc-pmd-format-list .wc-pmd-meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wc-pmd-format-list .wc-pmd-meta-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
}

.wc-pmd-format-list .wc-pmd-label {
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.wc-pmd-format-list .wc-pmd-value {
    color: #555;
}

/* 테이블 형식 */
.wc-pmd-format-table .wc-pmd-meta-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
}

.wc-pmd-format-table .wc-pmd-meta-table th,
.wc-pmd-format-table .wc-pmd-meta-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.wc-pmd-format-table .wc-pmd-meta-table th {
    background: #f6f7f7;
    font-weight: 600;
    color: #333;
    width: 30%;
}

.wc-pmd-format-table .wc-pmd-meta-table td {
    color: #555;
}

.wc-pmd-format-table .wc-pmd-meta-table tr:last-child th,
.wc-pmd-format-table .wc-pmd-meta-table tr:last-child td {
    border-bottom: none;
}

/* 인라인 형식 */
.wc-pmd-format-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.wc-pmd-format-inline .wc-pmd-meta-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.wc-pmd-format-inline .wc-pmd-label {
    font-weight: 600;
    color: #333;
    margin-right: 6px;
}

.wc-pmd-format-inline .wc-pmd-value {
    color: #555;
}

.wc-pmd-format-inline .wc-pmd-separator {
    color: #999;
    margin: 0 4px;
}

/* 뱃지 형식 */
.wc-pmd-format-badge .wc-pmd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wc-pmd-format-badge .wc-pmd-badge {
    display: inline-flex;
    flex-direction: column;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.wc-pmd-format-badge .wc-pmd-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wc-pmd-format-badge .wc-pmd-badge-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.wc-pmd-format-badge .wc-pmd-badge-value {
    font-size: 18px;
    font-weight: 700;
}

/* 사이즈별 재고 스타일 */
.wc-pmd-stock-by-size {
    margin: 20px 0;
}

.wc-pmd-variations-stock {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
}

.wc-pmd-variations-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.wc-pmd-variation-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s;
}

.wc-pmd-variation-item:hover {
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wc-pmd-size-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-pmd-stock-qty {
    font-size: 20px;
    font-weight: 700;
    color: #4caf50;
}

.wc-pmd-stock-qty.in-stock {
    color: #4caf50;
}

.wc-pmd-stock-qty.low-stock {
    color: #ff9800;
}

.wc-pmd-stock-qty.out-of-stock {
    color: #f44336;
}

/* ACF 필드 타입별 스타일 */
.wc-pmd-acf-image {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
}

/* 반응형 */
@media (max-width: 768px) {
    .wc-pmd-format-table .wc-pmd-meta-table th,
    .wc-pmd-format-table .wc-pmd-meta-table td {
        padding: 10px;
        font-size: 13px;
    }
    
    .wc-pmd-format-badge .wc-pmd-badges {
        flex-direction: column;
    }
    
    .wc-pmd-format-badge .wc-pmd-badge {
        width: 100%;
    }
    
    .wc-pmd-variations-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
}

/* 재고 수량 인라인 표시 스타일 (S:10 M:9 형식) */
.wc-pmd-stock-item {
    display: inline-block;
    padding: 4px 10px;
    margin-right: 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

/* 재고 있음 (6개 이상) */
.wc-pmd-stock-item.wc-pmd-in-stock {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

/* 재고 부족 (1~5개) */
.wc-pmd-stock-item.wc-pmd-low-stock {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ff9800;
    animation: pulse 2s infinite;
}

/* 품절 (0개) */
.wc-pmd-stock-item.wc-pmd-out-of-stock {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
    opacity: 0.6;
    text-decoration: line-through;
}

/* 재고 부족 펄스 애니메이션 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 프리뷰 전용 스타일 */
.wc-pmd-preview-empty {
    padding: 40px;
    text-align: center;
    color: #999;
    font-style: italic;
}
