/*!
 * 포인트몰 상품 목록 스타일시트
 *
 * @package Pointmall
 * @since 1.0.0
 * @author Pointmall Dev Team
 *
 * Bootstrap 우선 원칙을 따르며, 그누보드 네이티브 스타일과 조화롭게 작성되었습니다.
 * 이 스타일시트는 포인트몰 전용이며, DAPA 시스템과 완전히 독립적입니다.
 */

/* ========================================
   포인트몰 상품 카드 기본 스타일
   ======================================== */

.pointmall-product-card {
    position: relative;
    transition: all 0.3s ease;
}

.pointmall-product-card:hover {
    transform: translateY(-2px);
}

/* ========================================
   상품 가격 표시
   ======================================== */

.pointmall-product-card .product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3f4678;
    margin-bottom: 8px;
    line-height: 1.2;
}

.pointmall-product-card .product-price .text-muted {
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: line-through;
}

.pointmall-product-card .product-price .text-danger {
    color: #dc3545 !important;
    font-weight: 700;
}

/* ========================================
   재고 상태 표시
   ======================================== */

.pointmall-product-card .product-stock {
    font-size: 0.875rem;
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pointmall-product-card .stock-available {
    color: #28a745;
}

.pointmall-product-card .stock-low {
    color: #ffc107;
    animation: pulse-warning 2s infinite;
}

.pointmall-product-card .stock-out {
    color: #dc3545;
    font-weight: 600;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========================================
   상품 상태 배지
   ======================================== */

.pointmall-product-card .product-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pointmall-product-card .status-active {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.pointmall-product-card .status-inactive {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.pointmall-product-card .status-soldout {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

/* ========================================
   할인 배지
   ======================================== */

.pointmall-product-card .discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: flash-discount 3s infinite;
}

@keyframes flash-discount {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ========================================
   카테고리 표시
   ======================================== */

.pointmall-product-card .product-category {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pointmall-product-card .product-category i {
    color: #3f4678;
}

/* ========================================
   판매 수량 표시
   ======================================== */

.pointmall-product-card .product-sold {
    font-size: 0.8rem;
    color: #17a2b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.pointmall-product-card .product-sold i {
    color: #17a2b8;
}

/* ========================================
   구매 버튼
   ======================================== */

.pointmall-product-card .purchase-btn {
    width: 100%;
    margin-top: 15px;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.pointmall-product-card .purchase-btn:not(:disabled) {
    background: linear-gradient(135deg, #3f4678, #4b5390);
    color: white;
    box-shadow: 0 4px 8px rgba(63, 70, 120, 0.3);
}

.pointmall-product-card .purchase-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #4b5390, #5a61a5);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(63, 70, 120, 0.4);
}

.pointmall-product-card .purchase-btn:disabled {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
}

.pointmall-product-card .purchase-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ========================================
   포인트 정보 표시 영역
   ======================================== */

.pointmall-user-points {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 4px solid #3f4678;
    font-weight: 600;
}

.pointmall-user-points i {
    color: #ffc107;
    margin-right: 5px;
}

.pointmall-user-points .text-navy {
    color: #3f4678 !important;
}

/* ========================================
   갤러리 아이템 호버 효과 개선
   ======================================== */

.board-gallery .gallery-item .pointmall-product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.board-gallery .gallery-item:hover .gallery-item-in {
    border-color: #3f4678;
    box-shadow: 0 8px 25px rgba(63, 70, 120, 0.15);
}

.board-gallery .gallery-item:hover .pointmall-product-card .product-price {
    color: #2d3456;
}

/* ========================================
   반응형 디자인
   ======================================== */

/* 태블릿 */
@media (max-width: 991px) {
    .pointmall-product-card .product-price {
        font-size: 1.1rem;
    }

    .pointmall-product-card .purchase-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .pointmall-product-card .product-status,
    .pointmall-product-card .discount-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

/* 모바일 */
@media (max-width: 576px) {
    .pointmall-product-card .product-price {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .pointmall-product-card .product-stock,
    .pointmall-product-card .product-category,
    .pointmall-product-card .product-sold {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    .pointmall-product-card .purchase-btn {
        font-size: 0.8rem;
        padding: 8px 10px;
        margin-top: 10px;
    }

    .pointmall-product-card .product-status {
        top: 5px;
        right: 5px;
        font-size: 0.65rem;
        padding: 2px 5px;
    }

    .pointmall-product-card .discount-badge {
        top: 5px;
        left: 5px;
        font-size: 0.65rem;
        padding: 2px 5px;
    }

    .pointmall-user-points {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* ========================================
   접근성 및 사용성 개선
   ======================================== */

.pointmall-product-card .purchase-btn:focus {
    outline: 2px solid #3f4678;
    outline-offset: 2px;
}

.pointmall-product-card .product-status:focus,
.pointmall-product-card .discount-badge:focus {
    outline: 2px solid white;
    outline-offset: 1px;
}

/* 스크린 리더 전용 텍스트 */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ========================================
   로딩 및 상태 애니메이션
   ======================================== */

.pointmall-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(63, 70, 120, 0.3);
    border-radius: 50%;
    border-top-color: #3f4678;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pointmall-success {
    color: #28a745;
    font-weight: 600;
}

.pointmall-error {
    color: #dc3545;
    font-weight: 600;
}

/* ========================================
   프린트 스타일
   ======================================== */

@media print {
    .pointmall-product-card .purchase-btn {
        display: none;
    }

    .pointmall-product-card .product-status,
    .pointmall-product-card .discount-badge {
        position: static;
        display: inline-block;
        margin: 5px 0;
    }

    .board-gallery .gallery-item:hover .gallery-item-in {
        border-color: #e5e5e5;
        box-shadow: none;
    }
}