/* ---------- header ---------- */
.header .pc {
  display: none;
}

.header-outer {
  z-index: 200;
  position: sticky;
  top: 0;
  left: 0;
}

.header-outer.fixed {
  border-bottom: 1px solid #d9d9d9;
}

.header {
  display: flex;
  height: 40px;
  padding: 0 10px;
  background-color: white;
  justify-content: space-between;
  align-items: center;
}

.header .logo {
  display: block;
  width: 100px;
}

.header .header-btn .header-icon {
  width: 24px;
  height: 24px;
  margin: 0 3px;
  float: left;
}

/* ----- gnb ----- */
.gnb {
  display: flex;
}

.gnb > li {
  padding: 5px 0;
  text-align: center;
  flex-grow: 1;
}

.gnb > li:not(.mobile),
.gnb-lv2 {
  display: none;
}

/* ---------- all category ---------- */
.pc-category {
  display: none;
}

.mobile-category {
  width: 100%;
  height: 100vh;
  background-color: white;
  overflow: auto;
  z-index: 300;
  position: fixed;
  top: 0;
  left: -100%;
  transition: all 400ms;
}

.mobile-category .close-bar {
  width: 100%;
  height: 40px;
  background-color: white;
  z-index: 250;
  position: sticky;
  top: 0;
  left: 0;
}

.mobile-category .close-icon {
  width: 30px;
  height: 30px;
  margin: 5px;
  text-indent: -9999px;
  float: right;
}

.mobile-category > ul {
  padding: 10px;
}

.mobile-category .category-title {
  display: block;
  padding: 15px 10px;
  font-size: 1.15rem;
  border-bottom: 1px solid #ccc;
  position: relative;
  justify-content: space-between;
  align-items: center;
}

.mobile-category .selected-category .category-title {
  color: var(--point-color);
}

.mobile-category li:has(.category-lv2) .category-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-category .category-title i {
  font-size: 0.9rem;
  color: #666;
}


.mobile-category .category-title .close-i {
  display: none;
}

.mobile-category .selected-category .close-i {
  display: block;
}

.mobile-category .selected-category .open-i {
  display: none;
}

.mobile-category > ul .category-lv2 {
  height: 0;
  padding: 0 15px;
  overflow: hidden;
}

.mobile-category .selected-category .category-lv2 {
  border-bottom: 1px solid #ccc;
}

.mobile-category > ul .category-lv2 li a {
  display: block;
  padding: 3px 0;
}

/* ---------- search page ---------- */
.search-page {
  width: 100%;
  height: 0;
  box-sizing: border-box;
  padding: 0 10px;
  background-color: white;
  overflow: hidden;
  z-index: 300;
  position: fixed;
  top: 0;
  left: -100%;
  transition: left 300ms;
}

.search-page .search-box {
  height: 120px;
  box-sizing: border-box;
  padding-top: 60px;
  position: sticky;
  top: 0;
  left: 0;
}

.search-page .search-box .close-icon {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 10px;
  right: 0;
}

.search-page .search-box input[type="search"] {
  width: 100%;
  padding: 6px 35px 6px 15px;
  border-radius: 5px;
  border: 1px solid #999;
}

.search-page .search-box .search-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  top: calc(60px + 5px);
  right: 10px;
}

.search-page .search-wrapper {
  height: calc(100% - 120px);
  overflow: auto;
}

.search-page .search-box-title {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

/* ----- best keyword ----- */
.search-page .best-keyword-box {
  margin-bottom: 30px;
  overflow: hidden;
}

.search-page .best-keyword-box .keyword {
  margin-right: 10px;
  padding: 3px 12px;
  border-radius: 15px;
  background-color: #eee;
  text-align: center;
  float: left;
}

.search-page .best-keyword-box .keyword:last-child {
  margin-right: 0;
}

/* ----- best trip ----- */
.search-page .best-trip-box {
  display: flex;
  margin-bottom: 30px;
  justify-content: space-between;
}

.search-page .best-trip-box .best-trip {
  width: calc((100% - 30px) / 4);
}

.search-page .best-trip-box .best-trip:nth-of-type(5),
.search-page .best-trip-box .best-trip:nth-of-type(6) {
  display: none;
}

.search-page .best-trip-box .best-trip .trip-img {
  margin-bottom: 5px;
  border-radius: 50%;
  overflow: hidden;
}

.search-page .best-trip-box .best-trip .trip-title {
  text-align: center;
}

/* ----- best search ----- */
.search-page .best-search-box .best-search {
  display: flex;
  margin-bottom: 10px;
  justify-content: space-between;
}

.search-page .best-search-box .best-search .search-img {
  width: calc(var(--column-width) * 2 + 10px);
  height: fit-content;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.search-page .best-search-box .best-search .search-img .search-rank {
  width: 25%;
  box-sizing: border-box;
  padding: 5px;
  border-bottom-right-radius: 10px;
  background-color: var(--point-color);
  color: white;
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
}

.search-page .best-search-box .best-search .search-info {
  width: calc(var(--column-width) * 4 + 10px * 3);
  box-sizing: border-box;
  padding: 3px 0;
}

.search-page .best-search-box .best-search .search-info .search-title {
  margin-bottom: 5px;
}

.search-page .best-search-box .best-search .search-info .price {
  color: var(--point-color);
}

/* ---------- recently page ---------- */
.recently-bg {
  width: 100%;
  z-index: 300;
  position: fixed;
  top: 0;
  right: -100%;
  transition: all 0.3s;
}

.recently-page {
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
  padding: 0 10px;
  background-color: white;
}

.recently-page .recently-header {
  display: flex;
  height: 50px;
  margin-bottom: 5px;
  box-sizing: border-box;
  padding: 5px 3px;
  border-bottom: 1px solid #d9d9d9;
  font-weight: 550;
  align-items: end;
  position: sticky;
  top: 0;
  left: 0;
}

.recently-page .recently-header .close-icon {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 10px;
  right: 0;
}

.recently-page .recently-header .recently-title {
  margin-right: 8px;
  font-size: 1.2rem;
}

.recently-page .recently-header .num {
  font-size: 1.1rem;
  color: var(--point-color);
}

.recently-page .recently-wrapper {
  height: calc(100% - 55px);
  overflow: auto;
}

.recently-page .recently-notice {
  line-height: 20px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #666;
}

.recently-page .recently-container {
  min-height: calc(100% - 30px);
  padding-left: 15px;
  position: relative;
}

.recently-page .recently-container::after {
  content: "";
  width: calc(100% - 5px + 1px);
  height: calc(100% - 12px);
  box-sizing: border-box;
  border-left: 2px solid #999;
  z-index: 10;
  position: absolute;
  right: 0;
  bottom: 0;
}

.recently-page .recently-container .date {
  padding: 5px 3px;
  font-size: 1.1rem;
  position: relative;
}

.recently-page .recently-container .date::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background-color: #666;
  z-index: 20;
  position: absolute;
  top: 50%;
  left: -15px;
}

.recently-page .recently-container .recently {
  margin-bottom: 10px;
  overflow: hidden;
}

.recently-page .recently-container .recently .recently-img {
  width: calc((100% - 10px) / 2);
  border-radius: 10px;
  float: left;
  overflow: hidden;
  position: relative;
}

.recently-page .recently-container .recently .recently-img .product-mark-icon {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 5px;
  right: 5px;
}

.recently-page .recently-container .recently .recently-info {
  width: calc((100% - 10px) / 2);
  padding: 3px 0;
  float: right;
}

.recently-page .recently-container .recently .recently-info .product-title {
  margin-bottom: 3px;
  overflow: hidden;
}

.recently-page .recently-container .recently .recently-info .product-price {
  margin-bottom: 3px;
}

.recently-page .recently-container .recently .recently-info .product-price .price {
  font-weight: 550;
}

.recently-page .recently-container .recently .recently-info .star-rate i {
  margin-right: 5px;
  font-size: 0.9rem;
  color: #ffac11;
}


/* 태블릿 */
@media all and (min-width: 601px) and (max-width: 768px) {
  /* ---------- search page ---------- */
  .search-page .search-box .close-icon {
    width: 35px;
    height: 35px;
  }  
  
  .search-page .search-box input[type="search"] {
    width: calc(var(--column-width) * 6 + 10px * 5);
    padding-top: 10px;
    padding-bottom: 10px;
    margin: 0 calc(var(--column-width) + 10px);
  }

  .search-page .search-box .search-icon {
    width: 22px;
    height: 22px;
    top: calc(60px + 7px);
    right: calc(var(--column-width) + 10px + 10px);
  }

  .search-page .search-wrapper {
    padding: 0 calc(var(--column-width) + 10px);
  }

  /* ----- */
  .search-page .best-trip-box {    
    --column-width: calc((100% - 50px) / 6);
  }

  /* ---------- recently page ---------- */
  .recently-page {
    width: calc(var(--column-width) * 5 + 10px * 4 + 10px);
  }
}

/* 태블릿 이상 */
@media all and (min-width: 601px) {
  /* ---------- search page ----------- */
  .search-page .best-trip-box .best-trip {
    width: var(--column-width);
  }

  .search-page .best-trip-box .best-trip:nth-of-type(5),
  .search-page .best-trip-box .best-trip:nth-of-type(6) {
    display: block;
  }

  .search-page .best-search-box {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
  }

  .search-page .best-search-box .best-search {
    margin-bottom: 0;
  }

  .search-page .best-search-box .best-search .search-img {
    width: calc((100% - 20px) / 3);
  }

  .search-page .best-search-box .best-search .search-info {
    width: calc((100% - 20px) / 3 * 2 + 10px);
  }

  /* ---------- recently page ---------- */
  .recently-bg {
    display: flex;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: end;
    transition: none;
  }

  .recently-page {
    position: relative;
    right: -100%;
  }
}

/* PC */
@media all and (min-width: 769px) {
  /* ---------- header ---------- */
  .header .mobile {
    display: none;
  }

  .header .pc {
    display: block;
  }

  .header {
    display: block;
    height: 50px;
    padding: 0;
  }

  .header .header-container {
    display: flex;
    width: calc(var(--column-width) * 10 + 10px * 9);
    height: 50px;
    align-items: center;
    float: left;
  }

  .header .header-container > * {
    --column-width: calc((100% - 10px * 9) / 10);
  }

  .header .logo {
    width: calc(var(--column-width) * 2 + 10px);
    box-sizing: border-box;
    padding: 0 15px;
  }

  .header .search-box {
    width: calc(var(--column-width) * 6 + 10px * 5 + 20px);
    margin-right: 10px;
    position: relative;
  }

  .header .search-box input[type="search"] {
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    padding: 0 40px 0 20px;
    border: none;
    border-radius: 10px;
    background-color: #f5f5f5;
    line-height: 25px;
  }

  .header .search-box .search-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 10px;
    right: 12px;
  }

  .header .header-btn {
    padding: 0 5px;
  }

  .header .header-btn .icon-label {
    text-align: center;
    font-size: 12px;
  }

  .header .login-btn {
    width: calc(var(--column-width) * 2 + 10px);
    height: 40px;
    margin: 5px 0;
    border-radius: 5px;
    background-color: var(--point-color);
    text-align: center;
    color: white;
    line-height: 40px;
    font-weight: 500;
    float: right;
  }

  /* ----- gnb ----- */
  .gnb > li:not(.mobile) {
    display: block;
  }

  .gnb > li:not(.mobile).menu-btn {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .gnb > li {
    padding: 0;
    position: relative;
  }

  .gnb > li > p,
  .gnb > li > a {
    display: block;
    padding: 10px 0;
    line-height: 24px;
  }

  .gnb > li:first-of-type {
    padding-left: 0;
  }

  .gnb .menu-btn {
    cursor: pointer;
  }

  .gnb .menu-btn .menu-icon {
    width: 16px;
    height: 16px;
    margin: 4px;
    background-image: url(./img/icon_menu_point.png);
  }

  .gnb .menu-btn.category-open .menu-icon {
    background-image: url(./img/icon_close_point.png);
  }

  .gnb .menu-btn p {
    color: var(--point-color);
  }

  .gnb > li .gnb-lv2 {
    display: block;
    width: 110px;
    height: 0;
    margin-left: -55px;
    box-sizing: border-box;
    border-radius: 0 0 5px 5px;
    z-index: 100;
    position: absolute;
    top: 43px;
    left: 50%;
    overflow: hidden;
    transition: height 200ms;
  }

  .gnb > li .gnb-lv2 ul {
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.95);
  }

  .gnb > li .gnb-lv2 li {
    line-height: 25px;
  }

  .gnb li:hover > a {
    color: var(--point-color);
  }

  .gnb > li:hover .gnb-lv2 {
    height: calc(25px * 3 + 30px);
  }

  .gnb > li:nth-of-type(8):hover .gnb-lv2 {
    height: calc(25px * 2 + 30px);
  }

  .gnb > li:nth-of-type(9):hover .gnb-lv2 {
    height: calc(25px * 4 + 30px);
  }

  /* ----- all category ----- */
  .mobile-category {
    display: none;
  }

  .pc-category {
    display: block;
    width: 100%;
    height: 0;
    border-radius: 0 0 10px 10px;
    background-color: white;
    overflow: hidden;
    z-index: 250;
    position: absolute;
    top: 93px;
    left: 0;
    transition: height 500ms 100ms;
  }

  .pc-category > ul {
    display: grid;
    padding: 20px;
    gap: 30px 10%;
    grid-template-columns: repeat(5, 1fr);
  }

  .pc-category > ul > li > a {
    display: block;
    padding: 8px 3px;
    font-size: 1.1rem;
    position: relative;
  }

  .pc-category .category-lv2 {
    padding: 5px 0;
  }

  .pc-category .category-lv2 li a {
    display: block;
    padding: 3px 3px;
    font-size: 0.9rem;
  }

  .pc-category li:hover > a {
    color: var(--point-color);
  }

  .pc-category > ul > li > a::after {
    content: '';
    width: 100%;
    border-bottom: 1px solid #1e1e1e;
    position: absolute;
    bottom: 0;
    left: 0;
    transition: all 300ms;
  }

  .pc-category > ul > li:hover > a::after {
    animation: ani-category-hover 400ms ease-out 150ms forwards;
  }

  @keyframes ani-category-hover {
    0% {
      width: 0;
    }

    100% {
      width: 100%;
    }
  }

  /* ---------- search page ---------- */
  .search-page {
    width: calc(var(--column-width) * 6 + 10px * 5 + 20px);
    height: 0;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    top: 47px;
    left: calc(var(--column-width) * 2 + 10px);
    transition: height 300ms;
  }
  
  .search-page .mobile {
    display: none;
  }

  .search-page .search-wrapper {
    height: fit-content;
    max-height: calc(100vh - 100px);
    padding: 20px 10px;
  }

  .search-page .best-trip-box {
    --column-width: calc((100% - 50px) / 6);
  }

  /* ---------- recently search ---------- */
  .recently-page {
    width: calc(var(--column-width) * 5 + 10px * 4 + 10px);
  }

  .recently-page .recently-container .recently {
    position: relative;
    z-index: 15;
  }
}

/* 저해상도 PC */
@media all and (min-width: 769px) and (max-width: 1070px) {
  
}

/* 고해상도 PC */
@media all and (min-width: 1071px) {
  /* ---------- header ---------- */
  .header-outer {
    background-color: white;
  }

  .header {
    width: 1070px;
    margin: 0 auto;
  }

  /* ----- gnb ----- */
  .gnb {
    width: 1070px;
    margin: 0 auto;
  }

  /* ----- all category ----- */
  .pc-category {
    width: 1070px;
    margin-left: calc(-1070px / 2);
    left: 50%;
  }

  /* ---------- search page ---------- */
  .search-page {
    left: calc(var(--column-width) * 2 + 10px + (100% - 1070px) / 2);
  }
}