/*
Theme Name: Bar Sa Plaça
Theme URI: https://melososoft.com/
Author: Melososoft
Description: Web pública accesible para Bar Sa Plaça, Alaró. La experiencia de pedidos se conecta por separado.
Version: 1.6.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: bar-sa-placa
*/

:root {
  --paper: #fbf8f1;
  --cream: #f3ecdf;
  --ink: #262c24;
  --muted: #51594c;
  --olive: #355b45;
  --olive-dark: #294934;
  --rust: #aa4e30;
  --line: #d9d1c1;
  --white: #fffefa;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 18px/1.62 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .075em; text-underline-offset: .18em; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
::selection { background: #e9cabb; color: var(--ink); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100; width: auto; height: auto; padding: 10px 18px; clip: auto; background: var(--white); }
.container { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.eyebrow { display: inline-block; margin: 0 0 17px; color: var(--rust); font-size: .78rem; font-weight: 800; letter-spacing: .16em; line-height: 1.3; text-transform: uppercase; }
.section-title, h1, h2, h3 { text-wrap: balance; }
.section-title { max-width: 790px; margin: 0; font: 400 clamp(2.55rem, 5vw, 4.7rem)/1.07 var(--serif); letter-spacing: -.045em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 13px 25px; border: 2px solid transparent; border-radius: 6px; font-size: 1rem; font-weight: 750; line-height: 1.22; text-align: center; text-decoration: none; transition: background-color .2s ease, color .2s ease, transform .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--olive); color: #fff; }
.btn-primary:hover { background: var(--olive-dark); }
.btn-outline { border-color: var(--olive); color: var(--olive-dark); background: transparent; }
.btn-outline:hover { background: #e7eddf; }
.btn-white { color: var(--olive-dark); background: var(--white); }
.btn-white:hover { background: #ece7da; }
.arrow { font-size: 1.3em; line-height: .6; }

/* Navegación visible y fácil de pulsar en pantallas pequeñas. */
.topline { background: var(--olive-dark); color: #fff; }
.topline-inner { display: flex; align-items: center; justify-content: space-between; min-height: 46px; gap: 18px; font-size: .88rem; font-weight: 650; letter-spacing: .035em; }
.topline p { margin: 0; }
.topline a { text-decoration: underline; }
.language-switch { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.language-switch a { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 4px; color: #fff; font-size: .9rem; font-weight: 800; text-decoration: none; }
.language-switch a:hover, .language-switch a[aria-current="true"] { background: #fff; color: var(--olive-dark); }
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 88px; }
.site-logo { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; color: var(--olive-dark); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--olive); border-radius: 50%; font: italic 29px/1 var(--serif); }
.brand-name { font: 700 1.23rem/1.05 var(--serif); letter-spacing: -.035em; }
.brand-name small { display: block; margin-top: 5px; font: 700 .66rem/1 var(--sans); letter-spacing: .19em; text-transform: uppercase; }
.custom-logo { width: auto; max-width: 200px; max-height: 65px; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.site-nav a:not(.btn) { font-size: 1rem; font-weight: 730; text-decoration: none; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--rust); text-decoration: underline; text-underline-offset: 8px; }
.site-nav .btn { min-height: 48px; padding: 9px 17px; font-size: 1rem; }
.menu-toggle { display: none; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 8px 13px; border: 2px solid var(--olive); border-radius: 6px; background: transparent; color: var(--olive); font-weight: 750; }
.menu-toggle-bars { display: grid; gap: 4px; }
.menu-toggle-bars span { display: block; width: 19px; height: 2px; background: currentColor; }

/* Portada */
.hero { position: relative; overflow: hidden; background: var(--cream); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); align-items: center; gap: clamp(38px, 5.5vw, 88px); min-height: 655px; padding-block: 76px 88px; }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { margin: 0 0 24px; font: 400 clamp(3.75rem, 6.4vw, 6.9rem)/.99 var(--serif); letter-spacing: -.065em; }
.hero-intro { max-width: 535px; margin: 0; color: #3e453d; font-size: clamp(1.1rem, 1.4vw, 1.27rem); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.hero-meta { display: flex; align-items: center; gap: 13px; margin-top: 41px; color: var(--muted); font-size: .9rem; font-weight: 650; }
.hero-meta::before { content: ''; width: 31px; height: 2px; flex-shrink: 0; background: var(--rust); }
.hero-art { position: relative; min-width: 0; padding: 0 18px 17px 0; }
.hero-art::before { position: absolute; inset: 18px 0 0 18px; border: 2px solid #ba9a6b; border-radius: 48% 48% 4px 4px / 19% 19% 4px 4px; content: ''; }
.hero-art img { position: relative; width: 100%; aspect-ratio: 1.02; object-fit: cover; border-radius: 48% 48% 4px 4px / 19% 19% 4px 4px; background: #d5b48e; }
.hero-art .art-label { position: absolute; right: -15px; bottom: 20px; z-index: 1; max-width: 205px; padding: 17px 20px; border: 1px solid var(--line); background: var(--white); box-shadow: 0 15px 35px #2a382229; font: italic 1.12rem/1.25 var(--serif); transform: rotate(3deg); }
.hero-art .art-label strong { display: block; margin-top: 5px; color: var(--rust); font: 700 .73rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.about-section { padding-block: 92px 104px; background: #e5e9de; }
.about-intro-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: end; gap: clamp(35px, 7vw, 105px); margin-bottom: 45px; }
.about-copy { max-width: 630px; }
.about-copy p { margin: 0; color: #394539; font-size: 1.06rem; line-height: 1.7; }
.about-copy .about-lead { margin-bottom: 20px; color: var(--ink); font: 400 clamp(1.3rem, 1.8vw, 1.65rem)/1.45 var(--serif); }
.about-photo-grid { display: grid; grid-template-columns: 1.16fr .84fr; grid-template-rows: repeat(2, 270px); gap: 18px; }
.about-photo { position: relative; min-width: 0; min-height: 0; margin: 0; border: 1px solid #becab9; background: #d5ddcf; overflow: hidden; }
.about-photo--exterior { grid-row: span 2; }
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-photo-stamp { position: absolute; top: 18px; right: 18px; max-width: calc(100% - 36px); padding: 8px 12px; border: 1px solid #aebda9; background: #fffef6ee; color: var(--olive-dark); font-size: .75rem; font-weight: 750; letter-spacing: .045em; text-align: center; }
.about-photo figcaption { position: absolute; bottom: 0; left: 0; display: flex; align-items: baseline; gap: 17px; max-width: calc(100% - 30px); min-width: 230px; padding: 15px 22px; background: var(--white); color: var(--olive-dark); box-shadow: 0 8px 20px #253d2f21; }
.about-photo figcaption span { color: var(--rust); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.about-photo figcaption strong { font: 400 clamp(1.18rem, 2vw, 1.55rem)/1.2 var(--serif); }
.gallery-section, .reviews-section { padding-block: 88px; }
.gallery-section .section-title, .reviews-section .section-title { margin-bottom: 32px; }
.carousel-widget { max-width: 1000px; }
.carousel-widget img { max-width: 100%; height: auto; }
.reviews-section { background: var(--cream); }
.reviews-more { display: inline-flex; align-items: center; min-height: 48px; margin-top: 25px; color: var(--olive-dark); font-weight: 750; }
.visit-section { padding-block: 90px; }
.visit-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 25px; padding: 44px clamp(25px, 5vw, 63px); border-radius: 7px; background: var(--olive-dark); color: #fff; }
.visit-card .eyebrow { color: #edc295; }
.visit-card h2 { max-width: 670px; margin: 0 0 11px; font: 400 clamp(2.15rem, 4vw, 3.7rem)/1.07 var(--serif); letter-spacing: -.04em; }
.visit-card p { margin: 0; color: #e4ece2; }

/* Páginas */
.page-heading { padding-block: 75px 61px; border-bottom: 1px solid var(--line); background: var(--cream); }
.page-heading h1 { max-width: 800px; margin: 0; font: 400 clamp(3.3rem, 7vw, 6rem)/1.03 var(--serif); letter-spacing: -.055em; }
.page-heading p:last-child { max-width: 640px; margin: 19px 0 0; color: var(--muted); font-size: 1.12rem; }
.page-section { padding-block: 76px 105px; }
.pending-lead { margin-top: 0; font: 400 clamp(1.7rem, 3vw, 2.35rem)/1.3 var(--serif); }
.page-section.reading-column > .btn { margin-top: 20px; }
.reading-column { max-width: 820px; }
.page-body { font-size: 1.09rem; }
.page-body > :first-child { margin-top: 0; }
.page-body p { margin-block: 0 22px; }
.page-body h2 { margin: 50px 0 16px; font: 400 clamp(2.1rem, 4vw, 3rem)/1.15 var(--serif); letter-spacing: -.035em; }
.page-body h3 { margin: 32px 0 13px; font: 400 1.65rem/1.2 var(--serif); }
.page-body ul { padding-left: 28px; }
.page-body li { padding-left: 5px; margin-block: 9px; }
.page-body .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin-block: 40px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); gap: clamp(30px, 7vw, 110px); align-items: start; }
.about-aside { position: relative; min-height: 440px; padding: 47px 35px; background: #e9d6bd; overflow: hidden; }
.about-aside::before, .about-aside::after { position: absolute; width: 380px; height: 380px; border: 2px solid #bd9c72; border-radius: 50%; content: ''; }
.about-aside::before { top: -225px; right: -140px; }
.about-aside::after { bottom: -285px; left: -160px; }
.about-aside blockquote { position: relative; z-index: 1; max-width: 365px; margin: 48px 0 0; font: italic 400 clamp(2.4rem, 3.4vw, 3.4rem)/1.15 var(--serif); letter-spacing: -.045em; }
.about-aside p { position: relative; z-index: 1; margin-top: 34px; color: var(--olive-dark); font-weight: 750; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); }
.contact-info { display: grid; gap: 16px; }
.contact-card { padding: 27px 29px; border: 1px solid var(--line); background: var(--white); }
.contact-card h2 { margin: 0 0 12px; color: var(--rust); font: 750 .82rem/1.3 var(--sans); letter-spacing: .11em; text-transform: uppercase; }
.contact-card p { margin: 0; font-size: 1.12rem; line-height: 1.5; overflow-wrap: anywhere; }
.contact-card a { color: var(--olive-dark); font-weight: 750; }
.contact-map { display: flex; flex-direction: column; justify-content: space-between; min-height: 360px; padding: 33px; background: #d7e1d2; }
.contact-map h2 { margin: 0 0 10px; font: 400 clamp(2.1rem, 3vw, 3rem)/1.1 var(--serif); }
.contact-map p { max-width: 290px; margin: 0; }
.contact-map .btn { align-self: start; }
.not-found { min-height: 55vh; padding-block: 100px; }

/* Pie */
.site-footer { background: #253d2f; color: #f9f6ec; }
.footer-inner { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 45px; padding-block: 58px; }
.footer-inner .site-logo { color: #fff; }
.footer-inner .brand-mark { border-color: #e8d8b3; }
.footer-inner p { max-width: 330px; margin: 17px 0 0; color: #e7ede3; font-size: .95rem; }
.footer-inner h2 { margin: 7px 0 17px; font: 700 .8rem/1.3 var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.footer-links { display: grid; justify-items: start; gap: 11px; }
.footer-links a { font-size: .96rem; }
.footer-base { display: flex; justify-content: space-between; gap: 15px; padding-block: 17px 26px; border-top: 1px solid #66806d; color: #e7ede3; font-size: .8rem; }
.mobile-order { display: none; }

@media (max-width: 1160px) {
  .header-inner { min-height: 76px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 14px 24px 25px; border-bottom: 2px solid var(--line); background: var(--paper); box-shadow: 0 20px 30px #2e302822; }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { display: flex; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav .btn { margin-top: 18px; }
  .hero-grid { min-height: 550px; }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 34px), var(--max)); }
  .topline-inner { min-height: 46px; justify-content: space-between; text-align: left; }
  .hero-grid { grid-template-columns: 1fr; gap: 42px; padding-block: 58px 70px; }
  .hero h1 { max-width: 620px; font-size: clamp(3.3rem, 11vw, 5.7rem); }
  .hero-art { width: min(100%, 570px); margin-inline: auto; }
  .hero-art .art-label { right: -6px; }
  .hero-meta { margin-top: 27px; }
  .about-section { padding-block: 69px 75px; }
  .about-intro-grid { grid-template-columns: 1fr; gap: 22px; margin-bottom: 34px; }
  .about-photo-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 16px; }
  .about-photo, .about-photo--exterior { grid-row: auto; aspect-ratio: 4 / 3; }
  .about-photo--interior, .about-photo--food { aspect-ratio: 16 / 10; }
  .gallery-section, .reviews-section { padding-block: 65px; }
  .visit-section { padding-block: 65px; }
  .visit-card { grid-template-columns: 1fr; }
  .visit-card .btn { justify-self: start; }
  .page-heading { padding-block: 59px 52px; }
  .page-section { padding-block: 55px 75px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-aside { min-height: 340px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 38px; }
  .footer-inner > :first-child { grid-column: 1 / -1; }
  .mobile-order { display: block; position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; padding: 9px 16px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fbf8f1f5; box-shadow: 0 -6px 18px #1b261326; }
  .mobile-order .btn { width: 100%; min-height: 52px; }
  body { padding-bottom: 72px; }
}

@media (max-width: 540px) {
  body { font-size: 18px; }
  .topline-inner > p { display: none; }
  .language-switch { width: 100%; justify-content: space-around; }
  .header-inner { min-height: 70px; }
  .brand-mark { width: 42px; height: 42px; font-size: 26px; }
  .brand-name { font-size: 1.08rem; }
  .menu-toggle { min-height: 45px; padding-inline: 10px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-art .art-label { max-width: 150px; padding: 10px; font-size: .9rem; }
  .hero-art .art-label strong { font-size: .62rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-inner > :first-child { grid-column: auto; }
  .footer-base { display: block; }
  .footer-base span { display: block; margin-bottom: 7px; }
}

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

/* MelosoBar integration: full-width order area also on auto-created plugin pages. */
.page-body:has(> .mb-app), .page-body:has(> #melosobar-app), .page-body:has(> #melosobar-tablet) { max-width: none; }
.bsp-ordering-page { padding-block: 36px 85px; }
.bsp-ordering-extra { max-width: 760px; margin-top: 36px; }
@media (max-width: 700px) { .bsp-ordering-page { padding-block: 20px 65px; } }
