/* PrecioMásBajo.net — app layer
   Self-hosted fonts + the small slice of Bootstrap the markup actually uses
   + icon and cookie-banner styles.
   Load BEFORE theme.css (theme.css is the design layer and must win). */

/* ---------- fonts (self-hosted, was fonts.googleapis.com) ---------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Narrow';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/archivo-narrow-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo Narrow';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/archivo-narrow-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- minimal reset (was bootstrap-reboot) ---------- */

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: .5rem; line-height: 1.2; font-weight: 500; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }
p { margin-top: 0; margin-bottom: 1rem; }
ul, ol { margin-top: 0; }
img, svg { vertical-align: middle; }
button, input { font-family: inherit; font-size: inherit; line-height: inherit; margin: 0; }
button { text-transform: none; -webkit-appearance: button; }
button:not(:disabled) { cursor: pointer; }

/* ---------- layout / spacing utilities (was bootstrap utilities) ---------- */

.container { width: 100%; padding-right: .75rem; padding-left: .75rem; margin-right: auto; margin-left: auto; }
@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.gap-2 { gap: .5rem !important; }

.position-fixed { position: fixed !important; }
.bottom-0 { bottom: 0 !important; }
.start-0 { left: 0 !important; }
.end-0 { right: 0 !important; }

.p-3  { padding: 1rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.me-3 { margin-right: 1rem !important; }
@media (min-width: 768px) { .mb-md-0 { margin-bottom: 0 !important; } }

.bg-dark { background-color: #212529 !important; }
.text-white { color: #fff !important; }
.text-white-50 { color: rgba(255, 255, 255, .5) !important; }

/* ---------- buttons (was .btn from bootstrap) ---------- */

.btn {
  display: inline-block;
  padding: .375rem .75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  border: 1px solid transparent;
  border-radius: .375rem;
  background-color: transparent;
  color: inherit;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}
.btn:focus-visible { outline: 0; box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25); }
.btn-sm { padding: .25rem .5rem; font-size: .875rem; border-radius: .25rem; }

.btn-primary { color: #fff; background-color: #0d6efd; border-color: #0d6efd; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { color: #fff; }

.btn-outline-light { color: #f8f9fa; border-color: #f8f9fa; }
.btn-outline-light:hover, .btn-outline-light:focus { color: #000; background-color: #f8f9fa; border-color: #f8f9fa; }

/* ---------- switches (was .form-check / .form-switch) ---------- */

.form-check { display: block; min-height: 1.5rem; padding-left: 1.5em; margin-bottom: .125rem; }
.form-check .form-check-input { float: left; margin-left: -1.5em; }
.form-check-input {
  width: 1em; height: 1em; margin-top: .25em;
  vertical-align: top;
  background-color: #fff;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  border: 1px solid rgba(0, 0, 0, .25);
  -webkit-appearance: none; appearance: none;
  print-color-adjust: exact;
}
.form-check-input:checked { background-color: #0d6efd; border-color: #0d6efd; }
.form-check-input:disabled { opacity: .7; pointer-events: none; }

.form-switch { padding-left: 2.5em; }
.form-switch .form-check-input {
  width: 3em; height: 1.5em;
  margin-left: -2.5em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280,0,0,0.25%29'/%3e%3c/svg%3e");
  background-position: left center;
  border-radius: 2em;
  transition: background-position .15s ease-in-out;
}
.form-switch .form-check-input:checked {
  background-position: right center;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}
@media (prefers-reduced-motion: reduce) {
  .form-switch .form-check-input, .btn { transition: none; }
}

/* ---------- icons (was font-awesome; now an inline SVG sprite) ---------- */

.pmb-i {
  width: 1em; height: 1em;
  fill: currentColor;
  vertical-align: -.125em;
  flex: none;
}

/* ---------- cookie consent banner (was inline <style> in base.html) ---------- */

.cookie-consent-banner { z-index: 9999; box-shadow: 0 -4px 20px rgba(0, 0, 0, .3); }
.cookie-options {
  display: none;
  background: #2d2d2d;
  border-radius: 4px;
  padding: 15px;
  margin-top: 15px;
}
.cookie-options.show { display: block; }
.cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #444;
}
.cookie-option:last-child { border-bottom: none; }
.cookie-option-info h6 { margin-bottom: 2px; color: #fff; }
.cookie-option-info p { margin-bottom: 0; font-size: .85rem; color: #aaa; }
/* Panel heading sits on a dark background, so it must not inherit the dark
   ink colour theme.css gives every h1-h6. */
.cookie-options h5 { color: #fff; }
