/* 초기화 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 10px;
}

body {
  width: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  font-size: 1.6rem;
  color: #000000;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  vertical-align: bottom;
}

ul,
li {
  list-style: none;
}

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

button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
}

input {
  all: unset;
}

/* 공통 */
.sr-only {
  position: absolute;
  overflow: hidden;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
}

.font-bold {
  font-weight: 700;
}

.container {
  max-width: calc(1280px + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

.seller-container {
  max-width: calc(1720px + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

/* 포커스 스타일 */
*:focus-visible {
  outline: 2px solid #873be5;
  outline-offset: 2px;
  border-radius: 4px;
  z-index: 1000;
}

.list-item a:focus-visible {
  border-radius: 12px;
}

#search {
  outline: none;
}

/* header */
main {
  /* header footer 위치 조정 */
  flex: 1;
}

/* default-header */
header {
  background-color: #fff;
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 5000;
}

.header-container {
  height: 90px;

  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  justify-content: center;
  align-items: center;
}

.header-h1 a {
  display: inline-block;
}

.header-logo {
  width: 124px;
  height: auto;
  display: block;
}

.form-search {
  background-color: #fff;
  border: 2px solid var(--color-main);
  width: auto;
  max-width: 400px;
  height: 46px;
  border-radius: 24px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  overflow: hidden;
  padding: 0 22px;
  position: relative;
}

.form-search:focus-within {
  outline: 1px solid var(--color-main);
}

.form-search .search-logo-wrap {
  flex: 0 1 auto;
  width: 28px;
  min-width: 24px;
  display: none;
}

.form-search .search-logo {
  width: 100%;
  aspect-ratio: 1;
}

.form-search input {
  flex: 1;
  width: 100%;
  height: 100%;
  font-size: var(--fs-md);
  line-height: 1;
}

.form-search input::placeholder {
  color: var(--gray-dark);
}

.form-search .btn-clear {
  background: var(--gray-dark) url("../../assets/images/icons/icon-delete.svg")
    no-repeat center / 70%;
  width: 16px;
  aspect-ratio: 1;
  opacity: 35%;
  z-index: 10;

  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;

  display: none;
}

.form-search .btn-search {
  flex: 0 1 auto;
  width: 28px;
  min-width: 22px;
  aspect-ratio: 1;
  background: url("../../assets/images/icons/icon-search.svg") no-repeat center /
    contain;
  margin-bottom: 1px;
  cursor: pointer;
}

.actions-list {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: clamp(14px, 1.8vw, 26px);

  padding-left: 32px;
}

.actions-list a {
  flex: 0 1 auto;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 4px;
}

.actions-list .btn-icon {
  flex-direction: row;
  gap: 8px;
}

.actions-list svg {
  flex-grow: 0;
  flex-shrink: 0;
  display: block;
  width: clamp(24px, 3vw, 32px);
  height: clamp(24px, 3vw, 32px);
}

.actions-list span {
  color: var(--gray-dark);
  font-size: var(--fs-xs);
  min-width: 56px;
  width: auto;

  text-align: center;
  white-space: nowrap;
  line-height: 1;
}

.actions-item :is(svg path, span) {
  transition: stroke var(--trans), color var(--trans);
}

.actions-item:hover :is(svg path, span),
.actions-item.active :is(svg path, span) {
  stroke: var(--color-main);
  color: var(--color-main);
}

/* seller-header */
.header-container.seller {
  height: 90px;

  display: flex;
  justify-content: start;
  align-items: center;
  gap: 16px;
}

.header-container.seller .header-logo {
  flex: 0 0 80px;
  width: 80px;
  height: auto;
  display: block;
}

.header-container.seller .header-title {
  font-size: var(--fs-3xl);
  font-weight: 500;
}

/* 마이페이지 드롭다운 */
.dropdown-parent {
  position: relative;
}

.dropdown-mypage {
  position: absolute;
  top: 150%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;

  background-color: #fff;
  border-radius: 10px;
  padding: 10px;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 8px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: left var(--trans), opacity var(--trans);
}

.dropdown-mypage.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown-mypage.overflow {
  left: 8px;
}

.dropdown-mypage.overflow::before {
  left: 68%;
}

.dropdown-mypage .dropdown-item {
  box-sizing: border-box;
  display: inline-block;

  width: 110px;
  height: 40px;
  border-radius: 5px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;

  background-color: #fff;
  border: 1px solid #fff;

  color: var(--gray-dark);
  font-weight: 500;
  white-space: nowrap;
}

.dropdown-mypage .dropdown-item {
  transition: color var(--trans), border var(--trans);
}

.dropdown-mypage .dropdown-item:hover {
  color: #000;
  border: 1px solid var(--gray-dark);
}

.dropdown-mypage::before {
  content: "";
  width: 24px;
  aspect-ratio: 1;

  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  z-index: -10;

  background-color: #fff;
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}

.dropdown-mypage::after {
  content: "";
  width: 100%;
  height: 100%;

  position: absolute;
  top: 0;
  left: 0;

  background-color: #fff;
  box-shadow: 0 6px 6px 0 rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  z-index: -1;
}

/* footer */
footer {
  width: 100%;
  height: 298px;
  background-color: #f2f2f2;
  margin-top: 180px;
}

.footer-container {
  width: 100%;
  height: 100%;

  display: flex;
  justify-content: center;
  align-items: start;
  flex-direction: column;
  gap: 22px;
  font-size: var(--fs-sm);
}

footer .divider {
  width: 100%;
  height: 1px;
  background-color: var(--gray-light);
}

.footer-container .links-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  justify-content: start;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 0;
}

.footer-links li {
  display: inline-block;
}

.footer-links li:not(:last-child)::after {
  content: "|";
  padding: 0 14px;
}

.footer-sns {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 14px;
}

.footer-sns li {
  display: inline-block;
}

.footer-sns a {
  display: inline-block;
  width: 32px;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--gray-dark);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

.footer-sns .link-insta {
  background-image: url("../../assets/images/icons/icon-insta.svg");
}

.footer-sns .link-fb {
  background-image: url("../../assets/images/icons/icon-fb.svg");
}

.footer-sns .link-yt {
  background-image: url("../../assets/images/icons/icon-yt.svg");
}

.footer-info {
  color: var(--gray-dark);
  line-height: 24px;
}

/* 공통 CSS */

/* 버튼 사이즈 : btn + btn-lg / btn-m / btn-ms / btn-s */
/* 버튼 컬러 : default: 메인 그린 컬러 / btn + btn-white / btn-dark */
/* 버튼 기능 : default: / btn + btn-disabled */
/* 버튼 + 아이콘 : btn-icon (div > svg + span 구조) */
.btn {
  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;

  color: #fff;
  background-color: var(--color-main);
  border-radius: 5px;

  transition: background-color var(--trans);
}

.btn-lg {
  font-size: var(--fs-2xl);
  width: 220px;
  height: 68px;
}

.btn-m {
  font-size: var(--fs-lg);
  width: 480px;
  height: 60px;
}

.btn-ms {
  font-size: var(--fs-md);
  width: 200px;
  height: 60px;
}

.btn-s {
  font-size: var(--fs-md);
  width: 80px;
  height: 40px;
}

.btn-icon {
  background-color: var(--color-main);
  border-radius: 5px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;

  gap: 8px;
  padding: 11px 20px 11px 16px;
}

.btn-icon svg {
  flex: 1 1 30px;

  display: block;
  width: 30px;
  height: 30px;
}

.btn-icon span {
  flex: 0 0 auto;

  color: #fff;
  font-size: var(--fs-lg);
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
}

.btn-icon:hover :is(svg path, span) {
  stroke: #fff;
  color: #fff;
}

.btn:hover {
  background-color: var(--color-main-dark);
}

.btn-white {
  color: var(--gray-dark);
  background-color: #fff;
  border: 1px solid var(--gray-light);
}

.btn-white:hover {
  color: #000;
  background-color: #fff;
  border: 1px solid var(--gray-dark);
}

.btn-dark {
  background-color: var(--gray-dark);
}

.btn-dark:hover {
  background-color: #4a4a4a;
}

.btn:disabled {
  background-color: var(--gray-light);
  cursor: not-allowed;
}

/* 가격 사이즈 : price-l price-m price-s */
/* <p class="price-lg"><span>가격</span>원</p> 구조 */
.price-l {
  font-size: var(--fs-lg);
}

.price-l span {
  padding-right: 2px;
  font-size: var(--fs-4xl);
  font-weight: 700;
}

.price-m {
  font-size: var(--fs-lg);
}

.price-m span {
  padding-right: 2px;
  font-size: var(--fs-2xl);
  font-weight: 700;
}

.price-s {
  font-size: var(--fs-sm);
}

.price-s span {
  padding-right: 4px;
  font-size: var(--fs-lg);
  font-weight: 700;
}

/* tab-menu */
/* <button class="tab-menu"><span class="badge"></span></button>  */
.tab-menu {
  width: 100%;
  height: 50px;
  border-radius: 5px;
  background: #fff;

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;

  font-weight: 500;
  cursor: pointer;

  transition: background-color var(--trans), color var(--trans);
}

.tab-menu .badge {
  background-color: var(--color-red);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 400;

  display: inline-block;
  min-width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;

  border-radius: 9999px;
  padding: 0px 4px;

  display: none;
}

.tab-menu .badge.active {
  display: inline-block;
}

.tab-menu.active {
  background: var(--color-main);
  color: #fff;
}

.tab-menu:not(.active):hover {
  background: #effff3;
  color: #000;
}

/* responsive */
@media (max-width: 1280px) {
  .container {
    width: 100%;
  }

  .dropdown-mypage {
    padding: 6px;
    gap: 6px;
  }

  .dropdown-mypage .dropdown-item {
    width: 98px;
    height: 36px;
    border-radius: 5px;

    font-size: var(--fs-sm);
  }

  .actions-list .btn-icon {
    padding: 8px 16px 8px 14px;
  }

  .actions-list .btn-icon span {
    font-size: var(--fs-md);
  }
}

@media (max-width: 768px) {
  /* header */
  .header-container {
    height: 72px;
    display: flex;
    justify-content: space-between;
    gap: 0 14px;
  }

  .header-h1 {
    display: none;
  }

  .header-container.seller .header-h1 {
    display: inline-block;
  }

  .form-search {
    gap: 10px;
    padding: 0 16px 0 12px;
  }

  .form-search .search-logo-wrap {
    display: inline-block;
  }

  /* actions-list */
  .actions-list {
    gap: 4px;
    padding-left: 14px;
  }

  .actions-list a {
    gap: 4px;
    color: #fff;
  }

  .actions-list span {
    color: var(--gray-dark);
    font-size: var(--fs-xs);
  }

  .actions-list .btn-icon {
    padding: 8px 10px 8px 8px;
    margin-left: 12px;
  }

  .actions-list .btn-icon svg {
    width: 22px;
    height: 22px;
  }

  .actions-list .btn-icon span {
    color: #fff;
    font-size: var(--fs-sm);
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }

  /* header */
  .form-search {
    padding: 0 14px 0 12px;
  }

  .form-search input {
    font-size: var(--fs-sm);
  }

  .actions-list .btn-icon {
    flex-direction: column;
    padding: 4px 6.8px;
    margin-left: 12px;
  }

  .actions-list .btn-icon span {
    display: none;
  }

  /* footer */
  .footer-container {
    font-size: var(--fs-xs);
  }

  .footer-info {
    line-height: 20px;
  }
}
