/* Sello 33 editorial refinements */
:root {
  --s33-display: "Montserrat", "Inter", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --serif: var(--s33-display);
  --s33-heading-weight: 650;
  --s33-heading-tracking: -.035em;
}

.banner-button.manifesto-trigger {
  border-color: #997a4d;
  background: linear-gradient(150deg, #413624, #2c281d);
  color: #f0d8aa;
}

.banner-button.manifesto-trigger:hover {
  border-color: #e1bd7b;
  background: linear-gradient(150deg, #57462c, #342d20);
}

.section-title h1,
.section-title h2,
.catalog-end > span,
.dialog-header h2,
.product-detail-layout h2,
.cart-item-name,
.cart-empty h3,
.catalog-state h3,
.location-card h3,
.brand-copy strong,
.admin-wordmark > span,
.panel-heading h1,
.settings-card h2,
.product-row-title h2,
.featured-row h2,
.editor-header h2,
.editor-body h3,
.confirm-dialog h2,
.auth-card h1,
.logo-crop-header h2 {
  font-family: var(--serif);
}

.section-title h1,
.section-title h2,
.admin-body :is(h1, h2, h3) {
  font-family: var(--s33-display);
  font-weight: var(--s33-heading-weight);
  letter-spacing: var(--s33-heading-tracking);
}

.catalog-end > span {
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.location-card .maps-link {
  border: 1px solid #9f7e4d;
  border-radius: 7px;
  padding: 8px 11px;
  color: #f0d8aa;
  background: linear-gradient(135deg, #3c3120, #29251b);
}

.location-card .maps-link:hover {
  border-color: #e0bb77;
  background: #57452c;
}

.manifesto-dialog {
  width: min(900px, calc(100vw - 32px));
  overflow: hidden;
}

.manifesto-dialog .dialog-header {
  padding-bottom: 18px;
}

.manifesto-sheet {
  margin: 0 20px;
  max-height: min(70dvh, 680px);
  overflow-y: auto;
  border: 1px solid #755d3b;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 0%, #211b12 0, #0c0c0b 44%, #050505 100%);
  box-shadow: inset 0 0 0 1px #e0bb7720, 0 16px 35px #0008;
  scrollbar-color: #9f7e4d #17130e;
  scrollbar-width: thin;
}

.manifesto-copy {
  max-width: 700px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) clamp(24px, 7vw, 84px) 58px;
  color: #eee7d9;
  text-align: center;
  font-family: var(--sans);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.72;
}

.manifesto-copy p {
  margin: 0 0 22px;
}

.manifesto-copy .manifesto-lead {
  margin-bottom: 30px;
  color: #d9b16d;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 650;
  letter-spacing: .14em;
  line-height: 1.25;
}

.manifesto-copy .manifesto-closing {
  margin-top: 36px;
  color: #f0d8aa;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
}

.manifesto-signature {
  display: grid;
  gap: 3px;
  margin: 44px 0 34px !important;
  color: #d9b16d;
}

.manifesto-signature strong {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: .16em;
}

.manifesto-signature span {
  color: #eee7d9;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.manifesto-signature small {
  margin-top: 13px;
  color: #bcae91;
  font-size: 12px;
  letter-spacing: .06em;
}

.manifesto-origin {
  margin-bottom: 0 !important;
  color: #d9b16d;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .22em;
}

/* Accesos comerciales y cierre del catálogo */
.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 5px;
}

.catalog-toolbar .category-bar {
  flex: 1 1 auto;
  min-width: 0;
}

.institutional-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid #887043;
  border-radius: 8px;
  background: linear-gradient(145deg, #3a3020, #27231a);
  box-shadow: 0 5px 13px #0004, inset 0 1px #ffffff0a;
  color: #efd5a2;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.institutional-button svg {
  width: 18px;
  height: 18px;
}

.institutional-button:hover {
  border-color: #e1bb76;
  background: linear-gradient(145deg, #524127, #30281d);
  transform: translateY(-1px);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  padding-top: 28px;
  border-top: 1px solid #6b59373d;
}

.footer-brand {
  color: #bcae91;
}

.footer-contact-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-contact,
.footer-socials,
.footer-social {
  display: inline-flex;
  align-items: center;
}

.footer-contact {
  gap: 7px;
  color: #efd5a2;
  font-size: 14px;
  font-weight: 650;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
}

.footer-socials {
  gap: 9px;
  color: #bcae91;
  font-size: 12px;
}

.footer-social {
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #735e3c;
  border-radius: 50%;
  color: #d9b16d;
}

.footer-social svg {
  width: 15px;
  height: 15px;
}

.footer-social:hover {
  border-color: #e1bb76;
  color: #f0d8aa;
}

.footer-admin {
  justify-self: end;
}

@media (max-width: 760px) {
  .catalog-toolbar {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
  }

  .catalog-toolbar .category-bar {
    flex-basis: 100%;
    margin-left: -1px;
    margin-right: -23px;
  }

  .institutional-button {
    margin: 2px 0 4px 1px;
    padding: 9px 13px;
    font-size: 12px;
  }

  .site-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding-top: 24px;
  }

  .footer-contact-block {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 15px;
    border-top: 1px solid #6b593730;
  }

  .footer-admin {
    grid-column: 2;
    grid-row: 1;
  }

  .manifesto-dialog {
    width: 100%;
  }

  .manifesto-sheet {
    max-height: 70dvh;
    margin: 0 16px;
  }

  .manifesto-copy {
    padding: 34px 25px 44px;
    font-size: 15px;
  }
}

/* Identidad compartida. El marco reserva su propio espacio, incluso durante la carga. */
.brand-mark[data-s33-mark] {
  --s33-mark-size: 3.6875rem;
  display: block;
  position: relative;
  flex: none;
  width: var(--s33-mark-size);
  height: var(--s33-mark-size);
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
}

.brand-mark[data-s33-mark]:not(.poster) {
  width: calc(var(--s33-mark-size) * 1.7);
  border-radius: .5rem;
}

.brand-mark[data-s33-mark] > img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

.brand-mark[data-s33-mark].poster > img { object-fit: cover; }

.admin-body,
.admin-body :is(button, input, select, textarea) {
  font-family: var(--sans);
}

.admin-wordmark > .brand-copy {
  display: flex;
  min-width: 0;
  font: inherit;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

.admin-wordmark [data-s33-mark] { --s33-mark-size: 3rem; }
#store-logo-mark { --s33-mark-size: 4.5rem; }
.auth-gate { grid-template-columns: minmax(0, 1fr); }
.auth-card { min-width: 0; max-width: 100%; }
.auth-card .admin-wordmark { margin-bottom: clamp(1.5rem, 4vw, 2.25rem); }
.auth-card h1 { font-size: 1.75rem; }

@media (max-width: 760px) {
  .brand-banner [data-s33-mark] { --s33-mark-size: 2.9375rem; }
}

/* En teléfono la marca ocupa una fila; debajo, los cuatro destinos conservan su orden. */
@media (max-width: 640px) {
  html { scroll-padding-top: 12rem; }
  .brand-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    align-items: center;
    gap: .375rem;
    margin-inline: 0;
    padding: .5rem .625rem;
  }

  .brand-banner .brand {
    justify-self: start;
    max-width: 100%;
    gap: .65rem;
  }
  .brand-banner [data-s33-mark] { --s33-mark-size: 2.375rem; }
  .brand-banner .brand-copy, .admin-wordmark .brand-copy {
    display: flex;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .brand-banner .brand-copy strong, .admin-wordmark .brand-copy strong {
    font-size: 1.125rem;
    line-height: 1.2;
    letter-spacing: .10em;
  }
  .brand-banner .brand-copy > span, .admin-wordmark .brand-copy > span {
    font-size: .75rem;
    line-height: 1.25;
    letter-spacing: .06em;
  }

  .brand-banner nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 2.75rem;
    width: 100%;
    gap: .25rem;
    padding-top: .375rem;
    border-top: 1px solid #75624466;
    align-items: stretch;
  }
  .brand-banner .banner-button, .brand-banner .banner-cart {
    min-width: 0;
    min-height: 2.75rem;
    margin: 0;
    padding: .3rem .0625rem;
    border-radius: .5rem;
  }
  .brand-banner .banner-button {
    flex-direction: column;
    gap: .1875rem;
    font-size: .875rem;
    line-height: 1.15;
    text-align: center;
  }
  .brand-banner .banner-button > span { display: block; overflow-wrap: anywhere; }
  .brand-banner .banner-button svg { width: 1.125rem; height: 1.125rem; }
  .brand-banner .banner-cart { width: 100%; }
  .brand-banner #bag-count { right: 0; }

  .auth-gate { padding: 1rem; }
  .auth-card { padding: 1.5rem 1.25rem; }
  .auth-card h1 { font-size: 1.5625rem; }
  .auth-card .password-row input { font-size: 1rem; }
  .admin-header {
    height: auto;
    padding-block: .625rem;
    flex-wrap: wrap;
    gap: .5rem;
  }
  .admin-header .admin-header-actions { flex-wrap: wrap; max-width: 100%; }
  .admin-header .admin-wordmark [data-s33-mark] { --s33-mark-size: 2.375rem; }
}

@media (max-width: 18rem) {
  .brand-banner nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
