/* Preserve the original logo colors against the dark brand panels. */
footer > img {
  width: 190px;
  background: transparent;
  filter: none;
  mix-blend-mode: normal;
}

.admin-sidebar img {
  width: 135px;
  background: transparent;
  filter: none;
  mix-blend-mode: normal;
  margin: 3px 9px 35px;
}

footer > div {
  align-self: end;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 28px;
  white-space: nowrap;
}

footer > div > * {
  flex: 0 0 auto;
}

.bag-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 76px;
  padding: 7px 10px 7px 8px;
}

.bag-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
}

.bag-button .bag-icon {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.bag-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.bag-icon path {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.bag-icon .bag-body {
  fill: var(--pale);
}

.bag-icon .bag-stitch {
  stroke-dasharray: 2 2;
  stroke-width: 1;
}

.bag-icon text {
  fill: var(--ink);
  font: 600 11px "DM Mono", monospace;
  letter-spacing: .02em;
}

.bag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1px dashed var(--ink);
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font: 500 10px "DM Mono", monospace;
}

.bag-button .bag-count {
  margin: 0;
  padding: 0;
  border: 1px dashed var(--ink);
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}

@media (max-width: 760px) {
  footer > div {
    justify-self: end;
    width: 100%;
    justify-content: flex-end;
    gap: 18px;
  }
}

.workshop-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: -1;
}

.feature-image.has-photo {
  background: #8095bf;
}

.feature-image.has-photo::before,
.journal-card.has-site-photo::before {
  background: none;
}

.feature-image.has-photo .placeholder-label,
.feature-image.has-photo .stitch-line {
  display: none;
}

.site-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.has-site-photo .placeholder-label {
  display: none;
}

.hero-tile.has-site-photo::before {
  background: none;
}

.hero-tile.has-site-photo p {
  position: absolute;
  z-index: 1;
  left: 20px;
  bottom: 18px;
  max-width: calc(100% - 40px);
  margin: 0;
  color: #fff;
  text-shadow: 0 1px 12px rgba(7, 25, 93, 0.45);
}

.hero-tile.has-site-photo[data-caption-backdrop="on"] p {
  padding: 9px 11px;
  background: rgba(7, 25, 93, 0.72);
  border-radius: 2px;
}

.hero-tile.has-site-photo[data-text-tone="navy"] p {
  color: var(--ink);
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.65);
}

.hero-tile.has-site-photo[data-text-tone="navy"][data-caption-backdrop="on"] p {
  background: rgba(255, 255, 255, 0.78);
}

.hero-tile.has-site-photo[data-text-tone="red"] p { color: #f13b4a; }
.hero-tile.has-site-photo[data-text-tone="green"] p { color: #31bc72; }
.hero-tile.has-site-photo[data-text-tone="yellow"] p { color: #ffd63e; }
.hero-tile.has-site-photo[data-text-tone="purple"] p { color: #a373ed; }
.hero-tile.has-site-photo[data-text-tone="orange"] p { color: #ff8a38; }
.hero-tile.has-site-photo[data-text-tone="pink"] p { color: #ff66a8; }
.hero-tile.has-site-photo[data-text-tone="light-blue"] p { color: #82ccff; }

.hero-tile.has-site-photo[data-caption-position="bottom-right"] p,
.hero-tile.has-site-photo[data-caption-position="top-right"] p {
  left: auto;
  right: 20px;
  text-align: right;
}

.hero-tile.has-site-photo[data-caption-position="top-left"] p,
.hero-tile.has-site-photo[data-caption-position="top-right"] p {
  top: 18px;
  bottom: auto;
}

.admin-help {
  max-width: 580px;
  margin: 0;
  color: #617096;
  font-size: 12px;
  line-height: 1.6;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.admin-photo-card {
  overflow: hidden;
  border: 1px solid #e2e6ef;
  background: #fff;
}

.admin-photo-preview {
  position: relative;
  height: 155px;
  overflow: hidden;
  background: linear-gradient(135deg, #b8d0f5, #e9f1fc);
}

.admin-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-photo-preview span {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 28px;
  padding: 6px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  font: 500 10px "DM Mono", monospace;
}

.admin-photo-copy {
  min-height: 70px;
  padding: 13px;
}

.admin-photo-copy b,
.admin-photo-copy small {
  display: block;
}

.admin-photo-copy b {
  font-size: 12px;
}

.admin-photo-copy small {
  margin-top: 5px;
  color: #6c7897;
  font-size: 10px;
}

.admin-photo-adjustments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 13px 13px;
}

.admin-photo-adjustments label {
  color: #596789;
  font-size: 9px;
  font-weight: 700;
}

.admin-photo-adjustments select {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid #dce2ef;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 8px 6px;
  font-size: 10px;
}

.admin-photo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px 14px;
}

.admin-photo-actions .add-button {
  flex: 1;
  cursor: pointer;
  text-align: center;
}

html {
  scroll-padding-top: 124px;
}

.admin-dashboard[hidden],
.admin-login[hidden] {
  display: none !important;
}

.photo-storage-note {
  margin: 22px 0 0;
  color: #6c7897;
  font-size: 10px;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

.product-image.has-product-photo::before,
.product-modal-image.has-product-photo::before,
.mini-product.has-product-photo::before {
  display: none;
}

.product-modal-media {
  min-width: 0;
  background: var(--pale);
}

.product-modal-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  background: var(--pale);
}

.product-modal-thumbs:empty {
  display: none;
}

.product-modal-thumb {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  background: white;
  overflow: hidden;
}

.product-modal-thumb.active {
  border-color: var(--ink);
}

.product-modal-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-editor {
  margin-top: 24px;
  border-top: 1px solid #edf0f7;
  padding-top: 24px;
}

.product-editor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.product-editor-fields label,
.product-photo-editor > div:first-child {
  display: grid;
  gap: 7px;
  color: #596789;
  font-size: 11px;
  font-weight: 700;
}

.product-editor-fields input,
.product-editor-fields textarea {
  width: 100%;
  border: 1px solid #dce2ef;
  background: #fff;
  color: var(--ink);
  padding: 11px;
  font-size: 12px;
  font-weight: 400;
}

.product-editor-fields textarea {
  resize: vertical;
  line-height: 1.5;
}

.product-description-field {
  grid-column: 1 / -1;
}

.product-photo-editor {
  margin-top: 24px;
  border-top: 1px solid #edf0f7;
  padding-top: 20px;
}

.product-photo-editor > div:first-child small {
  color: #6c7897;
  font-size: 10px;
  font-weight: 400;
}

.product-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.product-photo-slot {
  display: grid;
  gap: 7px;
}

.product-photo-preview {
  position: relative;
  min-height: 116px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--pale);
  background-size: cover;
  background-position: center;
  color: #64749b;
  font: 500 9px "DM Mono", monospace;
  text-transform: uppercase;
}

.product-photo-preview.has-product-photo span {
  align-self: end;
  justify-self: stretch;
  padding: 6px;
  background: rgba(7, 25, 93, .75);
  color: white;
  text-align: center;
}

.product-photo-slot > label {
  cursor: pointer;
  text-align: center;
}

.product-editor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.product-editor-actions .button {
  min-width: 160px;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 15, 54, 0.52);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}

.product-modal.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.product-modal-card {
  width: min(900px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .28);
  transform: translateY(14px) scale(.98);
  transition: transform .25s ease;
}

.product-modal.open .product-modal-card {
  transform: none;
}

.product-modal-top,
.product-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.product-modal-top .close-button {
  padding: 0 4px;
}

.product-modal-kicker {
  color: #607099;
  font: 500 10px "DM Mono", monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.product-modal-body {
  display: grid;
  grid-template-columns: 48% 52%;
}

.product-modal-image {
  min-height: 490px;
  background: var(--pale);
}

.product-modal-image .quick-add {
  display: none;
}

.product-modal-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 64px);
}

.product-modal-copy h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: -.06em;
  line-height: .95;
}

.product-modal-detail {
  margin: 18px 0 0;
  color: #596789;
  font-size: 13px;
}

.product-modal-description {
  max-width: 360px;
  margin: 26px 0 0;
  color: #4e5d82;
  line-height: 1.75;
}

.product-modal-purchase {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.product-modal-purchase strong {
  margin-bottom: 4px;
  font-size: 22px;
}

.product-modal-purchase .button {
  width: 100%;
}

.product-modal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  gap: 16px;
}

.modal-nav,
.continue-shopping {
  border: 0;
  background: none;
  color: var(--ink);
  padding: 5px 0;
  font-size: 12px;
}

.modal-nav {
  font-weight: 700;
}

.modal-nav span {
  margin: 0 7px;
}

.continue-shopping {
  border-bottom: 1px solid currentColor;
}

.product-modal-position {
  color: #697694;
  font: 500 10px "DM Mono", monospace;
}

@media (max-width: 900px) {
  .admin-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .admin-photo-grid {
    grid-template-columns: 1fr;
  }

  .product-modal {
    padding: 12px;
  }

  .product-modal-body {
    display: block;
  }

  .product-modal-media {
    display: block;
  }

  .product-modal-image {
    min-height: 270px;
    max-height: 42vh;
  }

  .product-modal-copy {
    padding: 28px 24px 32px;
  }

  .product-modal-copy h2 {
    font-size: 45px;
  }

  .product-modal-footer {
    flex-wrap: wrap;
    padding: 15px 20px;
  }

  .product-modal-position {
    order: -1;
    width: 100%;
  }

  .product-editor-fields,
  .product-photo-grid {
    grid-template-columns: 1fr;
  }

  .product-description-field {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 100px;
  }

  .site-header {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand img {
    width: 104px;
  }

  .site-header nav {
    display: flex;
    flex: 1;
    gap: 11px;
    margin-left: 0;
  }

  .site-header nav a {
    font-size: 10px;
    white-space: nowrap;
  }

  .site-header .text-button {
    display: inline-flex;
    padding: 6px 2px;
    font-size: 10px;
    white-space: nowrap;
  }

  .header-actions {
    gap: 4px;
  }

  .bag-button {
    padding: 8px 10px;
  }

  /* Give the work gallery enough width on a phone to show the full photos.
     The desktop three-column collage becomes a vertical, 4:3 stack so
     landscape photos are not squeezed into tall slivers and over-cropped. */
  .journal-grid {
    grid-template-columns: 1fr;
    height: auto;
    gap: 16px;
  }

  .journal-card,
  .journal-card.journal-a,
  .journal-card.journal-b,
  .journal-card.journal-c {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .journal-b {
    margin-top: 0;
  }
}
