/* ============================================================
   ClickRemate — subastas online. Rojo/negro urgencia + sidebar layout.
   ============================================================ */

:root {
  --color-bg: #fafafa;
  --color-bg-alt: #f0f0f0;
  --color-ink: #161616;
  --color-muted: #5c5c5c;
  --color-red: #d1272d;
  --color-red-dark: #a51e23;
  --color-line: #e2e2e2;
  --color-card: #ffffff;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-sans: 'Barlow', sans-serif;
  --sidebar-width: 240px;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); background: var(--color-bg); color: var(--color-ink); line-height: 1.55; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; color: var(--color-ink); line-height: 1.15; margin: 0 0 0.4em; }
p { color: var(--color-muted); margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.74rem; font-weight: 700; color: var(--color-red); margin-bottom: 0.6em; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.8em 1.6em; border-radius: var(--radius); font-weight: 700; font-size: 0.92rem; border: 2px solid transparent; cursor: pointer; transition: all 0.15s ease; }
.btn-primary { background: var(--color-red); color: #fff; }
.btn-primary:hover { background: var(--color-red-dark); }
.btn-ghost { background: transparent; border-color: var(--color-ink); color: var(--color-ink); }
.btn-ghost:hover { background: var(--color-ink); color: #fff; }
.btn-sm { padding: 0.55em 1.2em; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* live banner */
.live-banner { background: var(--color-ink); color: #fff; font-size: 0.82rem; }
.live-banner-inner { display: flex; align-items: center; gap: 8px; padding: 8px 24px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-red); display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* top bar (sin nav de links tradicional) */
.top-bar { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--color-line); }
.top-bar-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.sidebar-toggle { display: none; background: none; border: 1px solid var(--color-line); border-radius: var(--radius); padding: 8px 14px; font-weight: 700; cursor: pointer; }
.brand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; flex-shrink: 0; }
.brand span { color: var(--color-red); }
.top-search { flex: 1; display: flex; border: 1px solid var(--color-line); border-radius: var(--radius); overflow: hidden; max-width: 520px; }
.top-search input { flex: 1; border: none; padding: 12px 14px; font-family: inherit; }
.top-search input:focus { outline: none; }
.top-search button { border: none; background: var(--color-ink); color: #fff; padding: 0 20px; font-weight: 700; cursor: pointer; }
.top-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.bids-count { font-size: 0.85rem; font-weight: 600; color: var(--color-muted); white-space: nowrap; }

/* app layout: sidebar + main */
.app-layout { display: flex; max-width: 1240px; margin: 0 auto; align-items: flex-start; }
.sidebar {
  width: var(--sidebar-width); flex-shrink: 0; padding: 32px 20px; position: sticky; top: 72px;
  height: calc(100vh - 72px); overflow-y: auto; border-right: 1px solid var(--color-line);
}
.sidebar h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); margin: 24px 0 12px; font-family: var(--font-sans); font-weight: 700; }
.sidebar h3:first-child { margin-top: 0; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.cat-btn { display: flex; justify-content: space-between; background: none; border: none; text-align: left; padding: 10px 12px; border-radius: var(--radius); font-size: 0.92rem; font-weight: 600; color: var(--color-ink); cursor: pointer; }
.cat-btn span { color: var(--color-muted); font-weight: 400; }
.cat-btn:hover { background: var(--color-bg-alt); }
.cat-btn.active { background: var(--color-red); color: #fff; }
.cat-btn.active span { color: rgba(255,255,255,0.8); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; margin-bottom: 10px; color: var(--color-muted); }
.sidebar-link { display: block; font-size: 0.88rem; font-weight: 600; padding: 10px 0; border-top: 1px solid var(--color-line); color: var(--color-red); }
main { flex: 1; min-width: 0; }

/* hero / featured lot */
.hero { padding: 40px 0 60px; }
.featured-lot { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; background: var(--color-card); border: 1px solid var(--color-line); border-radius: 12px; overflow: hidden; }
.featured-image { background: linear-gradient(135deg, #d1272d, #161616); min-height: 260px; }
.featured-body { padding: 32px 32px 32px 0; }
.featured-body h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.featured-meta { display: flex; gap: 28px; margin: 20px 0; }
.featured-meta span { display: block; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-muted); }
.featured-meta strong { font-family: var(--font-display); font-size: 1.4rem; }

/* lots grid */
.lots { padding: 20px 0 60px; }
.lots-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.view-toggle { display: flex; gap: 4px; border: 1px solid var(--color-line); border-radius: var(--radius); padding: 4px; }
.view-btn { background: none; border: none; padding: 6px 14px; font-size: 0.82rem; font-weight: 600; border-radius: 6px; cursor: pointer; color: var(--color-muted); }
.view-btn.active { background: var(--color-ink); color: #fff; }
.lots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lots-grid.list-view { grid-template-columns: 1fr; }
.lots-grid.list-view .lot-card { display: flex; align-items: center; }
.lots-grid.list-view .lot-image { width: 220px; height: 140px; flex-shrink: 0; }
.lots-grid.list-view .lot-body { flex: 1; }
.lot-card.hidden { display: none; }
.lot-card { background: var(--color-card); border: 1px solid var(--color-line); border-radius: 10px; overflow: hidden; transition: box-shadow 0.2s ease; }
.lot-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.lot-image { height: 160px; }
.l1 { background: linear-gradient(135deg, #7a8c3a, #2f3a15); }
.l2 { background: linear-gradient(135deg, #3a4a6a, #161616); }
.l3 { background: linear-gradient(135deg, #8a6b3a, #2f2415); }
.l4 { background: linear-gradient(135deg, #a5522a, #2f1810); }
.l5 { background: linear-gradient(135deg, #4a7a5c, #16261c); }
.l6 { background: linear-gradient(135deg, #2f3a52, #0d1218); }
.lot-body { padding: 18px; }
.lot-body h3 { font-size: 1.02rem; margin-bottom: 6px; }
.lot-price { font-family: var(--font-display); font-size: 1.15rem; color: var(--color-ink); font-weight: 700; }
.lot-bids { font-size: 0.8rem; color: var(--color-muted); font-weight: 400; font-family: var(--font-sans); }
.lot-timer { font-size: 0.82rem; margin-bottom: 14px; }
.lot-timer strong { color: var(--color-red); font-family: var(--font-display); }

/* how it works */
.how { background: var(--color-bg-alt); padding: 60px 0; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-step { text-align: center; }
.how-step span { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: var(--color-red); color: #fff; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; margin-bottom: 12px; }

/* register */
.register { padding: 60px 0 80px; }
.register-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--color-ink); color: #fff; border-radius: 12px; padding: 40px; align-items: center; }
.register-inner h2 { color: #fff; }
.register-inner p { color: #b8b8b8; }
.register-inner .form-row { margin-bottom: 14px; }
.register-inner label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: #fff; }
.register-inner input { width: 100%; padding: 0.7em 0.9em; border: 1px solid #3a3a3a; border-radius: var(--radius); background: #232323; color: #fff; font-family: inherit; }
.register-inner input:focus { outline: none; border-color: var(--color-red); }
.form-status { margin-top: 12px; font-size: 0.85rem; font-weight: 600; color: var(--color-red); }

/* bid modal */
.bid-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.bid-modal.open { display: flex; }
.bid-modal-content { background: #fff; max-width: 420px; width: 100%; border-radius: 12px; padding: 32px; position: relative; }
.bid-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.bid-history-label { font-size: 0.8rem; font-weight: 700; margin-top: 12px; }
.bid-history { max-height: 140px; overflow-y: auto; margin-bottom: 16px; }
.bid-history li { display: flex; justify-content: space-between; font-size: 0.86rem; padding: 6px 0; border-bottom: 1px solid var(--color-line); }
.bid-input-row { display: flex; gap: 10px; }
.bid-input-row input { flex: 1; padding: 0.7em 0.9em; border: 1px solid var(--color-line); border-radius: var(--radius); font-family: inherit; }

/* footer denso tipo marketplace */
.site-footer { background: var(--color-ink); color: #b8b8b8; padding: 56px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-bottom: 32px; border-bottom: 1px solid #2b2b2b; }
.footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; font-family: var(--font-sans); }
.footer-grid a { display: block; font-size: 0.88rem; margin-bottom: 10px; }
.footer-grid a:hover { color: var(--color-red); }
.footer-pay { display: flex; align-items: center; gap: 12px; padding: 20px 0; font-size: 0.82rem; flex-wrap: wrap; }
.pay-badge { border: 1px solid #3a3a3a; border-radius: 4px; padding: 4px 10px; font-size: 0.78rem; }
.footer-bottom { padding: 20px 0; font-size: 0.78rem; border-top: 1px solid #2b2b2b; }

/* responsive */
@media (max-width: 960px) {
  .featured-lot { grid-template-columns: 1fr; }
  .featured-body { padding: 24px; }
  .lots-grid { grid-template-columns: repeat(2, 1fr); }
  .register-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .top-search { display: none; }
  .sidebar-toggle { display: inline-block; }
  .sidebar { position: fixed; left: -280px; top: 0; height: 100%; background: #fff; z-index: 150; transition: left 0.25s ease; box-shadow: 0 0 40px rgba(0,0,0,0.2); }
  .sidebar.open { left: 0; }
  .app-layout { display: block; }
}
@media (max-width: 640px) {
  .lots-grid, .how-grid, .footer-grid { grid-template-columns: 1fr; }
}
