/* Carpets Plus WY — In-Stock Flooring page */

:root {
  --red: #d32f2f;
  --red-dark: #b32222;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --line: #e3e3e3;
  --bg-soft: #f6f6f4;
  --green: #2f7a3d;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}

a { color: inherit; text-decoration: none; }

/* ---------- Top bar ---------- */
.topbar {
  background: #111;
  color: #fff;
  font-size: 13px;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { opacity: .9; }
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar__locations span { opacity: .7; margin-right: 6px; }
.topbar__right { display: flex; gap: 18px; align-items: center; }

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 12px;
}
.nav__logo img { height: 46px; display: block; }
.nav__links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 15px;
}
.nav__links a.active { color: var(--red); }
.nav__cta {
  background: var(--red);
  color: #fff;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}
.nav__cta:hover { background: var(--red-dark); }

/* ---------- Hero ---------- */
.hero {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 56px 24px 48px;
}
.hero__eyebrow {
  color: #ff6b5e;
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 13px;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  margin: 0 0 16px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.hero p {
  max-width: 640px;
  margin: 0 auto;
  color: #ccc;
  font-size: 17px;
  line-height: 1.5;
}

/* ---------- Filter bar ---------- */
.filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 6px;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}
.filters button:hover { border-color: #bbb; }
.filters button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.item-count { color: #888; font-size: 14px; white-space: nowrap; }
.price-note {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 14px;
  color: #999;
  font-size: 12.5px;
}
.price-note a { color: inherit; text-decoration: underline; }
.filterbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.sort-select {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a4a4a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}
.sort-select:hover { border-color: #bbb; }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 18px 24px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card__media.has-photo { cursor: zoom-in; touch-action: pan-y; }
.card__dots {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.card__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.card__dots span.active { background: #fff; }

.card__media.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.no-photo__inner {
  text-align: center;
  color: #9a978f;
  padding: 12px;
}
.no-photo__inner svg { width: 34px; height: 34px; margin-bottom: 6px; opacity: .55; }
.no-photo__inner span { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 5px 9px;
  border-radius: 4px;
}
.price-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--red);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
}
.expand-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s ease;
}
.card__media.has-photo:hover .expand-hint { opacity: 1; }
.expand-hint svg { width: 15px; height: 15px; }
.photo-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.card__category {
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.card__name { font-size: 16.5px; font-weight: 700; line-height: 1.25; }
.card__color { color: var(--ink-soft); font-size: 14px; }
.card__spec { color: #888; font-size: 12.5px; }
.card__sqft { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.card__sqft strong { color: var(--ink); }

.card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.card__cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 6px;
}
.card__cta svg { width: 15px; height: 15px; flex: none; }
.card__cta--call { background: var(--ink); color: #fff; }
.card__cta--call:hover { opacity: .85; }
.card__cta--text:hover { background: var(--ink); color: #fff; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 60px 24px;
  color: #888;
}

/* ---------- Footer CTA ---------- */
.footer-cta {
  background: var(--bg-soft);
  text-align: center;
  padding: 48px 24px;
}
.footer-cta h2 { margin: 0 0 8px; font-size: 24px; }
.footer-cta p { color: var(--ink-soft); margin: 0 0 20px; }
.footer-cta a {
  display: inline-flex;
  background: var(--red);
  color: #fff;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 700;
}
.footer-cta a:hover { background: var(--red-dark); }

footer.site-footer {
  text-align: center;
  padding: 22px 24px 30px;
  color: #888;
  font-size: 13px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 24px;
  overflow-y: auto;
}
.lightbox.open { display: flex; }
.lightbox__frame {
  position: relative;
  max-width: min(90vw, 900px);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__img-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 6px;
  display: block;
}
.lightbox__caption {
  color: #fff;
  text-align: center;
  margin-top: 14px;
}
.lightbox__caption .name { font-weight: 700; font-size: 16px; }
.lightbox__caption .color { color: #bbb; font-size: 14px; }

.lightbox__info {
  max-width: 480px;
  margin: 14px auto 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.lightbox__info:empty { display: none; border: none; padding: 0; margin: 0; }
.lightbox__features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-bottom: 10px;
}
.lightbox__features span {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
}
.lightbox__blurb {
  color: #ccc;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}
.lightbox__source {
  color: #888;
  font-size: 11px;
  margin-top: 8px;
}
.lightbox__actions {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 16px auto 0;
}
.lightbox__cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid #fff;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 6px;
}
.lightbox__cta svg { width: 16px; height: 16px; flex: none; }
.lightbox__cta--call { background: #fff; color: #1a1a1a; }
.lightbox__cta--call:hover { opacity: .85; }
.lightbox__cta--text:hover { background: #fff; color: #1a1a1a; }
.lightbox__close {
  /* Fixed to the viewport (not the frame) so it stays reachable even when the
     frame grows taller than the screen and the overlay scrolls (e.g. Luxury
     Vinyl / Carpet items now show a features & care-info panel below the photo). */
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__nav.prev { left: -8px; }
.lightbox__nav.next { right: -8px; }
.lightbox__dots {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.lightbox__dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  padding: 0;
}
.lightbox__dots button.active { background: #fff; }

@media (max-width: 640px) {
  .lightbox__nav.prev { left: 4px; }
  .lightbox__nav.next { right: 4px; }
}
