.gf-checkout-shell,
.gf-order-summary-card {
  margin: 0 0 24px;
}

.gf-checkout-hero,
.gf-order-summary-card {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 14px 38px rgba(31, 41, 55, 0.08);
}

.gf-checkout-hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(135deg, #f7f4e8 0%, #eaf5e7 100%);
}

.gf-checkout-hero h2,
.gf-order-summary-card h3 {
  margin: 10px 0;
  color: #1d3f22;
}

.gf-checkout-hero p {
  margin: 0;
  max-width: 720px;
  color: #4b5563;
}

.gf-checkout-badge,
.gf-sales-channel {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  background: #eaf5e7;
  color: #1d3f22;
}

.gf-checkout-mini {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
}

.gf-checkout-notices {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.gf-checkout-notice {
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 13px;
  border: 1px solid transparent;
}

.gf-checkout-notice--success {
  background: #eaf5e7;
  border-color: #b8d9b1;
  color: #1d3f22;
}

.gf-checkout-notice--warning {
  background: #fff8e6;
  border-color: #f6d186;
  color: #7a4a12;
}

.gf-checkout-notice--info {
  background: #eef6ff;
  border-color: #b8d8f5;
  color: #0c447c;
}

.gf-order-summary-card {
  padding: 22px;
}

.gf-order-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.gf-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.gf-summary-metric {
  border-radius: 18px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #eef0f2;
}

.gf-summary-metric span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 6px;
}

.gf-summary-metric strong {
  display: block;
  color: #1d3f22;
  font-size: 22px;
}

.gf-area-chip {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.gf-area-chip span {
  margin-left: 8px;
  font-weight: 800;
}

.gf-area-chip--active {
  background: #eaf5e7;
  border-color: #b8d9b1;
  color: #1d3f22;
}

.gf-area-chip--restricted,
.gf-area-chip--pending {
  background: #fff8e6;
  border-color: #f6d186;
  color: #7a4a12;
}

.gf-area-chip--inactive {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.gf-account-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #4b5563;
  font-weight: 700;
}

.gf-account-link:hover {
  background: #eaf5e7;
  color: #1d3f22;
}

@media (max-width: 900px) {
  .gf-checkout-hero,
  .gf-account-dashboard {
    grid-template-columns: 1fr !important;
  }

  .gf-summary-grid {
    grid-template-columns: 1fr;
  }

  .gf-order-summary-head {
    flex-direction: column;
  }
}

/* Mi cuenta Green Factory — visual dashboard 0.3.2 */
.gf-account-dashboard--visual {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 12px;
}

.gf-account-dashboard--visual .gf-card,
.gf-account-panel {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(31, 41, 55, 0.055);
}

.gf-account-sidebar {
  position: sticky;
  top: 24px;
  padding: 22px;
}

.gf-account-profile {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 13px;
  align-items: center;
  margin-bottom: 22px;
}

.gf-account-avatar {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7f4ee;
  color: #0b3f24;
  font-weight: 900;
  font-size: 19px;
}

.gf-account-name {
  display: block;
  color: #102f1c;
  font-size: 17px;
  line-height: 1.2;
}

.gf-account-role,
.gf-account-email {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.gf-account-nav {
  display: grid;
  gap: 5px;
  margin: 10px 0 24px;
}

.gf-account-link {
  display: block;
  padding: 10px 11px;
  border-radius: 13px;
  color: #264434;
  font-weight: 750;
  text-decoration: none;
}

.gf-account-link:hover,
.gf-account-link:focus {
  background: #eaf5e7;
  color: #0b3f24;
}

.gf-account-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #991b1b;
  font-weight: 900;
  text-decoration: none;
}

.gf-account-logout:hover,
.gf-account-logout:focus {
  background: #fee2e2;
  color: #7f1d1d;
}

.gf-account-content {
  display: grid;
  gap: 20px;
}

.gf-account-panel {
  padding: clamp(20px, 2.5vw, 30px);
}

.gf-account-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.gf-account-kicker {
  display: inline-flex;
  margin-bottom: 7px;
  color: #00a79d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gf-account-panel h2 {
  margin: 0;
  color: #0b3f24;
  font-size: clamp(24px, 2.25vw, 30px);
  line-height: 1.1;
  font-weight: 900;
}

.gf-account-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.gf-account-status.is-active {
  background: #e7f4ee;
  color: #0b3f24;
}

.gf-account-status.is-pending {
  background: #eef6ff;
  color: #0c447c;
}

.gf-account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gf-account-summary-card {
  min-height: 136px;
  border-radius: 18px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 7px;
}

.gf-account-summary-card span {
  color: #143f23;
  font-size: 13px;
  font-weight: 900;
}

.gf-account-summary-card strong {
  display: block;
  color: #00a79d;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.12;
  font-weight: 900;
}

.gf-account-summary-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.42;
}

.gf-account-summary-card.is-green {
  background: #e7f4ee;
}

.gf-account-summary-card.is-cream {
  background: #fbf4df;
}

.gf-account-summary-card.is-blue {
  background: #eef6ff;
}

.gf-account-order-list {
  display: grid;
  gap: 12px;
}

.gf-account-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 17px;
  background: #ffffff;
}

.gf-account-order-code {
  display: block;
  color: #0b3f24;
  font-weight: 900;
}

.gf-account-order p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
}

.gf-account-order-side {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.gf-account-order-side strong {
  color: #0b3f24;
}

.gf-account-order-side a {
  color: #00a79d;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.gf-account-empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 17px;
  padding: 18px;
  background: #fafafa;
}

.gf-account-empty-state.is-soft {
  background: #fcfcf8;
}

.gf-account-empty-state strong {
  display: block;
  color: #0b3f24;
  margin-bottom: 6px;
}

.gf-account-empty-state p,
.gf-account-muted {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.5;
}

.gf-account-progress {
  height: 13px;
  background: #d7ead2;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 16px;
}

.gf-account-progress div {
  height: 100%;
  border-radius: 999px;
  background: #00a79d;
}

.gf-account-note {
  padding: 16px 18px;
  border: 1px solid #e7c66a;
  border-radius: 18px;
  background: #fbf4df;
  color: #1f2937;
  text-align: center;
  font-size: 14px;
}

.gf-account-note strong {
  color: #0b3f24;
}

/* Botón flotante heredado del snippet: ocultar solo en página Mi cuenta si se mantiene activo. */
body.page-template-page-mi-cuenta a[href*="wp-login.php?action=logout"]:not(.gf-account-logout),
body.page-template-page-mi-cuenta a[href*="customer-logout"]:not(.gf-account-logout) {
  display: none !important;
}

@media (max-width: 1080px) {
  .gf-account-dashboard--visual {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .gf-account-sidebar {
    position: static;
  }

  .gf-account-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gf-account-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .gf-account-dashboard--visual {
    gap: 18px;
    padding-inline: 0;
  }

  .gf-account-profile {
    grid-template-columns: 52px 1fr;
  }

  .gf-account-avatar {
    width: 52px;
    height: 52px;
  }

  .gf-account-nav {
    grid-template-columns: 1fr;
  }

  .gf-account-panel-head,
  .gf-account-order {
    flex-direction: column;
    align-items: flex-start;
  }

  .gf-account-order-side {
    justify-items: start;
    text-align: left;
  }

  .gf-account-status {
    white-space: normal;
  }
}

/* Mi cuenta Green Factory — datos GoodMeals 0.3.3 */
.gf-account-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.gf-account-metrics div {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px 16px;
  background: #ffffff;
}

.gf-account-metrics span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.gf-account-metrics strong {
  display: block;
  margin-top: 5px;
  color: #0b3f24;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.gf-account-order-side span {
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 640px) {
  .gf-account-metrics {
    grid-template-columns: 1fr;
  }
}

/* Mi cuenta Green Factory — detalle pedido 0.3.4 */
.gf-account-order-detail {
  position: relative;
  text-align: right;
}

.gf-account-order-detail summary {
  list-style: none;
  cursor: pointer;
  color: #00a79d;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.gf-account-order-detail summary::-webkit-details-marker {
  display: none;
}

.gf-account-order-detail[open] summary {
  text-decoration: underline;
}

.gf-account-order-detail-box {
  margin-top: 10px;
  min-width: 260px;
  max-width: 360px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .08);
}

.gf-account-order-detail-box p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid #eef2f7;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.gf-account-order-detail-box p:last-child {
  border-bottom: 0;
}

.gf-account-order-detail-box strong {
  color: #0b3f24;
}

/* Oculta la nota heredada de la plantilla anterior, pero conserva la nota nueva del dashboard. */
.gf-account-dashboard--visual ~ .gf-account-note:not(.gf-account-note--core) {
  display: none !important;
}

@media (max-width: 640px) {
  .gf-account-order-detail {
    text-align: left;
  }

  .gf-account-order-detail-box {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}

/* Mi cuenta Green Factory — detalles GoodMeals 0.3.5 */
.gf-account-detail-title {
  display: block;
  margin: 4px 0 6px;
  color: #00a79d !important;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.gf-account-order-detail-box .gf-account-detail-title + p {
  border-top: 0;
}

/* Mi cuenta Green Factory — reparación estable 0.3.7
   Basado en 0.3.5 estable. No usa JS para ocultar bloques. */
body.page-template-page-mi-cuenta .gf-account-dashboard--visual ~ .gf-account-note,
body.page-template-page-mi-cuenta .gf-account-dashboard--visual ~ * .gf-account-note,
body[class*="mi-cuenta"] .gf-account-dashboard--visual ~ .gf-account-note,
body[class*="mi-cuenta"] .gf-account-dashboard--visual ~ * .gf-account-note {
  display: none !important;
}

.gf-account-summary-card strong {
  word-break: normal;
}

.gf-account-empty-state strong,
.gf-account-muted {
  text-wrap: pretty;
}

/* Mi cuenta Green Factory — ajuste 0.3.8 */
body.page-template-page-mi-cuenta .gf-account-note,
body[class*="mi-cuenta"] .gf-account-note,
body.woocommerce-account .gf-account-note {
  display: none !important;
}

.gf-account-order {
  flex-wrap: wrap;
  align-items: flex-start;
}

.gf-account-order > div:first-child {
  flex: 1 1 420px;
}

.gf-account-order-side {
  flex: 0 0 160px;
}

.gf-account-order > .gf-account-order-detail {
  flex: 1 0 100%;
  width: 100%;
  margin-top: 8px;
  text-align: left;
}

.gf-account-order > .gf-account-order-detail summary {
  display: inline-flex;
  width: auto;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.gf-account-order > .gf-account-order-detail .gf-account-order-detail-box {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-top: 12px;
}

.gf-account-order-detail summary:focus {
  outline: 2px solid rgba(0,167,157,.28) !important;
  outline-offset: 3px;
  border-radius: 8px;
}

.gf-account-summary-card.is-cream strong {
  font-size: clamp(20px, 1.75vw, 25px);
}

@media (max-width: 640px) {
  .gf-account-order-side {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* Mi cuenta Green Factory — final 0.3.9 */
body.page-template-page-mi-cuenta .gf-account-note,
body[class*="mi-cuenta"] .gf-account-note,
body.woocommerce-account .gf-account-note {
  display: none !important;
}

.gf-account-order > .gf-account-order-detail summary {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

.gf-account-order > .gf-account-order-detail summary:focus {
  outline: 2px solid rgba(0,167,157,.25) !important;
  outline-offset: 3px !important;
}

.gf-account-order > .gf-account-order-detail .gf-account-order-detail-box {
  box-sizing: border-box;
}

/* Mi cuenta Green Factory — próxima entrega 0.4.0 */
.gf-account-summary-card.is-cream p {
  font-size: 14px;
  line-height: 1.35;
}

.gf-account-summary-card.is-cream strong {
  font-size: clamp(22px, 2.1vw, 30px);
}

body.page-template-page-mi-cuenta .gf-account-note,
body[class*="mi-cuenta"] .gf-account-note,
body.woocommerce-account .gf-account-note {
  display: none !important;
}

.gf-account-order > .gf-account-order-detail summary {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

/* Mi cuenta Green Factory — estado cliente 0.4.2 */
.gf-account-summary-card.is-blue.is-inactive {
  background: #fff1f2;
}

.gf-account-summary-card.is-blue.is-inactive strong {
  color: #b91c1c;
}

.gf-account-summary-card.is-blue.is-pending {
  background: #f8fafc;
}

.gf-account-summary-card.is-blue.is-pending strong {
  color: #64748b;
}
