/* reset ---------------------- */
body,
h1,
h2,
p,
ul,
button {
  padding: 0;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font: inherit;
}

ul,
li {
  list-style: none;
}

input {
  font: inherit;
}

button {
  font: inherit;
  border: 0;
  background: none;
}

button:enabled {
  cursor: pointer;
}

img {
  vertical-align: top;
}

/* 공통 CSS */
.a11y-hidden {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

/* CSS 적용 */
body {
  background-color: #eae8fe;
  font-family: 'Noto Sans KR', sans-serif;
}

/* 제목 */
h1 {
  text-align: center;
  padding-top: 30px;
}

h1 img {
  width: 20%;
  max-width: 210px;
}

/* 메인 레이아웃 ---------------------- */
main {
  width: 748px;
  max-width: 100%;
  display: grid;
}

/* 749부터 적용하겠다. */
@media (min-width: 749px) {
  main {
    grid-template-areas:
      'section1 section2'
      'section1 section3';
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 50px auto;
    gap: 20px 28px;
    margin: 30px auto;
  }
}

/* 768까지 적용하겠다. */
@media (max-width: 748px) {
  main {
    grid-template-areas:
      'section1'
      'section2'
      'section3';
    margin: 18px auto;
  }

  body {
    background-color: white;
  }
}

.section1 {
  grid-area: section1;
  background-color: white;
  padding: 30px 27px;
}

.section2 {
  grid-area: section2;
  background-color: white;
  padding: 9px 27px;
}

.section3 {
  grid-area: section3;
  background-color: white;
  padding: 25px 27px;

  display: flex;
  flex-direction: column;
}

.section3 .get-list {
  flex-grow: 1;
  flex-basis: 364px;
}

.section3 h2 {
  text-align: center;
  margin-bottom: 13px;
}

.total-price {
  font-size: 12px;
  text-align: right;
  margin-top: 8px;
}

/* 판매 음료 */
.pringles-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* 기본 버튼 */
[class^='btn'] {
  width: 100%;
  background-color: white;
  border-radius: 5px;
  min-height: 32px;
  font-size: 13px;
  box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.5);
}

.btn-pringles {
  height: 100%;
  border-radius: 10px;
  padding: 11px 12px 9px;
}

.btn-pringles img,
.pringles-name,
.pringles-price {
  display: block;
}

.btn-pringles img {
  /* width: 50px; */
  height: 145px;
  margin: 0 auto;
}

.pringles-name {
  font-size: 9px;
  margin: 6px 0;
}

.pringles-price {
  font-size: 12px;
  background-color: #6327fe;
  color: white;
  padding: 5px 0;
  font-weight: normal;
  border-radius: 30px;
}

/* 선택한 버튼 */
/* .btn-pringles.on {
    box-shadow: 0 0 0 4px #6327fe;
} */

.btn-pringles:active {
  box-shadow: 0 0 0 4px #6327fe;
}

/* 품절된 버튼 */
.btn-pringles:disabled {
  color: inherit;
  position: relative;
  overflow: hidden;
}

.btn-pringles:disabled::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  position: absolute;
  top: 0;
  left: 0;
  /* border-radius: 10px; */
}

.soldout {
  color: #eae8fe;
  font-size: 14px;

  z-index: 10;
  border: 4px double #eae8fe;
  position: absolute;
  width: 45px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
}

/* 잔액 */
.bg-box {
  background-color: #eae8fe;
  height: 32px;
  padding: 0 10px;
  border-radius: 5px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-size: 14px;
}

#input-money {
  border: 1px solid #bdbdbd;
  height: 32px;
  width: 100%;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 5px;
}

#input-money::placeholder {
  color: #bdbdbd;
  font-size: 13px;
}

.section2 .bg-box p {
  font-weight: 700;
}

.get-list {
  background-color: #eae8fe;
  border: 1px solid #bdbdbd;
  border-radius: 5px;
  padding: 12px;
  /* height: 106px; */

  /* auto: 내용이 넘칠때만 스크롤이 생기도록함. */
  overflow: auto;
}

.get-list li {
  background-color: white;

  display: flex;
  align-items: center;
  gap: 10px;

  height: 46px;
  padding: 0 8px 0 10px;
  border-radius: 5px;

  font-size: 9px;
}

.get-list li ~ li {
  margin-top: 6px;
}

.get-list li img {
  /* width: 18px; */
  height: 40px;
}

.get-list li strong {
  /* margin: 0 0 0 auto; */
  margin-left: auto;

  width: 30px;
  height: 30px;
  border: 1px solid #bdbdbd;
  border-radius: 5px;
  font-size: 14px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-get {
  background-color: #6327fe;
  color: white;
}

.container {
  display: grid;
  grid-template-columns: auto calc((100% - (12px * 2)) / 3);
  grid-template-rows: 33px 33px 106px;
  gap: 12px;
  margin-top: 20px;
}
