:root {
  --site-shell-green: #2f6500;
  --site-shell-green-dark: #214900;
  --site-shell-ink: #16251f;
  --site-shell-muted: #607069;
  --site-shell-line: #dce5e0;
  --site-shell-surface: #f8fbf9;
  --site-shell-header-height: 88px;
}

.site-header,
.site-header * {
  box-sizing: border-box;
}

.site-header {
  position: fixed;
  top: 0;
  z-index: 10050;
  width: 100%;
  min-height: var(--site-shell-header-height);
  background: rgba(248, 251, 249, 0.98);
  border-bottom: 1px solid var(--site-shell-line);
  box-shadow: 0 2px 12px rgba(22, 37, 31, 0.04);
  font-family: "Figtree", "Montserrat", Arial, sans-serif !important;
  color: var(--site-shell-ink);
}

/* El header queda siempre visible; esta reserva evita que tape el inicio de cada página. */
body {
  padding-top: var(--site-shell-header-height) !important;
}

/* Hero compacto para páginas operativas: conserva la identidad visual sin competir con la tarea principal. */
.site-compact-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 24px 28px;
  background: linear-gradient(135deg, #023326 0%, #88a69d 100%);
  color: #fff;
  text-align: center;
}

.site-compact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.14), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(126, 203, 65, 0.18), transparent 44%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='0.07' d='M30 0v60M0 30h60'/%3E%3C/svg%3E");
}

.site-compact-hero-inner {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: 0 auto;
}

.site-compact-hero-tag {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font: 700 12px/1.2 "Figtree", "Montserrat", Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-compact-hero h1 {
  margin: 12px 0 6px;
  color: #fff !important;
  font: 700 clamp(30px, 4vw, 42px)/1.12 "Figtree", "Montserrat", Arial, sans-serif !important;
}

.site-compact-hero-copy {
  max-width: 650px;
  margin: 0 auto 13px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.55;
}

.site-compact-breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.site-compact-breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.5);
}

.site-compact-breadcrumb a {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
}

.site-compact-breadcrumb a:hover,
.site-compact-breadcrumb a:focus-visible {
  color: #fff !important;
  text-decoration: underline;
}

.site-header [hidden] {
  display: none !important;
}

.site-nav {
  width: 100%;
}

.site-nav-inner {
  width: min(100% - 48px, 1760px);
  min-height: var(--site-shell-header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none !important;
}

.site-header .site-brand-logo {
  display: block !important;
  width: 220px !important;
  height: 52px !important;
  min-width: 220px !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: left center;
}

.site-nav-links {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.site-nav-links > li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.site-nav-link,
.site-account-trigger {
  color: var(--site-shell-muted) !important;
  font: 500 16px/1.2 "Figtree", "Montserrat", Arial, sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.site-nav-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 2px;
  border-bottom: 2px solid transparent;
}

.site-nav-link:hover,
.site-nav-link[aria-current="page"] {
  color: var(--site-shell-green-dark) !important;
  border-bottom-color: var(--site-shell-green);
}

.site-account {
  position: relative;
}

.site-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 4px 8px !important;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  cursor: pointer;
}

.site-account-trigger:hover {
  color: var(--site-shell-ink) !important;
  background: #eef5f1 !important;
}

.site-user-icon,
.site-user-avatar {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  border-radius: 50%;
}

.site-user-icon {
  background: #edf3ef;
  color: var(--site-shell-green-dark);
}

.site-user-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-user-avatar {
  background: #19845e;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.site-user-icon.is-hidden,
.site-user-avatar.is-hidden {
  display: none !important;
}

.site-account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 210px;
  margin: 0 !important;
  padding: 8px !important;
  list-style: none !important;
  border: 1px solid var(--site-shell-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(22, 37, 31, 0.14);
}

.site-account-menu a,
.site-account-menu button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  padding: 9px 12px !important;
  border: 0 !important;
  border-radius: 8px;
  background: transparent !important;
  color: var(--site-shell-ink) !important;
  font: 500 15px/1.2 "Figtree", "Montserrat", Arial, sans-serif !important;
  text-align: left;
  text-decoration: none !important;
  cursor: pointer;
}

.site-account-menu a:hover,
.site-account-menu button:hover {
  background: #f0f5f2 !important;
}

.site-account-menu .site-logout {
  color: #a52a25 !important;
}

.site-cart {
  flex: 0 0 auto;
}

.site-cart-link {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--site-shell-ink) !important;
  text-decoration: none !important;
}

.site-cart-link:hover {
  background: #eef5f1;
  color: var(--site-shell-green-dark) !important;
}

.site-cart-icon {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #19845e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.site-cart-count.invisible {
  visibility: hidden !important;
}

.site-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border: 1px solid var(--site-shell-line) !important;
  border-radius: 10px;
  background: #fff !important;
  color: var(--site-shell-ink);
  cursor: pointer;
}

.site-menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.site-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 12px 24px 18px;
  border-top: 1px solid var(--site-shell-line);
  border-bottom: 1px solid var(--site-shell-line);
  background: #fff;
  box-shadow: 0 14px 28px rgba(22, 37, 31, 0.12);
}

.site-mobile-menu a,
.site-mobile-menu button {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  padding: 10px 4px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf1ef !important;
  background: transparent !important;
  color: var(--site-shell-ink) !important;
  font: 500 16px/1.2 "Figtree", "Montserrat", Arial, sans-serif !important;
  text-align: left;
  text-decoration: none !important;
}

.site-mobile-menu .site-mobile-logout {
  color: #a52a25 !important;
}

.site-header :focus-visible {
  outline: 3px solid #7ecb41 !important;
  outline-offset: 3px !important;
}

/* Los espaciadores pertenecían al header fijo anterior. */
.main-sec {
  display: none !important;
}

@media (max-width: 1100px) {
  .site-nav-links {
    gap: 16px;
  }

  .site-nav-link,
  .site-account-trigger {
    font-size: 15px !important;
  }

  .site-header .site-brand-logo {
    width: 185px !important;
    min-width: 185px !important;
  }
}

@media (max-width: 900px) {
  :root {
    --site-shell-header-height: 72px;
  }

  .site-nav-inner {
    width: min(100% - 32px, 1760px);
    gap: 16px;
  }

  .site-header .site-brand-logo {
    width: 160px !important;
    height: 42px !important;
    min-width: 160px !important;
  }

  .site-nav-links {
    display: none !important;
  }

  .site-menu-toggle {
    display: inline-flex;
  }

  .site-compact-hero {
    padding: 28px 18px 24px;
  }

  .site-compact-hero-copy {
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .site-header .site-brand-logo {
    width: 145px !important;
    min-width: 145px !important;
  }
}

/* Mensajes globales: un único patrón visual y un único modal por página. */
.site-message-modal {
  z-index: 11050 !important;
  font-family: "Figtree", "Montserrat", Arial, sans-serif;
}

.modal-backdrop {
  z-index: 11040 !important;
  background: #10251d !important;
}

.modal-backdrop.show {
  opacity: 0.58 !important;
}

.site-message-modal .modal-dialog {
  width: min(92vw, 520px);
  margin-right: auto;
  margin-left: auto;
}

.site-message-dialog {
  position: relative;
  padding: 30px;
  border: 1px solid #dce5e0 !important;
  border-radius: 20px !important;
  background: #fff;
  box-shadow: 0 30px 80px rgba(11, 34, 25, 0.28);
}

.site-message-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f5f3;
  color: #465a50;
  cursor: pointer;
}

.site-message-close:hover,
.site-message-close:focus-visible {
  background: #e5eee9;
  color: #214900;
}

.site-message-icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  margin-bottom: 17px;
  border-radius: 16px;
  background: #edf6e8;
  color: #305601;
  font-size: 24px;
}

.site-message-modal[data-message-type="error"] .site-message-icon {
  background: #fff0ef;
  color: #b12f2a;
}

.site-message-modal[data-message-type="warning"] .site-message-icon {
  background: #fff7e5;
  color: #946100;
}

.site-message-modal[data-message-type="info"] .site-message-icon {
  background: #edf4f0;
  color: #356151;
}

.site-message-eyebrow {
  margin: 0 0 5px;
  color: #607069;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-message-title {
  margin: 0 46px 10px 0;
  color: #16251f;
  font: 700 25px/1.18 "Figtree", "Montserrat", Arial, sans-serif !important;
}

.site-message-copy {
  color: #53645c;
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.site-message-copy h6 {
  margin: 0;
  color: inherit;
  font: inherit;
}

.site-message-copy ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.site-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.site-message-button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #cbd8d0;
  border-radius: 10px;
  background: #fff;
  color: #305601;
  font-weight: 700;
  cursor: pointer;
}

.site-message-confirm {
  border-color: #305601;
  background: #305601;
  color: #fff;
}

.site-message-confirm:hover {
  border-color: #214900;
  background: #214900;
}

.site-message-confirm-danger {
  border-color: #a12e2a;
  background: #a12e2a;
}

.site-toast-region {
  position: fixed;
  z-index: 11100;
  top: calc(var(--site-shell-header-height) + 18px);
  right: 20px;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.site-toast {
  display: grid;
  grid-template-columns: 38px 1fr 34px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce5e0;
  border-left: 4px solid #305601;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(12, 42, 30, 0.18);
  opacity: 0;
  pointer-events: auto;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-toast[data-message-type="error"] { border-left-color: #b12f2a; }
.site-toast[data-message-type="warning"] { border-left-color: #946100; }

.site-toast-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #edf6e8;
  color: #305601;
}

.site-toast-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.site-toast-copy strong { color: #16251f; font-size: 14px; }
.site-toast-copy small { color: #607069; font-size: 13px; line-height: 1.35; }
.site-toast button { border: 0; background: transparent; color: #607069; cursor: pointer; }

@media (max-width: 575px) {
  .site-message-dialog { padding: 24px 20px 20px; }
  .site-message-title { font-size: 22px !important; }
  .site-message-actions { flex-direction: column-reverse; }
  .site-message-button { width: 100%; }
  .site-toast-region { right: 16px; }
}
