/* ==========================================================================
   Fire & Dine — rebuilt components
   ==========================================================================
   Styles for the parts of the site that are now rendered on the server and had
   no stylesheet of their own before: the product grid and its filters,
   pagination, forms, alerts and interactive storefront controls.

   theme.css keeps the brand look (colours, typography, heroes, footer);
   this file only adds what the new markup needs, and reuses the same variables
   so the two stay in step.
   ========================================================================== */

:root {
  --fd-gold: #fcbc4d;
  --fd-ink: #08090a;
  --fd-body: #5a5752;
  --fd-line: #e6e2dc;
  --fd-surface: #ffffff;
  --fd-surface-alt: #faf8f5;
  --fd-radius: 8px;
  --fd-danger: #b42318;
  --fd-success: #067647;
  --fd-warning: #b54708;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 200;
  padding: 12px 22px;
  background: var(--fd-gold);
  color: var(--fd-ink);
  font-weight: 700;
  border-radius: 0 0 var(--fd-radius) 0;
}
.skip-link:focus { left: 0; top: 0; }

.shell-narrow { max-width: 820px; }

/* --- Header additions ----------------------------------------------------- */

.header-actions { display: flex; align-items: center; gap: 14px; }

.header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
}
.header-search-btn:hover { background: rgba(255, 255, 255, .12); }

/* The header sets `color: #fff`, so the search utility stays readable. */
.header-search-btn { color: #fff; }

body.nav-open { overflow: hidden; }
/* site.js sets `search-open` alongside `dialog.hidden = false`; nothing consumed
   it, so the page kept scrolling underneath the modal. Same lock as the drawer. */
body.search-open { overflow: hidden; }

/* --- Search overlay ------------------------------------------------------- */

.fd-search-dialog {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 12vh 20px 20px;
  background: rgba(8, 9, 10, .72);
  backdrop-filter: blur(3px);
}
.fd-search-dialog[hidden] { display: none; }

.fd-search-dialog-panel {
  width: min(100%, 640px);
  background: var(--fd-surface);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.fd-search-dialog form { display: flex; gap: 10px; align-items: center; }
.fd-search-dialog input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  font: inherit;
  font-size: 16px;
}
.fd-search-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--fd-body);
  padding: 0 6px;
}

.fd-live-results { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.fd-live-result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-radius: var(--fd-radius);
  color: var(--fd-ink);
  text-decoration: none;
}
.fd-live-result:hover { background: var(--fd-surface-alt); }
.fd-live-result img { width: 48px; height: 48px; object-fit: cover; border-radius: 5px; }
.fd-live-result-name { font-weight: 600; font-size: 15px; }
.fd-live-result-price { color: var(--fd-body); font-size: 14px; white-space: nowrap; }
.fd-live-empty { margin: 14px 0 0; color: var(--fd-body); font-size: 14px; }

/* --- Product grid --------------------------------------------------------- */

.products,
.fd-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px;
}

.product {
  display: flex;
  flex-direction: column;
  background: var(--fd-surface);
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.product:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(8, 9, 10, .12); }
.product-media { position: relative; display: block; background: var(--fd-surface-alt); }
.product-media img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

.product-flag {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.product-flag-featured { background: var(--fd-gold); color: var(--fd-ink); }
.product-flag-stock { background: var(--fd-ink); color: #fff; top: auto; bottom: 12px; }

.product-info { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 20px; flex: 1; }
.product-info h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.product-info h3 a { color: inherit; text-decoration: none; }
.product-info h3 a:hover { color: var(--fd-gold); }
.product-info .spec { margin: 0; color: var(--fd-body); font-size: 14px; }
.product-info .price { margin: auto 0 0; font-size: 18px; font-weight: 700; }

.fd-product-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.section-actions { justify-content: center; margin-top: 34px; }

/* --- Shop layout ---------------------------------------------------------- */

.fd-shop {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-top: 26px;
}
.fd-shop-main { min-width: 0; }

.fd-shop-sidebar {
  padding: 20px 18px;
  background: var(--fd-surface-alt);
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  position: sticky;
  top: 106px;
}
.fd-shop-sidebar h2 { margin: 0 0 14px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; }
.fd-filter-group { display: flex; flex-direction: column; margin-bottom: 14px; }
.fd-filter-group a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
}
.fd-filter-group a:hover { background: var(--fd-surface-alt); }
.fd-filter-group a[aria-current] { background: var(--fd-ink); color: #fff; font-weight: 600; }
.fd-subfilter { padding-left: 24px !important; font-size: 14px !important; }
.fd-filter-count { color: inherit; opacity: .6; font-size: 13px; }

.fd-shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fd-line);
}
.fd-search { display: flex; gap: 8px; flex: 1 1 280px; min-width: 0; }
.fd-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  font: inherit;
}
.fd-shop-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fd-shop-control { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.fd-shop-control select { padding: 9px 11px; border: 1px solid var(--fd-line); border-radius: var(--fd-radius); font: inherit; }
.fd-shop-check input { width: 16px; height: 16px; accent-color: var(--fd-gold); }

.fd-count { margin: 18px 0 22px; color: var(--fd-body); font-size: 14px; }

@media (max-width: 900px) {
  .fd-shop { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .fd-shop-sidebar { order: 2; position: static; }
}

/* --- Pagination ----------------------------------------------------------- */

.fd-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--fd-line);
}
.fd-pagination a,
.fd-pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.fd-pagination a:hover { border-color: var(--fd-ink); }
.fd-pagination-current { background: var(--fd-ink); border-color: var(--fd-ink); color: #fff; }
.fd-pagination-gap { padding: 0 4px; color: var(--fd-body); }

/* --- Product detail ------------------------------------------------------- */

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 26px;
}
@media (max-width: 900px) { .product-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

.product-main-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--fd-radius);
  background: var(--fd-surface-alt);
}

.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.thumbs .thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  line-height: 0;
}
.thumbs .thumb.is-active { border-color: var(--fd-gold); }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; display: block; }

.product-copy-column .sku { margin: 0 0 6px; color: var(--fd-body); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.product-copy-column .price { margin: 0 0 10px; font-size: 30px; font-weight: 700; }

.product-stock { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; font-size: 14px; }
.product-stock.is-in-stock { color: var(--fd-success); }
.product-stock.is-out-of-stock { color: var(--fd-warning); }

.product-intro { color: var(--fd-body); line-height: 1.65; margin-bottom: 24px; }
.product-intro p:first-child { margin-top: 0; }

.product-configurator { display: flex; flex-direction: column; gap: 22px; }

.product-option-group { margin: 0; padding: 0; border: 0; }
.product-option-group legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.required-marker { color: var(--fd-danger); }

.product-option-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }

.product-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "input label" "input price";
  gap: 2px 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  cursor: pointer;
}
.product-option:has(input:checked) { border-color: var(--fd-gold); box-shadow: 0 0 0 1px var(--fd-gold); }
.product-option:has(input:disabled) { cursor: default; opacity: .8; }
.product-option input { grid-area: input; accent-color: var(--fd-gold); width: 17px; height: 17px; }
.product-option-label { grid-area: label; font-weight: 600; font-size: 15px; }
.product-option-price { grid-area: price; color: var(--fd-body); font-size: 13px; }

.product-quantity { display: flex; align-items: center; gap: 12px; }
.product-quantity label { font-weight: 600; font-size: 14px; }
.qty {
  width: 84px;
  padding: 10px 12px;
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  font: inherit;
}

.product-live-total { margin: 0; min-height: 22px; font-size: 15px; font-weight: 600; }
.product-live-total.is-quote { font-weight: 500; color: var(--fd-body); }
.product-live-total.is-error { color: var(--fd-danger); font-weight: 500; }

.product-note { margin: 0; color: var(--fd-body); font-size: 13.5px; }

.product-detail-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; margin-top: 26px; }
.product-description { line-height: 1.7; }
.product-description :first-child { margin-top: 0; }

.fd-spec-list { display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.fd-spec-list dt { font-weight: 700; font-size: 14px; }
.fd-spec-list dd { margin: 0; color: var(--fd-body); font-size: 14px; }

.fd-table-wrap { overflow-x: auto; }
.fd-spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.fd-spec-table th, .fd-spec-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--fd-line); }
.fd-spec-table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }

/* --- Forms ---------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.field > label, .field > legend { font-size: 14px; font-weight: 600; }
.field-optional { color: var(--fd-body); font-weight: 400; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  background: #fff;
  font: inherit;
  font-size: 15px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--fd-gold);
  outline-offset: 1px;
  border-color: var(--fd-gold);
}

.field-help { margin: 0; color: var(--fd-body); font-size: 13px; line-height: 1.55; }
.field-inline-options { display: flex; gap: 18px; flex-wrap: wrap; }
.field-inline-option { display: flex; align-items: center; gap: 7px; font-size: 15px; }
.field-inline-option input { accent-color: var(--fd-gold); width: 17px; height: 17px; }

.captcha-notice a { color: inherit; }

/* The honeypot must be reachable by a bot but never by a person. */
.fd-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.contact-form { display: flex; flex-direction: column; gap: 20px; }

.btn-block { width: 100%; }
.btn-small { padding: 8px 14px; font-size: 13px; }
.btn-text { background: transparent; border-color: transparent; text-decoration: underline; }

/* --- Alerts and empty states ---------------------------------------------- */

.fd-alert {
  margin: 0 0 22px;
  padding: 14px 18px;
  border-radius: var(--fd-radius);
  border: 1px solid transparent;
  font-size: 15px;
}
.fd-alert-success { background: #ecfdf3; border-color: #abefc6; color: var(--fd-success); }
.fd-alert-error { background: #fef3f2; border-color: #fecdca; color: var(--fd-danger); }
.fd-alert-warning { background: #fffaeb; border-color: #fedf89; color: var(--fd-warning); }

.fd-empty-state {
  padding: 60px 24px;
  text-align: center;
  border: 1px dashed var(--fd-line);
  border-radius: var(--fd-radius);
}
.fd-empty-state h2 { margin: 0 0 10px; font-size: 22px; }
.fd-empty-state p { margin: 0 auto 22px; max-width: 460px; color: var(--fd-body); }

/* --- Gallery -------------------------------------------------------------- */

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--fd-radius); display: block; }
.gallery-item figcaption { margin-top: 10px; color: var(--fd-body); font-size: 14px; }

.gallery-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 26px; }
.gallery-video { margin: 0; }
.gallery-video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--fd-radius); overflow: hidden; }
.gallery-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery-video video { width: 100%; border-radius: var(--fd-radius); display: block; }
.gallery-video figcaption { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.gallery-video figcaption span { color: var(--fd-body); }
.gallery-empty-state { text-align: center; padding: 48px 20px; color: var(--fd-body); }

/* --- Thank you and error -------------------------------------------------- */

.thank-you-card,
.error-card {
  text-align: center;
  padding: 64px 28px;
}
.thank-you-icon { font-size: 46px; margin-bottom: 18px; display: block; }
.thank-you-card h1, .error-card h1 { margin: 0 0 14px; }
.thank-you-card p, .error-card p { margin: 0 auto 16px; max-width: 560px; color: var(--fd-body); line-height: 1.65; }
.thank-you-reference { font-size: 17px; }
.error-status { font-size: 76px; font-weight: 800; line-height: 1; opacity: .12; margin: 0 0 6px; }
.thank-you-card .actions, .error-card .actions { justify-content: center; margin-top: 26px; }

/* --- Range and content pages --------------------------------------------- */

.knowledge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.content-box { padding: 26px; border: 1px solid var(--fd-line); border-radius: var(--fd-radius); }
.content-box h3 { margin: 0 0 10px; font-size: 19px; }
.content-box p { margin: 0 0 14px; color: var(--fd-body); line-height: 1.6; }
.content-box i { font-size: 20px; margin-bottom: 12px; display: block; }

.fd-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 44px; align-items: center; }
.fd-split-media { width: 100%; border-radius: var(--fd-radius); object-fit: cover; }
.fd-split-copy h2 { margin: 10px 0 16px; }
.fd-split-copy p { color: var(--fd-body); line-height: 1.7; margin-bottom: 16px; }

.trust-points { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 12px; }
.trust-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }

.stoneskin-colours { display: flex; flex-wrap: wrap; gap: 10px; }
.stoneskin-colour {
  padding: 8px 16px;
  border: 1px solid var(--fd-line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.legal-clauses { counter-reset: clause; list-style: none; margin: 0; padding: 0; }
.legal-clauses > li { counter-increment: clause; margin-bottom: 30px; }
.legal-clauses > li h2::before { content: counter(clause) ". "; }

.fd-content h2 { margin: 34px 0 12px; }
.fd-content h2:first-child { margin-top: 0; }
.fd-content p { color: var(--fd-body); line-height: 1.75; }

/* --- Accordions ----------------------------------------------------------- */

.fd-installation-accordion { display: flex; flex-direction: column; gap: 12px; }

.fd-installation-accordion-item {
  border: 1px solid var(--fd-line);
  border-radius: var(--fd-radius);
  overflow: hidden;
}
.fd-installation-accordion-item > summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 16px;
}
.fd-installation-accordion-item > summary::-webkit-details-marker { display: none; }
.fd-installation-accordion-item > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  line-height: 1;
  opacity: .6;
}
.fd-installation-accordion-item[open] > summary::after { content: "\2212"; }
.fd-installation-accordion-panel { padding: 0 24px 24px; display: grid; gap: 18px; }
.fd-installation-accordion-panel p { margin: 0; color: var(--fd-body); line-height: 1.7; }
.guide-detail-block h3 { margin: 0 0 6px; font-size: 16px; }

.guide-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--fd-surface-alt);
  color: var(--fd-gold);
  flex: none;
}
.guide-summary-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.guide-step-no { font-size: 12px; letter-spacing: .12em; opacity: .55; }
.guide-summary-title { font-size: 18px; }
.guide-summary-intro { font-weight: 400; font-size: 14px; color: var(--fd-body); }

/* --- Brochures ------------------------------------------------------------ */

.fd-brochure-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.fd-brochure-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  background: var(--fd-ink);
  color: #fff;
  border-radius: var(--fd-radius);
  margin: 0;
}
@media (max-width: 620px) { .fd-brochure-item { grid-template-columns: minmax(0, 1fr); text-align: center; } }
.fd-brochure-item .brochure-cover { width: 100%; border-radius: 5px; object-fit: cover; }
.fd-brochure-item .brochure-copy { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
@media (max-width: 620px) { .fd-brochure-item .brochure-copy { align-items: center; } }
.fd-brochure-item .brochure-copy h3 { margin: 0; font-size: 26px; color: #fff; }
.fd-brochure-item .brochure-copy p { margin: 0; color: rgba(255, 255, 255, .75); font-size: 14px; }
.fd-brochure-item .eyebrow { color: var(--fd-gold); }

/* --- WhatsApp float ------------------------------------------------------- */

.fd-whatsapp-float {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 26px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}
.fd-whatsapp-float:hover { transform: scale(1.05); }

/* --- Maintenance ---------------------------------------------------------- */

.maintenance-body { margin: 0; background: var(--fd-ink); color: #fff; }
.maintenance-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 24px;
  text-align: center;
}
.maintenance-screen h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); }
.maintenance-screen p { margin: 0; max-width: 520px; color: rgba(255, 255, 255, .75); line-height: 1.65; }
.maintenance-contact a { color: var(--fd-gold); }
