:root {
  --bg: #fdfbf7;
  --gold: #c69b7b;
  --gold-hover: #b8896a;
  --dark-text: #2a2421;
  --mid-gray: #7a746f;
  --light-gray: #a09a96;
  --border: #e8e2da;
  --card: #ffffff;
  --ok: #2f8f5b;
  --warn: #b26a2e;
  --info: #4c6faf;
  --muted: #8e8682;
  --footer-bg: #2a2421;
  --footer-muted: #b6aea5;
  --footer-link: #f0e9e1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Jost', sans-serif;
  background: var(--bg);
  color: var(--dark-text);
}

header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.logo img {
  width: 210px;
  height: auto;
}

nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

nav a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #6b6460;
  text-decoration: none;
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
}

nav a:hover,
nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-ingresar {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #6b6460;
  text-decoration: none;
}

.btn-registro {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  background: var(--gold);
  color: #fff;
  padding: 8px 18px;
  border-radius: 4px;
  text-decoration: none;
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-right: 8px;
  color: #6b6460;
}

.cart-icon {
  width: 19px;
  height: 19px;
}

.cart-badge {
  position: absolute;
  top: -7px;
  right: -12px;
  background: #e74c3c;
  color: #fff;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 2px solid #fdfbf7;
}

.cart-badge.hidden {
  display: none;
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 50px 24px 70px;
}

.page-head h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  margin: 0 0 10px;
}

.page-head p {
  color: var(--mid-gray);
  margin: 0;
}

.page-head {
  text-align: center;
}

.page-tools {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.btn-refresh {
  border: none;
  background: #8a6449;
  color: #fff;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-refresh:hover {
  background: #77543c;
}

.estado-empty {
  margin-top: 24px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 28px;
  color: var(--muted);
}

.estado-list {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.estado-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  padding: 16px;
}

.estado-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.estado-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.estado-btn-cancel {
  border: none;
  background: #8a6449;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.estado-btn-reorder {
  border: 1px solid #b99577;
  background: #fff;
  color: #7a563d;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.estado-btn-invoice {
  border: 1px solid #d8c5b4;
  background: #fffdfb;
  color: #7b5d46;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.estado-btn-invoice:hover:not(:disabled) {
  background: #f8efe7;
  border-color: #c8a98f;
  color: #694b35;
}

.estado-btn-invoice:disabled {
  opacity: 0.7;
  cursor: wait;
}

.estado-btn-reorder:hover:not(:disabled) {
  background: #f5ece4;
  border-color: #8a6449;
  color: #6a4933;
}

.estado-btn-reorder:disabled {
  opacity: 0.7;
  cursor: wait;
}

.estado-btn-cancel:hover:not(:disabled) {
  background: #77543c;
}

.estado-btn-cancel:disabled {
  opacity: 0.7;
  cursor: wait;
}

.pedido-id {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.estado-pill {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
}

.estado-pill.pendiente,
.estado-pill.procesado {
  background: rgba(178, 106, 46, 0.16);
  color: var(--warn);
}

.estado-pill.enviado {
  background: rgba(76, 111, 175, 0.16);
  color: var(--info);
}

.estado-pill.entregado {
  background: rgba(47, 143, 91, 0.16);
  color: var(--ok);
}

.estado-pill.cancelado {
  background: rgba(184, 74, 59, 0.16);
  color: #b84a3b;
}

.estado-meta {
  margin-top: 10px;
  color: var(--mid-gray);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.estado-progress {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.estado-progress-title {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light-gray);
  font-weight: 600;
}

.progress-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.progress-step {
  position: relative;
  display: grid;
  gap: 7px;
}

.progress-step::after {
  content: '';
  position: absolute;
  top: 6px;
  right: -16px;
  width: calc(100% - 8px);
  height: 2px;
  background: #e6e1db;
  z-index: 0;
}

.progress-step:last-child::after {
  display: none;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #d7d1ca;
  background: #fff;
  position: relative;
  z-index: 1;
}

.progress-label {
  font-size: 12px;
  color: var(--mid-gray);
}

.progress-step.done .progress-dot,
.progress-step.current .progress-dot {
  border-color: var(--gold);
  background: var(--gold);
}

.progress-step.done .progress-label,
.progress-step.current .progress-label {
  color: var(--dark-text);
  font-weight: 600;
}

.progress-step.done::after,
.progress-step.current::after {
  background: rgba(198, 155, 123, 0.7);
}

.estado-progress.cancelado {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.estado-progress-cancelled {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(184, 74, 59, 0.14);
  color: #b84a3b;
  font-weight: 600;
}

.estado-datos {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dato-item {
  background: #f8f5f1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.dato-item span {
  font-size: 11px;
  color: var(--light-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dato-item strong {
  font-size: 13px;
  color: var(--dark-text);
  font-weight: 500;
  word-break: break-word;
}

.dato-item-wide {
  grid-column: span 3;
}

.estado-productos {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.estado-productos-title {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light-gray);
  font-weight: 600;
}

.estado-productos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.estado-productos-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 110px;
  gap: 10px;
  font-size: 11px;
  color: var(--light-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.estado-productos-head span:nth-child(2),
.estado-productos-head span:nth-child(3) {
  text-align: right;
}

.estado-producto-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 110px;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
}

.producto-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.producto-main strong {
  font-size: 13px;
  color: var(--dark-text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.producto-main small {
  font-size: 11px;
  color: var(--mid-gray);
}

.producto-cantidad,
.producto-subtotal {
  text-align: right;
  font-size: 13px;
  color: var(--dark-text);
  font-weight: 600;
}

.estado-productos-empty {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.estado-error {
  margin-top: 18px;
  color: #b84a3b;
  font-size: 14px;
}

.estado-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 450;
  background: linear-gradient(135deg, #8a6449 0%, #6f4e38 100%);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 26px rgba(42, 36, 33, 0.28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.help-center {
  margin-top: 34px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 18px;
}

.help-center-head h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 500;
}

.help-center-head p {
  margin: 8px 0 0;
  color: var(--mid-gray);
  line-height: 1.5;
}

.help-center-head {
  text-align: center;
}

.help-center-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.help-mini-card {
  background: #f8f5f1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.help-mini-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-mini-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.help-mini-card h3 {
  margin: 0;
  color: #6f523c;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.help-mini-card p {
  margin: 7px 0 0;
  color: var(--dark-text);
  font-size: 13px;
  line-height: 1.45;
}

.faq-list {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.faq-item[open] {
  background: #fdfbf8;
  border-color: #ddd2c6;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 40px 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-text);
  display: block;
  text-align: center;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 500;
  color: #8a6449;
  line-height: 1;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.faq-item[open] summary::after {
  content: '-';
}

.faq-item p {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--mid-gray);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

.cancel-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(34, 26, 22, 0.45);
  backdrop-filter: blur(2px);
}

.cancel-modal-backdrop.open {
  display: flex;
}

.cancel-modal {
  width: min(460px, 100%);
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 24px 24px 20px;
  box-shadow: 0 22px 60px rgba(42, 36, 33, 0.28);
}

.cancel-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: #f6f2ed;
  color: #8e8682;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cancel-modal-close:hover {
  background: #eee6dd;
  color: #5a524f;
}

.cancel-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #8a6449;
  background: rgba(198, 155, 123, 0.2);
}

.cancel-modal h2 {
  margin: 12px 0 8px;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--dark-text);
}

.cancel-modal p {
  margin: 0;
  color: var(--mid-gray);
  line-height: 1.55;
}

.cancel-modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-modal-secondary,
.btn-modal-danger {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-modal-secondary {
  background: #f5f2ed;
  color: #5f5753;
}

.btn-modal-secondary:hover {
  background: #ebe3db;
}

.btn-modal-danger {
  background: #8a6449;
  color: #fff;
}

.btn-modal-danger:hover {
  background: #77543c;
}

footer {
  background: var(--footer-bg);
  color: var(--footer-muted);
  padding: 48px 48px 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.footer-logo img {
  display: block;
  width: 250px;
  max-width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--footer-muted);
  line-height: 1.6;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--footer-link);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 9px;
}

.footer-col ul li a {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--footer-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--footer-link);
}

.footer-col p {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--footer-muted);
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.social-icons a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
}

.social-icons img {
  width: 18px;
  height: 18px;
  display: block;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--footer-muted);
}

@media (max-width: 900px) {
  header {
    padding: 0 18px;
  }

  nav {
    display: none;
  }

  .estado-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .estado-top {
    align-items: flex-start;
  }

  .estado-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
  }

  .estado-btn-reorder,
  .estado-btn-cancel,
  .estado-btn-invoice {
    width: 100%;
  }

  .progress-track {
    grid-template-columns: 1fr 1fr;
    row-gap: 12px;
  }

  .progress-step::after {
    display: none;
  }

  .estado-datos {
    grid-template-columns: 1fr;
  }

  .dato-item-wide {
    grid-column: span 1;
  }

  .estado-productos-head,
  .estado-producto-row {
    grid-template-columns: minmax(0, 1fr) 60px 90px;
  }

  .help-center {
    padding: 14px;
  }

  .help-center-head h2 {
    font-size: 1.55rem;
  }

  .help-center-grid {
    grid-template-columns: 1fr;
  }

  .cancel-modal {
    padding: 20px 16px 16px;
    border-radius: 12px;
  }

  .cancel-modal h2 {
    font-size: 1.5rem;
  }

  .cancel-modal-actions {
    flex-direction: column-reverse;
  }

  .btn-modal-secondary,
  .btn-modal-danger {
    width: 100%;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 36px 20px 0;
  }
}
