/* ==========================================================================
   contact-modal.css
   Styling for the "Get in Touch" modal (js/contact-modal.js injects the
   markup; this file styles it). Link this in the <head> of every page.
   ========================================================================== */

.cm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.55);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  z-index: 9999;
  padding: 0;
}
.cm-overlay[hidden] { display: none; }

.cm-modal {
  background: #fff;
  border-radius: 14px 0 0 14px;
  width: 100%;
  max-width: 460px;
  height: 100%;
  max-height: 100vh;
  overflow-y: auto;
  padding: 32px 28px 24px;
  position: relative;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.25);
  animation: cm-slide-in 0.28s ease-out;
}

@keyframes cm-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.cm-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}
.cm-close:hover { color: #222; }

.cm-modal h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}
.cm-subtitle {
  margin: 0 0 20px;
  color: #6b6b6b;
  font-size: 0.92rem;
}

.cm-field { margin-bottom: 16px; }
.cm-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}
.cm-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.cm-field input:focus {
  outline: none;
  border-color: #b08b3f;
}
.cm-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  box-sizing: border-box;
}
.cm-field textarea:focus {
  outline: none;
  border-color: #b08b3f;
}
.cm-field-optional {
  font-weight: 400;
  color: #999;
  font-size: 0.78rem;
}

.cm-field-row {
  display: flex;
  gap: 12px;
}
.cm-field-row .cm-field { flex: 1; }

/* ---- Selected requirement chips ---- */
.cm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.cm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f4ede1;
  border: 1px solid #e2d3b3;
  color: #4a3b1f;
  font-size: 0.8rem;
  padding: 5px 8px 5px 12px;
  border-radius: 20px;
}
.cm-chip button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: #8a7654;
  padding: 0;
}
.cm-chip button:hover { color: #b00; }

/* ---- Category / subcategory / product browser ---- */
.cm-browser {
  border: 1px solid #e4e0d8;
  border-radius: 10px;
  overflow: hidden;
}
.cm-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  background: #faf8f4;
  border-bottom: 1px solid #e4e0d8;
  font-size: 0.8rem;
}
.cm-breadcrumb button {
  background: none;
  border: none;
  cursor: pointer;
  color: #8a6d2e;
  font-size: 0.8rem;
  padding: 2px 4px;
}
.cm-breadcrumb button:hover { text-decoration: underline; }
.cm-breadcrumb .cm-crumb-sep { color: #bbb; }
.cm-breadcrumb .cm-crumb-current {
  color: #444;
  font-weight: 600;
  padding: 2px 4px;
}

.cm-list {
  max-height: 220px;
  overflow-y: auto;
}
.cm-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.88rem;
  cursor: pointer;
  border-bottom: 1px solid #f0ede6;
}
.cm-list-item:last-child { border-bottom: none; }
.cm-list-item:hover { background: #faf6ec; }
.cm-list-item.cm-selected {
  background: #f4ede1;
  font-weight: 600;
}
.cm-list-item .cm-item-sub {
  color: #999;
  font-size: 0.75rem;
  font-weight: 400;
}
.cm-list-empty,
.cm-list-loading {
  padding: 18px 14px;
  font-size: 0.85rem;
  color: #999;
  text-align: center;
}
.cm-list-arrow { color: #bbb; font-size: 0.8rem; }

.cm-submit {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.cm-status {
  margin: 10px 0 0;
  font-size: 0.85rem;
  text-align: center;
}
.cm-status.cm-status-error { color: #b00020; }
.cm-status.cm-status-success { color: #1a7d34; }

@media (max-width: 520px) {
  .cm-field-row { flex-direction: column; gap: 0; }
  .cm-modal { padding: 24px 18px 20px; max-width: 100%; border-radius: 0; }
}

/* ==========================================================================
   "Get in Touch" trigger buttons (navbar + footer)
   Applies sitewide since contact-modal.css is linked on every page.
   ========================================================================== */

/* Navbar: keeps the regular nav links (Home, Products, Brands, etc.)
   perfectly centered as a group, while pinning #getInTouchBtn to the
   extreme right edge of the navbar — independent of the other links,
   via CSS only (no markup changes).
   .nav-links must stretch to fill its grid column first — the navbar's
   .wrap uses justify-items:center, which otherwise shrinks .nav-links
   to its own content width. Centering the links inside that full-width
   row keeps them visually centered on the page, and taking the button
   out of the flex flow (position:absolute) means it doesn't disturb
   that centering — it just docks to the far right independently. */
.navbar .wrap .nav-links {
  justify-self: stretch;
  position: relative;
  justify-content: center;
}
.nav-links #getInTouchBtn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0;
}

/* Footer: reuses the site's existing gold accent (already used for footer
   headings, social-icon hover, and the newsletter button) so the trigger
   blends into the dark footer theme instead of looking like a light-page
   button dropped in. */
.footer-cta { margin-top: 16px; padding: 12px 22px; font-size: .72rem; border-color: var(--gold); }
.footer-cta::before { background: var(--gold); }
.footer-cta:hover { color: var(--dark); border-color: var(--gold); }