/* ForChef - professional kitchen equipment catalog */

:root {
  --ink: #1c1a17;
  --ink-soft: #5c554c;
  --steel: #23272b;
  --steel-dark: #15181b;
  --copper: #b4692f;
  --copper-light: #d98a4a;
  --paper: #f7f4ef;
  --card: #ffffff;
  --line: #e4ded4;
  --shade: #fbfaf8;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.01em;
}

a { color: var(--copper); }
a:hover { color: var(--copper-light); }

/* --- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.topbar {
  background: var(--copper);
  color: #fff;
  letter-spacing: 0.01em;
}

.shop-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(28, 26, 23, 0.05);
  --bs-navbar-color: var(--ink-soft);
  --bs-navbar-hover-color: var(--copper);
  --bs-navbar-active-color: var(--ink);
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.shop-nav .nav-link { font-size: 0.95rem; font-weight: 500; }

.brand-logo { height: 46px; width: auto; display: block; }
.navbar-brand { padding-top: 0; padding-bottom: 0; }

.search-form { position: relative; flex: 0 1 280px; }
.search-form input {
  border-radius: 999px;
  padding-right: 2.2rem;
  background: var(--paper);
  border-color: var(--line);
}
.search-form input:focus {
  background: #fff;
  border-color: var(--copper-light);
  box-shadow: 0 0 0 0.2rem rgba(180, 105, 47, 0.15);
}
.search-form button {
  position: absolute;
  right: 0.15rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  line-height: 1;
}
.search-form button:hover { color: var(--copper); }

.text-bg-accent { background: var(--copper) !important; color: #fff !important; }
.nav-cart .badge { vertical-align: 0.15em; }

/* --- hero --- */

.hero {
  position: relative;
  color: #fff;
  padding: 5rem 0 4.5rem;
  background: var(--steel-dark) center/cover no-repeat;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(14, 16, 18, 0.93) 0%,
    rgba(14, 16, 18, 0.82) 45%,
    rgba(14, 16, 18, 0.45) 100%
  );
}
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.1; }
.hero .lead { color: rgba(255, 255, 255, 0.82); max-width: 48ch; }
.hero .eyebrow { color: var(--copper-light); }

/* --- how it works --- */

/* "How ordering works": three icons joined by arrows, stacked on phones */
.how-it-works { background: #fff; border-block: 1px solid var(--line); }
.flow {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow-step {
  position: relative;
  text-align: center;
  max-width: 22rem;
  margin-inline: auto;
}
.flow-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--steel);
  color: #fff;
}
.flow-icon svg { width: 1.8rem; height: 1.8rem; }
.flow-icon-whatsapp { background: #1f8f4e; }
.flow-number {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--copper);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
/* Phones: a short line down to the next step */
.flow-step:not(:last-child)::after {
  content: "";
  display: block;
  width: 2px;
  height: 1.75rem;
  margin: 1rem auto 0;
  background: var(--copper);
}
@media (min-width: 768px) {
  .flow { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .flow-step { max-width: none; }
  /* Dashed line from this icon to the next one, ending in an arrowhead */
  .flow-step:not(:last-child)::after {
    position: absolute;
    top: 2rem;
    left: calc(50% + 2.75rem);
    width: calc(100% - 4rem);
    height: 2px;
    margin: 0;
    background: repeating-linear-gradient(to right, var(--copper) 0 7px, transparent 7px 13px);
  }
  .flow-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(2rem - 5px);
    left: calc(150% - 1.25rem - 9px);
    border-left: 9px solid var(--copper);
    border-block: 6px solid transparent;
  }
}

/* --- product media --- */
/* Photos arrive in every shape, so letterbox them on a soft ground rather
   than cropping a long knife into a square. */

.item-card-media,
.feature-media,
.gallery-main {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--shade);
  overflow: hidden;
}
.item-card-media img,
.feature-media img,
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6%;
}

.item-card-media { aspect-ratio: 4 / 3; }
.feature-media { aspect-ratio: 4 / 3; display: block; }
.feature-media img { display: block; }

.placeholder-media {
  font-family: Georgia, serif;
  font-size: 2.5rem;
  color: #b6ada0;
}

/* --- cards --- */

.feature-card,
.item-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  overflow: hidden;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.feature-card { display: flex; flex-direction: column; }
.feature-card:hover,
.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(28, 26, 23, 0.11);
  border-color: #d8cfc1;
}

.stretched-link-title { color: var(--ink); text-decoration: none; }
.stretched-link-title:hover { color: var(--copper); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.68rem;
  color: var(--ink-soft);
  margin: 0;
}

.price { font-weight: 600; font-size: 1.05rem; }

/* --- item detail --- */

.gallery-main {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
}

.gallery-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.gallery-thumb {
  width: 70px;
  height: 70px;
  border: 2px solid var(--line);
  border-radius: 0.4rem;
  overflow: hidden;
  padding: 4px;
  background: #fff;
  cursor: pointer;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb.is-active { border-color: var(--copper); }

.variant-option input { position: absolute; opacity: 0; pointer-events: none; }
.variant-option label {
  display: block;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  background: #fff;
  font-size: 0.92rem;
}
.variant-option input:checked + label {
  border-color: var(--copper);
  box-shadow: inset 0 0 0 1px var(--copper);
}
.variant-option input:disabled + label {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* --- sections --- */

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
  margin-bottom: 1.35rem;
}

.category-tile {
  display: block;
  position: relative;
  border-radius: 0.6rem;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  aspect-ratio: 3 / 2;
  background: var(--steel);
}
.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.category-tile:hover img { transform: scale(1.05); }
.category-tile .tile-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.85rem 0.9rem 0.7rem;
  background: linear-gradient(to top, rgba(12, 14, 16, 0.85), rgba(12, 14, 16, 0));
  color: #fff;
}
.category-tile:hover { color: #fff; }

/* --- backoffice --- */

.office-shell { display: flex; gap: 1.5rem; align-items: flex-start; }
.office-nav {
  position: sticky;
  top: 6.5rem;
  min-width: 200px;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  overflow: hidden;
}
.office-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.9rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}
.office-nav a:last-child { border-bottom: 0; }
.office-nav a:hover { background: #faf7f2; }
.office-nav a.is-active { background: var(--steel); color: #fff; }

.stat-card {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  padding: 1rem 1.15rem;
  height: 100%;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 600; line-height: 1.1; }
.stat-card .stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.thumb-xs {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 0.3rem;
  background: var(--shade);
  padding: 2px;
}

.formset-row {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.9rem;
  background: #fff;
  margin-bottom: 0.75rem;
}

/* --- footer --- */

.site-footer {
  background: var(--steel-dark);
  color: rgba(255, 255, 255, 0.72);
}
.site-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
/* The logo is black artwork; inverting it turns the strokes white for the
   dark footer while the hat reads as an outline. */
.footer-logo { height: 52px; width: auto; filter: invert(1); opacity: 0.92; }

.lang-select {
  width: auto;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.1rem 1.6rem 0.1rem 0.5rem;
}
.lang-select option { color: var(--ink); }

@media (max-width: 991.98px) {
  .site-header { position: static; }
  .search-form { flex: 1 1 auto; }
  .office-nav { position: static; min-width: 0; }
}

/* --- WhatsApp ordering --- */

.btn-whatsapp {
  --bs-btn-color: #fff;
  --bs-btn-bg: #1f8f4e;
  --bs-btn-border-color: #1f8f4e;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #187540;
  --bs-btn-hover-border-color: #187540;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #145f34;
  --bs-btn-active-border-color: #145f34;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #7fb895;
  --bs-btn-disabled-border-color: #7fb895;
  font-weight: 600;
}

/* Floating "talk to us" chat button: an icon on phones, a labelled pill from tablets up. */
.whatsapp-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1025;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: #1f8f4e;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(21, 24, 27, 0.25);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
  background: #187540;
  color: #fff;
  transform: translateY(-2px);
}
.whatsapp-fab:focus-visible {
  outline: 3px solid var(--copper-light);
  outline-offset: 3px;
}
.whatsapp-fab:active { background: #145f34; transform: none; }
.whatsapp-fab svg { width: 1.75rem; height: 1.75rem; flex: none; }

/* On phones the label is read out but not shown. */
.whatsapp-fab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .whatsapp-fab {
    width: auto;
    padding: 0 1.25rem 0 1rem;
  }
  .whatsapp-fab svg { width: 1.5rem; height: 1.5rem; }
  .whatsapp-fab-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
}

/* Keep the end of the footer clear of the button. */
body:has(.whatsapp-fab) .site-footer { padding-bottom: 6rem !important; }

@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab { transition: none; }
  .whatsapp-fab:hover,
  .whatsapp-fab:focus-visible { transform: none; }
}

@media print {
  .whatsapp-fab { display: none; }
}

.text-pre-line { white-space: pre-line; }

/* --- legal --- */

.legal-page h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
}
