:root {
  --bg: #ffffff;
  --red: #ad5354;
  --red-soft: #d9a3a1;
  --gray-pill: #e1dfdf;
  --text-soft: #d4d4d4;
  --text: #9f4d4e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
}

.page {
  position: relative;
  width: min(1200px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 34px 80px;
}

.top-buttons {
  position: absolute;
  top: 30px;
  right: 34px;
  display: flex;
  gap: 12px;
}
.pill-link:hover {
  transition: all 0.3s ease;
  scale: 1.02;
  background: var(--red);
  color: #fff;
}


.pill-link {
  min-width: 96px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #e1dfdf;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
}

.pill-link.active {
  background: var(--red);
  color: #fff;
}
.pill-link.active:hover{
  background: #d4d4d4;
  color: var(--red);
    transition: all 0.3s ease;
}
.hero {
  text-align: center;
  padding-top: 18px;
  margin-bottom: 82px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -4px;
  font-weight: 900;
  color: var(--text-soft);
}

.hero h1 span {
  color: var(--red);
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 34px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--red-soft);
  margin-bottom: 96px;
}

.tab {
  width: 140px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--gray-pill);
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tab:hover {
  /* transform: translateY(-2px); */
  transition: all 0.3s ease;
  /* opacity: 0.7; */
  color: #fff;
  scale: 1.02;
}

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

.gallery-wrap {
  height: 980px;
  overflow-y: auto;
  padding: 0 90px 40px;
  scroll-behavior: smooth;
}

.gallery-wrap::-webkit-scrollbar {
  width: 8px;
}

.gallery-wrap::-webkit-scrollbar-thumb {
  background: #d2aaa8;
  border-radius: 999px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 300px);
  justify-content: center;
  column-gap: 66px;
  row-gap: 112px;
}

.card {
  cursor: pointer;
  min-height: 210px;
    width: 300px;
}
.card img {
  width: 100%;
  aspect-ratio: 18 / 12;
  object-fit: cover;
  display: block;
}
.collection .card img,
.card.collection img {
  object-fit: contain;
  background: #fff;
}
.thumb {
  width: 100%;
  aspect-ratio: 1.46 / 1;
  object-fit: cover;
  display: block;
  object-position: center 70%;
  background: #ddd;
}
.wellness {
  object-position: center bottom;
}
.hospitality {
  object-position: center 90%;
}

.thumb:hover {
    transform: translateY(-2px);
  /* opacity: 0.6; */
 /* filter: brightness(70%); */
  scale: 1.02;
    transition: all 0.3s ease;
}

.card[data-category="wood"] .thumb:hover,
.card[data-category="square"] .thumb:hover {
  transform: translateY(-2px);
  opacity: 0.6;
  scale: 1.02;
  transition: all 0.3s ease;
}
.card[data-category="collection"] .thumb:hover,
.card[data-category="space"] .thumb:hover {
  transform: translateY(-2px);
  filter: brightness(70%);
  scale: 1.02;
  transition: all 0.3s ease;
}


.placeholder {
  width: 100%;
  aspect-ratio: 1.46 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.5), transparent 30%),
    linear-gradient(135deg, #d8c8b5, #8b8176);
  color: rgba(255,255,255,.75);
  font-weight: 800;
  letter-spacing: 1px;
}

.card-line {
  width: 100%;
  height: 2px;
  background: var(--red-soft);
  margin: 22px 0 18px;
}

.card-title {
  margin: 0;
  text-align: center;
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
}

.empty-slot {
  width: 300px;
  min-height: 210px;
  padding-top: calc(300px / 1.46 + 22px);
}

.empty-line {
  width: 100%;
  height: 2px;
  background: var(--red-soft);
}


.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.35);
  z-index: 20;
}

.modal.show {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(1200px, 92vw);
  height: min(720px, 86vh);
  background: var(--bg);
  box-shadow: 0 28px 80px rgba(0,0,0,.25);
  display: grid;
  grid-template-columns: 62% 38%;
  overflow: hidden;
}

.modal-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center bottom;
  background: #d8d1c4;
}

.modal-card.collection {
  grid-template-columns: 75% 25%;
}
.modal-card.collection img {
  object-position: 10% center;
  background: #ffffff;
}
.modal-info {
  padding: 46px 36px;
}

.modal-label {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--red-soft);
}

.modal-info h2 {
  margin: 0 0 18px;
  color: var(--red);
  font-size: 32px;
}

.modal-info p {
  line-height: 1.7;
}

.detail-button {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  font-size: small;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 34px;
  cursor: pointer;
  z-index: 2;
}
.modal-close:hover {
  color: #fff;
  scale: 1.2;
    transition: all 0.5s ease;
}

#modalLink:hover {
    /* opacity: 0.7; */
      background: #b9b9b9;
      scale: 1.03;
        transition: all 0.5s ease;
}
@media (max-width: 860px) {
  
  .tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .tabs button {
    width: calc(40% - 10px);
  }
  .gallery-wrap {
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0 24px 40px;
  }
  .gallery {
    grid-template-columns: 1fr;
    gap: 72px;
  }
  .top-buttons {
    top: 20px;
  }

  .card,
  .empty-slot {
    width: 100%;
  }
  .card img,
  .thumb {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
  }
    .card-title {
    font-size: 20px;
  }
  .empty-slot {
    display: none;
  }

  .modal-card,
  .modal-card.collection {
    width: 92vw;
    max-height: 86vh;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .modal-card .collection img {
    width: 100%;
    height: auto;
    max-height: 48vh;
    object-fit: contain;
    object-position: center center;
    background: #fff;
  }
  .modal-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    object-position: center 70%;
  }
/* .modal-card img .wellness img{
  object-position: bottom;
} */


  .modal-info {
    padding: 28px 26px 36px;
  }
}
