/* =========================================================
   MUEBLERÍA VIFAC — WEB COMERCIAL RESPONSIVE
   Desktop + Tablet + iPhone + Android
========================================================= */

:root {
  --bg: #f5f1ea;
  --paper: #fffdf9;
  --paper-2: #eee7dd;
  --ink: #1c1917;
  --ink-soft: #6f675f;
  --red: #d41414;
  --red-dark: #a80e0e;
  --wood: #7b5a43;
  --line: rgba(28, 25, 23, 0.12);
  --dark: #181614;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(35, 27, 21, 0.13);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

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

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

/* TOP BAR */
.announcement {
  color: #fff;
  background: var(--dark);
  font-size: 12px;
}

.announcement-inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  letter-spacing: .4px;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 241, 234, .92);
  border-bottom: 1px solid rgba(28, 25, 23, .08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand-text {
  display: grid;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: .8px;
}

.brand-text small {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 11px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 23px;
}

.main-nav a {
  color: #4c4540;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--red);
}

.main-nav .nav-cta {
  padding: 11px 17px;
  color: #fff;
  border-radius: 999px;
  background: var(--red);
}

.main-nav .nav-cta:hover {
  color: #fff;
  background: var(--red-dark);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: var(--ink);
  transition: .2s ease;
}

/* HERO */
.hero {
  position: relative;
  min-height: 690px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #25211e;
}

.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: center 53%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(14,12,11,.78) 0%, rgba(14,12,11,.50) 43%, rgba(14,12,11,.10) 78%),
    linear-gradient(0deg, rgba(14,12,11,.42), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 85px;
  color: white;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.8px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f3d5d2;
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(50px, 7vw, 88px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -3px;
}

.hero-copy {
  max-width: 650px;
  margin: 0 0 28px;
  color: rgba(255,255,255,.84);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* BUTTONS */
.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  touch-action: manipulation;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-red {
  color: #fff;
  background: var(--red);
}

.btn-red:hover {
  background: var(--red-dark);
}

.btn-light {
  color: var(--ink);
  background: white;
}

.btn-dark {
  color: white;
  background: var(--dark);
}

.btn-outline {
  border-color: var(--line);
  background: transparent;
}

/* TRUST */
.trust-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.trust-grid article {
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.trust-grid article:last-child {
  border-right: 0;
}

.trust-grid article > span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.trust-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.trust-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

/* GENERAL SECTIONS */
.section {
  padding: 90px 0;
}

.section-soft {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.section-dark {
  color: white;
  background: var(--dark);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 38px;
}

.section-heading h2,
.custom-copy h2,
.finish-grid h2,
.contact-card h2 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.5vw, 58px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -1.8px;
}

.section-heading > p:last-child,
.custom-copy > p,
.finish-grid p,
.contact-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.section-heading.light > p:last-child {
  color: rgba(255,255,255,.68);
}

.row-heading {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

/* CATEGORIES */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ddd;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13,11,10,.78), rgba(13,11,10,0) 58%);
}

.category-card:hover img {
  transform: scale(1.035);
}

.category-card > div {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  color: white;
}

.category-card span {
  display: block;
  margin-bottom: 7px;
  color: #f1b0aa;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
}

.category-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
}

/* FILTERS */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.filter-button:hover,
.filter-button.is-active {
  color: white;
  border-color: var(--red);
  background: var(--red);
}

/* PRODUCTS */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.product-card.is-hidden {
  display: none;
}

.product-image-button {
  width: 100%;
  height: 390px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #ddd;
  cursor: zoom-in;
}

.product-image-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.product-card:hover .product-image-button img {
  transform: scale(1.025);
}

.product-info {
  padding: 22px;
}

.product-category {
  margin: 0 0 7px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.6px;
}

.product-info h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

.product-info > p:not(.product-category) {
  min-height: 68px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 14px;
}

.quote-button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.quote-button:hover {
  background: var(--red);
  border-color: var(--red);
}

/* CUSTOM */
.custom-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr);
  gap: 70px;
  align-items: center;
}

.custom-copy > p {
  max-width: 620px;
  margin-bottom: 30px;
}

.custom-image {
  min-height: 620px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.custom-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.steps {
  display: grid;
  gap: 2px;
  margin: 0 0 30px;
  border-top: 1px solid var(--line);
}

.steps div {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.steps span {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

/* PROJECTS */
.project-gallery {
  display: grid;
  grid-template-columns: 1.1fr .9fr .9fr 1.1fr;
  gap: 12px;
}

.project-gallery button {
  height: 450px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-md);
  background: #2b2826;
  cursor: zoom-in;
}

.project-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.project-gallery button:hover img {
  transform: scale(1.025);
}

/* FINISH */
.finish-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--red);
  font-weight: 850;
  text-decoration: none;
}

/* INSTAGRAM */
.instagram-section {
  background: #eadfd2;
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}

.instagram-grid img {
  width: 100%;
  aspect-ratio: 1 / 1.23;
  object-fit: cover;
  border-radius: 10px;
}

/* CONTACT */
.contact-section {
  padding-bottom: 110px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 60px;
  align-items: center;
  padding: 52px;
  border-radius: var(--radius-xl);
  color: white;
  background: var(--dark);
}

.contact-card .section-label {
  color: #ef9d96;
}

.contact-card p {
  max-width: 650px;
  color: rgba(255,255,255,.67);
}

.contact-actions {
  display: grid;
  gap: 10px;
}

.contact-actions .btn-outline {
  color: white;
  border-color: rgba(255,255,255,.23);
}

/* FOOTER */
.site-footer {
  padding: 38px 0 calc(38px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-brand img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.footer-brand strong {
  display: block;
}

.footer-brand p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.footer-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.footer-meta a {
  color: var(--red);
  font-weight: 800;
  text-decoration: none;
}

.footer-meta small {
  color: var(--ink-soft);
}

/* FLOATING WA */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 900;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #20b85a;
  box-shadow: 0 15px 35px rgba(0,0,0,.2);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  place-items: center;
  padding: 30px;
  background: rgba(10,8,7,.92);
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-width: min(1000px, 94vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 16px;
}

.lightbox-close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 24px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  color: white;
  background: rgba(0,0,0,.32);
  font-size: 30px;
  cursor: pointer;
}

/* TABLET */
@media (max-width: 980px) {
  .main-nav {
    gap: 13px;
  }

  .main-nav a:not(.nav-cta) {
    display: none;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .custom-image {
    min-height: 560px;
  }

  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .instagram-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* MOBILE */
@media (max-width: 720px) {
  html {
    scroll-padding-top: 74px;
  }

  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .announcement {
    display: none;
  }

  .header-inner {
    min-height: 70px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .brand-text strong {
    font-size: 13px;
  }

  .brand-text small {
    display: none;
  }

  .menu-toggle {
    position: relative;
    z-index: 1102;
    display: block;
  }

  .main-nav {
    position: fixed;
    z-index: 1101;
    top: 78px;
    left: 14px;
    right: 14px;
    display: none;
    grid-template-columns: 1fr;
    gap: 5px;
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(245,241,234,.99);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a,
  .main-nav a:not(.nav-cta) {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 15px;
  }

  .main-nav .nav-cta {
    justify-content: center;
    margin-top: 4px;
    color: white;
  }

  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero {
    min-height: 690px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(14,12,11,.80) 0%, rgba(14,12,11,.35) 65%, rgba(14,12,11,.12) 100%);
  }

  .hero-content {
    padding-bottom: 56px;
  }

  .hero h1 {
    font-size: clamp(46px, 13vw, 62px);
    letter-spacing: -2px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .trust-grid article {
    min-height: auto;
    padding: 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section {
    padding: 64px 0;
  }

  .section-heading h2,
  .custom-copy h2,
  .finish-grid h2,
  .contact-card h2 {
    font-size: 39px;
  }

  .row-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    justify-content: flex-start;
  }

  .category-grid,
  .product-grid,
  .project-gallery,
  .finish-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 390px;
  }

  .product-image-button {
    height: 420px;
  }

  .custom-grid {
    gap: 34px;
  }

  .custom-image {
    min-height: 500px;
    order: -1;
  }

  .project-gallery button {
    height: 420px;
  }

  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-card {
    gap: 28px;
    padding: 31px 22px;
  }

  .contact-actions .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-meta {
    width: 100%;
    justify-items: stretch;
    gap: 10px;
  }

  .footer-meta a {
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  .whatsapp-float {
    width: 54px;
    height: 54px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 43px;
  }

  .product-image-button {
    height: 390px;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .filter-button {
    width: 100%;
  }

  .footer-brand {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
