:root {
  --base-color: #f8ebdf;
  --highlight-color: #b06d5e;
  --right-gray: #dbdbdb;
}

/* 접근성 숨김 처리 */
.a11y-hidden {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

/* Reset */
body,
main,
h1,
h2,
h3,
p,
ul,
li,
div,
input {
  margin: 0;
  padding: 0;
}

ul,
li {
  list-style-type: none;
}

img {
  vertical-align: top;
  max-width: 100%;
}

button {
  all: unset;
  cursor: pointer;
}

/* Layout */
.wrap {
  margin: auto;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
}

/* pc */
@media (min-width: 748px) {
  body {
    background-color: var(--base-color);
  }
  main {
    width: 748px;
    display: grid;
    gap: 20px 28px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 50px auto;
  }

  .section1 {
    grid-row: 1 / span 2;
  }
}

/* mobile */
@media (max-width: 747px) {
  main {
    width: 360px;
  }

  h1 {
    margin-bottom: 15px;
  }

  h1 > img {
    width: 240px;
  }
}

.item-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  justify-items: center;
  text-align: center;
  margin: 31px 27px;
}

.container {
  text-align: center;
  margin: 31px 27px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.line {
  grid-column: 1 / span 2;
  min-height: 32px;
}

/* style */

html {
  font-family: 'Pretendard-Regular';
  font-size: 10px;
}

button {
  font-family: 'Pretendard-Regular';
}

h1 > img {
  max-width: 380px;
}

section {
  background-color: #fff;
}

/* section1 */
.item {
  width: 94px;
  height: 130px;
  border-radius: 10px;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: all 0.3s;
}

.item:hover {
  outline: 3px solid var(--highlight-color);
  background-color: #fffaf6;
}

.active {
  outline: 3px solid var(--highlight-color);
  box-sizing: border-box;
}

.item button {
  padding: 13px 10px;
  margin: auto;
  box-sizing: border-box;
}

.item img {
  width: 65px;
}

.item p {
  margin: 5px 0 8px 0;
}

.item strong {
  font-size: 1.2rem;
  font-weight: 500;
  color: #fff;
  background-color: var(--highlight-color);
  padding: 4px 10px;
  border-radius: 30px;
}

.item .soldout {
  background: rgba(0, 0, 0, 0.8);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  box-sizing: border-box;
}

.soldout span {
  display: inline-block;
  color: #eae8fe;
  border: 6px double #eae8fe;
  padding: 0 8px;
  transform: rotate(-20deg) translate(-10px, 30px);
}

.item button:disabled {
  cursor: not-allowed;
}

.container .btns {
  border-radius: 5px;
  font-size: 1.3rem;
  font-weight: 500;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
}

.container .btns:last-child {
  background-color: var(--highlight-color);
}

#input-money {
  border: 1px solid var(--right-gray);
  border-radius: 5px;
  padding: 0 7px;
}

#input-money::placeholder {
  color: var(--right-gray);
}

.get-list {
  background-color: var(--base-color);
  height: 106px;
  border: 1px solid var(--right-gray);
  border-radius: 5px;
  overflow: scroll;
  padding: 7px 7px;
}

.get-list .get-item {
  width: 100%;
  height: 45px;
  background-color: #fff;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px;
  box-sizing: border-box;
}

.get-list .get-item:not(:last-child) {
  margin-bottom: 5px;
}

.get-list .get-item div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.get-list .get-item img {
  width: 30px;
}

.get-list .get-item strong {
  width: 30px;
  height: 30px;
  border: 1px solid var(--right-gray);
  border-radius: 5px;
  font-size: 1.4rem;
  text-align: center;
  line-height: 30px;
}

/* section2 */
.bg-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--base-color);
  border-radius: 5px;
  font-size: 1.4rem;
  font-weight: 500;
  padding: 0 10px;
}

.section2 .bg-box {
  min-height: 32px;
  margin: 9px 27px;
}

/* section3 */
.section3 {
  display: flex;
  flex-direction: column;
  gap: 13px 9px;
  padding: 25px 27px;
}

.section3 h2 {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
}

.section3 .get-list {
  flex-grow: 1;
}

.section3 p {
  font-size: 1.3rem;
  text-align: right;
}
