@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 400;
  src: local('Noto Sans KR'), local('NotoSansKR-Regular'),
       url('/fonts/NotoSansKR-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 500;
  src: local('Noto Sans KR Medium'), local('NotoSansKR-Medium'),
       url('/fonts/NotoSansKR-Medium.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans KR';
  font-style: normal;
  font-weight: 700;
  src: local('Noto Sans KR Bold'), local('NotoSansKR-Bold'),
       url('/fonts/NotoSansKR-Bold.ttf') format('truetype');
  font-display: swap;
}

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

:root {
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --background-color: #F5F5F5;
    --text-color: #333;
    --card-bg-color: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --toast-bg-color: rgba(0, 0, 0, 0.8);
    --transition-speed: 0.3s;
}

/* 모바일 메뉴 관련 스타일 */
.mobile-menu-toggle {
    display: none; /* 기본적으로 숨김 */
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-color);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    padding: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle img {
    width: 24px;
    height: 24px;
    display: block;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9990;
}

.mobile-nav {
    display: block;
    position: fixed;
    top: 0;
    left: -280px;
    width: 270px;
    height: 100vh;
    background-color: white;
    z-index: 9999;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    visibility: hidden;
}

.mobile-nav.open {
    left: 0;
    visibility: visible;
}

.close-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu img {
    width: 24px;
    height: 24px;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
    padding: 0;
    list-style: none;
}

.mobile-nav .nav-link {
    font-size: 18px;
    padding: 12px 0;
    display: block;
    border-bottom: 1px solid #eee;
}

html {
    scroll-behavior: smooth;
}

html.page-loaded .fade-in {
    /* 애니메이션 제거 - 항상 표시 상태 유지 */
    opacity: 1;
    transform: translateY(0);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

/* 부드러운 로드 애니메이션 - 제거됨 (성능 최적화) */
.fade-in {
    /* 애니메이션 제거 - 즉시 표시 */
    opacity: 1;
    transform: translateY(0);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

img {
    max-width: 100%;
    height: auto;
}

.main-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 0px;
}

/* 헤더 섹션 */
.header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
    background-color: var(--card-bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
    will-change: transform; /* 스크롤 성능 최적화 */
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
    color: #e74c3c;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e74c3c;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f8f8;
    border-radius: 20px;
    padding: 8px 16px;
    width: 300px;
    border: 1px solid #e0e0e0;
}

.search-icon img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 100%;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 5;
}

.action-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-item:hover {
    transform: translateY(-2px);
}

.action-item img {
    width: 24px;
    height: 24px;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 메인 컨텐츠 영역 */
.container {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    contain: content;
}

/* 사이드바 */
.sidebar {
    width: 250px;
    margin-right: 20px;
}

.sidebar-section {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-item {
    padding: 6px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.filter-item:hover {
    background-color: #f9f9f9;
}

.checkbox-container, .radio-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-container input, .radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.radio-mark {
    position: absolute;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
}

.checkbox-container:hover .checkmark, .radio-container:hover .radio-mark {
    border-color: #e74c3c;
}

.checkbox-container input:checked ~ .checkmark, .radio-container input:checked ~ .radio-mark {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-mark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after, .radio-container input:checked ~ .radio-mark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.radio-container .radio-mark:after {
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.category-list li a {
    display: block;
    padding: 8px 14px;
    border-radius: 6px;
    color: #333;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, font-weight 0.15s;
}
.category-list li a.active,
.category-list li a:focus {
    background: #fbeee0;
    color: #e67e22;
    font-weight: 700;
}
.category-list li a:hover {
    background: #f8f4ed;
}

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    contain: content; /* 성능 최적화 */
}

section {
    /* 애니메이션 제거 - 즉시 표시 (성능 최적화) */
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 30px;
}

html.page-loaded section {
    /* 애니메이션 제거 - 항상 표시 상태 유지 */
    opacity: 1;
    transform: translateY(0);
}

/* 배너 섹션 */
.banner-section {
    width: 100%;
    margin-bottom: 30px;
    contain: content;
}

/* 섹션 헤더 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    position: relative;
    padding-left: 12px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 4px;
    background-color: #e74c3c;
    border-radius: 2px;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.see-all {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
    transition: color 0.2s;
}

.see-all:hover {
    color: #e74c3c;
}

.see-all img {
    width: 16px;
    height: 16px;
}

.product-card {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}

.discount-badge.new {
    background-color: #3498db;
}

.ranking-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #f39c12;
    color: white;
    font-size: 16px;
    font-weight: 700;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.product-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%;
    overflow: hidden;
    background-color: #f9f9f9;
    background-size: cover;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* max-width: 90%;
    max-height: 90%; */
    width: 96%;
    height: 96%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.category-tag {
    font-size: 11px;
    color: #777;
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 3px;
    width: fit-content;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 36px;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.price {
    font-size: 15px;
    font-weight: 700;
}

.discount-amount {
    font-size: 15px;
    font-weight: 700;
    color: #e74c3c;
}

.date-info {
    font-size: 12px;
    color: #666;
    background-color: #f9f9f9;
    padding: 3px 6px;
    border-radius: 3px;
    width: fit-content;
    margin-top: 3px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}


.extra-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

/* 휴무일 섹션 */
.holiday-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.prev-month, .next-month {
    background: none;
    font-size: 14px;
    color: #666;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.prev-month:hover, .next-month:hover {
    background-color: #f0f0f0;
    color: #333;
}

.current-month {
    font-size: 16px;
    font-weight: 500;
}

.calendar {
    margin-bottom: 15px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
}

.weekday {
    font-size: 12px;
    color: #666;
    padding: 5px 0;
}

.weekday:first-child {
    color: #e74c3c;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-gap: 5px;
}

.day {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.day:hover:not(.empty) {
    background-color: #f5f5f5;
    cursor: pointer;
}

.day.empty {
    background: none;
}

.day.current {
    background-color: #e0f7fa;
    color: #00acc1;
    font-weight: 500;
}

.day.holiday {
    background-color: #ffebee;
    color: #e74c3c;
    font-weight: 500;
}

.holiday-info {
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.holiday-info p {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.holiday-info p:nth-child(2) {
    color: #e74c3c;
    font-weight: 500;
}

/* 푸터 */
.footer-section {
    background-color: #2d3436;
    color: #f5f5f5;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-div {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 0 20px;
}

.footer-column h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column a {
    color: #b2bec3;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: #FFFFFF;
}

.footer-column p {
    color: #b2bec3;
    font-size: 14px;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.2s;
}

.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.newsletter {
    display: flex;
    gap: 8px;
}

.newsletter-input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    outline: none;
    padding: 10px 15px;
    color: white;
    border-radius: 4px;
    font-size: 14px;
}

.newsletter-button {
    background-color: #e74c3c;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.newsletter-button:hover {
    background-color: #c0392b;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
}

.footer-bottom p {
    color: #b2bec3;
    font-size: 13px;
}

.disclaimer {
    margin-top: 5px;
    font-size: 12px;
    color: #95a5a6;
}

/* 토스트 메시지 스타일 */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.toast {
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
    display: flex;
    align-items: center;
    max-width: 80vw;
    min-width: 250px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background-color: #4CAF50;
}

.toast-error {
    background-color: #F44336;
}

.toast-info {
    background-color: #2196F3;
}

.toast-warning {
    background-color: #FF9800;
}

.toast-icon {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.toast-message {
    flex: 1;
    word-break: break-word;
}

/* 반응형 미디어 쿼리 */
@media (max-width: 1024px) {
    .container {
        max-width: 96%;
        padding: 15px;
    }
    
    .header-section {
        padding: 15px 20px;
    }
    
    .search-bar {
        width: 250px;
    }
    
    .product-card {
        width: calc(33.33% - 15px);
    }
    
    .sidebar {
        width: 220px;
    }

    /* 헤더 관련 스타일 */
    .header-section {
        position: relative;
        align-items: center;
        justify-content: center;
        padding: 15px 20px;
        min-height: 60px;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .logo {
        margin: 0 auto;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .mobile-nav.open {
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }
    
    body.nav-open {
        overflow: hidden;
    }
    
    .user-actions {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        display: flex;
        align-items: center;
    }
    
    .action-item {
        width: 40px;
        height: 40px;
        padding: 8px;
        margin: 0;
    }
    
    .search-bar {
        display: none;
    }
    
    /* 레이아웃 관련 스타일 */
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .main-content {
        width: 100% !important;
    }
    
    .holiday-container {
        flex-direction: column;
    }
    
    .calendar {
        width: 100%;
    }
    
    .holiday-info {
        width: 100%;
    }
    
    .footer-section {
        padding: 30px 15px;
    }
    
    .footer-div {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-column {
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    /* 메인 콘텐츠 */
    .main-content {
        gap: 10px;
    }
    .header-section {
        padding: 10px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .product-card {
        width: 100%;
        margin-bottom: 8px;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
    
    .product-card .product-image {
        width: 100px;
        height: 100px;
        min-width: 100px;
        padding-bottom: 0;
        margin-right: 12px;
        border-radius: 6px;
    }
    
    .product-card .product-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .product-card .product-info {
        flex: 1;
        padding: 8px 8px 8px 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }
    
    .product-card .category-tag {
        display: none;
    }
    
    .product-card .price-container {
        margin: 2px 0;
    }
    
    .product-card:hover .product-image {
        transform: none;
    }
    
    .product-card .product-name {
        font-size: 14px;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        max-width: 100% !important;
        height: auto !important;
        margin-bottom: 0;
    }
    
    .price {
        font-size: 16px;
    }
    
    .discount-badge, .ranking-badge {
        font-size: 10px;
        padding: 2px 5px;
        top: 5px;
        left: 5px;
    }
    
    .ranking-badge {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
    
    .date-info {
        font-size: 11px;
        margin-top: 2px;
    }
    
    .action-buttons {
        margin-top: 3px;
        gap: 8px;
    }
    
    .category-shortcuts {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .toast {
        width: calc(100% - 20px);
        left: 10px;
    }
    
    .popular-product-grid,
    .discount-grid,
    .bookmark-grid {
        gap: 8px;
    }
}

/* 모바일 메뉴 관련 스타일 */
