@charset "UTF-8";

/* ==========================================================================
   Coffee Bean Exploration Service - Design System
   Description: Premium & Intuitive UI for coffee lovers
   Author: Antigravity
   ========================================================================== */

@font-face {
    font-family: 'Pretendard';
    src: url('../../fonts/Pretendard-Thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../../fonts/Pretendard-ExtraLight.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../../fonts/Pretendard-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../../fonts/Pretendard-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../../fonts/Pretendard-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../../fonts/Pretendard-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../../fonts/Pretendard-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../../fonts/Pretendard-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../../fonts/Pretendard-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

/* 1. Root Variables & Reset */
:root {
    /* Color Palette */
    --primary-brown: #8B5A3C;
    --light-brown: #D4A574;
    --accent-orange: #E6A756;
    --bg-cream: #FAF7F2;
    --text-dark: #3E2723;
    --text-gray: #757575;
    --surface-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Pretendard', sans-serif;
    --font-body: 'Pretendard', sans-serif;
    --font-serif: 'Pretendard', serif;
    /* Changed to Pretendard as per request to apply Pretendard fonts */
    /* Premium feel for bean names */

    /* Spacing & Borders */
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition-base: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.serif-text {
    font-family: var(--font-serif);
}

/* 3. Hero Section - Replaced by Swiper Carousel in main.jsp, but reused for roasteryDetail */
#roasteryDetailHeader .hero-coffee {
    position: relative;
    width: 100%;
    height: 13rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    border-radius: 4px;
    color: white;
}

#roasteryDetailHeader .hero-coffee::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-image: var(--hero-bg, none);
    background-size: 100% 100%;
    opacity: 0.8;
    border-radius: 4px;
    /* 이미지 오퍼시티 0.8 적용 */
    z-index: 1;
}

/* Overlay to darken background for even better text contrast */
#roasteryDetailHeader .hero-coffee::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    z-index: 2;
}

#roasteryDetailHeader .hero-coffee .container {
    position: relative;
    z-index: 3;
    padding: 0 20px;
}

#roasteryDetailHeader .hero-coffee h1,
#roasteryDetailHeader .hero-coffee p,
#roasteryDetailHeader .hero-coffee span {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* 글씨가 잘 보이게 효과 추가 */
}

#roasteryDetailHeader .hero-coffee h1 {
    color: white;
}

#roasteryDetailHeader .hero-coffee p {
    color: rgba(255, 255, 255, 0.9);
}

#detailLoc {
    color: var(--accent-orange);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    font-size: 1.4rem;
}

#detailName {
    font-size: 3.0rem;
    margin-bottom: 0px;
}

#detailDesc {
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* 4. Quick Filter Bar */
.filter-bar {
    background: var(--surface-white);
    padding: 12px 0;
    position: sticky;
    top: 60px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.filter-content {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.chip {
    padding: 8px 20px;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-base);
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.chip:hover {
    color: var(--primary-brown);
    border-bottom-color: var(--light-brown);
    text-decoration: none;
}

.chip.active {
    color: var(--primary-brown);
    border-bottom-color: var(--primary-brown);
    font-weight: 600;
    border-bottom-width: medium;
}

/* 5. Bean Cards & List */
.list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 60px;
    width: 100%;
    /* 너비를 명시적으로 100%로 설정 */
}

.bean-list-item {
    background: var(--surface-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: stretch;
    min-height: 160px;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
    /* 패딩과 테두리를 너비에 포함 */
}

.bean-list-item:hover {
    transform: translateY(-4px);
    /* 가로 이동보다 세로 이동이 리스트 정렬에 더 안정적 */
    box-shadow: var(--shadow-md);
}

.list-img-wrapper {
    width: 160px;
    min-width: 160px;
    position: relative;
    /* 자식 요소 절대 배치를 위해 추가 */
    overflow: hidden;
    background: #eee;
    flex-shrink: 0;
}

.list-img-wrapper img {
    position: absolute;
    /* 사파리 높이 계산 버그 방지 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.list-content {
    padding: 12px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    /* flex 자식 요소의 오버플로우 방지 */
}

.list-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.list-main-info {
    flex-grow: 1;
}

.list-side-info {
    text-align: right;
    min-width: 120px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 60px;
}

.bean-card {
    background: var(--surface-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.bean-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.card-img-wrapper {
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #eee;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 16px;
}

.roastery-name {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 4px;
}

.bean-name {
    font-size: 1.25rem;
    margin-bottom: 6px;
    color: var(--primary-brown);
}

.flavor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    color: var(--text-gray);
}

/* 6. Radar Chart Placeholder */
.radar-chart {
    width: 100px;
    height: 100px;
    margin: 10px 0;
    position: relative;
    background: radial-gradient(circle, #f9f9f9 0%, #eee 100%);
    clip-path: polygon(50% 0%, 100% 38%, 81% 91%, 19% 91%, 0% 38%);
}

/* 7. Buttons */
.btn-coffee {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-base);
    text-decoration: none;
    display: inline-block;
}

.btn-coffee-primary {
    background: var(--accent-orange);
    color: white;
}

.btn-coffee-primary:hover {
    background: #d49646;
    filter: brightness(1.1);
}

/* 8. Header & Navigation */
.header {
    background: var(--surface-white);
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo h1 a {
    color: var(--primary-brown);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--light-brown);
    border-radius: 50px;
    padding: 2px 5px 2px 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    min-width: 250px;
    flex-shrink: 0;
}

.header-search:focus-within {
    border-color: var(--primary-brown);
    box-shadow: var(--shadow-md);
}

.header-search-input {
    border: none;
    background: transparent;
    flex-grow: 1;
    padding: 8px 0;
    font-size: 0.9rem;
    outline: none;
    color: var(--text-dark);
    min-width: 0;
}

.header-search-input::placeholder {
    color: #bbb;
}

.header-search-btn {
    background: transparent;
    border: none;
    color: var(--primary-brown);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    margin-left: 5px;
    flex-shrink: 0;
    padding: 0;
}

.header-search-btn:hover {
    color: var(--primary-brown);
    transform: scale(1.05);
}

.header-search-btn svg {
    width: 18px;
    height: 18px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-base);
}

.nav ul li a:hover {
    color: var(--accent-orange);
}

.nav ul li.active a {
    color: var(--primary-brown);
    font-weight: 700;
}

/* 9. Utility */
.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.text-center {
    text-align: center;
}

/* 10. Section Layout & Toggle */
.content-section {}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.view-toggle {
    display: flex;
    background: #eee;
    padding: 4px;
    border-radius: 20px;
}

.toggle-btn {
    padding: 6px 10px;
    border-radius: 16px;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    background: transparent;
}

.toggle-btn.active {
    background: white;
    box-shadow: var(--shadow-sm);
}

.footer {
    background: #F8F8F8;
    padding: 30px 0 20px;
    margin-top: 60px;
    border-top: 1px solid #E0E0E0;
}

.footer .container {
    max-width: 1300px;
}

/* 상단 유틸리티 메뉴 */
.footer-utility {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
    margin-bottom: 30px;
}

.utility-link {
    color: #757575;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-base);
    padding: 0 15px;
    position: relative;
    line-height: 1;
}

.utility-link:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    background-color: #ccc;
}

.utility-link:last-child {
    padding-right: 0;
}

.utility-link:hover {
    color: var(--primary-brown);
}

/* 본문 영역 */
.footer-main {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 30px;
}

/* 왼쪽: 로고 및 회사 정보 */
.footer-left {
    flex: 1;
    max-width: 500px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.footer-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-orange);
    border-radius: 50%;
    position: relative;
}

.footer-logo-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    border-right-color: transparent;
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 2px;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-orange);
}

.footer-company-info {
    margin-top: 0px;
}

.info-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.info-content {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.info-content p {
    margin: 5px 0;
}

.business-info-link {
    color: #1976D2;
    text-decoration: none;
}

.business-info-link:hover {
    text-decoration: underline;
}

/* 오른쪽: 고객센터/결제/SNS 정보 */
.footer-right {
    display: flex;
    gap: 40px;
    flex: 1;
    justify-content: flex-end;
}

.footer-column {
    min-width: 180px;
}

.column-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.column-content {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.column-content p {
    margin: 5px 0;
}

.sns-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    text-decoration: none;
    margin-bottom: 5px;
    transition: var(--transition-base);
}

.sns-link .sns-icon {
    flex-shrink: 0;
}

.sns-link:hover {
    color: var(--primary-brown);
}

/* 하단: 저작권 정보 */
.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid #E0E0E0;
    text-align: left;
}

.copyright {
    font-size: 0.8rem;
    color: #9E9E9E;
    margin: 0;
}

/* 11. Responsive Design */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 12px;
    }

    #roasteryDetailHeader .hero-coffee {
        height: 11rem;
        padding: 0;
    }

    #detailName {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    #detailLoc {
        font-size: 1.0rem;
        margin-bottom: 5px;
        font-weight: 500;
    }

    #detailDesc {
        font-size: 0.9rem;
        line-height: 1.4;
        max-width: 90%;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .bean-list-item {
        flex-direction: row !important;
        /* 가로형 유지 */
        min-height: 120px;
    }

    .list-img-wrapper {
        width: 100px !important;
        /* 이미지 크기 80% 축소 (100px -> 80px) */
        min-width: 80px !important;
        height: auto !important;
        flex-shrink: 0 !important;
    }

    .btn-coffee {
        padding: 8px 14px !important;
        /* 버튼 크기 약 80% 축소 */
        font-size: 0.85rem !important;
        min-width: 80px;
    }

    .list-content {
        padding: 12px !important;
    }

    .list-info-header {
        margin-bottom: 5px;
    }

    .bean-name {
        font-size: 1rem;
        /* 글자 크기 축소 */
    }

    .roastery-name {
        font-size: 0.75rem;
        margin-bottom: 0px;
    }

    .list-side-info {
        min-width: 80px;
    }

    .tag {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    /* Filter Bar 모바일 대응 */
    .filter-bar {
        top: 50px;
        padding: 10px 0;
    }

    .filter-content {
        gap: 8px;
        justify-content: center;
    }

    .chip {
        font-size: 0.85rem;
        padding: 6px 16px;
    }

    /* Header Search 모바일 대응 */
    .header-search {
        min-width: 200px;
    }

    .header-search-input {
        font-size: 0.85rem;
        padding: 6px 0;
    }

    .header-search-btn {
        width: 28px;
        height: 28px;
    }

    .header-search-btn svg {
        width: 16px;
        height: 16px;
    }

    .search-modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }

    .search-modal-content h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .search-modal-input {
        font-size: 0.9rem;
        padding: 10px 0;
    }

    .search-modal-submit {
        width: 36px;
        height: 36px;
    }

    /* Footer 모바일 대응 */
    .footer {
        margin-top: 24px;
    }

    .footer-utility {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .footer-main {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 20px;
    }

    .footer-left {
        max-width: 100%;
    }

    .footer-right {
        flex-direction: column;
        gap: 25px;
        justify-content: flex-start;
    }

    .footer-column {
        min-width: 100%;
    }

    .footer-bottom {
        text-align: center;
    }

}

/* 12. New Main Layout (Sidebar + Content) */
.main-layout {
    display: flex;
    gap: 20px;
    /* 사이드바와 컨텐츠 사이 간격 */
    padding-top: 24px;
    align-items: flex-start;
}

/* Sidebar Styles */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 140px;
    background: transparent;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--text-dark);
}

.sidebar-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.reset-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.sidebar-section {}

.sidebar-section h4 {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* Sidebar Search */
.sidebar-search {
    margin-bottom: 20px;
    padding: 0 5px;
}

.search-wrap {
    display: flex;
    align-items: center;
    background: var(--surface-white);
    border: 1.5px solid var(--light-brown);
    border-radius: 50px;
    padding: 2px 5px 2px 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.search-wrap:focus-within {
    border-color: var(--primary-brown);
    box-shadow: var(--shadow-md);
}

.search-input {
    border: none;
    background: transparent;
    flex-grow: 1;
    padding: 8px 0;
    font-size: 0.9rem;
    outline: none;
    color: var(--text-dark);
    min-width: 0;
}

.search-input::placeholder {
    color: #bbb;
}

.search-submit {
    background: var(--primary-brown);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    margin-left: 5px;
    flex-shrink: 0;
}

.search-submit:hover {
    background: var(--text-dark);
    transform: scale(1.05);
}

/* Custom Checkbox */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    user-select: none;
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    margin-right: 10px;
    display: inline-block;
    position: relative;
    border-radius: 2px;
    background: white;
}

.custom-checkbox input:checked+.checkmark {
    background: var(--text-dark);
    border-color: var(--text-dark);
}

.custom-checkbox input:checked+.checkmark:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Flavor Pills (Half Circle Visual) */
.flavor-pills {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flavor-pill {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.flavor-pill input {
    margin-right: 8px;
    /* 임시 */
    accent-color: var(--text-dark);
}

/* Filter Apply Button */
.apply-filter-btn {
    width: 100%;
    padding: 12px;
    background: var(--text-dark);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition-base);
}

.apply-filter-btn:hover {
    background: var(--primary-brown);
}

/* Pagination Styles */
.pagination-btn-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 0px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    background: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    background: var(--bg-cream);
    border-color: var(--light-brown);
    color: var(--primary-brown);
}

.page-btn.active {
    background: var(--primary-brown);
    border-color: var(--primary-brown);
    color: white;
    font-weight: 600;
}

.apply-filter-btn:hover {
    background: #222;
}

/* Content Area */
.content-area {
    flex-grow: 1;
    min-width: 0;
    /* Flexbox overflow fix */
}

/* Right Sidebar (AdSense) */
.sub-sidebar {
    width: 160px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sub-sidebar-content {
    width: 100%;
    min-height: 600px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sub-sidebar-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile Responsive for Ad Sidebar */
@media (max-width: 1024px) {
    .sub-sidebar {
        display: none;
    }
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-count {
    font-weight: 600;
    font-size: 1.1rem;
}

.mobile-filter-toggle {
    display: none;
    /* Desktop hidden */
    background: none;
    border: 1px solid #ccc;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Sidebar Collapsible */
.collapsible-section {
    /* margin-bottom handled by sidebar-section */
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 0;
    user-select: none;
    transition: color 0.3s ease;
}

.collapsible-header:hover {
    color: var(--primary-brown);
}

.collapsible-header h3 {
    margin: 0;
    font-size: 1.1rem;
    /* Match previous h3 size if needed, or sidebar-header h3 is 1.1rem */
}

.toggle-icon {
    font-size: 0.8rem;
    color: var(--text-gray);
    transition: transform 0.3s ease;
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Pagination Button Wrapper */
.pagination-btn-wrapper .btn-coffee:hover {
    background-color: #f0f0f0 !important;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Content blur when sidebar is open */
.content-area.blurred,
.list-container.blurred,
.bean-list-item.blurred {
    filter: blur(3px);
    pointer-events: none;
    transition: filter 0.3s ease;
}

/* 13. Additional Responsive Updates for Sidebar */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        display: block;
        /* Changed from display: none to display: block for animation */
        position: fixed;
        top: 0;
        left: -100%;
        /* Start off-screen */
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: white;
        z-index: 1000;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        transition: left 0.3s ease;
        /* Smooth slide animation */
    }

    .sidebar.active {
        left: 0;
        /* Slide in from left */
    }

    .mobile-filter-toggle {
        display: inline-block;
    }

    .content-area {
        width: 100%;
    }

    .main-layout {
        padding-top: 16px;
    }

    .list-container {
        margin-bottom: 30px;
    }
}

/* 14. Flavor Wheel Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.flavor-modal-content {
    background: var(--surface-white);
    padding: 30px;
    border-radius: 24px;
    position: relative;
    width: 95%;
    max-width: 900px;
    /* 세분화된 휠을 위해 크기 확대 (780px -> 900px) */
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.4s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    background: #f5f5f5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-base);
    z-index: 10;
}

.modal-close:hover {
    background: #ddd;
}

.flavor-wheel-container {
    width: 100%;
    aspect-ratio: 1;
    max-width: 750px;
    /* 세분화된 휠을 위해 크기 확대 (650px -> 750px) */
    margin: 0 auto;
    position: relative;
}

/* Flavor Wheel SVG Styles */
.wheel-segment {
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
    stroke: #fff;
    stroke-width: 1;
}

.wheel-segment:hover {
    filter: brightness(1.2);
}

.wheel-text {
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    fill: #333;
    user-select: none;
}

.wheel-center-text {
    font-size: 16px;
    font-weight: 700;
    fill: var(--primary-brown);
}

.flavor-hint {
    margin-top: 15px;
    color: var(--text-gray);
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .flavor-modal-content {
        padding: 40px 15px 20px 15px;
    }

    .wheel-text {
        font-size: 8px;
    }

    .flavor-modal-content h2 {
        font-size: 1.2rem;
    }
}

/* Hero Carousel specific styles override */
.main-hero-swiper {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    height: 190px;
    /* Adjust height as needed */
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    /* Optional: smooth corners like other containers */
}

.main-hero-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    height: 100%;
}

.swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    /* Dark overlay for text readability */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.0rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 배너 로딩 인디케이터 */
.banner-loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.banner-loading-indicator p {
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 500;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
    width: 10px;
    height: 10px;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--accent-orange);
}

.swiper-button-next,
.swiper-button-prev {
    color: #ccc;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: bold;
}

/* 15. Notice List Styles */
.notice-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.notice-search-form {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
    gap: 10px;
}

.notice-search-input {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    width: 300px;
    font-family: var(--font-body);
}

/* Desktop Table */
.notice-table-desktop {
    width: 100%;
    border-collapse: collapse;
}

.notice-table-desktop thead tr {
    border-bottom: 2px solid var(--primary-brown);
}

.notice-table-desktop th {
    padding: 15px 10px;
    text-align: center;
    color: var(--primary-brown);
    font-weight: 600;
}

.notice-table-desktop th:nth-child(1) {
    width: 80px;
}

.notice-table-desktop th:nth-child(3) {
    width: 120px;
}

.notice-table-desktop th:nth-child(4) {
    width: 80px;
}

.notice-table-desktop th:nth-child(2) {
    text-align: left;
}

.notice-table-desktop tbody tr {
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.notice-table-desktop tbody tr:hover {
    background: #faf7f2;
}

.notice-table-desktop td {
    padding: 20px 10px;
}

.notice-table-desktop td:nth-child(2) {
    text-align: left;
}

.notice-table-desktop td:nth-child(3),
.notice-table-desktop td:nth-child(4) {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Mobile Card List */
.notice-card-list {
    display: none;
}

.notice-card-item {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.notice-card-item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.notice-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.notice-card-badge {
    background: var(--accent-orange);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.notice-card-number {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.notice-card-title {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.notice-card-title .important-dot {
    color: red;
    font-size: 0.7rem;
    margin-left: 5px;
}

.notice-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* Mobile Responsive for Notice */
@media (max-width: 768px) {
    .notice-container {
        padding: 16px;
    }

    .notice-search-form {
        flex-direction: column;
        gap: 10px;
    }

    .notice-search-input {
        width: 100%;
    }

    .notice-table-desktop {
        display: none;
    }

    .notice-card-list {
        display: block;
    }
}

/* 16. Roastery List Styles (Mobile) */
.roastery-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 60px;
    width: 100%;
}

.roastery-list-item {
    background: var(--surface-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: stretch;
    min-height: 160px;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
}

.roastery-list-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.roastery-list-img-wrapper {
    width: 160px;
    min-width: 160px;
    position: relative;
    overflow: hidden;
    background: #eee;
    flex-shrink: 0;
}

.roastery-list-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.roastery-list-content {
    padding: 12px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.roastery-list-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.roastery-list-main-info {
    flex-grow: 1;
}

/* Mobile Responsive for Roastery List */
@media (max-width: 768px) {
    .roastery-list-item {
        flex-direction: row !important;
        min-height: 120px;
    }

    .roastery-list-img-wrapper {
        width: 100px !important;
        min-width: 100px !important;
        height: auto !important;
        flex-shrink: 0 !important;
    }

    .roastery-list-content {
        padding: 12px 14px !important;
    }

    .roastery-list-info-header {
        margin-bottom: 5px;
    }

    .roastery-list-main-info .bean-name {
        font-size: 1rem;
    }
}

/* 13. About Page Styles */
.about-hero-text {
    text-align: center;
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
}

.about-hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-brown);
    margin-bottom: 24px;
    line-height: 1.3;
}

.about-hero-desc {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 0;
}

.about-section {
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.about-section:last-child {
    border-bottom: none;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.about-content p {
    font-size: 1.05rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 20px;
}

.highlight-span {
    color: var(--accent-orange);
    font-weight: 600;
}

.about-quote {
    background-color: var(--bg-cream);
    padding: 30px 40px;
    text-align: center;
    border-radius: var(--radius-lg);
    margin: 30px 0;
}

.about-quote h3 {
    color: var(--primary-brown);
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.about-quote p {
    font-size: 1.1rem;
    color: var(--text-dark);
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-hero-title {
        font-size: 2rem;
    }
}

/* 12. Contact Modal */
.contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background-color: var(--surface-white);
    width: 500px;
    max-width: 90%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background-color: var(--primary-brown);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    resize: vertical;
    /* Allow vertical resize only for textarea */
}

.form-control:focus {
    border-color: var(--primary-brown);
    outline: none;
}

.modal-footer {
    padding: 15px 20px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eee;
}

.btn-cancel {
    padding: 8px 16px;
    background-color: #e0e0e0;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 500;
}

.btn-send {
    padding: 8px 16px;
    background-color: var(--accent-orange);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: white;
    font-weight: 600;
}

.btn-send:hover {
    background-color: #d49646;
}

.btn-cancel:hover {
    background-color: #bdbdbd;
}

.mail-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}