/* MOTO71 · Fotos — shared gallery styles (used by index.php and local preview) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:      #edeff2;
  --surface: #ffffff;
  --ink:     #1a1d23;
  --ink2:    #6b7079;
  --line:    #e6e8ec;
  --brand:   #e4151f;
  --brand-d: #b3101a;
  --brand2:  #ff7a00;
  --accent:  #ffb703;
  --head:    #15171c;
  --r:       15px;
  --gap:     16px;
  --shadow:   0 1px 2px rgba(20,22,28,.05), 0 10px 26px -16px rgba(20,22,28,.22);
  --shadow-h: 0 18px 36px -14px rgba(228,21,31,.34);
}
html {
  font-size: 16px;
  background-color: var(--bg);
  background-image: url("moto.svg");
  background-repeat: no-repeat;
  background-position: right -8px bottom 0;
  background-size: min(48vw, 500px) auto;
  background-attachment: fixed;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ── Header ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--head);
  border-bottom: 3px solid var(--brand);
  padding: 0 22px; height: 64px;
  display: flex; align-items: center; gap: 18px;
}
.logo { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.bdg {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--brand), var(--brand2));
  color: #fff; font-weight: 800; font-size: .82rem;
  border-radius: 11px;
  box-shadow: 0 4px 12px -2px rgba(228,21,31,.55), inset 0 1px 0 rgba(255,255,255,.3);
}
.bt { display: flex; flex-direction: column; line-height: 1.1; }
.bt b { color: #fff; font-size: 1.06rem; font-weight: 800; letter-spacing: .04em; }
.bt small { color: #9aa0a8; font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin-top: 2px; }

.search-wrap {
  flex: 1; min-width: 0; max-width: 380px; margin-left: auto;
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.10);
  border-radius: 11px; padding: 0 13px;
  transition: border-color .15s, background .15s;
}
.search-wrap:focus-within { border-color: var(--brand); background: rgba(255,255,255,.12); }
.search-wrap svg { flex-shrink: 0; color: #8b9098; }
#search { flex: 1; min-width: 0; background: none; border: none; outline: none; color: #fff; font-size: .9rem; padding: 11px 0; }
#search::placeholder { color: #7e848c; }
.clr { background: none; border: none; cursor: pointer; color: #8b9098; padding: 4px; display: flex; opacity: 0; pointer-events: none; transition: opacity .15s, color .15s; }
.clr.on { opacity: 1; pointer-events: auto; }
.clr:hover { color: #fff; }
.wa-top {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  background: #25d366; color: #fff; font-weight: 700; font-size: .85rem;
  padding: 9px 15px; border-radius: 10px; white-space: nowrap;
  box-shadow: 0 4px 12px -3px rgba(37,211,102,.55);
  transition: transform .15s, box-shadow .15s;
}
.wa-top:hover { transform: translateY(-1px); box-shadow: 0 7px 16px -4px rgba(37,211,102,.72); }
.wa-top svg { width: 18px; height: 18px; }
.order-top {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(150deg, #ff7a00, #e4151f); color: #fff;
  font-weight: 700; font-size: .85rem;
  padding: 9px 14px; border-radius: 10px; white-space: nowrap;
  box-shadow: 0 4px 12px -3px rgba(228,21,31,.5);
  transition: transform .15s, box-shadow .15s;
}
.order-top:hover { transform: translateY(-1px); box-shadow: 0 7px 16px -4px rgba(228,21,31,.66); }
.order-top svg { width: 17px; height: 17px; }
@media (max-width: 720px) {
  .wa-top-t, .order-top-t { display: none; }
  .wa-top, .order-top { padding: 9px 11px; }
}

/* ── Hero banner ────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(118deg, #9c0c14 0%, var(--brand) 44%, var(--brand2) 100%);
  border-bottom: 1px solid rgba(0,0,0,.12);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(440px 240px at 86% -40%, rgba(255,255,255,.28), transparent 68%),
    repeating-linear-gradient(125deg, rgba(255,255,255,.05) 0 2px, transparent 2px 24px);
}
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -90px;
  width: 280px; height: 280px; border-radius: 50%;
  border: 38px solid rgba(255,255,255,.10);
  pointer-events: none;
}
.hero-c {
  position: relative; max-width: 1340px; margin: 0 auto;
  padding: 30px 22px 32px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
}
.hero-k { color: rgba(255,255,255,.88); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 9px; }
.hero-h { color: #fff; font-size: 1.95rem; font-weight: 800; letter-spacing: .01em; text-shadow: 0 2px 14px rgba(0,0,0,.20); }
.hero-stat {
  flex-shrink: 0; align-self: center;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.34);
  color: #fff; font-weight: 700; font-size: .85rem;
  padding: 8px 17px; border-radius: 999px; backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.3);
}

/* ── Layout ─────────────────────────────────────────────── */
.wrap { max-width: 1340px; margin: 0 auto; padding: 24px 22px 44px; }

.bc { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: .82rem; color: var(--ink2); margin-bottom: 20px; }
.bc a { transition: color .12s; }
.bc a:hover { color: var(--brand); }
.bc .sep { opacity: .4; }
.bc .cur { color: var(--ink); font-weight: 600; }

.lbl {
  display: flex; align-items: center; gap: 9px;
  font-size: .72rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink); margin: 0 0 14px;
}
.lbl::before { content: ""; width: 4px; height: 15px; border-radius: 3px; background: linear-gradient(var(--brand), var(--brand2)); }

/* ── Folder grid ────────────────────────────────────────── */
.fg { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: var(--gap); margin-bottom: 32px; }
.fc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 19px 15px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  cursor: pointer; text-align: center; user-select: none;
  box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.fc:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: rgba(228,21,31,.45); }
.fc .ico {
  width: 54px; height: 54px; display: grid; place-items: center;
  font-size: 1.6rem; border-radius: 14px;
  background: linear-gradient(150deg, var(--brand), var(--brand2));
  box-shadow: 0 6px 14px -4px rgba(228,21,31,.5), inset 0 1px 0 rgba(255,255,255,.25);
}
.fc .fn { font-size: .88rem; font-weight: 600; color: var(--ink); word-break: break-all; line-height: 1.35; }
.fc .fb { font-size: .72rem; color: var(--ink2); }

/* ── Image grid ─────────────────────────────────────────── */
.ig { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: var(--gap); }
.ic {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.ic:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); border-color: rgba(228,21,31,.45); }
.ic .tw { position: relative; aspect-ratio: 1; overflow: hidden; background: #eceef1; }
.ic img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ic:hover img { transform: scale(1.07); }
.ic .tw::after {
  content: "🔍"; position: absolute; inset: 0;
  display: grid; place-items: center; font-size: 1.5rem;
  background: linear-gradient(0deg, rgba(228,21,31,.42), rgba(20,22,28,.30));
  opacity: 0; transition: opacity .2s;
}
.ic:hover .tw::after { opacity: 1; }
/* video cards */
.ic.vid video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ic.vid .tw::after {
  content: "▶"; opacity: 1; padding-left: 4px;
  background: rgba(20,22,28,.34); color: #fff; font-size: 1.45rem;
}
.ic.vid:hover .tw::after { background: rgba(228,21,31,.55); }
.ic.vid:hover video { transform: scale(1.07); }
.ic .in {
  padding: 10px 13px 11px; font-size: .8rem; color: var(--ink); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-top: 1px solid var(--line);
}

/* ── States ─────────────────────────────────────────────── */
.empty { text-align: center; padding: 80px 20px; color: var(--ink2); }
.empty .ei { font-size: 3.2rem; margin-bottom: 12px; }
#no-results { display: none; text-align: center; padding: 56px 20px; color: var(--ink2); font-size: .92rem; }
.h { display: none !important; }

/* ── Footer ─────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 36px; padding: 30px 22px 38px;
  text-align: center; color: var(--ink2); font-size: .82rem;
}
.foot::before {
  content: ""; display: block;
  width: min(540px, 90%); height: 50px; margin: 0 auto 18px;
  background: url("deco.svg") center / contain no-repeat;
  opacity: .9;
}
.foot-b { color: var(--brand); font-weight: 800; letter-spacing: .04em; }

/* ── Info / tienda ──────────────────────────────────────── */
.info { border-top: 1px solid var(--line); background: rgba(255,255,255,.55); }
.info-c {
  max-width: 1340px; margin: 0 auto; padding: 32px 22px;
  display: grid; grid-template-columns: 1.25fr 1fr 1.1fr; gap: 30px;
}
.info-h { font-size: .82rem; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.couriers { display: flex; flex-wrap: wrap; gap: 10px; }
.cr {
  width: 96px; height: 52px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; display: grid; place-items: center; padding: 8px;
  box-shadow: var(--shadow);
}
.cr img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pays { display: flex; flex-wrap: wrap; gap: 8px; }
.pay {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: .82rem; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow);
}
.wa-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: #25d366; color: #fff; font-weight: 700; font-size: .9rem;
  padding: 11px 18px; border-radius: 11px;
  box-shadow: 0 8px 20px -6px rgba(37,211,102,.6);
  transition: transform .15s, box-shadow .15s;
}
.wa-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -6px rgba(37,211,102,.72); }
.wa-ic { width: 20px; height: 20px; }
.info-sub { margin-top: 10px; font-size: .78rem; color: var(--ink2); }

/* ── WhatsApp floating button ───────────────────────────── */
.wa-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 28px -6px rgba(37,211,102,.7);
  transition: transform .15s;
}
.wa-fab:hover { transform: scale(1.08); }
.wa-fab svg { width: 32px; height: 32px; }

@media (max-width: 900px) { .info-c { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (max-width: 600px) {
  .info-c { grid-template-columns: 1fr; gap: 22px; padding: 24px 14px; }
  .wa-fab { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .wa-fab svg { width: 28px; height: 28px; }
}

/* ── Lightbox ───────────────────────────────────────────── */
#lb {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,11,15,.94); backdrop-filter: blur(3px);
  flex-direction: column; align-items: center; justify-content: center;
}
#lb.on { display: flex; }
#lbw { flex: 1; display: flex; align-items: center; justify-content: center; padding: 64px 76px 12px; width: 100%; max-height: 100%; }
#lbi, #lbv { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 18px 70px rgba(0,0,0,.6); transition: opacity .2s; }
#lbv { display: none; background: #000; }
#lbi.fade, #lbv.fade { opacity: 0; }
/* opening animation */
#lb.on { animation: lbBg .22s ease both; }
#lb.on #lbi, #lb.on #lbv { animation: lbZoom .34s cubic-bezier(.2,.85,.25,1) both; }
@keyframes lbBg   { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbZoom { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
.lc {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.10); border: none; border-radius: 50%; color: #fff; cursor: pointer;
  width: 52px; height: 52px; font-size: 1.55rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; user-select: none; backdrop-filter: blur(6px);
}
.lc:hover { background: var(--brand); }
#lp { left: 16px; } #ln { right: 16px; }
#lx, #ldl {
  position: fixed; top: 16px;
  background: rgba(255,255,255,.10); border: none; border-radius: 50%; color: #fff; cursor: pointer;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; text-decoration: none; backdrop-filter: blur(6px);
}
#lx { right: 16px; font-size: 1.18rem; }
#ldl { right: 70px; font-size: 1.05rem; }
#lx:hover, #ldl:hover { background: var(--brand); }
#lm { padding: 12px 20px 20px; text-align: center; color: rgba(255,255,255,.55); font-size: .82rem; }
#lm b { color: #fff; font-weight: 500; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .topbar { padding: 0 14px; gap: 12px; height: 60px; }
  .bt small { display: none; }
  .hero-c { padding: 22px 16px 24px; }
  .hero-h { font-size: 1.5rem; }
  .wrap { padding: 18px 14px 36px; }
  .ig { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; }
  .fg { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 12px; }
  #lbw { padding: 56px 50px 10px; }
  .lc { width: 42px; height: 42px; font-size: 1.25rem; }
  #lp { left: 7px; } #ln { right: 7px; }
}
