* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #ece7ef;
  color: #1c1b1d;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

#wrapper {
  width: 92%;
  max-width: 1280px;
  margin: 0 auto;
  background-color: #f4eef6;
}

header,
footer {
  background-color: #dacfe0;
  border: 1px solid #8d8293;
  text-align: center;
  padding: 1.25rem;
}

header h1 {
  margin: 0;
}

.tagline {
  margin-top: 0.5rem;
}

nav {
  background-color: #d3c6da;
  border-left: 1px solid #8d8293;
  border-right: 1px solid #8d8293;
  border-bottom: 1px solid #8d8293;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

nav li {
  flex: 1 1 14%;
}

nav a {
  display: block;
  padding: 0.9rem;
  text-align: center;
  text-decoration: none;
  color: #1c1b1d;
  font-weight: bold;
}

nav a:hover {
  background-color: #c4b4cc;
}

main {
  border-left: 1px solid #8d8293;
  border-right: 1px solid #8d8293;
  padding: 1rem;
}

.two-col-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.box {
  background-color: #ebe2ef;
  border: 1px solid #9d92a4;
  padding: 1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #8d8293;
}

figure {
  margin: 1rem 0;
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.link-list {
  padding-left: 1.2rem;
}

.form-row {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: bold;
}

input[type="text"],
select {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #8d8293;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.form-buttons input,
.filter-buttons button {
  padding: 0.7rem 1rem;
  margin-right: 0.5rem;
  margin-top: 0.3rem;
  border: 1px solid #8d8293;
  background-color: #d8cbe0;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
}

.form-buttons input:hover,
.filter-buttons button:hover,
.active-btn {
  background-color: #c8b8d0;
}

.error-message {
  display: block;
  color: #8b0000;
  margin-top: 0.3rem;
  font-size: 0.9rem;
}

.hidden-panel {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

caption {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

th,
td {
  border: 1px solid #8d8293;
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  background-color: #d9cde0;
}

.guide-section {
  margin-top: 1rem;
}

.guide-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.guide-gallery img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

.formula-list {
  padding-left: 1.5rem;
}

.formula-list li {
  margin-bottom: 0.5rem;
}

/* Outfit formulas page */
.formula-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

.formula-description {
  margin-top: 0;
}

.formula-side {
  display: flex;
  justify-content: flex-end;
}

.formula-side img {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
  margin-left: auto;
}

.formula-extra-box {
  margin-top: 1rem;
}

/* Lookbook slideshow */
#slideshow {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 600px;
  margin: 0 auto;
  overflow: hidden;
}

#slideshow .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

#slideshow .slide:first-child {
  display: block;
}

/* Lookbook grid images */
.lookbook-grid img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

/* Capsule wardrobe */
.checklist-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.capsule-images img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

.capsule-layout {
  margin-top: 1rem;
}

.capsule-steps,
.capsule-tips {
  padding-left: 1.5rem;
}

.capsule-steps li,
.capsule-tips li {
  margin-bottom: 0.5rem;
}

/* Mix and Match arrows + stacked rows */
.mix-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.mix-row {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: 1rem;
}

.mix-row img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.arrow-btn {
  width: 60px;
  height: 60px;
  border: 1px solid #8d8293;
  background-color: #d8cbe0;
  cursor: pointer;
  font-size: 1.8rem;
  font-family: Georgia, "Times New Roman", serif;
}

.arrow-btn:hover {
  background-color: #c8b8d0;
}

/* Mix and Match sidebar */
.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mix-tips {
  padding-left: 1.5rem;
  margin: 0;
}

.mix-tips li {
  margin-bottom: 0.6rem;
}

@media only screen and (max-width: 768px) {
  #wrapper {
    width: 100%;
  }

  nav ul {
    flex-direction: column;
  }

  nav li {
    flex: 1 1 100%;
  }

  .two-col-layout,
  .card-grid,
  .guide-gallery,
  .formula-layout {
    grid-template-columns: 1fr;
  }

  #slideshow {
    height: 300px;
  }

  .lookbook-grid img {
    height: 220px;
  }

  .guide-gallery img {
    height: 320px;
  }

  .capsule-images img {
    height: 220px;
  }

  .formula-side {
    justify-content: center;
  }

  .formula-side img {
    max-width: 250px;
    margin: 0 auto;
  }

  .mix-row {
    grid-template-columns: 45px 1fr 45px;
    gap: 0.5rem;
  }

  .mix-row img {
    max-width: 220px;
    height: auto;
  }

  .arrow-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}