@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --gh-primary: #83FCBA;
  --gh-primary-hover: #67e8a4;
  --gh-primary-light: #E6FEF1;
  --gh-dark: #0E3A30;
  --gh-dark-subtle: #195245;
  --gh-accent-warm: #FFBC7D;
  --gh-bg: #F8FAF9;
  --gh-surface: #FFFFFF;
  --gh-border: #D7EAE1;
  --gh-text: #0E3A30;
  --gh-text-muted: #52756C;
  --gh-danger: #D94B4B;
  --gh-radius-sm: 4px;
  --gh-radius-md: 6px;
  --gh-radius-lg: 8px;
  --gh-radius-full: 9999px;
  --gh-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --gh-shadow-md: 0 1px 3px rgba(0, 0, 0, 0.06);
  --gh-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
  --gh-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--gh-font);
  background-color: var(--gh-bg);
  color: var(--gh-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* ==========================================================================
   HEADER & NAVIGATION (TWO-ROW CLEAN CORPORATE LAYOUT)
/* ==========================================================================
   HEADER & NAVIGATION
   Fila superior de 195px de alto con padding de 60px y logo de 75px
   ========================================================================== */
.gh-header {
  background: var(--gh-surface);
  border-bottom: 1px solid var(--gh-border);
  position: relative;
  z-index: 100;
}

.gh-header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gh-header-top {
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
}

.gh-header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.5rem;
}

.gh-brand-group {
  display: flex;
  align-items: center;
}

.gh-brand-link {
  display: block;
  line-height: 0;
}

.gh-interreg-logo {
  height: 75px;
  width: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.gh-interreg-logo:hover {
  opacity: 0.92;
}

.gh-header-top-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.gh-auth-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gh-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  color: var(--gh-dark);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gh-user-pill:hover {
  background: var(--gh-primary-light);
  border-color: var(--gh-primary-hover);
  color: var(--gh-dark);
  text-decoration: none;
}

.gh-user-pill:hover .gh-user-contact {
  color: var(--gh-dark);
  text-decoration: underline;
}

.gh-user-pill:active {
  background: #d1fae5;
  border-color: #34d399;
}

.gh-user-pill:focus-visible {
  outline: 2px solid var(--gh-dark);
  outline-offset: 2px;
}

.gh-user-contact {
  font-weight: 700;
  color: var(--gh-dark);
}

.gh-user-company {
  font-weight: 600;
  color: var(--gh-text-muted);
  border-left: 1px solid var(--gh-border);
  padding-left: 0.5rem;
}

.gh-header-nav-bar {
  background: #FFFFFF;
  border-top: 1px solid var(--gh-border);
  padding: 0.3rem 0;
}

.gh-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.gh-nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gh-text);
  padding: 0.45rem 0.2rem;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

.gh-nav-link:hover,
.gh-nav-link.active {
  color: var(--gh-dark);
  text-decoration: none;
}

.gh-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--gh-primary);
  transition: width 0.2s ease;
}

.gh-nav-link:hover::after,
.gh-nav-link.active::after {
  width: 100%;
}

/* Selector de Idiomas Trilingüe */
.gh-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0 0.5rem;
}

.gh-lang-btn {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(14, 58, 48, 0.5);
  text-decoration: none;
  padding: 0.15rem 0.2rem;
  transition: color 0.15s ease;
  line-height: 1;
}

.gh-lang-btn:hover {
  color: var(--gh-dark);
  text-decoration: none;
}

.gh-lang-btn.active {
  color: var(--gh-dark);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 991px) {
  .gh-header-top {
    padding: 1rem 0;
  }
  .gh-interreg-logo {
    height: 55px;
  }
}

@media (max-width: 600px) {
  .gh-header-top {
    padding: 0.75rem 0;
  }
  .gh-interreg-logo {
    height: 40px;
  }
  .gh-header-top-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .gh-nav-links {
    gap: 1.25rem;
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.gh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--gh-font);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--gh-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
  line-height: 1.25;
}

.gh-btn-primary {
  background-color: var(--gh-primary);
  color: var(--gh-dark);
}

.gh-btn-primary:hover {
  background-color: var(--gh-primary-hover);
}

.gh-btn-dark {
  background-color: var(--gh-dark);
  color: #FFFFFF;
}

.gh-btn-dark:hover {
  background-color: var(--gh-dark-subtle);
}

.gh-btn-outline {
  background-color: transparent;
  color: var(--gh-dark);
  border: 1px solid var(--gh-border);
}

.gh-btn-outline:hover {
  background-color: var(--gh-dark) !important;
  color: #FFFFFF !important;
  border-color: var(--gh-dark) !important;
}

.gh-btn-outline-hero {
  background-color: transparent;
  color: #FFFFFF !important;
  border: 1px solid var(--gh-primary) !important;
}

.gh-btn-outline-hero:hover {
  background-color: var(--gh-primary) !important;
  color: var(--gh-dark) !important;
  border-color: var(--gh-primary) !important;
}

.gh-btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* ==========================================================================
   MAIN CONTENT CONTAINER
   ========================================================================== */
.gh-main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* Hero Section */
.gh-hero {
  background: var(--gh-dark);
  color: #FFFFFF;
  border-radius: var(--gh-radius-md);
  padding: 2.75rem 2.25rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid var(--gh-dark-subtle);
}

.gh-hero::after {
  display: none;
}

.gh-hero-badge {
  display: none !important;
}

.gh-hero-title {
  font-size: clamp(2.2rem, 1.8rem + 2vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 800px;
}

.gh-hero-title span {
  color: var(--gh-primary);
}

.gh-hero-subtitle {
  font-size: 1.15rem;
  color: #C8E5DC;
  max-width: 700px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.gh-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Features Grid */
.gh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.gh-card {
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 1.5rem;
  box-shadow: none;
}

.gh-card:hover {
  border-color: #cbd5e1;
}

.gh-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--gh-radius-md);
  background: var(--gh-primary-light);
  color: var(--gh-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.gh-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  color: var(--gh-dark);
}

.gh-card-text {
  color: var(--gh-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.gh-footer {
  background: var(--gh-surface);
  border-top: 1px solid var(--gh-border);
  margin-top: auto;
  padding: 1.5rem 0;
}

.gh-footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gh-footer-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.gh-footer-simple img {
  display: block;
}

.gh-footer-copy {
  color: var(--gh-text-muted);
  font-size: 0.9rem;
  margin: 0 0 0 auto;
  font-weight: 500;
  text-align: right;
}

@media (max-width: 900px) {
  .gh-navbar {
    flex-wrap: wrap;
  }
  .gh-nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gh-border);
  }
}

/* ==========================================================================
   FLASH MESSAGES & ALERTS
   ========================================================================== */
.message {
  padding: 1rem 1.25rem;
  border-radius: var(--gh-radius-md);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--gh-shadow-sm);
}

.message.success {
  background-color: var(--gh-primary-light);
  border-left: 5px solid var(--gh-primary);
  color: var(--gh-dark);
}

.message.error {
  background-color: #FDF2F2;
  border-left: 5px solid var(--gh-danger);
  color: #7A1C1C;
}

.message.warning {
  background-color: #FEF7EC;
  border-left: 5px solid var(--gh-accent-warm);
  color: #7B4B15;
}

.message.info {
  background-color: #EBF8FF;
  border-left: 5px solid #3182CE;
  color: #1A365D;
}

/* ==========================================================================
   AUTH BOX & FORMS (RF-05, RF-06)
   ========================================================================== */
.gh-auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0 3rem;
}

.gh-auth-card {
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 500px;
  box-shadow: none;
}

.gh-auth-card.gh-card-wide {
  max-width: 680px;
}

.gh-auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.gh-auth-badge {
  display: none !important;
}

.gh-auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gh-dark);
  margin-bottom: 0.4rem;
}

.gh-auth-subtitle {
  font-size: 0.95rem;
  color: var(--gh-text-muted);
}

.gh-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .gh-form-row {
    grid-template-columns: 1fr;
  }
}

.gh-form-group {
  margin-bottom: 1.35rem;
}

.gh-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gh-dark);
  margin-bottom: 0.45rem;
}

.gh-label .gh-required {
  color: var(--gh-danger);
  margin-left: 2px;
}

.gh-input,
.gh-select,
.gh-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--gh-font);
  font-size: 0.95rem;
  color: var(--gh-text);
  background-color: #FFFFFF;
  border: 1.5px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  transition: all 0.2s ease;
  outline: none;
}

.gh-input:focus,
.gh-select:focus,
.gh-textarea:focus {
  border-color: var(--gh-primary);
  box-shadow: 0 0 0 3px rgba(131, 252, 186, 0.35);
}

.gh-input.is-invalid,
.gh-input.form-error,
.gh-textarea.is-invalid,
.gh-textarea.form-error,
.gh-select.is-invalid,
.gh-select.form-error {
  border-color: var(--gh-danger);
}

.gh-error-text,
.gh-field-error,
.error-message {
  font-size: 0.8rem;
  color: var(--gh-danger);
  margin-top: 0.35rem;
  font-weight: 500;
}

.gh-form-hint {
  font-size: 0.8rem;
  color: var(--gh-text-muted);
  margin-top: 0.35rem;
}

.gh-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 0.85rem 1rem;
  background-color: var(--gh-bg);
  border-radius: var(--gh-radius-md);
  border: 1px solid var(--gh-border);
}

.gh-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--gh-dark);
  cursor: pointer;
}

.gh-checkbox-label {
  font-size: 0.85rem;
  color: var(--gh-text);
  line-height: 1.45;
  cursor: pointer;
}

.gh-btn-block {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

.gh-auth-footer {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gh-border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--gh-text-muted);
}

.gh-auth-footer a {
  color: var(--gh-dark);
  font-weight: 700;
}

.gh-auth-footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   PRODUCT MANAGEMENT & DASHBOARD (FASE 3)
   ========================================================================== */
.gh-dashboard-header,
.gh-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.gh-dashboard-title,
.gh-page-title {
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.5rem);
  font-weight: 800;
  color: var(--gh-dark);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.gh-dashboard-subtitle,
.gh-page-subtitle {
  color: var(--gh-text-muted);
  font-size: 1rem;
  max-width: 780px;
  line-height: 1.5;
}

.gh-stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.gh-stat-chip {
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: none;
}

.gh-stat-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gh-dark);
}

.gh-stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gh-text-muted);
}

/* Badges */
.gh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 3px;
  line-height: 1.25;
}

.gh-badge-success {
  background-color: var(--gh-primary-light);
  color: var(--gh-dark);
  border: 1px solid var(--gh-primary);
}

.gh-badge-warning {
  background-color: #FFF6EC;
  color: #B45309;
  border: 1px solid var(--gh-accent-warm);
}

.gh-badge-danger {
  background-color: #FEE2E2;
  color: #991B1B;
  border: 1px solid #F87171;
}

.gh-badge-muted {
  background-color: #F3F4F6;
  color: #6B7280;
  border: 1px solid #D1D5DB;
}

.gh-badge-info {
  background-color: #E0F2FE;
  color: #0369A1;
  border: 1px solid #7DD3FC;
}

.gh-badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 90px;
  box-sizing: border-box;
}

/* Products Table & Grid */
.gh-table-container {
  background: var(--gh-surface);
  border-radius: var(--gh-radius-sm);
  border: 1px solid var(--gh-border);
  box-shadow: none;
  overflow-x: auto;
}

.gh-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.gh-table th {
  background-color: var(--gh-bg);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gh-dark-subtle);
  border-bottom: 1px solid var(--gh-border);
}

.gh-table td {
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--gh-border);
  vertical-align: middle;
}

.gh-table tr:last-child td {
  border-bottom: none;
}

.gh-table tr:hover {
  background-color: #FAFCFB;
}

.gh-td-product {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.gh-td-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--gh-radius-md);
  object-fit: cover;
  background-color: var(--gh-bg);
  border: 1px solid var(--gh-border);
  flex-shrink: 0;
}

.gh-td-title {
  font-weight: 700;
  color: var(--gh-dark);
  margin-bottom: 0.15rem;
  font-size: 0.92rem;
}

.gh-td-meta {
  font-size: 0.78rem;
  color: var(--gh-text-muted);
}

.gh-table-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gh-table-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  gap: 0.3rem;
  width: 172px;
  margin-left: auto;
}

.gh-table-actions-grid form {
  display: none !important;
  margin: 0;
  padding: 0;
}

.gh-table-actions-grid .gh-btn-xs {
  width: 100%;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  white-space: nowrap;
  padding: 0.32rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.gh-btn-xs {
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  border-radius: var(--gh-radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.gh-btn-xs.gh-btn-outline {
  background: transparent;
  border: 1px solid var(--gh-border);
  color: var(--gh-dark);
}

.gh-btn-xs.gh-btn-outline:hover {
  background: var(--gh-dark) !important;
  color: #FFFFFF !important;
  border-color: var(--gh-dark) !important;
}

.gh-btn-xs.gh-btn-outline-danger {
  background: transparent;
  border: 1px solid #FCA5A5;
  color: #DC2626;
}

.gh-btn-xs.gh-btn-outline-danger:hover {
  background: #DC2626 !important;
  color: #FFFFFF !important;
  border-color: #DC2626 !important;
}

/* Empty State */
.gh-empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--gh-surface);
  border-radius: var(--gh-radius-lg);
  border: 1.5px dashed var(--gh-border);
}

.gh-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--gh-text-muted);
}

.gh-empty-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gh-dark);
  margin-bottom: 0.5rem;
}

.gh-empty-desc {
  color: var(--gh-text-muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto 1.5rem auto;
}

/* Product Form Layout */
.gh-form-container {
  max-width: 960px;
  margin: 0 auto 4rem auto;
}

.gh-form-section-card {
  background: var(--gh-surface);
  border-radius: var(--gh-radius-sm);
  border: 1px solid var(--gh-border);
  box-shadow: none;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.gh-section-header {
  border-bottom: 1px solid var(--gh-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.gh-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gh-dark);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gh-section-desc {
  font-size: 0.88rem;
  color: var(--gh-text-muted);
  margin-top: 0.25rem;
}

/* Autocomplete EWC */
.gh-autocomplete-wrap {
  position: relative;
}

.gh-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  box-shadow: var(--gh-shadow-md);
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.gh-autocomplete-item {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  cursor: pointer;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: background-color 0.15s ease;
}

.gh-autocomplete-item:hover,
.gh-autocomplete-item.active {
  background-color: var(--gh-primary-light);
}

.gh-autocomplete-item-code {
  font-weight: 700;
  color: var(--gh-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gh-autocomplete-item-desc {
  color: var(--gh-text-muted);
  font-size: 0.82rem;
}

/* Image & Doc Management in Edit Mode */
.gh-gallery-manager {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.gh-gallery-card {
  position: relative;
  background: var(--gh-bg);
  border: 1.5px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.gh-gallery-card.is-primary {
  border-color: var(--gh-primary);
  box-shadow: 0 0 0 2px var(--gh-primary);
}

.gh-gallery-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--gh-radius-sm);
}

.gh-gallery-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.gh-doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--gh-bg);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  margin-bottom: 0.75rem;
}

.gh-doc-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gh-doc-icon {
  font-size: 1.5rem;
  color: #DC2626;
}

.gh-doc-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gh-dark);
}

.gh-doc-meta {
  font-size: 0.78rem;
  color: var(--gh-text-muted);
}

/* ==========================================================================
   TABBED FULL-WIDTH PRODUCT EDITOR (LEFT SIDEBAR NAVIGATION & DROPZONE)
   ========================================================================== */
.gh-editor-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto 4rem auto;
}

@media (max-width: 960px) {
  .gh-editor-layout {
    grid-template-columns: 1fr;
  }
}

.gh-editor-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 10;
}

.gh-tab-nav {
  list-style: none;
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 0.5rem;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gh-tab-btn {
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: none;
  background: transparent;
  border-radius: var(--gh-radius-sm);
  font-family: var(--gh-font);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--gh-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.gh-tab-btn:hover {
  background: var(--gh-bg);
  color: var(--gh-dark);
}

.gh-tab-btn.active {
  background: var(--gh-primary-light);
  color: var(--gh-dark);
  font-weight: 700;
  border-left: 3px solid var(--gh-dark);
}

.gh-tab-btn.has-error {
  color: var(--gh-danger);
}

.gh-tab-btn.has-error:not(.active) {
  background: rgba(239, 68, 68, 0.08);
}

.gh-tab-btn.has-error.active {
  border-left-color: var(--gh-danger);
  color: var(--gh-danger);
}

.gh-tab-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: var(--gh-bg);
  color: var(--gh-dark);
  font-weight: 600;
}

.gh-tab-btn.active .gh-tab-badge {
  background: var(--gh-surface);
  color: var(--gh-dark);
}

.gh-editor-actions-card {
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 1rem;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gh-tab-pane {
  display: none;
}

.gh-tab-pane.active {
  display: block;
  animation: ghFadeTab 0.25s ease-out;
}

@keyframes ghFadeTab {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gh-tab-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gh-border);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Dropzone Components */
.gh-dropzone {
  border: 2px dashed var(--gh-border);
  border-radius: var(--gh-radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #FAFDFB;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  margin-bottom: 1.5rem;
}

.gh-dropzone:hover,
.gh-dropzone.dragover {
  border-color: var(--gh-dark);
  background: var(--gh-primary-light);
  transform: scale(1.005);
}

.gh-dropzone-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  color: var(--gh-dark);
}

.gh-dropzone-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gh-dark);
  margin-bottom: 0.35rem;
}

.gh-dropzone-subtitle {
  font-size: 0.88rem;
  color: var(--gh-text-muted);
}

.gh-dropzone-uploading {
  display: none;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gh-dark);
}

/* ==========================================================================
   PHASE 4: PUBLIC MARKETPLACE, CATALOG & PRODUCT DETAIL (RF-04, RF-09..RF-13)
   ========================================================================== */

/* Catalog & Global Page Container */
.gh-catalog-page,
.gh-page-container,
.gh-container {
  width: 100%;
}

.gh-catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.gh-catalog-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gh-primary-light);
  color: var(--gh-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: var(--gh-radius-full);
  margin-bottom: 0.75rem;
  border: 1px solid var(--gh-border);
}

.gh-catalog-title {
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.5rem);
  font-weight: 800;
  color: var(--gh-dark);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.gh-catalog-subtitle {
  color: var(--gh-text-muted);
  font-size: 1rem;
  max-width: 780px;
  line-height: 1.5;
}

/* Search and Filters Card (RF-10) */
.gh-search-card {
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 1.25rem;
  box-shadow: none;
  margin-bottom: 2rem;
}

.gh-search-main-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.gh-search-input-group {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.gh-search-icon {
  position: absolute;
  left: 1rem;
  font-size: 1.1rem;
  color: var(--gh-text-muted);
  pointer-events: none;
}

.gh-search-input {
  width: 100%;
  padding: 0.85rem 2.5rem 0.85rem 2.85rem;
  font-family: var(--gh-font);
  font-size: 1rem;
  border: 1.5px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  background: var(--gh-bg);
  color: var(--gh-dark);
  transition: all 0.2s ease;
}

.gh-search-input:focus {
  outline: none;
  border-color: var(--gh-dark);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(14, 58, 48, 0.08);
}

.gh-search-clear {
  position: absolute;
  right: 1rem;
  font-size: 1.4rem;
  color: var(--gh-text-muted);
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}

.gh-search-clear:hover {
  color: var(--gh-danger);
}

.gh-search-submit {
  padding: 0.85rem 1.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.gh-search-filters-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 1024px) {
  .gh-search-filters-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .gh-search-main-row {
    flex-direction: column;
  }
  .gh-search-filters-row {
    grid-template-columns: 1fr;
  }
}

.gh-filter-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gh-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gh-dark-subtle);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gh-select-sm {
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--gh-radius-sm);
  background-color: var(--gh-bg);
}

.gh-active-filters-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--gh-border);
}

.gh-btn-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: #B91C1C;
  font-weight: 600;
  background: #FEE2E2;
  padding: 0.25rem 0.65rem;
  border-radius: var(--gh-radius-full);
}

.gh-btn-filter-reset:hover {
  background: #FECACA;
}

/* Meta Bar & View Switch */
.gh-catalog-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.gh-catalog-results-count {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gh-dark);
}

.gh-catalog-view-switch {
  display: flex;
  align-items: center;
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  padding: 0.25rem;
  gap: 0.25rem;
}

.gh-view-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gh-text-muted);
  border-radius: var(--gh-radius-sm);
  transition: all 0.15s ease;
}

.gh-view-btn.active,
.gh-view-btn:hover {
  background: var(--gh-bg);
  color: var(--gh-dark);
}

/* Products Cards Grid (RF-09) */
.gh-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.gh-product-card {
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.gh-product-card:hover {
  border-color: #94a3b8;
}

.gh-card-media-link {
  display: block;
  text-decoration: none;
}

.gh-card-thumb-wrap {
  position: relative;
  width: 100%;
  height: 190px;
  background-color: var(--gh-bg);
  overflow: hidden;
}

.gh-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh-card-badges-top {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  gap: 0.5rem;
}

.gh-card-body {
  padding: 1.25rem 1.25rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gh-card-ewc {
  margin-bottom: 0.5rem;
}

.gh-ewc-pill {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.78rem;
  background: var(--gh-bg);
  color: var(--gh-dark);
  padding: 0.2rem 0.55rem;
  border-radius: var(--gh-radius-sm);
  border: 1px solid var(--gh-border);
}

.gh-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.gh-card-title a {
  color: var(--gh-dark);
  text-decoration: none;
}

.gh-card-title a:hover {
  color: var(--gh-dark-subtle);
  text-decoration: underline;
}

.gh-card-desc {
  font-size: 0.88rem;
  color: var(--gh-text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  flex: 1;
}

.gh-card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--gh-border);
  font-size: 0.84rem;
  color: var(--gh-dark-subtle);
}

.gh-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gh-card-meta-icon {
  font-size: 0.95rem;
}

.gh-card-company-name {
  font-weight: 600;
  color: var(--gh-dark);
}

.gh-card-footer {
  padding: 0.75rem 1.25rem 1.25rem;
}

.gh-btn-card {
  width: 100%;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.gh-btn-card:hover {
  background: var(--gh-dark) !important;
  color: #FFFFFF !important;
  border-color: var(--gh-dark) !important;
}

/* Pagination */
.gh-pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.gh-pagination {
  display: flex;
  list-style: none;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.gh-pagination li {
  list-style: none;
  display: inline-flex;
}

.gh-pagination li a,
.gh-pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.65rem;
  border-radius: var(--gh-radius-sm);
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  color: var(--gh-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.gh-pagination li.active a,
.gh-pagination li.active span {
  background: var(--gh-dark);
  color: #FFFFFF;
  border-color: var(--gh-dark);
}

.gh-pagination li a:hover {
  background: var(--gh-primary);
  color: var(--gh-dark);
  border-color: var(--gh-primary);
}

.gh-pagination li.disabled a,
.gh-pagination li.disabled span {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: #f8fafc;
  color: var(--gh-text-muted);
}

/* ==========================================================================
   PRODUCT DETAIL VIEW (RF-11, RF-12, RF-13)
   ========================================================================== */
.gh-view-container {
  width: 100%;
}
.gh-breadcrumbs {
  display: none !important;
}

.gh-view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.gh-view-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.gh-view-title {
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.6rem);
  font-weight: 800;
  color: var(--gh-dark);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.gh-view-submeta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--gh-text-muted);
  flex-wrap: wrap;
}

.gh-view-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .gh-view-grid {
    grid-template-columns: 1fr;
  }
}

.gh-view-card {
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: none;
}

.gh-view-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gh-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gh-view-desc-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gh-dark-subtle);
}

/* Gallery View */
.gh-gallery-main-wrap {
  width: 100%;
  height: 420px;
  background-color: var(--gh-bg);
  border-radius: var(--gh-radius-md);
  overflow: hidden;
  border: 1px solid var(--gh-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gh-gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gh-gallery-thumbs-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.gh-gallery-thumb-btn {
  width: 80px;
  height: 80px;
  border-radius: var(--gh-radius-sm);
  border: 2px solid var(--gh-border);
  background: var(--gh-bg);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.gh-gallery-thumb-btn.is-active,
.gh-gallery-thumb-btn:hover {
  border-color: var(--gh-primary);
  box-shadow: 0 0 0 2px var(--gh-primary);
}

.gh-gallery-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Documents List */
.gh-docs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gh-doc-download-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: var(--gh-bg);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  gap: 1rem;
  flex-wrap: wrap;
}

.gh-doc-download-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.gh-doc-pdf-icon {
  font-size: 1.8rem;
}

.gh-doc-download-title {
  font-weight: 700;
  color: var(--gh-dark);
  font-size: 0.95rem;
}

.gh-doc-download-meta {
  font-size: 0.8rem;
  color: var(--gh-text-muted);
}

/* Map */
.gh-product-map-container {
  width: 100%;
  height: 320px;
  border-radius: var(--gh-radius-md);
  border: 1px solid var(--gh-border);
  overflow: hidden;
  z-index: 10;
}

.gh-map-disclaimer {
  font-size: 0.85rem;
  color: var(--gh-text-muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.gh-map-fallback {
  padding: 2rem;
  background: var(--gh-bg);
  border-radius: var(--gh-radius-md);
  text-align: center;
  font-weight: 600;
  color: var(--gh-dark);
}

/* Sidebar Cards */
.gh-side-card {
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: none;
}

.gh-side-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gh-dark);
  margin-bottom: 1.15rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gh-border);
}

.gh-side-price-box {
  margin-bottom: 1.25rem;
}

.gh-side-price-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.gh-side-price-val {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gh-dark);
  line-height: 1.1;
}

.gh-side-unit {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gh-text-muted);
}

.gh-price-donation {
  color: #0369A1;
}

.gh-side-price-sub {
  font-size: 0.82rem;
  color: var(--gh-text-muted);
  margin-top: 0.35rem;
}

.gh-side-stock-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--gh-bg);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  margin-bottom: 1.5rem;
}

.gh-side-stock-icon {
  font-size: 1.5rem;
}

.gh-side-stock-title {
  font-size: 0.92rem;
  color: var(--gh-dark);
}

.gh-side-stock-state {
  font-size: 0.8rem;
  color: var(--gh-text-muted);
}

.gh-side-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gh-btn-block {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--gh-radius-md);
}

.gh-owner-notice {
  font-size: 0.85rem;
  color: var(--gh-dark);
  background: var(--gh-primary-light);
  border: 1px solid var(--gh-primary);
  border-radius: var(--gh-radius-sm);
  padding: 0.65rem 0.85rem;
  line-height: 1.4;
}

.gh-spec-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.gh-spec-list dt {
  font-weight: 700;
  color: var(--gh-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gh-spec-list dd {
  font-weight: 600;
  color: var(--gh-dark);
  margin-bottom: 0.35rem;
}

.gh-seller-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.gh-seller-icon {
  font-size: 2rem;
  background: var(--gh-bg);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gh-seller-name {
  font-weight: 800;
  color: var(--gh-dark);
  font-size: 1.05rem;
  line-height: 1.25;
}

.gh-seller-contact {
  font-size: 0.85rem;
  color: var(--gh-text-muted);
  margin-top: 0.25rem;
}

.gh-seller-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gh-dark);
  background: var(--gh-primary-light);
  border: 1px solid var(--gh-primary);
  border-radius: var(--gh-radius-full);
  padding: 0.2rem 0.55rem;
  margin-top: 0.5rem;
}

/* Modals */
.gh-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 58, 48, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: ghFadeIn 0.2s ease-out;
}

@keyframes ghFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gh-modal-dialog {
  background: var(--gh-surface);
  border-radius: var(--gh-radius-lg);
  max-width: 580px;
  width: 100%;
  box-shadow: var(--gh-shadow-lg);
  border: 1px solid var(--gh-border);
  overflow: hidden;
  animation: ghSlideUp 0.2s ease-out;
}

@keyframes ghSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.gh-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--gh-border);
  background: var(--gh-bg);
}

.gh-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gh-dark);
  margin: 0;
}

.gh-modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--gh-text-muted);
  cursor: pointer;
  line-height: 1;
}

.gh-modal-close:hover {
  color: var(--gh-danger);
}

.gh-modal-body {
  padding: 1.75rem;
}

.gh-modal-product-summary {
  background: var(--gh-bg);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--gh-dark);
  margin-bottom: 1.25rem;
}

.gh-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.75rem;
  background: var(--gh-bg);
  border-top: 1px solid var(--gh-border);
}

/* ==========================================================================
   Fase 5: Panel de Administración, Contacto e Instrucciones
   ========================================================================== */

.gh-admin-nav-tab {
  padding: 0.85rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.gh-admin-nav-tab:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.02);
}

.gh-admin-nav-tab.active {
  color: #0f172a;
  border-bottom-color: var(--gh-primary);
  font-weight: 700;
}

.gh-input-error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}

.gh-filter-tab {
  transition: all 0.2s ease;
}

.gh-filter-tab:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  #gh-contact-form {
    grid-template-columns: 1fr !important;
  }
}

/* Standard Two-Column Layout (Form + Lateral Sidebar) */
.gh-two-col-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .gh-two-col-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   FASE 7: MAPA INTERACTIVO DE RESIDUOS TRANSFRONTERIZO
   ========================================================================== */
.gh-map-page-wrapper {
  padding: 1.5rem 0 3rem 0;
}

.gh-map-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gh-border);
}

.gh-map-header-main {
  flex: 1;
  min-width: 280px;
}

/* Conmutador de vistas */
.gh-view-switcher {
  display: inline-flex;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-sm);
  background-color: var(--gh-surface);
  overflow: hidden;
}

.gh-switcher-btn {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gh-text-muted);
  text-decoration: none;
  border-right: 1px solid var(--gh-border);
  transition: all 0.15s ease;
}

.gh-switcher-btn:last-child {
  border-right: none;
}

.gh-switcher-btn:hover {
  color: var(--gh-dark);
  background-color: #f1f5f3;
}

.gh-switcher-btn.active {
  background-color: var(--gh-dark);
  color: #FFFFFF;
}

/* Barra de filtros del mapa */
.gh-map-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
}

.gh-map-filters-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.85rem;
  flex: 1;
}

.gh-filter-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gh-filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.gh-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gh-map-counter {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--gh-text-muted);
  white-space: nowrap;
}

.gh-counter-number {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gh-dark);
}

/* Canvas del Mapa */
.gh-map-canvas-container {
  position: relative;
  border-radius: var(--gh-radius-md);
  overflow: hidden;
  box-shadow: var(--gh-shadow-sm);
}

/* Estilos de Popups de Leaflet */
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: var(--gh-radius-md) !important;
  box-shadow: 0 4px 14px rgba(14, 58, 48, 0.15) !important;
  border: 1px solid var(--gh-border) !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.gh-popup-card {
  width: 280px;
  background: var(--gh-surface);
  font-family: var(--gh-font);
}

.gh-popup-thumb {
  height: 120px;
  background-size: cover;
  background-position: center;
  background-color: #f1f5f3;
  border-bottom: 1px solid var(--gh-border);
}

.gh-popup-content {
  padding: 12px 14px;
}

.gh-popup-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.gh-popup-badge-modality {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  text-transform: uppercase;
}

.gh-popup-badge-modality.donation {
  background-color: var(--gh-primary-light);
  color: var(--gh-dark);
}

.gh-popup-badge-modality.sale {
  background-color: #EBF3FF;
  color: #1E40AF;
}

.gh-popup-badge-hazard {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  background-color: #FEE2E2;
  color: #991B1B;
  text-transform: uppercase;
}

.gh-popup-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gh-dark);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.gh-popup-details {
  font-size: 11.5px;
  color: var(--gh-text-muted);
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gh-popup-details strong {
  color: var(--gh-dark);
}

.gh-popup-details code {
  font-family: monospace;
  background-color: #f1f5f3;
  padding: 1px 4px;
  border-radius: 2px;
}

.gh-popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #E8F2EC;
}

.gh-popup-cost {
  font-size: 13px;
  font-weight: 800;
  color: var(--gh-dark);
}

.leaflet-container .gh-popup-card a.gh-btn,
.leaflet-container .gh-popup-footer a,
.leaflet-popup-content-wrapper a.gh-btn,
.gh-popup-footer .gh-btn {
  color: #FFFFFF !important;
  background-color: var(--gh-dark) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

.leaflet-container .gh-popup-card a.gh-btn:hover,
.leaflet-container .gh-popup-footer a:hover,
.leaflet-popup-content-wrapper a.gh-btn:hover,
.gh-popup-footer .gh-btn:hover {
  background-color: var(--gh-dark-subtle) !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
}

@media (max-width: 768px) {
  .gh-map-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .gh-map-filters-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .gh-map-filters-form {
    flex-direction: column;
    align-items: stretch;
  }
  .gh-map-canvas {
    height: 480px !important;
  }
}





