/* ============================================================
   VORO Designs gallery (/designs). All rules namespaced .dg-* /
   .s-dg-*; shared tokens, .shell, .eyebrow, .btn come from
   styles.css. Own cache counter: bump designs.css?v= in
   designs.html on every edit.
   ============================================================ */

/* ---------- Hero ---------- */
.s-dg-hero { padding: 72px 0 28px; background: var(--background); }
.dg-hero__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.dg-hero__title .hl { color: var(--brand); background: linear-gradient(transparent 62%, var(--cream) 62%); }
.dg-hero__sub { margin-top: 18px; max-width: 58ch; font-size: 17px; line-height: 1.6; color: var(--text-muted); }
.dg-hero__sub strong { color: var(--brand); font-weight: 700; }

/* ---------- Specials ---------- */
.s-dg-featured { padding: 26px 0 8px; background: var(--background); }
.dg-featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 14px; }
.dg-featured-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--brand);
  color: #fff;
  text-align: left;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform .3s var(--ease-bounce), box-shadow .3s var(--ease-luxe);
}
.dg-featured-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(46, 40, 35, 0.28); }
.dg-featured-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-muted); }
.dg-featured-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s var(--ease-luxe); }
.dg-featured-card:hover .dg-featured-card__media img { transform: scale(1.06); }
.dg-featured-card__body { display: block; padding: 18px 20px 20px; }
.dg-featured-card__tag {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  padding: 6px 12px; border-radius: var(--r-full);
  background: var(--cream); color: var(--on-cream);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.dg-featured-card__title { display: block; font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.dg-featured-card__desc { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; opacity: 0.85; }
.dg-featured-card__price { display: block; margin-top: 10px; font-size: 14.5px; font-weight: 700; }
.dg-featured-card__price s { margin-left: 6px; font-weight: 400; opacity: 0.6; }

/* ---------- Toolbar (filters + search) ---------- */
.s-dg-gallery { padding: 34px 0 72px; background: var(--background); }
.dg-toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 0;
  background: var(--background);
}
.dg-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.dg-chip {
  padding: 9px 16px;
  border-radius: var(--r-full);
  border: 1.5px solid rgba(46, 40, 35, 0.22);
  background: transparent;
  color: var(--brand);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s var(--ease-bounce);
}
.dg-chip:hover { transform: translateY(-1px); border-color: var(--brand); }
.dg-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.dg-search {
  min-width: 210px;
  padding: 10px 16px;
  border-radius: var(--r-full);
  border: 1.5px solid rgba(46, 40, 35, 0.22);
  background: #fff;
  font: inherit; font-size: 14.5px;
  color: var(--brand);
}
.dg-search:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---------- Grid + tiles ---------- */
.dg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 12px; }
.dg-card { text-align: left; border: 0; padding: 0; background: none; cursor: pointer; }
.dg-card__media {
  display: block;
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-muted);
  transition: transform .3s var(--ease-bounce), box-shadow .3s var(--ease-luxe);
}
.dg-card:hover .dg-card__media,
.dg-card:focus-visible .dg-card__media {
  transform: translateY(-8px) rotate(-1.2deg);
  box-shadow: 0 0 0 4px var(--cream), 0 18px 40px rgba(244, 238, 160, 0.85);
}
.dg-card:nth-child(even):hover .dg-card__media { transform: translateY(-8px) rotate(1.2deg); }
.dg-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease-luxe); }
.dg-card:hover .dg-card__media img { transform: scale(1.07); }
.dg-card { width: 100%; }
.dg-card__title { display: block; margin-top: 12px; font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--brand); }
.dg-card__sub { display: block; margin-top: 2px; font-size: 13px; color: var(--text-muted); }
.dg-card__price { display: block; margin-top: 6px; font-size: 14.5px; font-weight: 700; color: var(--brand); }
.dg-card__price s { margin-left: 6px; font-weight: 400; color: var(--text-muted); }

.dg-empty { margin-top: 26px; font-size: 15px; color: var(--text-muted); }
.dg-note { margin-top: 34px; max-width: 60ch; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }

/* ---------- Make-your-own tile (pinned first in the grid) ---------- */
.dg-card--make { display: block; text-decoration: none; }
.dg-card__media--make {
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px dashed rgba(46, 40, 35, 0.35);
}
.dg-make-plus {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 600;
  line-height: 1;
  color: var(--brand);
}

/* ---------- Custom section (designer link + request form) ---------- */
.s-dg-custom { padding: 6px 0 72px; background: var(--background); }
.dg-custom__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: start;
  padding-top: 34px;
  border-top: 1px solid rgba(46, 40, 35, 0.12);
}
.dg-custom__title { margin-top: 6px; font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 32px); font-weight: 600; color: var(--brand); }
.dg-custom__text { margin-top: 10px; max-width: 48ch; font-size: 15px; line-height: 1.65; color: var(--text-muted); }
.dg-custom__text strong { color: var(--brand); }
.dg-custom__form { display: grid; gap: 10px; }
.dg-custom__form input,
.dg-custom__form textarea {
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid rgba(46, 40, 35, 0.22);
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--brand);
  resize: vertical;
}
.dg-custom__form input:focus,
.dg-custom__form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.dg-custom__error { font-size: 13.5px; color: #9c3b3b; }
.dg-custom__success { font-size: 13.5px; font-weight: 600; color: #3f6b34; }

/* ---------- Quick view modal ---------- */
.dg-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; }
.dg-modal[hidden] { display: none; }
.dg-modal__backdrop { position: absolute; inset: 0; background: rgba(20, 12, 8, 0.55); }
.dg-modal__panel {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: var(--r-lg);
  background: var(--background);
  box-shadow: 0 30px 80px rgba(20, 12, 8, 0.4);
}
.dg-modal__close {
  position: absolute; top: 10px; right: 12px; z-index: 1;
  width: 38px; height: 38px;
  border: 0; border-radius: var(--r-full);
  background: var(--brand); color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.dg-modal__media { background: var(--surface-muted); aspect-ratio: 1 / 1; align-self: center; width: 100%; }
.dg-modal__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dg-modal__body { padding: 26px 26px 24px; }
.dg-modal__title { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--brand); }
.dg-modal__desc { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.dg-modal__price { margin-top: 14px; font-size: 17px; color: var(--brand); }
.dg-modal__price s { margin-left: 8px; font-size: 14px; color: var(--text-muted); }
.dg-modal__meta { margin-top: 4px; font-size: 13px; color: var(--text-muted); }
.dg-qty { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.dg-qty[hidden] { display: none; }
.dg-qty__label { font-size: 14px; font-weight: 600; color: var(--brand); }
.dg-qty__btn {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(46, 40, 35, 0.3); border-radius: var(--r-full);
  background: #fff; color: var(--brand);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.dg-qty__num { min-width: 22px; text-align: center; font-size: 16px; font-weight: 700; color: var(--brand); }
.dg-modal__total { margin-top: 10px; font-size: 14.5px; color: var(--text-muted); }
.dg-modal__cta { margin-top: 14px; width: 100%; }
.dg-modal__cta[disabled] { opacity: 0.55; cursor: default; pointer-events: none; }
.dg-modal__fine { margin-top: 10px; font-size: 12.5px; color: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .dg-grid { grid-template-columns: repeat(3, 1fr); }
  .dg-featured-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .s-dg-hero { padding-top: 44px; }
  .dg-hero__sub { font-size: 15.5px; }
  .dg-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .dg-card__title { font-size: 15.5px; }
  .dg-card__price { font-size: 14px; }

  /* Specials: swipeable snap carousel instead of a tall stack. */
  .dg-featured-grid {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -16px;
    padding: 4px 16px 8px;
  }
  .dg-featured-grid::-webkit-scrollbar { display: none; }
  .dg-featured-card { flex: 0 0 76%; scroll-snap-align: center; }

  /* Toolbar: sticky, chips in one swipeable row, full-width search. */
  .dg-toolbar { position: sticky; top: 0; padding: 10px 0; }
  .dg-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
    margin-inline: -16px;
    padding-inline: 16px;
    -webkit-overflow-scrolling: touch;
  }
  .dg-chips::-webkit-scrollbar { display: none; }
  .dg-chip { flex: 0 0 auto; padding: 10px 16px; min-height: 42px; }
  .dg-search { width: 100%; min-width: 0; padding: 12px 16px; font-size: 16px; }

  /* Quick view: bottom sheet, thumb-reach CTA, 44px+ targets. */
  .dg-modal { padding: 0; align-items: end; place-items: end center; }
  .dg-modal__panel {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 92dvh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  .dg-modal__media { aspect-ratio: 5 / 4; align-self: auto; }
  .dg-modal__media img { object-position: center; }
  .dg-modal__body { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); }
  .dg-modal__title { font-size: 23px; }
  .dg-qty__btn { width: 44px; height: 44px; font-size: 20px; }
  .dg-qty__num { min-width: 30px; font-size: 18px; }
  .dg-modal__cta { min-height: 52px; font-size: 17px; }
  .dg-modal__close { width: 44px; height: 44px; }

  /* Custom section stacks on mobile. */
  .dg-custom__grid { grid-template-columns: 1fr; gap: 20px; }
  .dg-custom__form button[type="submit"] { min-height: 48px; }
}
