/* Estilos de la aplicación servida desde public_html/. */
:root {
  --ink: #111;
  --muted: #6e6e6e;
  --line: #dedede;
  --paper: #fff;
  --soft: #f5f3ef;
  --accent: #8b1e36;
  --shell: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.link-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.eyebrow {
  margin: 0 0 14px; color: var(--muted); font-size: .74rem;
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 10px 20px; border: 1px solid var(--ink);
  border-radius: 999px; font-weight: 700;
}
.button-dark { color: #fff; background: var(--ink); }
.button-outline { background: #fff; }

.site-header {
  position: sticky; z-index: 30; top: 0; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
}
.header-main { display: flex; min-height: 74px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 700; }
.brand img { width: auto; max-width: 210px; height: 42px; object-fit: contain; }
.account-actions { display: flex; align-items: center; gap: 22px; font-size: .9rem; }
.primary-nav { min-height: 48px; }
.primary-nav > ul { display: flex; height: 48px; align-items: center; gap: 30px; margin: 0; padding: 0; list-style: none; }
.primary-nav li { position: relative; }
.primary-nav a { font-size: .88rem; }
.submenu {
  position: absolute; top: calc(100% + 14px); left: -18px; display: none;
  min-width: 220px; margin: 0; padding: 14px; border: 1px solid var(--line);
  background: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.1); list-style: none;
}
.submenu li + li { margin-top: 10px; }
.has-submenu:hover .submenu, .has-submenu:focus-within .submenu { display: block; }
.menu-toggle { display: none; width: 42px; border: 0; background: transparent; }
.menu-toggle span:not(.sr-only) { display: block; height: 2px; margin: 6px 0; background: #111; }

.search-hero {
  display: grid; min-height: 500px; align-items: center;
  background: linear-gradient(120deg, #f7f5f0 0 58%, #ede7dd 58%);
}
.search-hero-inner { padding-block: 54px 64px; }
.search-hero h1 {
  max-width: 1120px; margin: 0; font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 800; letter-spacing: -.065em; line-height: .91; text-transform: uppercase;
}
.hero-copy { max-width: 610px; margin: 18px 0 22px; font-size: 1.05rem; }
.global-search {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center;
  width: min(820px, 100%); min-height: 64px; padding: 8px 9px 8px 20px;
  border: 1px solid #aaa; border-radius: 999px; background: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.global-search svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.global-search input, .global-search select { min-width: 0; border: 0; outline: 0; background: transparent; }
.global-search input { padding: 8px 14px; font-size: 1.05rem; }
.global-search button {
  min-width: 112px; min-height: 46px; padding: 0 22px; border: 0;
  border-radius: 999px; color: #fff; background: #111; font-weight: 700; cursor: pointer;
}
.search-types { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; font-size: .85rem; }
.search-types span { color: var(--muted); }
.search-types a { text-decoration: underline; text-underline-offset: 4px; }
.ad-strip { display: flex; gap: 18px; padding-block: 30px; overflow-x: auto; }
.ad-strip a { flex: 0 0 min(100%, 760px); }
.ad-strip img { width: 100%; max-height: 160px; object-fit: cover; }
.installation-note { padding-block: 40px 84px; color: var(--muted); text-align: center; }

.page-header { padding-block: 70px 38px; }
.page-header h1, .error-page h1 { margin: 0 0 28px; font-size: clamp(2.6rem, 6vw, 5rem); letter-spacing: -.055em; }
.global-search-compact { grid-template-columns: 1fr 150px auto; box-shadow: none; }
.results-section { padding-bottom: 90px; }
.empty-state { padding: 80px 24px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.result-group + .result-group { margin-top: 72px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); }
.section-heading h2 { font-size: 1.6rem; }
.section-heading span { color: var(--muted); font-size: .8rem; }
.artist-grid, .artwork-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; margin-top: 26px; }
.artist-photo { display: grid; aspect-ratio: 4 / 5; place-items: center; overflow: hidden; background: var(--soft); }
.artist-photo img { width: 100%; height: 100%; object-fit: cover; }
.artist-photo span { font-family: Georgia, serif; font-size: 4rem; }
.artist-card h3, .artwork-card h3 { margin: 14px 0 2px; font-size: 1rem; }
.artist-card h2, .artwork-card h2 { margin: 14px 0 2px; font-size: 1rem; }
.artist-card p, .artwork-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.artwork-image { display: grid; aspect-ratio: 4 / 5; place-items: center; overflow: hidden; background: #f2f2f2; }
.artwork-image img { width: 100%; height: 100%; object-fit: contain; }
.artwork-card small { color: var(--muted); }

.artist-profile { padding-block: 64px 100px; }
.artist-profile-header { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: end; }
.artist-portrait { display: grid; aspect-ratio: 4 / 5; place-items: center; overflow: hidden; background: var(--soft); }
.artist-portrait img { width: 100%; height: 100%; object-fit: cover; }
.artist-portrait span { font-family: Georgia, serif; font-size: 7rem; }
.artist-profile h1 { margin: 0; font-size: clamp(3.2rem, 7vw, 6.4rem); letter-spacing: -.06em; line-height: .9; }
.artist-years { font-size: 1.1rem; }
.market-badge { display: inline-flex; padding: 7px 13px; border: 1px solid var(--ink); border-radius: 999px; font-size: .8rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span { padding: 6px 10px; background: var(--soft); font-size: .78rem; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 50px; margin-top: 64px; }
.content-panel { padding-block: 30px; border-top: 1px solid var(--line); }
.content-panel h2 { margin-top: 0; }
.content-panel p { max-width: 76ch; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.source-list { margin: 0; padding: 0; list-style: none; }
.source-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.source-list small { display: block; color: var(--muted); }

.artwork-detail { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr); gap: 62px; padding-block: 64px 100px; }
.artwork-detail-media { display: grid; min-height: 600px; place-items: center; background: #f1f1f1; }
.artwork-detail-media img { width: 100%; max-height: 760px; object-fit: contain; }
.image-placeholder { color: var(--muted); }
.artwork-detail-info h1 { margin: 0 0 5px; font-size: clamp(2.5rem, 5vw, 4.4rem); letter-spacing: -.05em; line-height: 1; }
.artist-link { display: inline-block; margin-bottom: 32px; font-size: 1.15rem; text-decoration: underline; text-underline-offset: 5px; }
.detail-list { border-top: 1px solid var(--line); }
.detail-list div { display: grid; grid-template-columns: 110px 1fr; padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; }
.commerce-card { margin-top: 30px; padding: 25px; background: var(--soft); }
.commerce-card h2 { font-size: 1.7rem; }
.commerce-card .button { width: 100%; margin: 16px 0; }
.commerce-card small { display: block; color: var(--muted); }
.status-pill { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.error-page { min-height: 62vh; padding-block: 100px; }

.auth-page {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
  gap: 80px; min-height: 68vh; align-items: start; padding-block: 88px;
}
.auth-copy h1 { max-width: 700px; margin: 0; font-size: clamp(3rem, 6vw, 5.8rem); letter-spacing: -.06em; line-height: .95; }
.auth-copy > p:last-child { max-width: 550px; font-size: 1.05rem; }
.auth-form { display: grid; gap: 18px; padding: 30px; border: 1px solid var(--line); background: #fff; }
.auth-form label { display: grid; gap: 7px; font-size: .8rem; font-weight: 700; }
.auth-form input { width: 100%; padding: 13px; border: 1px solid #aaa; }
.auth-form .button { width: 100%; cursor: pointer; }
.auth-form a { text-decoration: underline; text-underline-offset: 3px; }
.checkbox-label { grid-template-columns: 20px 1fr; align-items: start; }
.checkbox-label input { width: auto; margin-top: 3px; }
.form-alert { padding: 12px 14px; color: #842029; background: #f8d7da; }

.site-footer { padding: 55px 0 22px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-contact, .social-links { display: flex; flex-direction: column; gap: 8px; }
.footer-legal { margin-top: 45px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }

@media (max-width: 820px) {
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .account-actions { display: none; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; padding-bottom: 18px; }
  .primary-nav.is-open { display: block; }
  .primary-nav > ul { display: block; height: auto; }
  .primary-nav li { padding: 10px 0; border-top: 1px solid var(--line); }
  .submenu { position: static; display: block; padding: 10px 0 0 18px; border: 0; box-shadow: none; }
  .search-hero { min-height: 510px; background: var(--soft); }
  .search-hero-inner { padding-block: 65px; }
  .search-hero h1 { font-size: clamp(2.8rem, 14vw, 4.8rem); }
  .global-search { grid-template-columns: 24px 1fr; border-radius: 20px; }
  .global-search button { grid-column: 1 / -1; width: 100%; margin-top: 8px; }
  .global-search-compact { grid-template-columns: 1fr; padding: 12px; }
  .global-search-compact select { padding: 10px; border-top: 1px solid var(--line); }
  .artist-grid, .artwork-grid { grid-template-columns: repeat(2, 1fr); }
  .artist-profile-header { grid-template-columns: 110px 1fr; gap: 24px; align-items: center; }
  .artist-profile h1 { font-size: 2.7rem; }
  .profile-layout, .artwork-detail { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; gap: 36px; padding-block: 55px; }
  .artwork-detail-media { min-height: 420px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .artist-grid, .artwork-grid { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .artist-profile-header { grid-template-columns: 1fr; }
  .artist-portrait { width: 150px; }
}
