/* main.css */

body {
    background-color: white;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", sans-serif;
}

/* -------------------- 상단 영역 (Header) -------------------- */
header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    height: 120px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

img.logo {
    width: 80px;
    height: auto;
}

h1 {
    font-size: 48px;
    color: #222;
    margin: 0;
}

.button-container {
    position: absolute;
    right: 40px;
    top: 25px;
    display: flex;
    gap: 15px;
}

.btn {
    font-size: 18px;
    padding: 10px 20px;
    border: none;
    background-color: #222;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #444;
}

/* -------------------- 4분할 메뉴 바 영역 (Menu Bar) -------------------- */
.menu-bar {
    display: flex;
    width: 100%; 
    border-top: 1px solid black; 
    border-bottom: 1px solid black; 
    height: 60px; 
}

.menu-item-wrapper {
    display: flex;
    flex-direction: row; 
    flex-grow: 1; 
    justify-content: center; 
    align-items: center; 
    gap: 8px; 
    
    text-decoration: none;
    color: #222;
    transition: background-color 0.2s;
    
    border-right: 1px solid #ccc; 
    padding: 0 10px; 
}

.menu-item-wrapper:last-child {
    border-right: none;
}

.menu-item-wrapper:hover {
    background-color: #f0f0f0;
}

.menu-icon {
    width: 30px; 
    height: 30px;
    object-fit: contain; 
}

.menu-item-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap; 
}

/* -------------------- ✅ 추천상품 영역 스타일 추가 -------------------- */
.main-content {
    max-width: 1200px; /* 콘텐츠 최대 너비 설정 */
    margin: 0 auto; /* 중앙 정렬 */
    padding: 40px 20px;
}

/* 추천상품 제목 스타일 */
.section-title {
    text-align: center; /* 가운데 정렬 */
    font-size: 28px;
    font-weight: bold;
    color: #222;
    margin-bottom: 30px; /* 아래 상품 목록과 간격 */
    border-bottom: 2px solid #eee; /* 아래에 얇은 구분선 */
    padding-bottom: 10px;
}

/* 상품 목록 (3개 이미지 배열) */
.product-list {
    display: flex;
    justify-content: space-between; /* 상품을 균등하게 분배 */
    gap: 30px;
}

.product-item {
    flex: 1; /* 3개 항목이 공간을 균등하게 차지 */
    text-align: center;
    border: 1px solid #eee; /* 깔끔한 경계선 */
    padding: 15px;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.product-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* 호버 시 그림자 효과 */
}

/* 상품 이미지 스타일 */
.product-image {
    width: 100%; /* 부모 .product-item 너비에 꽉 채움 */
    height: 250px; /* ✅ 이미지 높이 조정: 300px -> 250px */
    
    /* ✅ 수정: 이미지가 잘리지 않고 전체가 보이도록 'contain'으로 변경 */
    object-fit: contain; 
    
    background-color: white; /* contain 사용 시 배경이 투명하지 않도록 흰색으로 설정 */
    border-radius: 6px;
    margin-bottom: 10px;
}

/* 상품 정보 텍스트 */
.product-info {
    font-size: 16px;
    font-weight: 500;
    color: #444;
    margin: 0;
}
.main-content {
    max-width: 1200px; /* 콘텐츠 최대 너비 설정 */
    margin: 0 auto; /* 중앙 정렬 */
    padding: 40px 20px;
}

/* 제목 스타일 */
.section-title {
    text-align: center; /* 가운데 정렬 */
    font-size: 28px;
    font-weight: bold;
    color: #222;
    margin-bottom: 30px; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 10px;
}

/* ✅ 상품 목록 (15개 상품을 3x5 그리드로 배열) */
.product-list {
    display: grid; /* Flex 대신 Grid 사용 */
    grid-template-columns: repeat(3, 1fr); /* 가로 3열을 균등하게 분할 */
    gap: 30px; /* 상품 간의 간격 */
}

.product-item {
    /* flex: 1; 이 제거됨 */
    text-align: center;
    border: 1px solid #eee; 
    padding: 15px;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.product-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
}

/* 상품 이미지 스타일 */
.product-image {
    width: 100%; 
    height: 250px; /* 높이 고정 */
    object-fit: contain; /* 이미지가 잘리지 않고 전체가 보이도록 설정 */
    background-color: white; 
    border-radius: 6px;
    margin-bottom: 10px;
}

/* 상품 정보 텍스트 */
.product-info {
    font-size: 16px;
    font-weight: 500;
    color: #444;
    margin: 0;
}