/* ==========================================================================
   NUESTRA SEÑORA DEL ROSARIO DE TALPA — BASE
   Paleta sagrada: crema pergamino, vino tinto profundo, oro antiguo.
   ========================================================================== */

:root {
  /* Colores principales */
  --cream: #f4ecd8;
  --cream-soft: #faf5e8;
  --cream-warm: #ebe0c4;
  --parchment: #e8dcc0;

  /* Vinos y burgundies — para los colores eclesiásticos */
  --burgundy: #6b1f2a;
  --burgundy-deep: #4a1520;
  --burgundy-dark: #2d0c14;
  --wine: #8b2635;

  /* Oros — iconografía sagrada */
  --gold: #b8860b;
  --gold-light: #d4a84a;
  --gold-soft: #c9a66b;
  --gold-pale: #e8d4a0;

  /* Neutros */
  --ink: #2d241a;
  --ink-soft: #5a4a3a;
  --ink-mute: #8a7a66;
  --line: #d4c5a8;
  --line-soft: #e0d4b8;

  /* Acento */
  --rose: #a8485a;

  /* Tipografías */
  --font-display: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
  --font-serif: 'Cormorant Garamond', 'Garamond', 'Georgia', serif;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  /* Espacios */
  --radius: 2px;
  --shadow-soft: 0 2px 20px rgba(45, 12, 20, 0.08);
  --shadow-card: 0 4px 30px rgba(45, 12, 20, 0.12);
  --shadow-modal: 0 20px 60px rgba(45, 12, 20, 0.3);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Textura de pergamino sutil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(184, 134, 11, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(107, 31, 42, 0.05) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
}

/* ===================== UTILIDADES ===================== */

.kicker {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 6px;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--burgundy);
  color: var(--cream-soft);
}
.btn-primary:hover {
  background: var(--burgundy-deep);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--cream-soft);
  border-color: var(--burgundy);
}

.btn-gold {
  background: var(--gold);
  color: var(--cream-soft);
}
.btn-gold:hover {
  background: var(--gold-light);
}

.btn-danger {
  background: transparent;
  color: var(--burgundy);
  border-color: var(--line);
}
.btn-danger:hover {
  background: var(--burgundy);
  color: var(--cream-soft);
  border-color: var(--burgundy);
}

.btn-plus {
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  transition: all 0.2s ease;
}
.icon-btn:hover {
  background: var(--cream-soft);
  border-color: var(--burgundy);
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 48px 0 12px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-divider span {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 500;
}

/* ===================== MODAL ===================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 12, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-top: 4px solid var(--burgundy);
  padding: 36px 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-modal);
  animation: slideUp 0.25s ease;
}

.modal-kicker {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 24px;
  letter-spacing: 0.02em;
  color: var(--burgundy-deep);
  line-height: 1.2;
}

.field-label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 16px 0 6px;
}

.modal input[type="text"],
.modal input[type="number"],
.modal textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 15px;
  font-family: var(--font-serif);
  outline: none;
  transition: border-color 0.2s;
}

.modal input:focus,
.modal textarea:focus {
  border-color: var(--burgundy);
}

.modal textarea {
  resize: vertical;
  min-height: 60px;
}

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

.price-input-wrap {
  position: relative;
}
.price-input-wrap::before {
  content: '$';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--burgundy);
  font-weight: 600;
  pointer-events: none;
}
.price-input-wrap input {
  padding-left: 28px !important;
}

/* ===================== ANIMACIONES ===================== */

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

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

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ===================== SCROLLBAR ===================== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--cream);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-soft);
}
