/* 헤더 */
#top-placeholder, .sticky-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 9999;
    transition: top 0.3s;
    background-color: white;
}

/* 공통 */
body {
    font-family: Arial, sans-serif;
    margin: 0px;
}
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    padding-bottom: 0;
}

.head-logo {
    justify-content: flex-start; /* 좌측 정렬 */
}


.head-logo {
    display: flex;
    justify-content: center; /* 중앙 정렬 */
}

.head-logo img {
    max-width: 100%;
    max-height: 40px;
}

.menu button.selected {
    background-color:#f7bd29;
    color: white;
    font-weight: bold;
    display: inline-block;
    border-radius: 8px;
}

.header-right {
    display: flex;
    justify-content: flex-end; /* 우측 정렬 */
    align-items: center; /* 수직 중앙 정렬 */
    gap: 5px; /* 아이템 간의 간격 조정 */
}
.favorite-page-button-container {
    margin-right: 0px;
}   
button#favorite-page-button {
    border: 0;
    
    background-color: white;
    cursor: pointer;
    max-width: 50px;
    
}

.search-container, .favorite-page-button-container, .hamburger-menu-container {
    display: flex;
    align-items: center;
}

.search-icon , .favorite-page-button, .hamburger-menu {
    color: #333333;
}


.hamburger-menu, .search-icon {
    margin: 0; /* 불필요한 마진 제거 */
    padding: 0; /* 불필요한 패딩 제거 */
}


.search-icon {
    cursor: pointer;
    
    
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    width: 200px;
    padding: 5px;
    margin-right: 10px;
}

.search-bar button {
    padding: 5px 10px;
}


.hamburger-menu {

   
    background: none;
    border: none;
    cursor: pointer;
    z-index: 9999;

}

.close-menu {
    position: absolute;
    top: 10px;
    right: 0px;
    font-size: 30px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: none; /* 기본적으로 숨김 */
}

.slide-menu {
    position: fixed;
    top: 0;
    right: -300px; /* 초기 위치: 화면 밖 */
    width: 250px;
    height: 100%;
    background-color: #333;
    color: white;
    transition: right 0.3s ease;
    z-index: 999999;
    padding: 20px;
}

.slide-menu ul {
    list-style: none;
    padding: 0;
}

.slide-menu li {
    margin: 15px 0;
}

.slide-menu a {
    color: white;
    text-decoration: none;
}

.menu {
    display: flex;
    overflow-x: auto; /* 수평 스크롤 가능 */
    white-space: nowrap; /* 줄바꿈 방지 */
    -webkit-overflow-scrolling: touch; /* 부드러운 스크롤 */
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 1000;
    padding: 10px 0;
    justify-content: center; /* 중앙 정렬 */
    transition: top 0.3s; /* 부드러운 전환 효과 */
    padding-top: 0;
}

.menu button {
    flex: 0 0 auto; /* 버튼이 줄바꿈되지 않도록 설정 */
    margin-right: 10px;
    padding: 10px 20px;
    cursor: pointer;
    border: none; /* 기본 테두리 제거 */
    background-color: #f0f0f0; /* 배경색 설정 */
    border-radius: 8px; /* 모서리 둥글게 */
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 그림자 추가 */ 
}
.top-banner-coupang-search {
    display: contents;
}

.Product-coupang-search {
    display: block;
    
    background-color: #FFC107;
    padding: 20px;
}


.top-banner {
    /* display: flex
; */
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px;
    /* height: 90px; */
    background-color: #f7bd29;
    color: white;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}
.top-banner-img {
    flex: 2;
  
  justify-content: flex-end;
}
.top-banner-img img {
    max-height: 80px;
    width: 200px;
    margin: 4px;
  }
.top-banner-update-info {
    display: none !important;
    flex: 1;
  display: flex;
  justify-content: flex-start;
  text-align: right;
    font-size: 14px;
}
.top-banner-text {
    font-size: 10px;
    position: absolute;
    right: 5px;
}


.grid-banner-container {
    display: flex;
    justify-content: center; /* 다른 상품 리스트와 유사하게 중앙 정렬 */
    align-items: flex-start; /* 상단 정렬 */
    flex-wrap: wrap; /* 공간이 부족하면 다음 줄로 넘어가도록 설정 (모바일 대응) */
    gap: 10px; /* 배너들 사이의 간격 (가로 및 세로) - product-item의 margin과 유사하게 */
    width: 100%;
    max-width: 1200px; /* 전체 컨테이너 최대 너비 (기존 max-width와 유사하게) */
    margin: 10px auto; /* 상하 여백 및 중앙 정렬 (상품 리스트와 분리감을 줍니다) */
    padding: 0 10px; /* 좌우 패딩으로 가장자리에 너무 붙지 않게 */
    box-sizing: border-box;
}

.grid-banner {
    display: flex;
    flex-direction: column; /* 내용물을 세로로 정렬 (이미지 위, 텍스트 아래) */
    justify-content: flex-start; /* 내용을 상단부터 정렬 */
    align-items: center; /* 내용물을 가로 중앙 정렬 */

    width: auto;
    /* 모바일 product-item의 width: 100%; margin: 0; padding: 0;와 유사하게 */
    /* 15px gap을 고려하여 너비 계산 (15px * 2 / 3 = 10px 정도 제외) */

    aspect-ratio: 1 / 1; /* 정사각형 비율 유지 (핵심!) */

    border: 1px solid #ddd; /* 회색 경계선 - product-item과 동일 */
    border-radius: 8px; /* 둥근 모서리 - product-item과 유사하게 */
    background-color: #fff; /* 배경색 - product-item과 동일 */
    box-shadow: 1px 1px 5px rgba(0,0,0,0.1); /* 은은한 그림자 - product-item과 동일 */
    overflow: hidden; /* 내용이 넘치면 숨김 */
    padding: 15px; /* 내부 여백 - product-item과 동일 */
    box-sizing: border-box; /* 패딩이 너비에 포함되도록 */

    text-decoration: none; /* 링크 밑줄 제거 */
    color: inherit; /* 링크 색상 기본값 상속 */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* 호버 효과 추가 */
    max-height: 180px;
}

.grid-banner:hover {
    transform: translateY(-3px); /* 살짝 위로 올라가는 효과 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* 그림자 더 강조 */
}

.grid-banner a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* 링크 내부 콘텐츠 상단 정렬 */
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.grid-banner-image {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1; /* 이미지가 가능한 공간을 차지하도록 */
    width: 100%; /* 이미지 컨테이너 너비 100% */
    padding-bottom: 10px; /* 이미지와 텍스트 사이 간격 */
    max-height: 80%; /* 전체 배너 높이 대비 이미지 영역 제한 */
}

.grid-banner-image img {
    max-width: 90%; /* 이미지 자체 크기를 배너 내에서 조절 (padding 고려하여 조금 더 크게) */
    max-height: 90%; /* 이미지 자체 크기를 배너 내에서 조절 */
    width: auto; /* 비율 유지를 위해 auto */
    height: auto; /* 비율 유지를 위해 auto */
    object-fit: contain; /* 이미지가 잘리지 않고 비율에 맞게 축소 */
    /* border-radius: 10px; /* 이미지 자체도 둥근 모서리 (선택 사항) */
}

.grid-banner-text {
    font-size: 14px; /* 텍스트 크기 조절 (product-item의 텍스트 크기와 유사하게) */
    color: #333; /* 텍스트 색상 */
    text-align: center;
    line-height: 1;
    word-break: keep-all; /* 단어가 잘리지 않도록 */
    white-space: normal; /* 텍스트가 필요하면 다음 줄로 넘어가도록 */
    flex-shrink: 0; /* 텍스트가 줄어들지 않도록 */
}

/* 모바일 반응형 (기존 @media 규칙 내부에서 grid-banner 관련 부분만 수정) */
@media (max-width: 768px) {
    .grid-banner-container {
        justify-content: center; /* 모바일에서 가운데 정렬 */
        padding: 15px; /* 모바일 패딩 조정 */
        gap: 10px; /* 모바일에서 간격 조정 */
    }

    .grid-banner {
        /*
         * product-list의 모바일 반응형 (.product-list { grid-template-columns: repeat(3, 1fr); })
         * 에 맞춰서 grid-banner도 3개 또는 2개씩 한 줄에 표시되도록 합니다.
         * 이미지처럼 2개씩 한 줄에 배치하려면 width: calc(50% - gap/2);
         * 3개씩 한 줄에 배치하려면 width: calc(33.33% - gap*2/3);
         * 첨부 이미지처럼 2개씩 배치하는 것을 기본으로 합니다.
         */
        width: 31%; /* 모바일에서는 2개씩 한 줄에 (gap 고려) */
        padding: 10px; /* 모바일 내부 패딩 조정 */
        border-radius: 8px; /* 모바일 둥근 모서리 */
    }

    .grid-banner-image {
        padding-bottom: 0px; /* 모바일 이미지와 텍스트 사이 간격 줄임 */
        max-height: 60%;
    }
    

    .grid-banner-text {
        font-size: 12px; /* 모바일 텍스트 크기 조정 */
    }
}

/* 아주 작은 화면 (예: 480px 미만) 에서 1개씩 표시 - 기존 product-item과 유사하게 */
@media (max-width: 480px) {
    .grid-banner-container {
        gap: 10px; /* 간격 통일 */
        padding: 10px; /* 전체 패딩 줄임 */
    }
    .grid-banner {
        width: 31%; /* 한 줄에 1개씩 (좌우 패딩 10px씩 고려) */
        margin: 0 auto; /* 중앙 정렬 */
        padding: 12px;
    }
    
    .grid-banner-text {
        font-size: 13px; /* 더 작은 화면 텍스트 크기 */
    }
    .grid-banner-image {
        max-height: 60px;
    }
}


.info-controls-container {
    display: flex;
    justify-content: flex-end; 
    align-items: center; /* 수직 중앙 정렬 */
    width: 100%; /* 부 요소의 너비에 맞춤 */
    box-sizing: border-box; /* 패딩과 테두리를 포함하 크기 계산 */
    margin-bottom: 20px; /* 하단 여백 */
}

.date-info {
    text-align: left; /* 좌측 정렬 */
    margin: 0; /* 기본 마진 제거 */
    font-size: 16px;
    color: #555;
    display: none;
}

.controls {
    display: flex;
    justify-content: flex-end; /* 우측 정렬 */
    align-items: center;
    padding-right: 10px; /* 상품 리스트의 끝 선과 맞추기 위한 패딩 */
    gap: 5px;
}


.controls label {
    margin-right: 2px;
    margin-left: 10px;
    display: none;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* 중앙 정렬 */
}

.product-item {
    border: 1px solid #ddd;
    margin: 10px;
    padding: 15px;
    width: 220px;
    text-align: left;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
    cursor: pointer;
}

.product-item img {
    max-width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.product-detail img {
    max-width: 100%;
    height: 320px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.product-item h2 {
    font-size: 18px;
}

.product-item p {
    margin: 5px 0;
}


.product-name {
    text-align: center;
    height: 40px;
}

.product-sale-info-text {
    text-align: right;
}


.strike-through-price {
    text-decoration: line-through;
}

.net-price .price {
    font-size: 18px;
    font-weight: bold;
    color: white;
    background-color: #e12705;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
}
#product-page .net-price .price{
    color: #e12705;
    background-color: #ffffff;
}

.discount-price .price {
    background-color: #f5b000;
    color: white;
    font-weight: bold;
    padding: 2px;
    border-radius: 6px;
}

.notice, .loading, .error {
    font-size: 16px;
    color: #555;
    margin-top: 20px;
    text-align: center;
}
/*
.upcoming-label {
    position: absolute;
    color: #000000;
    font-size: 15px;
    font-weight: bold;
    text-align: right;
    background-color: #f5b000;
    padding: 0 12px;
}*/

.product-image-container {
    position: relative;
}
/* 메인 페이지 상품 카드 위 라벨 스타일 */

.upcoming-label, .sale-label,.index-sale-label,.popular-label {
    position: absolute;
    padding: 4px 8px;
    font-size: 12px; /* 원하시는 크기로 조절 */
    font-weight: bold;
    color: white;
    border-radius: 4px;
    z-index: 10; /* 이미지 위에 오도록 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* 왼쪽 상단에 위치하는 라벨 */
.upcoming-label, .sale-label,.index-sale-label{
    top: 8px;
    left: 8px;
}
/* 오른쪽 상단에 위치하는 라벨 */
.popular-label{
    top: 8px;   
    right: 8px;
}

.product-image-container {
    position: relative; /* 내부 요소 absolute 포지셔닝 기준 */
}

.upcoming-label, .sale-label{
    background-color: #dc3545;
}

.index-lowest-price {
    background-color: #dc3545; 
}

.index-max-discount {
    background-color: #dc3545; /* 예시: 빨간색 계열 */
}
.popular-label {
    background-color: #2196F3;
}
/* 상품 상세 페이지 상단 정보 내 라벨 스타일 */
.current-sale-tag, .popular-tag {
    position: absolute;
    display: inline-block;
    margin-left: 10px; /* 상품명과의 간격 */
    padding: 3px 7px;
    font-size: 0.85em; /* 상품명 대비 크기 */
    font-weight: bold;
    color: white;
    border-radius: 4px;
    vertical-align: middle; /* 상품명과 수직 정렬 */
    
}

.lowest-price-tag { /* 상세 페이지 최저가 */
    background-color: #dc3545;
}

.max-discount-tag { /* 상세 페이지 최고할인 */
    background-color: #dc3545;
}
span.popular-tag {
    right: 0;
    background-color: #2196F3;
}





a {
    color: inherit; /* 부모 요소의 색상을 상속받음 */
    text-decoration: none; /* 밑줄 제거 */
}

a:visited {
    color: inherit; /* 방문한 링크의 색상도 부모 요소의 색상을 상속받음 */
}

h1 {
    margin: 5px 0;
    font-size: 22px;
}



/* 프로덕트 페이지 */
div#subpage-header {
    display: flex;
    justify-content: space-between;
}
.back-button-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;  
}   
.back-button, .home-button, .edit-favorites-button {
    /*position: fixed;
    top: 20px;
    left: 20px;*/
    background-color: #ffffff;
    color: #000000;
    border: none;
    padding: 10px 10px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    z-index: 1000;
}

.back-button:hover, .home-button:hover {
    background-color: #f5b000;
    color: white;
}
button#edit-favorites {
    font-size: 16px;
}

div#favorite-container {
    display: flex;
    justify-content: flex-end;  
    /*position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1000;*/
}
div#favorite-container button {
    background-color: #ffffff;
    color: #d70b0b;
    border: none;
    padding: 10px 10px;
    
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    
}
/*div#favorite-container button:hover {
    background-color: #646464;
    color: white;
} */  

.product-detail {
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #ddd;
    padding: 20px;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
}


.product-name-p2 {
    text-align: center;
}
.productpage-sale-info p {
    padding-left: 20%;
    text-align: left;
}

.productpage-sale-info-text p {
    margin: 4px;
}

.past-discounts {
    margin-top: 50px;
}
#product-page h3 {
    text-align: center;
}
.past-discounts h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.past-discounts table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.past-discounts th, .past-discounts td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.past-discounts th {
    background-color: #f9f9f9;
    font-weight: bold;
}
.more-button-container {
    text-align: center;
    margin-top: 10px;
}
.more-button-container button {
    width: 70%;
    height: 40px;
    font-size: 15px;
}
.ad-banner {
    width: 100%; /* 배너의 너비를 페이지에 맞춤 */
    
   
    
    justify-content: center;
    align-items: center;
    margin-top: 20px; /* 위쪽 여백 */
    

    text-align: center;
}

.price-label {
    font-weight: bold;
}

.lowest-price-value,.max-discount-value {
    font-weight: bold;
    color: #e12705; /* 최저가 가격의 색상 */
}

.past-discounts th, .past-discounts td {
    position: relative;
}

.lowest-price-label, .max-discount-label {
    background-color: #f5b000;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
    margin-left: 5px;
    position: absolute;
    top: 55px;
    left: 49%;
    transform: translate(-50%, -50%);
}
.notification-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px 10px 0 0;
    padding: 15px 20px;
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    color: white;
    text-align: center;
    font-size: 14px;
    width: 320px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-container.show {
    transform: translate(-50%, -100px);
}

button#notification-button {
    background-color: #ffffff00;
    color: #f5b000;
    border: none;
    padding: 10px 10px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
}

.notification-message-container {
    flex-grow: 1;
    text-align: left;
}

.notification-button-container {
    flex-shrink: 0;
}

.copy-title-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    position: relative;
}

.copy-title-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 툴팁 스타일 */
.copy-title-button::after {
    content: attr(title);
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.copy-title-button:hover::after {
    opacity: 1;
}





.product-image-container {
    position: relative;
}

.delete-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    padding: 3px 6px;
    border-radius: 50%;
    font-weight: normal;
    cursor: pointer;
    display: none; /* 기본적으로 숨김 */
}

.product-item.edit-mode .delete-icon {
    display: block; /* 편집 모드에서만 표시 */
}
.product-meta-info {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    align-items: center;
    justify-content: center;
  }
  .meta-item-one {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}
  .meta-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    border: 1px solid #ddd;
    padding: 10px 20px;
    
    border-radius: 8px;
  }
  .meta-item:hover {
    color: #ffffff;
    background-color: #f5b000;
}
  .meta-icon {
    margin-right: 5px;
  }
  svg {
    margin-right: 5px;
}


/* 리뷰 섹션 스타일 */
.review-section {
    max-width: 600px;
    margin: 40px auto; /* 가운데 정렬 */
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
    background-color: #f9f9f9;
}

.review-section h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.review-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    margin-bottom: 10px;
}

.review-item:last-child {
    border-bottom: none;
}

.review-item p {
    margin: 5px 0;
    color: #555;
}

.review-item strong {
    color: #333;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-form input, .review-form select, .review-form textarea, .review-form button {
    /*width: 100%;*/
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.review-form button {
    background-color: #f7bd29;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.review-form button:hover {
    background-color: #f5b511;
}

.star-rating {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.star {
    font-size: 30px;
    color: #ddd; /* 기본 흰색 */
    cursor: pointer;
    transition: color 0.2s;
}

.star.selected {
    color: gold; /* 선택된 별은 노란색 */
}

.star-rating .star:hover {
    color: gold; /* 호버된 별은 노란색 */
}

.star-rating .star:hover ~ .star {
    color: #ddd; /* 호버되지 않은 별은 기본 색상 */
}

.review-item .star {
    cursor: default; /* 고객 리뷰의 별은 클릭 불가 */
}


/* weekly-click-trend 섹션 스타일 */
.weekly-click-trend {
    margin: 20px auto; /* 위아래 20px, 좌우 자동 (가운데 정렬) */
    padding: 20px;
    background-color: #ffffff; /* 하얀 배경 */
    border-radius: 8px; /* 모서리 둥글게 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 은은한 그림자 */
    max-width: 800px; /* 최대 너비 설정 (너무 넓어지지 않도록) */
    text-align: center; /* 내부 텍스트 가운데 정렬 */
}

.weekly-click-trend h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee; /* 제목 아래 구분선 */
    padding-bottom: 10px;
}

/* 로딩 메시지 스타일 */
.weekly-click-trend .notice {
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* 차트 캔버스 스타일 (필요하다면 추가) */
#weeklyClickChart {
    width: 100% !important; /* 부모 컨테이너에 맞춰 너비 조절 */
    height: auto !important; /* 높이 자동 조절 */
    max-height: 400px; /* 최대 높이 설정 */
}


/* 상품 내비게이션 버튼 스타일 */
.product-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.nav-button {
    background-color: #9E9E9E;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-button:hover {
    background-color: #646464;
}

.nav-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


/* 작은모니터 (최대 너비 1400px) */
@media (max-width: 1400px) {
    .menu {
        justify-content: flex-start;
    }   
    .top-banner-coupang-banner img {
        max-width: 100%;
    }
}

.top-banner-coupang-banner {
    margin-top: 10px;
}

/* 스마트폰 세로 */
@media all and (max-width: 480px) {
    .layout-three .product-item {
        max-width: 120px;
    }
    .top-banner-coupang-banner,.bottom-banner-coupang-banner {
        display: flex;
        justify-content: center;
    }
    .top-banner-coupang-banner img, .bottom-banner-coupang-banner img {
        max-width: 100%;
    }
    .top-banner {
        height: auto;
    }
    .top-banner-img {
        display: flex;
        /*flex-wrap: wrap;*/
        justify-content: center;
        gap: 10px;
        margin-bottom: 20px;
      }
      
      .top-banner-img a {
        display: block;
        width: 100%; /* 기본은 꽉 채움 (모바일용) */
      }
      
      .top-banner-img img {
        width: 100%;
        height: auto;
        display: block;
        max-height: 120px;
        object-fit: contain;
        border-radius: 8px;
      }
    
}
/* 스마트폰  */
@media all and (max-width: 767px) {

    .menu {
        justify-content: flex-start;
    }
    #content, .product-list {
        overflow-x: hidden; /* 가로 스크롤 비활성화 */  
    }
    .product-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr); 
        gap: 5px;
    }
    .product-item {
        width: 100%; 
        margin: 0;
        padding: 0;
    }
    .product-item img {
        height: 120px;
        max-width: 120px;
    }
    .layout-two .product-item img {
        height: 150px;
        max-width: 150px;
    }
    .layout-one .product-item img {
        height: 300px;
        max-width: 300px;
    }

    .product-name {
        height: 50px;
        line-height: 14px;
        max-width: 120px;
    }
    .layout-one .product-name {
        max-width: 100%;
    }
    .layout-two .product-name {
        max-width: 100%;
    }   
    
    .product-name h2 {
        font-size: 14px;
        margin: 5px;
        
    }
    .layout-three .product-name h2 {
        font-size: 14px;
        line-height: 16px;
    }
    .product-sale-info {
        padding: 5px;
    }
    .layout-two .discount-price .price {
        font-size: 13px;
    }
    .layout-three .discount-price .price {
        font-size: 12px;
    }
    
    .discount-price .price {
        font-size: 12px;
    }
    .layout-two .net-price .price {
        font-size: 15px;
    }
    .layout-three .net-price .price {
        font-size: 12px;
    }
    .net-price .price {
        font-size: 12px;
    }
    .productpage-sale-info .net-price .price {
        font-size: 16px;
    }
    .product-item p {
        margin: 2px 0;
    }
       
    p.sale-period {
        font-size: 12px;
    }
    tbody#past-discounts-body {
        font-size: 14px;
    }

    .productpage-sale-info-text {
        text-align: left;
    }

    .lowest-price-label, .max-discount-label {
        display: none;
    }
    .layout-options-container {
        display: flex !important;
    }
    
}

/* 테블릿패드  */
@media (min-width: 768px) and (max-width: 1199px) {
    .menu {
        justify-content: flex-start;
    }
    .product-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr); 
        gap: 10px;
    }
    .product-item {
        width: 100%; 
        margin: 0;
        padding: 0;
    }
    .product-item img {
        height: 150px;  
    }
    .product-sale-info {
        padding: 10px;
    }
} 
@media all and (max-width: 1199px) {
   
}

/* 맨 위로 이동 버튼 스타일 */
#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #f5b00099;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none; /* 초기에는 숨김 */
    justify-content: center;
    align-items: center;
    font-size: 24px;
    z-index: 1000;
}

#scrollToTopBtn:hover {
    background-color: #f5b000;
}

footer {
    background-color: #f8f8f8;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #555;
    border-top: 1px solid #ddd;
}

footer p {
    margin: 5px 0;
}

/* 검색 아이콘 스타일 */
.search-icon {
    cursor: pointer;
}

/* 검색 오버레이 전체 화면 */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box; /* 패딩 포함하여 크기 계산 */
}

/* 오버레이 헤더 */
.search-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 0px 15px 0 2px ;
}

.close-btn {
   
    background: none;
    border: none;
    cursor: pointer;
    color: black;
    padding: 10px 10px;
}
button#overlay-searchIcon {
    border: 0;
    background-color: white;
    margin-right: 0px;
    margin-top: 0px;
    
}


/* 최근 검색어 스타일 */
.recent-searches {
    flex-grow: 1;
}

.recent-searches    h1{
    margin-bottom: 10px;
}

.recent-searches ul {
    list-style: none;
    padding: 0;
}

.recent-searches li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.recent-searches li:hover {
    background-color: #f9f9f9;
}

.subpage-header-title {
    display: flex;
    align-items: center;
}
.subpage-right {
    display: flex;
    justify-content: flex-end; /* 우측 정렬 */
    align-items: center; /* 수직 중앙 정렬 */
    gap: 0px; /* 아이템 간의 간격 조정 */
}


/* 레이아웃 변경 버튼 스타일 */
.layout-options-container {
    display: none;
}
.layout-buttons {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.layout-buttons button {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.layout-buttons button:hover {
    background-color: #e0e0e0;
}

.controls select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.controls select:hover {
    background-color: #e0e0e0;
}

/* 3줄보기 스타일 */
.layout-three .product-item .price {
    font-size: 12px;
}
.layout-three .product-name {
    height: 40px;
}
.layout-three .product-item img {
    height: 120px; /* 이미지 크기 줄이기 */
}

/* 2줄보기 스타일 */
.layout-two .product-name h2 {
    font-size: 18px; 
    line-height: 20px;
}


/* 1줄보기 스타일 */
.layout-one .product-item {
    font-size: 18px; /* 텍스트 크기 키우기 */
}

.layout-one .product-item img {
    height: 300px; /* 이미지 크기 키우기 */
}
.layout-one .product-name h2 {
    font-size: 20px;
}
.layout-one .product-item .price {
    font-size: 16px;
}
.layout-one .product-sale-info-text {
    text-align: center;
}

/* 기본 스타일 초기화 */


body, h2, form, label, input, button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.signup-page {
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.form-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 300px;
}

.tab {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-around;
}

.tab button {
    background-color: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 20px;
    transition: 0.3s;
    font-size: 16px;
    flex-grow: 1;
    text-align: center;
}

.tab button:hover {
    background-color: #ddd;
}

.tab button.active {
    background-color: #ccc;
}

.tabcontent {
    display: none;
    padding: 20px 0;
    height: 300px;
}

.tabcontent h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
    text-align: center;
}

.tabcontent form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tabcontent label {
    font-weight: bold;
    color: #555;
}

.tabcontent input[type="email"],
.tabcontent input[type="password"],
.tabcontent input[type="text"],
.tabcontent input[type="tel"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tabcontent input[type="checkbox"] {
    margin-right: 5px;
}

.tabcontent a {
    color: #007bff;
    text-decoration: none;
}

.tabcontent a:hover {
    text-decoration: underline;
}

.tabcontent button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.tabcontent button:hover {
    background-color: #0056b3;
}

.loading-spinner {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.more-button-container {
    margin-bottom: 30px;
}


/* PDF페이지*/
.category-section {
    grid-column: 1 / -1; /* ← 모든 열을 차지하게 만듦 */
    text-align: center;
    margin: 40px 0 10px;
    width: 100%;
}

.category-divider {
    border: none;
    border-top: 2px solid #aaa;
    width: 100%;
    margin: 10px 0;
}

.category-title {
    font-size: 1.6em;
    font-weight: bold;
    color: #333;
}

.pdf-page .header {
    justify-content: center;
    text-align: center;
}


/* admin-weekly-trends.ejs 에 적용될 스타일 */
body#admin-page {
    background-color: #f4f7f6; /* 관리자 페이지 배경색 */
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
    line-height: 1.6;
}

.admin-content {
    max-width: 1200px; /* 차트 두 개를 위해 너비 증가 */
    margin: 80px auto 40px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex; /* 내부 요소들을 flexbox로 배치 */
    flex-wrap: wrap; /* 화면이 작아지면 줄바꿈 */
    gap: 20px; /* 섹션 간 간격 */
    justify-content: space-around; /* 섹션들을 가운데 정렬 */
}

.subpage-title {
    text-align: center;
    flex-grow: 1;
    color: #333;
}

.subpage-title h1 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

/* 개별 차트 섹션 컨테이너 */
.chart-section {
    flex: 1; /* 가변 너비로 공간 분할 */
    min-width: 450px; /* 최소 너비 설정 (너무 줄어들지 않도록) */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chart-section h2 {
    font-size: 20px;
    color: #444;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    text-align: center;
}

.chart-container {
    width: 100%;
    height: 500px; /* 차트 높이 고정 (조절 가능) */
    position: relative;
    /* padding: 20px; 이전 padding은 chart-section으로 이동 */
}

.chart-container .notice {
    text-align: center;
    padding: 50px 0;
    color: #777;
    font-size: 1.1em;
}

/* 차트 캔버스에 직접 너비/높이 100% 적용 */
#weeklyPopularityChart,
#monthlyPopularityChart {
    width: 100% !important;
    height: 100% !important;
}

/* ======================================== */
/* 1. 기본 공유 버튼 스타일 */
/* ======================================== */

button#shareButton {
    background-color: #ffffff;
    color: #673AB7;
    border: none;
    padding: 10px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}



/* product-coupang-banner 섹션은 이전 스타일 유지 */
.product-coupang-banner {
    width: 100%;
    /* max-width: 700px; */
    margin: 20px auto;
    /*padding: 15px 0px 30px 30px;*/
    text-align: center;
    background-color: #FFC107;
}
.product-coupang-banner img {
    width: 100px;
}
.product-coupang-banner h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 15px;
}

/* 쿠팡 검색창 스타일 */
.coupang-search-button {
    display: flex; /* 내부 요소 정렬을 위해 flex 사용 */
    align-items: center; /* 세로 중앙 정렬 */
    width: 90%;
    
    padding: 10px 15px; /* 패딩 줄임 */
    background-color: #fff; /* 흰색 배경 */
    color: #777; /* placeholder처럼 연한 글씨색 */
    font-size: 1em;
    font-weight: normal; /* 일반 굵기로 */
    border: 1px solid #ccc; /* 회색 테두리 */
    border-radius: 5px; /* 살짝 둥근 모서리 */
    text-decoration: none;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); /* 내부 그림자 */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-content: space-between; /* 텍스트와 아이콘 간 간격 벌리기 */
}

.coupang-search-button:hover {
    border-color: #aaa;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.coupang-search-button:active {
    border-color: #999;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* 버튼 내 상품명 (선택 사항 - 필요에 따라 스타일 조절) */
.coupang-search-button .product-name-in-button {
    color: #333;
    font-weight: bold;
    /* 검색어처럼 보이게 하기 위해 폰트 스타일 조정 가능 */
}

/* 돋보기 아이콘 스타일 조정 */
.coupang-search-button svg {
    fill: #555;
    margin-left: 10px; /* 아이콘 왼쪽 여백 */
    margin-right: 0; /* 아이콘 오른쪽 여백 제거 */
    vertical-align: middle;
}

/* AD 광고 텍스트 (이전 스타일 유지) */
.top-banner-text {
    font-size: 0.8em;
    
/*    margin-top: 10px;*/
}
.coupang-banner-text {
    font-size: 0.8em;
    margin-top: -15px;
    text-align: center;
}

/* 반응형 디자인 (선택 사항 - 필요에 따라 조절) */
@media (max-width: 768px) {
    .coupang-search-button {
        font-size: 0.9em;
        padding: 8px 12px;
    }
    .coupang-search-button svg {
        width: 14px;
        height: 14px;
    }
   
}



.product-ai-description {
    padding: 10px 10%;
}

.product-ai-description p {
    font-family: 'Noto Sans KR', sans-serif; /* 원하는 폰트로 변경 가능 */
    font-size: 1em;
    line-height: 1.6;
    white-space: pre-wrap; /* 줄 바꿈 유지 */
    overflow: hidden; /* 텍스트가 넘치면 숨김 */
    border-right: .15em solid orange; /* 커서 효과 */
    animation: 
        blinking-cursor .75s step-end infinite; /* 커서 깜빡임 */
    display: inline-block; /* 커서와 함께 한 줄로 표시 */
    vertical-align: top; /* 상단 정렬 */
}

/* 타이핑 애니메이션을 위한 키프레임 (JS로 width 조절 예정) */
/* @keyframes typing {
    from { width: 0 }
    to { width: 100% }
} */

@keyframes blinking-cursor {
    from, to { border-color: transparent }
    50% { border-color: orange }
}