* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #513b2c;
}
/* DB Komol X Fonts */
@font-face {
  font-family: "DB Komol X Bd";
  src: local("DB Komol X Bd"),
    url("https://www.scasset.com/campaign/scassetxchanintr/assets/fonts/DB-Komol-X-Bd-v3.2.woff2") format("woff2"),
    url("https://www.scasset.com/campaign/scassetxchanintr/assets/fonts/DB-Komol-X-Bd-v3.2.woff") format("woff"),
    url("https://www.scasset.com/campaign/scassetxchanintr/assets/fonts/DB-Komol-X-Bd-v3.2.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DB Komol X Demi";
  src: local("DB Komol X Demi"),
    url("../assets/fonts/DB-Komol-X-Demi-v3.2.woff2") format("woff2"),
    url("../assets/fonts/DB-Komol-X-Demi-v3.2.woff") format("woff"),
    url("../assets/fonts/DB-Komol-X-Demi-v3.2.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DB Komol X Li";
  src: local("DB Komol X Li"),
    url("../assets/fonts/DB-Komol-X-Li-v3.2.woff2") format("woff2"),
    url("../assets/fonts/DB-Komol-X-Li-v3.2.woff") format("woff"),
    url("../assets/fonts/DB-Komol-X-Li-v3.2.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DB Komol X";
  src: local("DB Komol X"),
    url("../assets/fonts/DB-Komol-X-v3.2.woff2") format("woff2"),
    url("../assets/fonts/DB-Komol-X-v3.2.woff") format("woff"),
    url("../assets/fonts/DB-Komol-X-v3.2.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* SC Asset TH Font */
@font-face {
  font-family: "SC Asset TH Regular";
  src: local("SC Asset TH Regular"),
    url("../assets/fonts/SC-Asset-TH-Regular.woff2") format("woff2"),
    url("../assets/fonts/SC-Asset-TH-Regular.woff") format("woff"),
    url("../assets/fonts/SC-Asset-TH-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Mercury Display Fonts */
@font-face {
  font-family: "Mercury Display Semibold";
  src: local("Mercury Display Semibold"),
    url("../assets/fonts/Mercury-DisplaySemibold.woff2") format("woff2"),
    url("../assets/fonts/Mercury-DisplaySemibold.woff") format("woff"),
    url("../assets/fonts/Mercury-DisplaySemibold.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mercury Display Semibold Italic";
  src: local("Mercury Display Semibold Italic"),
    url("../assets/fonts/Mercury-DisplaySemiboldItalic.woff2") format("woff2"),
    url("../assets/fonts/Mercury-DisplaySemiboldItalic.woff") format("woff"),
    url("../assets/fonts/Mercury-DisplaySemiboldItalic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

/* Apply to body */
body {
  font-family: "DB Komol X", sans-serif;
  font-size: clamp(14px, 1vw, 18px);
  background-color: #e9e9df;
  color: var(--primary-color);
}

h1 {
  font-size: clamp(28px, 5vw, 48px);
}

h2 {
  font-size: clamp(24px, 4vw, 68.17px);
}

h3 {
  font-size: clamp(22px, 3.5vw, 50px);
}

h4 {
  font-size: clamp(16px, 3vw, 28px);
}

p,
a {
  font-size: clamp(20px, 1.8vw, 46px);
  line-height: 1.3;
}

img {
  width: 100%;
}

.container {
  max-width: 1680px;
  margin: 0 auto;
}

.info-section {
  margin-top: 6rem;
}

.upper-section {
  display: flex;
  gap: 2rem;
}

.upper-section > div:nth-of-type(1) {
  width: 47%;
}

.upper-section > div:nth-of-type(2) {
  flex: 1;
}

.barbara-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.barbara-info h2 {
  font-family: "Mercury Display Semibold", sans-serif;
  font-weight: lighter;
  letter-spacing: 5px;
}

.horizon-line {
  width: 225px;
  background-color: var(--primary-color);
  height: 2px;
}

.barbara-info h2 {
  font-family: "DB Komol X", sans-serif;
}

.barbara-info p {
  margin-top: -1rem;
  width: 100%;
}

.lower-section {
  display: flex;
  gap: 2rem;
}

.lower-section > div:nth-of-type(1) {
  flex: 1;
}

.lower-section > div:nth-of-type(2) {
  width: 47%;
}

.chanintr-info {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 1.2rem;
}

.chanintr-info img {
  width: 450px;
}

.chanintr-info div:nth-of-type(2) {
  width: 100%;
}

.product-section {
  margin-top: 6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  gap: 2rem;
  padding: 4rem 0;
}
.product-section h3 {
  margin-top: 2rem;
  font-weight: 400;
}

.product-section p {
  width: 60%;
}

.product-section p:nth-of-type(3) {
  margin-top: -2rem;
}

.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.small-image {
  width: 100%;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}
.small-image img {
  width: calc(100% / 7 - 1rem); /* Adjusted width */
  height: 100%;
  object-fit: cover;
  cursor: pointer; /* Changes cursor to indicate clickable */
  transition: 0.3s ease-in-out;
  border: 2px solid transparent; /* Default border */
}

.small-image img.active {
  opacity: 0.4;
}

.promotion-section {
  width: 100%;
  margin: 2rem auto;
  text-align: center;
}
.promotion-section h4 {
  font-weight: lighter;
}

.table_project {
  margin: 6rem auto 2rem auto;
  font-size: clamp(16px, 3vw, 28px);
  max-width: 980px;
}
.table_project h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.table-list {
  margin-top: 4rem;
  width: 100%;
  border-collapse: collapse;
}
.display-control {
  display: block;
}
.table-list td {
  padding: 10px;
  border: 1px solid #cccccc;
}
.row__table_1 td:nth-of-type(1) {
  text-align: center;
}
.row__table_1 td:nth-of-type(5) {
  text-align: center;
}

.td-project-detail img {
  width: 150px;
  height: auto;
  object-fit: cover;
  border-radius: 0;
}

.btn__viewdetail {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 6px 1rem;
  text-decoration: none;
  border-radius: 4px;
}

.btn__viewdetail:hover {
  background-color: #f37a21;
}

/* Custom Checkbox Styling */
.cbx {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.cbx input {
  display: none; /* Hide default checkbox */
}

.cbx span {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  position: relative;
  transition: all 0.3s;
}

.cbx input:checked + span {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.cbx input:checked + span::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 6px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 980px;
  margin: 0 auto;
}
input,
select,
option {
  font-size: 20px;
  border: none;
  border-bottom: 2px solid var(--primary-color);
  width: 100%;
  padding: 0.5rem;
  background-color: transparent;
  font-family: inherit;
}

.form-section div:nth-of-type(5) {
  grid-column: span 2;
}

.submit-btn {
  background-color: var(--primary-color);
  width: 100%;
  padding: 1rem;
  margin-top: 4rem;
  color: white;
  text-transform: uppercase;
  font-size: 24px;
  letter-spacing: 3px;
  font-family: "DB Komol X", sans-serif;
  outline: none;
  border: none;
  box-shadow: 5px 5px 0px 1px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.project-detail-m {
  display: none;
}

.error-message {
  font-size: 16px;
  color: red;
}
.thank-msg {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100dvh;
  width: 100vw;
  font-size: 30px;
  text-align: center;
}
@media only screen and (max-width: 1680px) {
  .container {
    padding: 1rem;
  }
  .info-section {
    margin-top: 4rem;
  }
  .product-section {
    margin-top: 2rem;
  }
  .chanintr-info img {
    width: 320px;
  }
}

@media only screen and (max-width: 800px) {
  .info-section {
    margin-top: 2rem;
  }

  .upper-section {
    flex-direction: column;
    gap: 0.5rem;
  }

  .upper-section > div:nth-of-type(1) {
    width: 100%;
  }

  .barbara-info {
    gap: 0.5rem;
  }

  .horizon-line {
    width: 100px;
    height: 1px;
  }

  .barbara-info p {
    margin-top: -0.5rem;
    width: 100%;
  }

  .lower-section {
    gap: 1rem;
    flex-direction: column;
    margin-top: 2rem;
  }

  .lower-section > div:nth-of-type(2) {
    width: 100%;
  }

  .chanintr-info {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
  }

  .chanintr-info img {
    width: 250px;
  }

  .product-section {
    margin-top: 2rem;
    gap: 1rem;
  }
  .product-section h3 {
    margin-top: 1rem;
  }

  .product-section p {
    width: 100%;
  }

  .product-section p:nth-of-type(3) {
    margin-top: -1rem;
  }
  .small-image {
    flex-wrap: wrap;
    gap: 0.1rem;
  }
  .small-image img {
    width: calc(100% / 5); /* Adjusted width */
    height: 50px;
  }
  .table_project {
    margin: 2rem auto 2rem auto;
  }
  .form-section div {
    grid-column: span 2;
  }
  .table-list thead tr td:nth-of-type(1) {
    width: 5%;
  }
  .table-list thead tr td:nth-of-type(4),
  .table-list thead tr td:nth-of-type(5),
  .table-list tbody tr td:nth-of-type(4),
  .table-list tbody tr td:nth-of-type(5) {
    display: none;
  }
  .cbx span {
    width: 20px;
    height: 20px;
  }

  .cbx input:checked + span::after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
  }
  .project-detail-m {
    display: block;
    color: inherit;
  }
  .submit-btn {
    padding: 0.5rem;
    margin-top: 2rem;
  }
}
