/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Georgia', serif;
  background: #f5f0eb;
  color: #2c1f10;
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: #2c1f10;
  color: #f5f0eb;
  padding: 1.8rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  background: #f5f0eb;
  border-radius: 50%;
  padding: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tagline {
  font-size: 1rem;
  opacity: 0.75;
  font-style: italic;
  text-align: center;
}

.header-text {
  text-align: center;
  flex: 1;
}

header h1 {
  font-size: 2.4rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  text-align: center;
}

header p {
  font-size: 1rem;
  opacity: 0.75;
  font-style: italic;
}

@media (max-width: 520px) {
  header {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
    padding: 1.5rem 1rem;
  }
  .header-text { text-align: center; }
  .header-logo { width: 120px; height: 120px; }
  header h1 { font-size: 1.8rem; }
}

/* ── Main Layout ── */
main {
  max-width: 860px;
  margin: 2.5rem auto;
  padding: 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ── Section Headings ── */
h2 {
  font-size: 1.4rem;
  color: #5a3820;
  border-bottom: 2px solid #c8a96e;
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
}

/* ── Board Cards ── */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.board-card {
  background: #fff8f0;
  border: 2px solid #ddd0bb;
  border-radius: 10px;
  padding: 0 1.2rem 1.2rem;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.popular-badge {
  background: #c8a96e;
  color: #3a2208;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.18rem 0.65rem;
  border-radius: 0 0 6px 6px;
  display: inline-block;
  margin-bottom: 0.5rem;
  opacity: 0.85;
}

.board-photo-wrap {
  margin: 0 -1.2rem 0.8rem;
  background: #f0e8dc;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.board-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.board-photo-wrap.photo-missing::after {
  content: "Photo coming soon";
  font-size: 0.8rem;
  color: #a08060;
  font-style: italic;
}

.board-photo-wrap.photo-missing .board-photo {
  display: none;
}

.board-dimensions {
  font-size: 0.78rem !important;
  color: #9a7a60 !important;
  font-style: italic;
  margin-bottom: 0.2rem !important;
  letter-spacing: 0.02em;
}

.board-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #2c1f10;
}

.board-card p {
  font-size: 0.85rem;
  color: #6b5040;
  margin-bottom: 0.5rem;
}

.board-note {
  font-size: 0.9rem;
  color: #5a3820;
  font-style: italic;
  background: #f5e6d3;
  border-left: 4px solid #c8a96e;
  padding: 0.7rem 1rem;
  margin: 0 0 1.2rem 0;
  text-align: left;
  border-radius: 4px;
}

.board-card .price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #3d7a3d;
  margin-bottom: 0.8rem;
}

.board-card.selected {
  border-color: #8b4513;
  box-shadow: 0 0 0 3px #c8a96e55;
}

.select-btn {
  background: #2c1f10;
  color: #f5f0eb;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.select-btn:hover { background: #5a3820; }

.select-btn.selected-btn {
  background: #8b4513;
}

/* ── Board Includes List ── */
.includes-list {
  list-style: none;
  margin: 0.4rem 0 0.8rem;
  padding: 0;
  text-align: left;
  font-size: 0.78rem;
  color: #6b5040;
  border-top: 1px dashed #ddd0bb;
  padding-top: 0.5rem;
}

.includes-list li {
  padding: 0.15rem 0;
  padding-left: 1rem;
  position: relative;
}

.includes-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #3d7a3d;
  font-size: 0.7rem;
}

/* ── Stain Swatches ── */
.stain-swatches {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.swatch {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 3px solid transparent;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.swatch span {
  font-size: 0.65rem;
  color: #fff;
  background: rgba(0,0,0,0.45);
  width: 100%;
  text-align: center;
  padding: 2px 0;
  border-radius: 0 0 5px 5px;
  position: relative;
  z-index: 1;
}

.swatch:hover { transform: scale(1.07); }
.swatch.active { border-color: #f5f0eb; outline: 2px solid #8b4513; }

/* ── Large Hover Preview ── */
.swatch::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.9);
  transform-origin: bottom center;
  width: 340px;
  height: 340px;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 5px solid #fff8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
  color: #fff;
  font-family: 'Georgia', serif;
  font-size: 1.05rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-align: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.6);
}

.swatch:hover::after,
.swatch:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

@media (max-width: 520px) {
  .swatch::after {
    width: 220px;
    height: 220px;
  }
}

/* ── Form Elements ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

label {
  font-size: 0.95rem;
  font-weight: bold;
  color: #3d2810;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  padding: 0.6rem 0.8rem;
  border: 1.5px solid #c8a96e;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff8f0;
  color: #2c1f10;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #8b4513;
}

input[type="file"] {
  font-size: 0.9rem;
  color: #5a3820;
}

.hint {
  font-size: 0.78rem;
  color: #8b6f55;
  font-style: italic;
}

.section-intro {
  font-size: 0.95rem;
  color: #2c1f10;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

/* ── Logo Method ── */
.logo-method-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.logo-method-option {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: #fff8f0;
  border: 2px solid #c8a96e;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.logo-method-option:has(input:checked) {
  border-color: #8b4513;
  background: #f5e6d3;
}

.logo-method-option input[type="radio"] {
  accent-color: #8b4513;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}

.logo-method-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logo-method-content strong {
  font-size: 1rem;
  color: #3d1f0a;
}

.logo-method-content span {
  font-size: 0.85rem;
  color: #6b5040;
}

.method-note {
  margin-top: 0.8rem;
}

/* ── Delivery Method ── */
.delivery-intro {
  font-size: 0.95rem;
  color: #2c1f10;
  margin-bottom: 0.9rem;
}

.delivery-options {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.delivery-option {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: #fff8f0;
  border: 2px solid #c8a96e;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.delivery-option:has(input:checked) {
  border-color: #8b4513;
  background: #f5e6d3;
}

.delivery-option input[type="radio"] {
  accent-color: #8b4513;
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  cursor: pointer;
  flex-shrink: 0;
}

.delivery-option-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.delivery-option-content strong {
  font-size: 1rem;
  color: #2c1f10;
}

.delivery-option-content span {
  font-size: 0.85rem;
  color: #6b5040;
  line-height: 1.4;
}

/* ── Payment Methods ── */
.payment-box {
  background: #fff8f0;
  border: 1.5px solid #c8a96e;
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
}

.payment-intro {
  font-size: 0.95rem;
  color: #2c1f10;
  margin-bottom: 0.8rem;
}

.payment-methods {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0;
}

.payment-methods li {
  background: #f5e6d3;
  border: 1.5px solid #c8a96e;
  color: #5a3820;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
}

.payment-note {
  font-size: 0.9rem;
  color: #5a3820;
  font-style: italic;
  border-top: 1px dashed #ddd0bb;
  padding-top: 0.8rem;
  margin-top: 0.4rem;
}

/* ── Order Summary ── */
#summary-box {
  background: #fff8f0;
  border: 1.5px solid #c8a96e;
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

#summary-box p { font-size: 0.95rem; }
#summary-box span { color: #5a3820; }

/* ── Continue Button ── */
.continue-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.2rem;
}

.continue-btn {
  background: #8b4513;
  color: #fff8f0;
  border: none;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
}

.continue-btn:hover {
  background: #5a3820;
  transform: translateX(3px);
}

@media (max-width: 600px) {
  .continue-row {
    justify-content: stretch;
  }
  .continue-btn {
    width: 100%;
    text-align: center;
  }
}

/* ── Submit Button ── */
#submit-btn {
  display: block;
  width: 100%;
  background: #3d7a3d;
  color: #fff;
  border: none;
  padding: 1.2rem 2rem;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(61, 122, 61, 0.4);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

#submit-btn:hover {
  background: #2f5e2f;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(61, 122, 61, 0.5);
}

#submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(61, 122, 61, 0.3);
}

#submit-btn:disabled {
  background: #7aaa7a;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Success Message ── */
#success-message {
  background: #eaf4ea;
  border: 2px solid #3d7a3d;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
}

#success-message h2 { color: #2f5e2f; border: none; }
#success-message p { margin-top: 0.8rem; font-size: 1rem; color: #3d5e3d; }
#success-message .response-time {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-style: italic;
  color: #5a7a5a;
}

.success-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.print-btn {
  background: #2c1f10;
  color: #f5f0eb;
  border: none;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.print-btn:hover {
  background: #5a3820;
}

.order-again-btn {
  display: inline-block;
  background: transparent;
  color: #2f5e2f;
  border: 2px solid #3d7a3d;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.order-again-btn:hover {
  background: #3d7a3d;
  color: #fff;
}

/* ── Print Summary (screen: hidden) ── */
#print-summary {
  display: none;
}

/* ── Print styles ── */
@media print {
  body * { visibility: hidden; }

  #print-summary,
  #print-summary * {
    visibility: visible;
  }

  #print-summary {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    font-family: Georgia, serif;
    color: #2c1f10;
    background: #fff;
  }

  .print-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    border-bottom: 2px solid #c8a96e;
    padding-bottom: 1rem;
    margin-bottom: 1.2rem;
  }

  .print-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: contain;
    border: 2px solid #c8a96e;
  }

  .print-header h1 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
  }

  .print-header p {
    font-size: 0.85rem;
    color: #5a3820;
    margin: 0;
  }

  .print-email {
    font-weight: bold;
  }

  #print-summary h2 {
    font-size: 1.2rem;
    color: #5a3820;
    margin-bottom: 0.8rem;
  }

  #print-details table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
  }

  #print-details th {
    text-align: left;
    padding: 0.45rem 0.8rem;
    background: #f5e6d3;
    width: 38%;
    font-weight: bold;
    color: #3d1f0a;
    border: 1px solid #ddd0bb;
  }

  #print-details td {
    padding: 0.45rem 0.8rem;
    border: 1px solid #ddd0bb;
    color: #2c1f10;
  }

  #print-details tr:nth-child(even) td {
    background: #fdf8f3;
  }

  .print-footer-note {
    margin-top: 1.2rem;
    font-style: italic;
    font-size: 0.88rem;
    color: #5a3820;
  }

  .print-date {
    font-size: 0.8rem;
    color: #8b6f55;
    margin-top: 0.3rem;
  }
}

/* ── Utility ── */
.hidden { display: none; }

/* ── Required field marker ── */
.req {
  color: #c0392b;
  margin-left: 2px;
  font-style: normal;
}

h2 .req {
  font-size: 1rem;
}

/* ── Inline validation ── */
.field-error {
  font-size: 0.82rem;
  color: #c0392b;
}

input.invalid {
  border-color: #c0392b;
  background: #fff5f5;
}

/* ── Marble Color Selectors ── */
.label-sub {
  font-size: 0.78rem;
  font-weight: normal;
  color: #8b6f55;
  font-style: italic;
}

.marble-row {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.marble-slot {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 180px;
}

.marble-slot-label {
  font-size: 0.85rem;
  font-weight: bold;
  color: #5a3820;
}

.custom-color-input {
  margin-top: 0.3rem;
}

/* ── Contact Method Options ── */
.contact-options {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff8f0;
  border: 2px solid #c8a96e;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: #2c1f10;
  transition: border-color 0.2s, background 0.2s;
}

.contact-option:has(input:checked) {
  border-color: #8b4513;
  background: #f5e6d3;
}

.contact-option input[type="radio"] {
  accent-color: #8b4513;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ── Mobile Improvements ── */
@media (max-width: 600px) {
  main {
    padding: 0 0.8rem;
    gap: 1.8rem;
    margin: 1.5rem auto;
  }

  .board-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stain-swatches {
    justify-content: center;
  }

  .swatch {
    width: 75px;
    height: 75px;
  }

  .marble-row {
    flex-direction: column;
    gap: 0.8rem;
  }

  .marble-slot {
    min-width: unset;
    width: 100%;
  }

  .contact-options {
    flex-direction: column;
    gap: 0.5rem;
  }

  .contact-option {
    width: 100%;
  }

  .delivery-option,
  .logo-method-option {
    padding: 0.75rem 0.9rem;
  }

  #summary-box {
    padding: 1rem;
  }

  #submit-btn {
    font-size: 1.1rem;
    padding: 1rem;
  }
}

@media (max-width: 380px) {
  .board-grid {
    grid-template-columns: 1fr;
  }
}

/* Suppress hover popup on touch-only devices */
@media (hover: none) {
  .swatch::after {
    display: none;
  }
}

/* ── Restore Notice ── */
.restore-notice {
  background: #eaf4ea;
  border: 1.5px solid #3d7a3d;
  color: #2f5e2f;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-align: center;
  animation: fadeout 4s forwards;
}

@keyframes fadeout {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── FAQ Section ── */
.faq-section {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  padding: 0 1.2rem;
  opacity: 0.85;
}

.faq-section h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b6f55;
  border-bottom: 1px solid #ddd0bb;
  padding-bottom: 0.3rem;
  margin-bottom: 0.7rem;
  font-weight: 600;
}

.faq-item {
  border-bottom: 1px solid #e8ddd0;
  margin-bottom: 0;
  overflow: hidden;
  background: none;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 0.55rem 0;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5a3820;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  transition: color 0.15s;
}

.faq-question:hover {
  color: #8b4513;
}

.faq-icon {
  font-size: 1rem;
  font-weight: normal;
  color: #c8a96e;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0;
}

.faq-answer p {
  font-size: 0.82rem;
  color: #6b5040;
  line-height: 1.55;
  padding-bottom: 0.65rem;
  margin: 0;
}

.faq-item.open .faq-answer {
  max-height: 200px;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

@media (max-width: 600px) {
  .faq-section {
    padding: 0 0.8rem;
  }
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: #8b6f55;
  margin-top: 3rem;
  border-top: 1px solid #ddd0bb;
}

.footer-contact {
  font-size: 0.95rem;
  color: #5a3820;
  margin-bottom: 0.6rem;
}

.footer-contact a {
  color: #8b4513;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 1px dashed #c8a96e;
}

.footer-contact a:hover {
  color: #5a3820;
  border-bottom-style: solid;
}