/* Legotti — modern rebuild
   Fonts kept from the original brand: Carrois Gothic SC for display/nav,
   Titillium Web for body copy. */
@import url("https://fonts.googleapis.com/css2?family=Carrois+Gothic+SC&family=Titillium+Web:wght@400;600;700&display=swap");

:root {
  --container: 1200px;
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #262422;
  --color-muted: #6f6b66;
  --color-border: #e2ded6;
  --color-dark: #2f2c29;
  --color-dark-hover: #171615;
  --color-accent: #9c8b6e;
  --footer-bg: #eeece8;
  --footer-text: #6d6a65;
  --font-body: "Titillium Web", -apple-system, "Segoe UI", sans-serif;
  --font-display: "Carrois Gothic SC", var(--font-body);
  --radius: 2px;
  --shadow-sm: 0 1px 3px rgba(30, 26, 20, 0.08);
  --shadow-md: 0 10px 30px rgba(30, 26, 20, 0.12);
  --header-h: 84px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Pushes the footer to the bottom of the viewport on short pages (e.g.
   Contact) instead of leaving it floating right under the content. */
#main { flex: 1 0 auto; }

img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-dark);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.logo img { height: var(--logo-height, 40px); width: auto; }
.logo { display: inline-flex; }

.primary-nav > ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.primary-nav > ul > li { position: relative; }
.primary-nav a {
  display: inline-block;
  padding: 10px 16px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--color-text);
  border-radius: var(--radius);
  transition: color 0.15s ease;
}
.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--color-accent); }
.primary-nav a[aria-current="page"] { color: var(--color-accent); font-weight: 700; }

.has-submenu > a::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.submenu {
  display: none;
  list-style: none;
  margin: 0;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 190px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: 6px 0;
  flex-direction: column;
  gap: 0;
}
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu,
.has-submenu.open .submenu {
  display: flex;
}
.submenu a { padding: 10px 16px; font-family: var(--font-body); font-size: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background: var(--color-dark);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }
  .primary-nav.open { display: block; }
  .primary-nav > ul { flex-direction: column; padding: 8px 20px 18px; gap: 0; }
  .primary-nav a { display: block; padding: 12px 4px; }
  .submenu {
    display: none;
    position: static;
    border: none;
    box-shadow: none;
    padding-left: 12px;
    min-width: 0;
  }
  .has-submenu.open .submenu { display: flex; }
  .has-submenu > a::after { display: none; }
}

/* ===== Hero carousel ===== */
.hero-section {
  padding: 28px 0 0;
}
.hero {
  position: relative;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.hero-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 16 / 7;
  min-height: 260px;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-caption {
  position: absolute;
  left: 24px;
  bottom: 28px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
}
.hero-dots {
  position: absolute;
  right: 24px;
  bottom: 28px;
  display: flex;
  gap: 8px;
}
.hero-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: rgba(255, 255, 255, 0.35);
  padding: 0;
  cursor: pointer;
}
.hero-dots button[aria-current="true"] { background: #fff; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-arrow:hover { background: rgba(0, 0, 0, 0.55); }
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }
@media (max-width: 640px) {
  .hero-caption { font-size: 13px; padding: 8px 14px; }
  .hero-arrow { display: none; }
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  font-size: 13px;
  color: var(--color-muted);
  padding: 18px 0 0;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 8px; color: var(--color-border); }
.breadcrumbs [aria-current="page"] { color: var(--color-text); }

/* ===== Page shell ===== */
main { display: block; }
.section { padding: 28px 0 64px; }
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
}
@media (max-width: 640px) {
  .card { padding: 20px; }
}

.intro h1 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}
.intro p { margin: 0 0 16px; color: var(--color-text); }
.intro p:last-child { margin-bottom: 0; }
.rich-text ul,
.rich-text ol { margin: 0 0 16px; padding-left: 24px; color: var(--color-text); }
.rich-text li { margin-bottom: 4px; }
.rich-text > *:last-child { margin-bottom: 0; }

/* ===== Product grid ===== */
.category-note { color: var(--color-muted); margin: 0 0 26px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 860px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
}
.product-card { }
.product-card a {
  display: block;
  text-decoration: none;
  color: var(--color-text);
}
.product-card figure {
  position: relative;
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
}
.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
}
.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.product-card a:hover img,
.product-card a:focus-visible img { transform: scale(1.045); }
.product-card figcaption {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-align: center;
}

/* ===== Product detail ===== */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px;
}
@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; }
}

.gallery-main {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f4f2ee;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}
.gallery-thumbs button {
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  width: 76px;
  height: 76px;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--color-dark); }

.product-meta h1 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.03em;
  margin: 0 0 6px;
}
.product-meta .stock-line {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 16px;
}
.product-meta .lede { color: var(--color-text); margin: 0 0 22px; }

.tabs { margin-top: 8px; }
.tablist {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--color-border);
  list-style: none;
  margin: 0;
  padding: 0;
}
.tablist button {
  border: 1px solid transparent;
  border-bottom: none;
  background: none;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--color-muted);
  position: relative;
  top: 1px;
}
.tablist button[aria-selected="true"] {
  color: var(--color-text);
  border-color: var(--color-border);
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tabpanel { padding: 20px 2px; }
.tabpanel[hidden] { display: none; }
.tabpanel ul { margin: 0; padding-left: 20px; }
.tabpanel li { margin-bottom: 4px; }
.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.spec-list li:last-child { border-bottom: none; }
.spec-list .label { color: var(--color-muted); }

.cta-quote {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}
.cta-quote p { margin: 0 0 12px; color: var(--color-muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-dark);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.05em;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--color-dark-hover); }
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover { background: #f6f4f0; }

/* ===== Contact page ===== */
.contact-block { max-width: 46ch; }
.contact-block dt { color: var(--color-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 20px; }
.contact-block dd { margin: 4px 0 0; font-size: 19px; }
.contact-block a { text-decoration: none; }
.contact-block a:hover { text-decoration: underline; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-form .form-field { margin-bottom: 16px; }
.contact-form label { display: block; font-size: 13px; color: var(--color-muted); margin-bottom: 6px; }
.contact-form label .hint { font-size: 12px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}
.contact-form textarea { resize: vertical; }

.form-flash {
  background: #f3f6ef;
  border: 1px solid #cfe0c2;
  color: #3f6b2b;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 14px;
}
.form-flash-error {
  background: #fbeeee;
  border-color: #e6c6c6;
  color: #b23b3b;
}
.form-flash-error ul { margin: 0; padding-left: 18px; }

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  padding: 34px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  font-size: 14px;
}
.footer-inner a { color: var(--footer-text); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
