/* ============================================================
   LOFFO FURNITURE — Global stylesheet (deep blue theme)
   Responsive-first (mobile 375px) -> desktop via min-width
   ============================================================ */

/* ---------- Design tokens — deep blue ---------- */
:root {
  --font-display: "Manrope", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --bg: #f3f6fb;
  --surface: #ffffff;
  --ink: #14223a;
  --muted: #55627a;
  --line: #d9e2f0;
  --brand: #1b5ca8;          /* deep blue primary */
  --brand-deep: #0f3c6e;
  --brand-soft: #e5eef9;
  --dark: #0c1f38;           /* deep navy hero / footer */
  --dark-2: #153254;
  --accent: #7fb0ea;
  --white: #ffffff;

  --shadow-sm: 0 1px 2px rgba(13,32,56,.06), 0 4px 14px rgba(13,32,56,.07);
  --shadow-md: 0 8px 28px rgba(13,32,56,.16);
  --radius: 10px;

  --container: 1240px;
  --header-h: 74px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { color: var(--brand); }
ul { list-style: none; }

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

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.22; letter-spacing: .2px; }
h1 { font-size: 34px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }

.section { padding: 48px 0; }
.section--tight { padding: 36px 0; }

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-deep); margin-bottom: 12px;
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.section-head p { color: var(--muted); margin-top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-family: var(--font-body);
  font-weight: 700; font-size: 15px; letter-spacing: .2px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  min-height: 46px;
}
.btn--primary { background: var(--brand); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-deep); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.75); }
.btn--ghost:hover { background: rgba(255,255,255,.14); color: var(--white); transform: translateY(-2px); }
.btn--dark { background: var(--dark); color: var(--white); }
.btn--dark:hover { background: var(--brand-deep); color: var(--white); }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 56px; width: auto; border-radius: 8px; }

.main-nav { display: none; align-items: center; gap: 4px; }
.main-nav a, .main-nav .nav-label {
  font-weight: 600; color: var(--ink); padding: 8px 12px; border-radius: 8px; font-size: 15px;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand-deep); background: var(--brand-soft); }

/* Catalogue dropdown */
.has-dropdown { position: relative; display: flex; align-items: center; }
.has-dropdown > .nav-label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.has-dropdown .caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); display: inline-block; transition: transform .2s ease; }
.has-dropdown.open .caret { transform: rotate(225deg) translateY(-2px); }
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 8px; display: none; z-index: 150;
}
.has-dropdown.open .dropdown { display: block; }
.dropdown a { display: block; padding: 9px 12px; font-size: 14px; border-radius: 8px; }
.dropdown a:hover { background: var(--brand-soft); color: var(--brand-deep); }

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

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch a, .lang-switch .active { padding: 6px 12px; font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.lang-switch a { color: var(--muted); }
.lang-switch .active { background: var(--brand); color: var(--white); }
.lang-switch a:hover { background: var(--brand-soft); color: var(--brand-deep); }

.social-row { display: none; align-items: center; gap: 6px; }
.social-row a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.social-row a:hover { color: var(--white); background: var(--brand-deep); border-color: var(--brand-deep); }
.social-row svg { width: 18px; height: 18px; fill: currentColor; }

.nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200; overflow: hidden; background: var(--surface);
  visibility: hidden; transition: visibility 0s linear .3s;
}
.mobile-menu.open { visibility: visible; transition: none; }
.mobile-menu-inner { height: 100%; overflow-y: auto; padding: 20px; transform: translateX(100%); transition: transform .28s ease; }
.mobile-menu.open .mobile-menu-inner { transform: translateX(0); }
.mobile-menu-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 2px; }
.mobile-menu nav > a { font-size: 18px; font-weight: 600; color: var(--ink); padding: 12px 4px; border-bottom: 1px solid var(--line); }
.mobile-menu .mm-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-deep); margin: 18px 4px 6px; }
.mobile-menu .mm-sub a { display: block; padding: 9px 14px; font-size: 15px; color: var(--ink); border-left: 2px solid var(--line); }
.mobile-menu .mm-sub a:hover { color: var(--brand-deep); border-color: var(--brand); }
.mobile-menu .lang-switch { margin: 20px 0; }
.mobile-menu .social-row { display: flex; }

/* ---------- Hero / Banner ---------- */
.hero { position: relative; overflow: hidden; background: var(--dark); }
.hero img.banner-img { width: 100%; height: 520px; object-fit: cover; object-position: center; }
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(9,24,42,.5);
  display: flex; align-items: center; justify-content: center;
}
.hero-overlay > .hero-content {
  padding: 0 24px; text-align: center; max-width: 780px;
}
.hero-content { color: var(--white); text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.hero-content h1, .hero-content p, .hero-content .eyebrow { text-align: center; margin-left: auto; margin-right: auto; }
.hero-content .hero-keywords, .hero-content .hero-cta { display: flex; flex-wrap: wrap; justify-content: center; }
@media (max-width: 899px) {
  .hero-overlay > .hero-content { padding: 40px 20px; }
}
.hero-content .eyebrow { color: var(--accent); }
.hero-content h1 { color: var(--white); font-size: 38px; margin-bottom: 14px; }
.hero-content p { color: rgba(255,255,255,.92); margin-bottom: 20px; font-size: 18px; }
.hero-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.hero-keywords span {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #d6e6fa; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
  padding: 5px 11px; border-radius: 999px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Factory banner — clean full-bleed image only (no overlay text/button) */
.banner-band { position: relative; overflow: hidden; background: var(--dark); }
.banner-band img.banner-img { width: 100%; height: 520px; object-fit: cover; object-position: center; display: block; }

/* ---------- Product category grid (home) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 16px 24px; text-align: center; color: var(--ink);
  box-shadow: 0 2px 8px rgba(12,31,56,.05);
  transition: all .25s ease;
  position: relative; overflow: hidden;
  height: 100%;
}
.cat-card::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 3px; background: linear-gradient(90deg, var(--brand), #4a90d9);
  border-radius: 0 0 3px 3px; transition: width .3s ease;
}
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(27,92,168,.14);
  border-color: var(--brand);
}
.cat-card:hover::before { width: 60%; }
.cat-card .icon {
  width: 64px; height: 64px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  border-radius: 18px; color: #fff;
  box-shadow: 0 6px 16px rgba(27,92,168,.25);
  transition: transform .25s ease;
}
.cat-card:hover .icon { transform: scale(1.1) rotate(-3deg); }
.cat-card .icon img { width: 34px; height: 34px; filter: brightness(0) invert(1); }
.cat-card .cat-label {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink);
  line-height: 1.3; min-height: 39px; display: flex; align-items: center; justify-content: center;
}
.cat-card .cat-sub { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: -4px; }

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1); }
.carousel-slide { flex: 0 0 100%; padding: 0 6px; }
.carousel-slide .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.carousel-slide .card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #eef3fa; cursor: zoom-in; }
.carousel-slide .card .cap { padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.carousel-nav { position: absolute; top: 40%; width: 100%; pointer-events: none; }
.carousel-nav button {
  pointer-events: auto; position: absolute; top: 0; width: 32px; height: 32px;
  border: 0; cursor: pointer; background: transparent; color: var(--brand);
  display: grid; place-items: center;
}
.carousel-nav button:hover { color: var(--brand-dark); }
.carousel-nav .prev { left: 4px; }
.carousel-nav .next { right: 4px; }
.carousel-nav svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2.4; fill: none; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; padding: 0; }
.carousel-dots button.active { background: var(--brand); }

/* About carousel — edge to edge full width */
.about-carousel { background: var(--surface); border-block: 1px solid var(--line); padding: 44px 0; }
.about-carousel .carousel-slide { padding: 0 8px; }
.about-carousel .card { background: var(--surface); }
.about-carousel .card img { aspect-ratio: 4/3; }

/* ---------- Factory strength ---------- */
.factory-copy { max-width: 760px; margin: 0 auto; padding: 44px 0; text-align: center; }
.factory-copy h2 { color: var(--ink); }
.factory-copy p { color: var(--muted); margin-top: 14px; }
.factory-copy .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 14px; }
.stat b { font-family: var(--font-display); font-size: 26px; color: var(--brand-deep); display: block; }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- Product grid (catalogue pages) ---------- */
.cat-hero { background: var(--dark); color: var(--white); padding: 46px 0; }
.cat-hero h1 { color: var(--white); }
.cat-hero p { color: rgba(255,255,255,.85); margin-top: 10px; max-width: 760px; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 10px; }
.breadcrumb a { color: var(--accent); }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); cursor: zoom-in; }
.product-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #eef3fa; transition: transform .3s ease; }
.product-card:hover img { transform: scale(1.03); }
.product-card .p-meta { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.p-meta .m { font-weight: 700; color: var(--brand-deep); font-size: 13px; }
.p-meta .s { font-size: 12.5px; color: var(--ink); }
.p-meta .t { font-size: 12.5px; color: var(--muted); }
.p-meta .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Lightbox — blur backdrop */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(9,24,42,.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-md); }
.lightbox-close {
  position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.94); color: var(--ink); font-size: 26px; cursor: pointer; line-height: 1;
}

/* ---------- Forms ---------- */
.inquiry-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow-sm); max-width: 720px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.form-field label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-field label .req { color: #c0392b; }
.form-field input, .form-field textarea { width: 100%; padding: 12px 14px; font-size: 18px; font-family: var(--font-body); border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px rgba(27,92,168,.16); }
.form-field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.form-msg { margin-top: 16px; padding: 13px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; display: none; }
.form-msg.ok { display: block; background: #e7f4e7; color: #1f6f2f; border: 1px solid #bfe3c2; }
.form-msg.err { display: block; background: #fbe9e6; color: #a53b2a; border: 1px solid #f0c3ba; }

.hp-field { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

/* ---------- About ---------- */
.about-copy { max-width: 760px; margin: 0 auto; }
.about-copy p { color: var(--muted); margin-bottom: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.85); }
.footer-inner { text-align: center; padding: 20px 20px 40px; }
.footer-brand { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--white); margin-bottom: 18px; letter-spacing: .4px; }
.footer-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; font-size: 14px; }
.footer-links a { color: rgba(255,255,255,.85); }
.footer-contacts { display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; font-size: 14.5px; }
.footer-contacts a { color: rgba(255,255,255,.9); }
.footer-contacts a:hover { color: var(--accent); }
.footer-contacts svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 7px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.footer-contacts svg.wa-mini { fill: currentColor; stroke: none; }
.footer-copy { margin-top: 22px; font-size: 13px; color: rgba(255,255,255,.55); border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 250; width: 60px; height: 60px;
  border-radius: 50%; background: #25d366; display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.3); transition: transform .2s ease;
}
.wa-float:hover { transform: translateY(-3px) scale(1.05); }
.wa-float svg { width: 38px; height: 38px; fill: #fff; display: block; }

/* ---------- Page header band ---------- */
.page-head { background: var(--dark); color: var(--white); padding: 46px 0; }
.page-head h1 { color: var(--white); }
.page-head p { color: rgba(255,255,255,.82); margin-top: 8px; max-width: 700px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 90px 20px; }
.notfound h1 { font-size: 44px; }
.notfound p { color: var(--muted); margin: 14px 0 24px; }

/* ============================================================
   Responsive — tablet / desktop
   ============================================================ */
@media (min-width: 640px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .carousel-slide { flex-basis: 50%; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-field--full { grid-column: 1 / -1; }
  .factory-copy .stats { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  .carousel-slide { flex-basis: 25%; }
  .cat-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 68px 0; }
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }

  .main-nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }

  .hero img.banner-img { height: 600px; }
  .hero-content h1 { font-size: 52px; }
  .hero-content p { font-size: 19px; }

  .banner-band img.banner-img { height: 600px; }

  .social-row { display: flex; }
  .cat-card .icon { width: 68px; height: 68px; }
  .cat-card .icon img { width: 42px; height: 42px; }
  .cat-card .cat-label { font-size: 22px; }

  .footer-contacts { gap: 3px; }
  .section-head { margin-bottom: 44px; }
}

@media (min-width: 1200px) {
  .container { padding: 0 24px; }
}

/* ---------- Accessibility / motion ---------- */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
