/* MercadilloGeek 3.2 · navegación ordenada, contacto claro y centro legal */

/* Cabecera en dos niveles: cuenta arriba, secciones debajo */
.mg-site-header { display: block; height: auto; min-height: 0; padding: 0; }
.mg-header-main { align-items: center; display: grid; gap: 24px; grid-template-columns: auto minmax(260px, 1fr) auto; margin: 0 auto; min-height: 76px; width: min(1180px, calc(100% - 48px)); }
.mg-header-main .mg-search { max-width: 540px; width: 100%; }
.mg-header-actions { align-items: center; display: flex; gap: 9px; justify-content: flex-end; min-width: 0; }
.mg-header-actions > a { flex: 0 0 auto; }
.mg-header-actions .mg-support-nav em { font-style: normal; }
.mg-header-actions .mg-login { border-radius: 9px; padding: 9px 10px; }
.mg-header-actions .mg-signup { background: #eef1ff; border-radius: 9px; padding: 9px 11px; }
.mg-header-actions .mg-account { background: #f6f7fa; border: 1px solid #e4e6ed; border-radius: 999px; min-height: 42px; padding: 3px 10px 3px 4px !important; }
.mg-header-actions .mg-publish-button { min-height: 42px; padding: 11px 14px; white-space: nowrap; }
.mg-header-nav-wrap { background: #fff; border-top: 1px solid #eceef3; box-shadow: 0 5px 14px #11182708; width: 100%; }
.mg-site-header .mg-main-nav { align-items: center; display: flex; gap: 6px; margin: 0 auto; max-width: none; min-height: 52px; overflow: visible; padding: 5px 0; width: min(1180px, calc(100% - 48px)); }
.mg-site-header .mg-main-nav > a { align-items: center; border: 1px solid transparent; border-radius: 9px; color: #414754; display: inline-flex !important; flex: 0 0 auto; font-size: 13px !important; font-weight: 800; gap: 6px; min-height: 40px; padding: 7px 10px !important; white-space: nowrap; width: auto; }
.mg-site-header .mg-main-nav > a:hover { background: #f5f6fa; border-color: #e1e4ec; color: #171c27; }
.mg-site-header .mg-main-nav .mg-market-nav { background: #171c27; color: #fff !important; }
.mg-site-header .mg-main-nav .mg-users-nav { animation: none; background: #ecf9d4; border-color: #cce79b; border-radius: 9px; color: #355115 !important; }
.mg-site-header .mg-main-nav .mg-users-nav::before, .mg-site-header .mg-main-nav .mg-sold-nav::before { content: none !important; }
.mg-site-header .mg-main-nav .mg-super-geeks-nav { border-radius: 9px; min-height: 40px; padding: 4px 9px 4px 4px !important; }
.mg-site-header .mg-main-nav .mg-super-geeks-nav img { height: 30px; width: 30px; }
.mg-site-header .mg-main-nav .mg-super-geeks-nav span { display: inline !important; }
.mg-site-header .mg-main-nav .mg-sold-nav { background: #eaf8ef; border-color: #c5e7d2; color: #237244 !important; }
.mg-site-header .mg-main-nav .mg-story-nav { color: #5b3b95; }
.mg-site-header .mg-main-nav .mg-contact-nav { color: #176879 !important; margin-left: auto; }
.mg-site-header .mg-main-nav .mg-contact-nav span { background: #e8f9fc; border-color: #b7e3ea; height: 28px; width: 28px; }
.mg-site-header .mg-main-nav .mg-legal-nav { background: #f3f1ff; border-color: #dcd5fa; color: #563ba2 !important; }
.mg-site-header .mg-main-nav .mg-membership-nav { min-height: 40px; }
.mg-menu-toggle { align-items: center; background: #fff; border: 1px solid #dfe2e9; border-radius: 10px; cursor: pointer; display: none; flex-direction: column; gap: 4px; height: 42px; justify-content: center; padding: 0; width: 44px; }
.mg-menu-toggle span { background: #1f2530; border-radius: 4px; display: block; height: 2px; transition: transform .2s, opacity .2s; width: 20px; }
.mg-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mg-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mg-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Formulario de contacto en superficie clara y alto contraste */
.mg-contact-page { color: #171c27; }
.mg-contact-page .mg-contact-intro, .mg-contact-page .mg-contact-form { border: 1px solid #dfe3ec; box-shadow: 0 18px 55px #17213c12; color: #171c27; }
.mg-contact-page .mg-contact-intro { background: linear-gradient(145deg, #f4f7ff, #e9f4f7); }
.mg-contact-page .mg-contact-form { background: #fff; }
.mg-contact-page .mg-label { color: #4f55b7 !important; }
.mg-contact-page .mg-contact-intro h1, .mg-contact-page .mg-contact-form h2 { color: #151b27 !important; }
.mg-contact-page .mg-contact-intro h1 em { color: #6844c6; }
.mg-contact-page .mg-contact-intro > p { color: #485366; }
.mg-contact-page .mg-contact-intro li { color: #283244; }
.mg-contact-page .mg-contact-form label { color: #252c39; font-size: 13px; }
.mg-contact-page .mg-contact-form input, .mg-contact-page .mg-contact-form select, .mg-contact-page .mg-contact-form textarea { background: #f9fafc; border: 1px solid #cfd5e1; color: #131823; font-size: 15px; outline: 0; }
.mg-contact-page .mg-contact-form input::placeholder, .mg-contact-page .mg-contact-form textarea::placeholder { color: #747d8d; opacity: 1; }
.mg-contact-page .mg-contact-form input:focus, .mg-contact-page .mg-contact-form select:focus, .mg-contact-page .mg-contact-form textarea:focus { background: #fff; border-color: #5b70f5; box-shadow: 0 0 0 3px #5b70f51c; }
.mg-contact-page .mg-contact-user { background: #eaf8f0; border-color: #b9dfc8; color: #244c35; }
.mg-contact-page .mg-contact-consent { background: #f5f6fa; border: 1px solid #dfe2e9; border-radius: 10px; padding: 12px; }
.mg-contact-page .mg-contact-consent input { accent-color: #5b70f5; }
.mg-contact-page .mg-contact-consent a { color: #4a55c5; font-weight: 850; text-decoration: underline; }
.mg-contact-page .mg-contact-form > small { color: #626b7b; font-size: 12px; }

/* Normas de usuarios y privacidad */
.mg-legal-page { color: #1a1f2b; padding-bottom: 90px; }
.mg-legal-page [id] { scroll-margin-top: 150px; }
.mg-legal-hero { align-items: center; background: radial-gradient(circle at 85% 20%, #8b64ee55, transparent 27%), linear-gradient(135deg, #151b31, #27315b 62%, #452b66); border: 1px solid #59659c; border-radius: 24px; color: #fff; display: flex; justify-content: space-between; margin: 8px 0 18px; overflow: hidden; padding: 42px; position: relative; }
.mg-legal-hero::before { background-image: linear-gradient(#ffffff0c 1px, transparent 1px), linear-gradient(90deg, #ffffff0c 1px, transparent 1px); background-size: 30px 30px; content: ""; inset: 0; pointer-events: none; position: absolute; }
.mg-legal-hero > * { position: relative; }
.mg-legal-hero .mg-label { color: #8ff1b8 !important; }
.mg-legal-hero h1 { color: #fff; font-size: clamp(40px, 6vw, 66px); letter-spacing: -3px; line-height: .98; margin: 14px 0; max-width: 760px; }
.mg-legal-hero h1 em { color: #aef26b; font-style: normal; }
.mg-legal-hero p { color: #c9d0e5; font-size: 16px; line-height: 1.65; margin: 0; max-width: 690px; }
.mg-legal-updated { color: #9fa9c6; display: block; font-size: 11px; margin-top: 18px; }
.mg-legal-shield { align-items: center; background: linear-gradient(145deg, #6d63df, #353a99); border: 5px solid #9ba3ef; border-radius: 24px 24px 38px 38px; box-shadow: 0 18px 45px #0005; color: #fff; display: flex; flex: 0 0 130px; font: 950 35px monospace; height: 145px; justify-content: center; position: relative; transform: rotate(4deg); }
.mg-legal-shield i { align-items: center; background: #84f0b4; border: 4px solid #1c2245; border-radius: 50%; bottom: -13px; color: #15462b; display: flex; font-size: 17px; font-style: normal; height: 42px; justify-content: center; position: absolute; right: -12px; width: 42px; }
.mg-legal-jump { background: #fff; border: 1px solid #dfe2e9; border-radius: 14px; display: flex; gap: 7px; margin: 0 0 24px; overflow-x: auto; padding: 9px; position: sticky; scrollbar-width: none; top: 138px; z-index: 30; }
.admin-bar .mg-legal-jump { top: 170px; }
.mg-legal-jump::-webkit-scrollbar { display: none; }
.mg-legal-jump a { background: #f5f6f9; border-radius: 8px; color: #444b58; flex: 0 0 auto; font-size: 12px; font-weight: 800; padding: 9px 11px; }
.mg-legal-jump a:hover { background: #e9e8ff; color: #4d3ca5; }
.mg-legal-layout { align-items: start; display: grid; gap: 34px; grid-template-columns: 250px minmax(0, 1fr); }
.mg-legal-layout > aside { background: linear-gradient(145deg, #eef2ff, #f7f5ff); border: 1px solid #d9def0; border-radius: 16px; display: grid; gap: 10px; padding: 22px; position: sticky; top: 210px; }
.admin-bar .mg-legal-layout > aside { top: 242px; }
.mg-legal-layout > aside b { font-size: 18px; }
.mg-legal-layout > aside p { color: #586173; font-size: 13px; line-height: 1.65; margin: 0; }
.mg-legal-layout > aside a { color: #5142b1; font-size: 12px; font-weight: 850; }
.mg-legal-layout main { min-width: 0; }
.mg-legal-layout main > section { background: #fff; border: 1px solid #e0e3ea; border-radius: 18px; box-shadow: 0 12px 35px #121a2e09; margin-bottom: 18px; padding: 31px 34px; }
.mg-legal-number { color: #5d6ad1; font: 900 11px monospace; letter-spacing: 1px; }
.mg-legal-layout h2 { color: #171d29; font-size: clamp(26px, 3vw, 35px); letter-spacing: -1.3px; margin: 7px 0 16px; }
.mg-legal-layout h3 { color: #343c4c; font-size: 17px; margin: 24px 0 7px; }
.mg-legal-layout p, .mg-legal-layout li { color: #4c5668; font-size: 15px; line-height: 1.75; }
.mg-legal-layout ul { display: grid; gap: 10px; margin: 0; padding-left: 22px; }
.mg-legal-layout main a { color: #5146bd; font-weight: 750; text-decoration: underline; }
.mg-legal-cards { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin-top: 24px; }
.mg-legal-cards div { background: #f6f7fb; border: 1px solid #e2e5ec; border-radius: 12px; display: grid; gap: 4px; padding: 16px; }
.mg-legal-cards i { align-items: center; background: #e9e8ff; border-radius: 9px; color: #5b4fc0; display: flex; font-size: 20px; font-style: normal; height: 38px; justify-content: center; margin-bottom: 5px; width: 38px; }
.mg-legal-cards b { font-size: 14px; }
.mg-legal-cards span { color: #687183; font-size: 12px; }
.mg-legal-alert { background: #fff4e2; border: 1px solid #ecd1a2; border-left: 5px solid #dc852e; border-radius: 10px; color: #71491c; line-height: 1.6; margin-top: 22px; padding: 16px; }
.mg-legal-cta { align-items: center; background: #161c2d; border-radius: 13px; color: #fff; display: flex; gap: 20px; justify-content: space-between; margin-top: 26px; padding: 20px; }
.mg-legal-cta div { display: grid; gap: 4px; }
.mg-legal-cta b { font-size: 17px; }
.mg-legal-cta span { color: #b9c1d5; font-size: 12px; }
.mg-legal-cta a { text-decoration: none !important; white-space: nowrap; }

@media (max-width: 1050px) {
  .mg-site-header { padding: 0; }
  .mg-header-main { gap: 12px; grid-template-columns: auto 1fr auto; padding: 10px 0; }
  .mg-header-main .mg-search { grid-column: 1 / -1; grid-row: 2; max-width: none; order: initial; }
  .mg-header-actions { grid-column: 2; grid-row: 1; }
  .mg-menu-toggle { display: flex; grid-column: 3; grid-row: 1; }
  .mg-header-nav-wrap { display: block; }
  .mg-site-header.has-menu-toggle .mg-header-nav-wrap { display: none; }
  .mg-site-header.has-menu-toggle.is-open .mg-header-nav-wrap { display: block; }
  .mg-site-header .mg-main-nav { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 0 16px; }
  .mg-site-header .mg-main-nav > a { justify-content: flex-start; min-height: 48px; width: 100%; }
  .mg-site-header .mg-main-nav .mg-contact-nav { margin-left: 0; }
  .mg-site-header .mg-main-nav .mg-super-geeks-nav { padding: 7px 10px !important; }
  .mg-site-header .mg-main-nav .mg-users-nav { display: inline-flex !important; }
  .mg-legal-jump { top: 122px; }
  .admin-bar .mg-legal-jump { top: 154px; }
  .mg-legal-layout { grid-template-columns: 1fr; }
  .mg-legal-layout > aside { position: static; }
}

@media (max-width: 720px) {
  .mg-header-main { width: calc(100% - 24px); }
  .mg-header-main .mg-brand b { display: inline; }
  .mg-header-actions { gap: 5px; }
  .mg-header-actions .mg-account { flex-basis: 40px; height: 40px; justify-content: center; padding: 2px !important; width: 40px; }
  .mg-header-actions .mg-account > span { display: none !important; }
  .mg-header-actions .mg-support-nav { height: 40px; justify-content: center; min-width: 40px; padding: 5px !important; }
  .mg-header-actions .mg-support-nav em { display: none; }
  .mg-header-actions .mg-publish-button { font-size: 12px; min-width: auto; padding: 10px 11px; }
  .mg-header-actions .mg-publish-button:first-letter { font-size: inherit; }
  .mg-header-actions .mg-signup { display: none; }
  .mg-site-header .mg-main-nav { width: calc(100% - 24px); }
  .mg-legal-hero { align-items: flex-start; padding: 30px 22px; }
  .mg-legal-shield { display: none; }
  .mg-legal-jump { margin-inline: -2px; top: 120px; }
  .admin-bar .mg-legal-jump { top: 166px; }
  .mg-legal-layout main > section { padding: 24px 20px; }
  .mg-legal-cards { grid-template-columns: 1fr; }
  .mg-legal-cta { align-items: stretch; flex-direction: column; }
  .mg-legal-cta a { text-align: center; }
}

@media (max-width: 500px) {
  .mg-header-main { grid-template-columns: auto 1fr auto; }
  .mg-header-main .mg-brand b { display: none; }
  .mg-header-actions .mg-login { font-size: 11px; padding: 8px 5px; }
  .mg-header-actions .mg-support-nav { display: none; }
  .mg-site-header .mg-main-nav { grid-template-columns: 1fr; }
  .mg-site-header .mg-main-nav > a { font-size: 14px !important; }
  .mg-contact-page .mg-contact-intro, .mg-contact-page .mg-contact-form { padding: 20px; }
  .mg-legal-hero h1 { font-size: 39px; }
  .mg-legal-hero p { font-size: 14px; }
  .mg-legal-jump { top: 118px; }
  .mg-legal-layout p, .mg-legal-layout li { font-size: 14px; }
}
