* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #222;
  background: #faf9f7;
}

header.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #e2ddd6;
  max-width: 800px;
  margin: 0 auto;
}
header.site-header img.logo { height: 48px; }
.header-meta {
  margin: 0.25rem 0 0;
  font-size: 0.6rem;
  font-weight: 400;
  line-height: 1.3;
  color: #000;
  text-align: center;
}
.phone {
  font-size: 1.25rem;
  font-weight: 700;
  color: #7a3b1e;
  text-decoration: none;
}

/* Header cell helpers */
.header-cell.center { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.header-cell.left, .header-cell.right { min-height: 48px; }

footer.site-footer .phone {
  font-size: 1rem;
  font-weight: 400;
}

footer.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

main { max-width: 800px; margin: 0 auto; padding: 1.25rem; padding-top: 0.625rem; }

.intro { text-align: center; margin-bottom: 1.5rem; }
.intro h1 { margin-bottom: 0.25rem; }
.intro h2 { margin-top: 0.5rem; margin-bottom: 0.25rem; }
.intro-bullets ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 auto;
  display: inline-block;
  text-align: left;
}
.intro-bullets li {
  margin: 0.25rem 0;
  font-size: 0.75rem;
  color: #444444;
}
.intro-bullets a {
  color: #444444;
  text-decoration: underline;
}
/* Color the list marker and text to match the element screenshot color */
.intro-bullets li::marker {
  color: #444444;
}

.search-box { display: flex; gap: 0.5rem; max-width: 420px; margin: 0 auto 1.5rem; }
.search-box input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}
.search-box button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  background: #7a3b1e;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.search-message { text-align: center; min-height: 1.5em; color: #a33; }

.type-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 800px) {
  .type-cards { grid-template-columns: 1fr; }
}
.type-card {
  background: #fff;
  border: 1px solid #e2ddd6;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
}
.type-card img { width: 100%; height: 220px; object-fit: contain; background: #fff; cursor: zoom-in; }
.type-card .card-body { padding: 0.35rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.type-card h2 { margin: 0 0 0.1rem; font-size: 0.92rem; font-weight: 700; }
.type-card p { flex: 1; color: #444; font-size: 0.84rem; text-align: center; }
.type-card a.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0.4rem auto 0;
  padding: 0.35rem 0.85rem;
  background: #c0392b;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  width: auto;
  min-width: 7.5rem;
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .type-card a.button {
    min-width: 0;
    padding: 0.35rem 0.75rem;
  }
}

.cross-shortcut { text-align: center; margin: 1.75rem 0; }
.cross-shortcut a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  padding: 0.35rem 0.9rem;
  background: #c0392b;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  width: auto;
  min-width: 12rem;
  max-width: 100%;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .cross-shortcut a {
    min-width: 0;
    padding: 0.35rem 0.75rem;
  }
}

/* Gallery page */
.filters { background: #fff; border: 1px solid #e2ddd6; border-radius: 10px; padding: 1rem; margin-bottom: 1.25rem; }
.filter-group { margin-bottom: 0.25rem; display: flex; align-items: center; flex-wrap: wrap; }
.label { font-weight: 700; margin-right: 0.5rem; display: inline-block; width: 5rem; text-align: right; font-size: 0.75rem; }
.capsule {
  display: inline-block;
  padding: 0.13rem 0.55rem;
  margin: 0.09rem;
  border: 1px solid #b8917a;
  border-radius: 999px;
  background: #fff;
  color: #7a3b1e;
  cursor: pointer;
  font-size: 0.6rem;
}
.capsule.active { background: #7a3b1e; color: #fff; }
.dropdown-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.33rem; align-items: center; }
.dropdown-row > div { display: flex; align-items: center; }
.dropdown-row label { font-weight: 700; margin-right: 0.4rem; font-size: 0.75rem; }
.dropdown-row .label { width: 5rem; }
.dropdown-row select { height: 17px; padding: 0.04rem 0.34rem; font-size: 0.56rem; border-radius: 6px; border: 1px solid #ccc; }
#weight-select { margin-left: 2px; }
.back-link { display: inline-block; margin-bottom: 0.375rem; color: #7a3b1e; text-decoration: none; }
.csr-portal-link { font-size: 0.7rem; }
.gallery-nav-link { font-size: 0.75rem; }

#page-title { margin-top: 0.25rem; margin-bottom: 0.5rem; font-size: 0.875rem; }

.search-field-row {
  margin-top: 0.627rem;
}
.search-field-row input {
  flex: none;
  min-width: 0;
  width: 123px;
  max-width: 100%;
  padding: 0.13rem 0.18rem;
  font-size: 0.63rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.search-field-row input#mid-search {
  width: 43px;
  margin-left: 0.5rem;
}
.filters .search-box {
  max-width: 100%;
  width: fit-content;
  margin: 0.5rem 0 0 88px;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.filters .search-box button {
  padding: 0.15rem 0.25rem;
  font-size: 0.63rem;
}

#group-list {
  background: #faf7f4;
}
#group-view-btn, #group-clear-btn {
  padding: 0.15rem 0.4rem;
  margin-left: 0.35rem;
  font-size: 0.63rem;
  border: 1px solid #b8917a;
  border-radius: 6px;
  background: #fff;
  color: #7a3b1e;
  cursor: pointer;
}
#group-view-btn:disabled, #group-clear-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.add-to-group-check {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.add-to-group-checkbox {
  width: 0.7rem;
  height: 0.7rem;
  margin: 0;
  accent-color: #7a3b1e;
  cursor: pointer;
}

.result-count { margin: 0.5rem 0 1rem; color: #555; }

.carpet-row {
  display: grid;
  grid-template-columns: 1fr 1fr 260px;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid #e2ddd6;
  border-radius: 10px;
  padding: 0.35rem;
  margin-bottom: 0.35rem;
  align-items: stretch;
  height: 180px;
  overflow: hidden;
}
@media (max-width: 750px) {
  .carpet-row { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .carpet-row .sample-photo, .carpet-row .color-photo { height: 160px; min-height: 0; }
}
.carpet-row img { width: 100%; height: 100%; min-height: 0; border-radius: 6px; cursor: zoom-in; }
/* Show the full image for sample and color photos (allow whitespace on sides) */
.carpet-row .sample-photo,
.carpet-row .color-photo {
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.carpet-row .specs { min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }

.specs { line-height: 1.1; max-width: 260px; width: 260px; margin: 0 auto; }
.specs h3 { margin: 0; font-size: 0.65rem; font-weight: normal; color: #222; line-height: 1.1; display: flex; align-items: center; gap: 0.3rem; }
.specs .bar-row { margin: 0.08rem 0; }
.specs .bar-label { font-size: 0.65rem; color: #555; }
.specs .bar-track { background: #eee; border-radius: 4px; height: 6px; overflow: hidden; max-width: 400px; }
.specs .bar-fill { height: 100%; }
.specs .bar-fill.cost-under { background: #e07b1a; }
.specs .bar-fill.cost-over { background: #c0392b; }
.specs .bar-fill.weight { background: #2c5f8a; }
.specs .field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem; }
.specs .field-row { font-size: 0.72rem; margin: 0.02rem 0; }
.specs .field-row span.field-label { font-weight: 600; }
.specs .field-row.tier-row { display: flex; justify-content: space-between; align-items: baseline; }
.specs .data-disclaimer { font-size: 0.54rem; font-family: inherit; color: #222; font-weight: normal; }
.specs .warranty-title { font-weight: 700; margin-top: 0.15rem; font-size: 0.72rem; }
.specs .warranty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.75rem; }
.specs .warranty-row { display: flex; justify-content: space-between; font-size: 0.65rem; border-bottom: 1px dotted #ddd; padding: 0 0; }

.access-gate { max-width: 800px; margin: 3rem auto; padding: 0 1.25rem; }
.access-gate-box { background: #fff; border: 1px solid #e2ddd6; border-radius: 10px; padding: 2rem 1.5rem; text-align: center; }
.access-gate-box h3 { margin: 0 0 0.5rem; }
.access-gate-box p { margin: 0 0 1rem; color: #555; }
.access-gate-form { display: flex; gap: 0.5rem; justify-content: center; }
.access-gate-form input { padding: 0.6rem 0.75rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; max-width: 200px; }
.access-gate-form button { padding: 0.6rem 1rem; border: none; border-radius: 6px; background: #7a3b1e; color: #fff; font-weight: 600; cursor: pointer; }
.access-gate-error { color: #a33; margin-top: 0.75rem !important; }

.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; z-index: 100;
}
.lightbox-overlay img { max-width: 92vw; max-height: 92vh; }
.hidden { display: none !important; }
