/* Dantas Paint: public store */
:root {
  --red: #d42f2c;
  --orange: #e8782f;
  --orange-soft: #fdeee2;
  --blue: #2a79d9;
  --ink: #242424;
  --muted: #6d6d6d;
  --line: #ececec;
  --bg: #fff;
  --gap: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
a { color: var(--blue); }
img { max-width: 100%; }

.page { max-width: 1100px; margin: 0 auto; padding: 22px 20px 40px; }

/* ---- title box */
.masthead { text-align: center; margin: 0 0 30px; }
.brand {
  display: inline-block;
  padding: .28em 1.35em;
  border: 2px solid var(--orange);
  background: #fff;
  color: var(--red);
  font-size: clamp(1.7rem, 4.6vw, 2.4rem);
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .15s;
}
.brand:hover { background: var(--orange-soft); }
.brand:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.tagline { margin: .7rem auto 0; max-width: 40rem; color: var(--muted); }

/* ---- grid + sidebar */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 36px;
  align-items: start;
}
.side { position: sticky; top: 20px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a {
  display: inline-block;
  padding: .06em 0;
  color: var(--blue);
  font-size: 1.2rem;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.side a:hover { color: var(--red); }
.side a[aria-current="page"] { color: var(--red); font-weight: 600; text-decoration: none; }

.sec-head { margin: 0 0 16px; }
.sec-head h1 { margin: 0; color: var(--red); font-size: 1.55rem; font-weight: 600; line-height: 1.25; }
.sec-head p { margin: .35rem 0 0; color: var(--muted); max-width: 46rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.cell { margin: 0; min-width: 0; }
.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 2px solid var(--orange);
  background: #fff;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
a.tile:hover img { transform: scale(1.04); }
a.tile:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ph {
  display: grid;
  place-items: center;
  padding: 8px;
  background: radial-gradient(circle at 50% 50%, #fff 0 38%, var(--orange-soft) 100%);
  color: var(--orange);
  font-size: .8rem;
  text-align: center;
}
.cap {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  font-size: .9rem;
  line-height: 1.3;
}
.cap-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap-p { color: var(--red); font-weight: 600; white-space: nowrap; }
.empty { margin: 0; padding: 48px 16px; border: 2px dashed var(--orange); color: var(--muted); text-align: center; }

/* ---- single artwork */
.crumbs { margin: 0 0 14px; }
.art { display: grid; gap: 18px; }
.art-img {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 10px;
  border: 2px solid var(--orange);
  background: #fff;
}
.art-img img { display: block; width: auto; height: auto; max-height: 76vh; object-fit: contain; }
.art-info h1 { margin: 0; color: var(--red); font-size: 1.6rem; font-weight: 600; line-height: 1.25; }
.art-price { margin: .3rem 0 0; font-size: 1.25rem; font-weight: 600; }
.art-desc { margin: .8rem 0 0; max-width: 46rem; }
.btn {
  display: inline-block;
  margin-top: .4rem;
  padding: .6em 1.25em;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
}
.btn:hover { background: #b82523; }
.pager { display: flex; justify-content: space-between; margin-top: 24px; font-size: 1.05rem; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 160px; gap: 24px; }
  .side a { font-size: 1.05rem; }
}

/* phones: categories become chips above a 2-column grid */
@media (max-width: 700px) {
  .page { padding: 16px 16px 32px; }
  .masthead { margin-bottom: 18px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .side { position: static; order: -1; }
  .side ul { display: flex; flex-wrap: wrap; gap: 6px 8px; }
  .side a {
    padding: .3em .8em;
    border: 1.5px solid var(--orange);
    border-radius: 999px;
    font-size: .95rem;
    text-decoration: none;
  }
  .side a[aria-current="page"] { background: var(--orange); border-color: var(--orange); color: #fff; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); --gap: 8px; }
  /* don't leave a lone placeholder dangling in the last row */
  .grid > .is-ph:last-child:nth-child(odd) { display: none; }
}
