/* /main/css/recommend.css */

/* 컨테이너 설정 */
.container-fluid {
    max-width: 1600px !important;
    margin: 0 auto !important;
}



/* 카드 기본 스타일 */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-radius: 10px;
    max-width: 300px !important; /* 카드 최대 너비 제한 */
    margin: 0 auto !important; /* 카드 중앙 정렬 */
}

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

.card img {
    transition: transform 0.2s ease-in-out;
    border-radius: 10px 10px 0 0;
}

.card:hover img {
    transform: scale(1.05);
}

/* 섹션 스타일 - 기본 */
.product-section {
    margin: 2rem 0;
    border-radius: 15px;
    padding: 3rem 0 !important;
}

/* 배지 스타일 */
.badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
}

/* 빈 슬롯 스타일 */
.empty-slot {
    border: 2px dashed #ddd !important;
    opacity: 0.3;
    border-radius: 10px;
}

.empty-slot .card-body {
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 제목 스타일 */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1rem;
    color: #6c757d;
}

/* 가격 스타일 */
.price-per-kg {
    color: #dc3545 !important;
    font-weight: bold;
    font-size: 0.9rem;
}

.total-price {
    color: #0d6efd !important;
    font-weight: bold;
    font-size: 1.2rem;
}

.product-weight {
    color: #6c757d;
    font-size: 0.85rem;
}

/* 태블릿 (992px 이하) */
@media (max-width: 991px) {
    .container-fluid {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
        
    .product-section {
        margin: 2rem 0 !important;
        padding: 2rem 0.5rem !important;
    }
        
    .section-title {
        font-size: 1.5rem;
    }
        
    /* 태블릿에서 2열 */
    .row-cols-md-4 > .col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .row.row-cols-md-4 {
        gap: 1.5rem 1rem !important;
    }
    
    .card {
        max-width: 100% !important;
    }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .row.row-cols-md-4 {
        gap: 1rem !important;
    }
    
    .card {
        max-width: 100% !important;
    }
    
    .product-section {
        padding: 2rem 0 !important;
    }
}

/* 모바일 (576px 이하) */
@media (max-width: 576px) {
    .container-fluid {
        max-width: 100% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
        
    .product-section {
        margin: 1rem 0 !important;
        padding: 2rem 0.5rem !important;
    }
        
    .section-title {
        font-size: 1.2rem !important;
    }
    
    .row-cols-md-4 > .col {
        flex: 0 0 50% !important;   /* 2개씩 */
        max-width: 50% !important;
    }
        
    .card-body {
        padding: 0.8rem !important; /* 패딩 조금 줄이기 */
    }
        
    .card img {
        height: 120px !important;   /* 이미지 높이 줄이기 */
    }
        
    .section-title {
        font-size: 1.2rem !important;
    }
        
    .total-price {
        font-size: 0.9rem !important; /* 가격 텍스트 작게 */
    }
    
    .row.row-cols-md-4 {
        gap: 0.8rem !important;
    }
    /* 모바일(<=576px)에서도 2열 강제 */
@media (max-width: 576px){
  .product-section .row > .col{
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  /* 카드가 칸을 정확히 채우도록 */
  .product-section .card{
    width: 100% !important;
    max-width: none !important;  /* 상단의 max-width:300px 무력화 */
    margin: 0 !important;
  }
}

/* 태블릿(<=768px)에서도 2열 유지가 목표라면 같은 규칙 한 번 더 */
@media (max-width: 768px){
  .product-section .row > .col{
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
  .product-section .card{
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
}


}