/* cafe-menu.css */

/* 공통 컨테이너 */
.cafe-menu-container {
    max-width: 1200px; /* 전체 최대 너비 유지, 필요에 따라 조정 */
    margin: 0 auto;
    padding: 40px 20px;
}

/* --- 카테고리 목록 (category_list.php) --- */
.category-list-section h2 {
    color: #333;
    font-family: 'Noto Sans KR', sans-serif;
    margin-bottom: 40px;
}

.category-grid {
    display: grid;
    /* PC에서는 3열, 각 열은 동일한 너비를 가집니다. */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    justify-content: center;
}

.category-item {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.category-item a {
    display: block;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    height: 100%; /* Ensure link covers full item */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    text-align: center;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4A90E2; /* Primary color */
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif; /* Modern font */
    letter-spacing: -0.5px;
}

.category-description {
    font-size: 1.05rem;
    color: #666;
    line-height: 1.6;
    max-height: 90px; /* Limit height to prevent excessive text */
    overflow: hidden;
    text-overflow: ellipsis;
}


/* --- 메뉴 아이템 목록 (item_list.php) --- */
.menu-items-section h2 {
    color: #333;
    font-family: 'Noto Sans KR', sans-serif;
    margin-bottom: 20px;
}

.menu-items-section p {
    color: #555;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
}

.menu-item-grid {
    display: grid;
    /* PC에서는 3열, 각 열은 동일한 너비를 가집니다. */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    justify-content: center;
}

.menu-item {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.menu-item a {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.item-thumbnail {
    width: 100%;
    height: 300px; /* 고정된 높이 유지 */
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 이미지가 잘리더라도 영역을 채웁니다. */
    transition: transform 0.3s ease;
}

.menu-item:hover .item-thumbnail img {
    transform: scale(1.05);
}

.no-image-placeholder {
    text-align: center;
    color: #bbb;
    font-size: 0.9em;
}
.no-image-placeholder i {
    font-size: 3em; /* Larger icon */
    margin-bottom: 10px;
    color: #ddd;
}

.item-content {
    padding: 20px;
    text-align: center;
}

.item-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Noto Sans KR', sans-serif;
    white-space: nowrap; /* 제목이 한 줄에 표시되도록 합니다. */
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-description {
    font-size: 0.95rem;
    color: #777;
    line-height: 1.5;
    max-height: 60px; /* Limit height for description snippet */
    overflow: hidden;
    text-overflow: ellipsis;
}

.back-to-categories-btn {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
    margin-top: 20px;
}

.back-to-categories-btn:hover {
    background-color: #0056b3;
}

/* --- 메뉴 아이템 상세 (item_detail.php) --- */
.item-detail-section {
    padding-top: 20px;
    padding-bottom: 40px;
}

.item-detail-section h2 {
    font-family: 'Noto Sans KR', sans-serif;
    margin-bottom: 30px;
}

.image-gallery {
    position: relative;
    width: 100%;
    max-width: 900px; /* 갤러리 최대 너비 */
    margin: 20px auto 40px auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.gallery-slides {
    display: flex;
    transition: transform 0.6s ease-in-out;
}
.gallery-slides img {
    width: 100%;
    height: 600px; /* 이미지 슬라이더의 고정 높이 */
    flex-shrink: 0;
    object-fit: contain; /* 이미지가 잘리지 않고 전체가 보이도록 합니다. 필요시 주변에 여백이 생길 수 있습니다. */
    background-color: #f0f0f0; /* 이미지가 contain 될 때 배경색 */
    display: block; /* Remove extra space below image */
}
.gallery-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.6);
    color: white;
    border: none;
    padding: 15px 18px;
    cursor: pointer;
    font-size: 1.8em;
    z-index: 10;
    border-radius: 50%; /* Circular buttons */
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-nav button:hover {
    background-color: rgba(0,0,0,0.8);
}
.gallery-nav .prev {
    left: 20px;
}
.gallery-nav .next {
    right: 20px;
}
.gallery-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    background-color: rgba(0,0,0,0.4);
    padding: 8px 15px;
    border-radius: 20px;
}
.gallery-dots .dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}
.gallery-dots .dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

.item-detail-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

.item-description-full {
    line-height: 2.0;
    color: #444;
    font-size: 1.15rem;
    white-space: pre-wrap; /* Preserve line breaks from textarea */
    font-family: 'Noto Sans KR', sans-serif;
}

.no-image-placeholder-detail {
    text-align: center;
    padding: 60px;
    background-color: #f8f8f8;
    border-radius: 12px;
    color: #aaa;
    font-size: 1.3em;
    margin: 20px auto 40px auto;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}
.no-image-placeholder-detail i {
    display: block;
    margin-bottom: 20px;
    color: #ccc;
}

.back-btn-container {
    margin-top: 60px;
}

.item-content .item-price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #c0392b; /* 가격에 어울리는 색상 */
  margin-top: 5px;
}

/* 모바일 반응형 */
@media (max-width: 992px) { /* PC 3열을 위해 이 breakpoint를 조금 더 넓게 조정 */
    .category-grid, .menu-item-grid {
        grid-template-columns: repeat(2, 1fr); /* 태블릿에서는 2열 */
    }
}

@media (max-width: 768px) {
    .cafe-menu-container {
        padding: 30px 15px;
    }

    .category-grid, .menu-item-grid {
        grid-template-columns: 1fr; /* 모바일에서는 1열 */
    }

    .category-item, .menu-item {
        margin: 0 auto;
        max-width: 350px; /* Constrain width on mobile */
    }

    .category-title {
        font-size: 1.5rem;
    }

    .item-thumbnail {
        height: 180px;
    }
    .item-title {
        font-size: 1.4rem;
    }
    .item-description {
        font-size: 0.9rem;
    }

    .image-gallery {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }
    .gallery-slides img {
        height: 300px; /* Shorter height for mobile */
    }
    .gallery-nav button {
        padding: 10px 12px;
        font-size: 1.2em;
    }
    .gallery-nav .prev {
        left: 10px;
    }
    .gallery-nav .next {
        right: 10px;
    }
    .gallery-dots {
        bottom: 10px;
        padding: 5px 10px;
    }
    .item-detail-section h2 {
        font-size: 2rem;
    }
    .item-detail-content {
        padding: 25px;
    }
    .item-description-full {
        font-size: 1rem;
        line-height: 1.7;
    }
}

/* 폰트 임포트는 today-menu.css 또는 parts/head 에 추가하는 것이 더 적합합니다. */
/* @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap'); */
/* @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap'); */
/* Font Awesome CDN */
/* @import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css'); */