/* ═══════════════════════════════════════════════════
   AnubisTiendaSync — main.css
   Reset, variables, tipografía, layout base
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ────────────────────────────────────── */
:root {
  --accent: #ee3a62;
  --accent-hover: #d02d51;
  --accent-light: rgba(238, 58, 98, 0.08);
  --secondary: #63c7c7;
  --secondary-hover: #52b5b5;
  --secondary-light: rgba(99, 199, 199, 0.08);
  --text: #000000;
  --text-muted: #333333;
  --text-light: #777777;
  --border: #ec718e;
  --bg: #ffffff;
  --bg-alt: #f3396530;
  --success: #2d7a2d;
  --success-bg: #edf7ed;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --warning: #92400e;
  --warning-bg: #fffbeb;
  --badge-sale: #ee3a62;
  --badge-new: #63c7c7;
  --badge-out: #8c8c8c;
  --radius: 6px;
  --radius-lg: 14px;
  --shadow: 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, .08);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
  --container: 1400px;
  --header-h: 140px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font: inherit;
}

ul,
ol {
  list-style: none;
}

input,
select,
textarea {
  font: inherit;
}

/* ── Tipografía ───────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

p {
  margin-bottom: .75rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ── Layout ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

main {
  flex: 1;
}

/* ── Botones ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 9999px;
  /* Botón píldora moderno */
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: #000000;
  border-color: #000000;
}

.btn-outline:hover {
  background: #000000;
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-alt);
  color: #000000;
}

.btn-danger {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}

.btn-xs {
  padding: .3rem .75rem;
  font-size: .75rem;
  min-height: auto;
}

.btn-sm {
  padding: .5rem 1.1rem;
  font-size: .875rem;
}

.btn-lg {
  padding: .95rem 2.2rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Formularios ──────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: .35rem;
  color: var(--text);
}

.form-control {
  display: block;
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, .1);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-hint {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

.form-error {
  font-size: .8125rem;
  color: var(--error);
  margin-top: .25rem;
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ── Alertas ──────────────────────────────────────── */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .9375rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #fecaca;
}

.alert-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid #fde68a;
}

.alert-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* ── Badges ───────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2em .55em;
  border-radius: 2px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1;
}

.badge-sale {
  background: var(--badge-sale);
  color: #fff;
  border-radius: 33px;
  padding: 8px 12px !important;
}

.badge-new {
  background: var(--badge-new);
  color: #fff;
  border-radius: 33px;
  padding: 8px 12px !important;
}

.badge-out {
  background: var(--badge-out);
  color: #fff;
  border-radius: 33px;
  padding: 8px 12px !important;
}

/* ── Cards ────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

/* ── Tabla genérica ───────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
}

.table th,
.table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  background: var(--bg-alt);
  white-space: nowrap;
}

.table tbody tr:hover {
  background: var(--bg-alt);
}

.table-responsive {
  overflow-x: auto;
}

/* ── Paginación ───────────────────────────────────── */
.pagination {
  display: flex;
  gap: .35rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 .6rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition);
}

.pagination a:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.pagination .active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination .disabled {
  color: var(--text-light);
  pointer-events: none;
}

/* ── Utilidades ───────────────────────────────────── */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-muted);
}

.text-small {
  font-size: .875rem;
}

.mt-1 {
  margin-top: .5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: .5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.gap-1 {
  gap: .5rem;
}

.gap-2 {
  gap: 1rem;
}

.flex-1 {
  flex: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hidden-desktop {
    display: none !important;
  }
}