/*
Theme Name: M Brown Makeup
Theme URI: https://example.com/
Author: M Brown Makeup
Description: Tema editorial para maquillaje, peinado y bodas. Incluye plantillas de Inicio, páginas, blog y contacto.
Version: 1.2.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: mbrown-makeup
*/

:root {
  --mb-ink: #333;
  --mb-paper: #fff;
  --mb-white: #fff;
  --mb-rose: #a96455;
  --mb-olive: #68715c;
  --mb-line: #d9d5cf;
}

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  border: 20px solid #333;
  background: var(--mb-paper);
  color: var(--mb-ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 14px;
  line-height: 1.9;
}

body:not(.home) {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
}

body:not(.home) > .site-header,
body:not(.home) > .site-footer {
  flex: 0 0 auto;
}

body:not(.home) > .wp-block-group,
body:not(.home) > main {
  flex: 1 0 auto;
}

body:not(.home) > .wp-site-blocks {
  display: flex;
  min-height: 100%;
  flex: 1 0 auto;
  flex-direction: column;
}

.wp-site-blocks > .site-header,
.wp-site-blocks > .site-footer {
  flex: 0 0 auto;
}

.wp-site-blocks > :not(.site-header):not(.site-footer) {
  flex: 1 0 auto;
}

a {
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--mb-rose);
}

h1,
h2,
h3,
.wp-block-site-title {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 400;
}

.site-header {
  position: relative;
  z-index: 5;
  background: #fff;
}

.site-header-inner,
.site-footer-inner {
  width: min(100% - 48px, 1320px);
  margin-inline: auto;
}

.site-header-inner {
  width: min(100% - 48px, 1320px);
  padding-block: 20px 15px;
  text-align: center;
}

.mbrown-brand {
  gap: 14px;
  margin-bottom: 15px;
}

.mbrown-brand-mark {
  flex: 0 0 58px;
  margin: 0;
}

.mbrown-brand-mark img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.mbrown-brand-copy {
  text-align: left;
}

.site-header .wp-block-site-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
  white-space: nowrap;
}

.site-header .mbrown-brand-tagline {
  margin: 4px 0 0;
  font-size: 0.68rem;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-header .wp-block-navigation {
  justify-content: center;
}

.site-header .wp-block-page-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px clamp(12px, 1.3vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header .wp-block-pages-list__item {
  position: relative;
  list-style: none;
}

.site-header .wp-block-pages-list__item__link {
  padding: 0 4px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-header .wp-block-pages-list__item__link::after {
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 4px;
  height: 1px;
  background: var(--mb-ink);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-header .wp-block-pages-list__item__link:hover::after,
.site-header .current-menu-item > .wp-block-pages-list__item__link::after {
  transform: scaleX(1);
}

.site-header .has-child > .wp-block-pages-list__item__link {
  padding-right: 20px;
}

.site-header .has-child > .wp-block-pages-list__item__link::before {
  position: absolute;
  top: 0.68em;
  right: 4px;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.site-header .wp-block-pages-list__item > .children {
  position: absolute;
  z-index: 10;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 14px 18px;
  background: #f0f0f0;
  box-shadow: 3px 2px 7px 1px rgb(0 0 0 / 18%);
  list-style: none;
  text-align: left;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}

.site-header .wp-block-pages-list__item:hover > .children,
.site-header .wp-block-pages-list__item:focus-within > .children {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.site-header .wp-block-pages-list__item .children a {
  display: block;
  padding: 6px 0;
  font-size: 0.78rem;
  text-transform: none;
}

.site-header a,
.site-footer a {
  color: inherit;
  text-decoration: none;
}

.mbrown-hero-image {
  margin-block: 0 60px;
  max-height: 76vh;
  overflow: hidden;
  background: #d6d0c9;
}

.mbrown-hero-image img {
  width: 100%;
  height: min(76vh, 860px);
  object-fit: cover;
}

.mbrown-page-image {
  margin-block: 0 48px;
  max-height: 650px;
  overflow: hidden;
  background: #d6d0c9;
}

.mbrown-page-image img {
  width: 100%;
  max-height: 650px;
  object-fit: cover;
}

.mbrown-home-copy {
  padding-block: clamp(48px, 8vw, 112px);
}

.mbrown-eyebrow {
  color: var(--mb-rose);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mbrown-home-copy h1,
.mbrown-page-title,
.mbrown-archive-title {
  max-width: 900px;
  margin-inline: auto;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  line-height: 1.02;
}

.mbrown-intro {
  max-width: 650px;
  margin: 24px auto 0;
  color: #54534f;
  font-size: 1.1rem;
  line-height: 1.8;
}

.wp-block-button__link {
  border-radius: 0;
  background: var(--mb-ink);
  color: var(--mb-white);
  padding: 14px 22px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wp-block-button__link:hover {
  background: var(--mb-rose);
  color: var(--mb-white);
}

.mbrown-content-width {
  width: min(100% - 48px, 980px);
  margin-inline: auto;
  padding-block: 20px 96px;
}

.mbrown-content-width > :where(h1, h2, h3, p, ul, ol, blockquote) {
  max-width: 760px;
  margin-inline: auto;
}

.mbrown-content-width p,
.mbrown-content-width li {
  color: #54534f;
  font-size: 1.02rem;
  line-height: 1.85;
}

.mbrown-archive {
  width: min(100% - 48px, 1320px);
  margin: 0 auto;
  padding-block: clamp(54px, 8vw, 100px);
}

.mbrown-archive-header {
  margin-bottom: 48px;
  text-align: center;
}

.mbrown-archive .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mbrown-post-card {
  height: 100%;
  padding-bottom: 22px;
}

.mbrown-post-card .wp-block-post-featured-image {
  margin-bottom: 20px;
  background: #dedbd5;
}

.mbrown-post-card .wp-block-post-featured-image img {
  object-fit: cover;
}

.mbrown-post-card .wp-block-post-terms {
  color: var(--mb-rose);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mbrown-post-card h2 {
  margin-block: 10px;
  font-size: 1.7rem;
  line-height: 1.15;
}

.mbrown-post-card h2 a {
  color: inherit;
  text-decoration: none;
}

.mbrown-post-card .wp-block-post-excerpt {
  color: #54534f;
  font-size: 0.92rem;
  line-height: 1.7;
}

.mbrown-single {
  width: min(100% - 48px, 900px);
  margin-inline: auto;
  padding-block: clamp(48px, 8vw, 100px);
}

.mbrown-single .wp-block-post-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.05;
}

.mbrown-single .wp-block-post-featured-image {
  margin-block: 40px;
}

.mbrown-single .wp-block-post-content {
  font-size: 1.05rem;
  line-height: 1.85;
}

.mbrown-single .wp-block-post-content p {
  margin-block: 1.4em;
}

.mbrown-pagination {
  margin-top: 44px;
}

.site-footer {
  border-top: 1px solid var(--mb-line);
  background: #efede8;
}

.site-footer-inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 14px;
  color: #54534f;
  font-size: 0.82rem;
}

.site-footer-inner > * {
  margin: 0;
}

.mbrown-contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.mbrown-contact-form label {
  display: grid;
  gap: 8px;
  color: var(--mb-ink);
  font-size: 0.85rem;
}

.mbrown-contact-form input,
.mbrown-contact-form select,
.mbrown-contact-form textarea {
  width: 100%;
  border: 1px solid #bdb9b2;
  border-radius: 0;
  background: var(--mb-white);
  padding: 13px 14px;
  color: var(--mb-ink);
  font: inherit;
}

.mbrown-contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.mbrown-contact-form .full-width {
  grid-column: 1 / -1;
}

.mbrown-contact-form .consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.mbrown-contact-form .consent input {
  width: auto;
  margin-top: 4px;
}

.mbrown-contact-form button {
  justify-self: start;
  border: 0;
  border-radius: 0;
  background: var(--mb-ink);
  padding: 14px 24px;
  color: var(--mb-white);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mbrown-contact-form button:hover {
  background: var(--mb-rose);
}

.mbrown-form-notice {
  margin-block: 24px;
  padding: 14px 18px;
  background: #e8ece3;
}

.mbrown-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

body.home {
  display: flex;
  height: 100svh;
  min-height: 560px;
  flex-direction: column;
  overflow: hidden;
}

body.home > .wp-site-blocks {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

body.home .wp-site-blocks > .site-header,
body.home .wp-site-blocks > .site-footer {
  flex: 0 0 auto;
}

body.home .wp-site-blocks > .mbrown-homepage {
  min-height: 0;
  flex: 1 1 auto;
}

body.home .site-header-inner {
  padding-block: 12px 8px;
}

body.home .mbrown-brand {
  gap: 10px;
  margin-bottom: 8px;
}

body.home .mbrown-brand-mark,
body.home .mbrown-brand-mark img {
  width: 44px;
  height: 44px;
}

body.home .site-header .wp-block-site-title {
  font-size: 1.08rem;
}

body.home .site-header .mbrown-brand-tagline {
  margin-top: 2px;
  font-size: 0.58rem;
}

body.home .site-header .wp-block-page-list {
  gap: 6px clamp(10px, 1.2vw, 18px);
}

.mbrown-homepage {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.mbrown-homepage > .wp-block-shortcode {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
}

.mbrown-homepage .mbrown-carousel {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

.mbrown-carousel-viewport {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mbrown-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.mbrown-carousel-track {
  display: flex;
  height: 100%;
  min-height: 0;
  align-items: center;
  gap: clamp(10px, 1.3vw, 20px);
  padding-inline: max(24px, calc((100vw - 430px) / 2));
}

.mbrown-carousel-slide {
  position: relative;
  width: clamp(260px, 31vw, 430px);
  height: min(100%, 70vh, 680px);
  max-height: 100%;
  flex: 0 0 auto;
  overflow: hidden;
  background: #e8e6e3;
  opacity: 0.58;
  scroll-snap-align: center;
  transform: scale(0.88);
  transition: opacity 350ms ease, transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.mbrown-carousel-slide.is-active {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
}

.mbrown-carousel-slide > a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  text-decoration: none;
}

.mbrown-carousel-slide > a::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgb(0 0 0 / 4%) 58%, rgb(0 0 0 / 58%) 100%);
  content: "";
  opacity: 0;
  transition: opacity 300ms ease;
}

.mbrown-carousel-slide.is-active > a::after,
.mbrown-carousel-slide:hover > a::after,
.mbrown-carousel-slide:focus-within > a::after {
  opacity: 1;
}

.mbrown-carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mbrown-carousel-caption {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 28px;
  left: 12px;
  display: grid;
  gap: 2px;
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.mbrown-carousel-slide.is-active .mbrown-carousel-caption,
.mbrown-carousel-slide:hover .mbrown-carousel-caption,
.mbrown-carousel-slide:focus-within .mbrown-carousel-caption {
  opacity: 1;
  transform: translateY(0);
}

.mbrown-carousel-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mbrown-carousel-title {
  font-size: 1.2rem;
}

.mbrown-carousel-controls {
  display: flex;
  min-height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.mbrown-carousel-arrow {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mb-ink);
  cursor: pointer;
}

.mbrown-carousel-arrow:hover,
.mbrown-carousel-arrow:focus-visible {
  border-color: var(--mb-ink);
}

.mbrown-carousel-arrow span {
  display: block;
  width: 12px;
  height: 12px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.mbrown-carousel-arrow .arrow-left {
  transform: rotate(-135deg);
}

.mbrown-carousel-arrow .arrow-right {
  transform: rotate(45deg);
}

.mbrown-carousel-count {
  display: inline-flex;
  min-width: 64px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.count-divider {
  color: #aaa;
}

.error404 .mbrown-content-width {
  text-align: center;
}

.mbrown-contact-page {
  display: grid;
  height: calc(100vh - 270px);
  height: calc(100svh - 270px);
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.mbrown-contact-photo {
  height: 100%;
  min-height: 0;
  background-color: #d4d0cc;
  background-image: url("assets/contact/contact-artist.jpg");
  background-position: center 38%;
  background-size: cover;
}

.mbrown-contact-panel {
  display: flex;
  min-width: 0;
  height: 100%;
  align-self: stretch;
  align-items: flex-start;
  justify-content: center;
  margin: 0;
  overflow-y: auto;
  padding: 0 clamp(34px, 5vw, 80px);
  background: #fff;
}

.mbrown-contact-panel-inner {
  width: min(100%, 600px);
  padding-block: 64px 80px;
}

.mbrown-contact-panel .wp-block-post-title {
  margin-block: 0 22px;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.05;
}

.mbrown-contact-panel-inner > :not(.wp-block-post-title) {
  max-width: none;
}

.mbrown-contact-panel .mbrown-eyebrow {
  margin-bottom: 12px;
}

.mbrown-contact-panel h2 {
  margin-block: 0 12px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.mbrown-contact-panel p {
  margin-block: 0 18px;
}

.mbrown-contact-panel .mbrown-contact-form {
  gap: 13px 16px;
  margin-top: 20px;
}

.mbrown-contact-panel .mbrown-contact-form input,
.mbrown-contact-panel .mbrown-contact-form select,
.mbrown-contact-panel .mbrown-contact-form textarea {
  padding: 10px 12px;
  font-size: 0.88rem;
}

.mbrown-contact-panel .mbrown-contact-form textarea {
  min-height: 100px;
}

.mbrown-contact-panel .mbrown-contact-form button {
  padding: 11px 20px;
}

.mbrown-contact-panel .mbrown-contact-form .consent {
  font-size: 0.8rem;
}

body.page-id-12 .site-header-inner {
  padding-block: 8px 6px;
}

body.page-id-12 .mbrown-brand {
  gap: 10px;
  margin-bottom: 6px;
}

body.page-id-12 .mbrown-brand-mark,
body.page-id-12 .mbrown-brand-mark img {
  width: 40px;
  height: 40px;
}

@media (max-width: 780px) {
  body {
    border-width: 10px;
  }

  .site-header-inner,
  .site-footer-inner {
    width: min(100% - 32px, 1320px);
  }

  .site-header-inner {
    padding-block: 16px 12px;
  }

  body.home {
    min-height: 540px;
  }

  body.home .site-header-inner {
    padding-block: 10px 8px;
  }

  .site-header .wp-block-site-title {
    font-size: 1.12rem;
  }

  .mbrown-brand {
    margin-bottom: 8px;
  }

  .site-header .mbrown-brand-mark,
  .site-header .mbrown-brand-mark img {
    width: 48px;
    height: 48px;
  }

  .site-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none;
  }

  .site-header .wp-block-navigation__responsive-container-open {
    display: inline-flex;
    border: 1px solid var(--mb-ink);
    padding: 7px 12px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 0.78rem;
    text-transform: uppercase;
  }

  .site-header .wp-block-navigation__responsive-container.is-menu-open {
    position: absolute;
    z-index: 30;
    top: 100%;
    right: 0;
    left: 0;
    padding: 20px;
    background: #fff;
    box-shadow: 0 8px 14px rgb(0 0 0 / 12%);
  }

  .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
  .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list {
    align-items: center;
    flex-direction: column;
    gap: 10px;
  }

  body.home .site-header .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
  }

  .site-header .wp-block-pages-list__item > .children {
    position: static;
    display: block;
    min-width: 0;
    padding: 4px 12px;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .mbrown-hero-image {
    margin-bottom: 30px;
  }

  .mbrown-hero-image img {
    height: 58vh;
    min-height: 380px;
  }

  .mbrown-carousel-track {
    gap: 12px;
    padding-inline: 13vw;
  }

  .mbrown-carousel-slide {
    width: 74vw;
    height: min(58vh, 600px);
  }

  .mbrown-carousel-slide:not(.is-active) {
    opacity: 0.62;
    transform: scale(0.92);
  }

  .mbrown-carousel-controls {
    min-height: 44px;
    flex-basis: 44px;
  }

  .mbrown-content-width,
  .mbrown-archive,
  .mbrown-single {
    width: min(100% - 32px, 980px);
  }

  .mbrown-archive .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 18px;
  }

  .mbrown-contact-form {
    grid-template-columns: 1fr;
  }

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

  .mbrown-contact-page {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .mbrown-contact-photo {
    height: min(68vh, 600px);
    min-height: 360px;
    background-position: center 36%;
  }

  .mbrown-contact-panel {
    overflow-y: visible;
    padding: 0 24px;
  }

  .mbrown-contact-panel-inner {
    padding-block: 40px 56px;
  }

  .mbrown-contact-panel .mbrown-contact-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .mbrown-archive .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mbrown-carousel-viewport {
    scroll-behavior: auto;
  }

  .mbrown-carousel-slide,
  .mbrown-carousel-slide > a::after,
  .mbrown-carousel-caption {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}