/* Load Helvetica Now Display Medium */
@font-face {
  font-family: 'HelveticaNowMedium';
  src: url('https://cdn.shopify.com/s/files/1/0753/6931/6686/files/HelveticaNowDisplay-Medium.ttf?v=1738062343') format('truetype');
  font-weight: 500;
  font-style: normal;
}

/* Global reset + new font */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'HelveticaNowMedium', sans-serif;
}
body {
  background: #f4f6f8;
  color: #333;
}

/* Container */
.app-container {
  max-width: 960px;
  margin: auto;
  padding: 24px;
}

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.logo {
  width: 120px;
  height: auto;
}
h1 {
  font-size: 1.75rem;
  font-weight: 500;
}

/* Search */
.search-wrapper {
  margin-bottom: 24px;
}
.search-wrapper input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 32px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow .2s, border-color .2s;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.card.selected {
  border-color: #3b82f6;
  background: #eef4ff;
}
.card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fafafa;
}
.card p {
  flex: 1;
  text-align: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}
.card button {
  padding: 8px 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s;
}
.card button:hover {
  background: #2563eb;
}

/* Print button */
.print-btn {
  width: 100%;
  padding: 14px;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .2s;
}
.print-btn:disabled {
  background: #999;
  cursor: not-allowed;
}
.print-btn:not(:disabled):hover {
  background: #1f2937;
}

@media print {
  body {
    background: #fff;
    color: #000;
    margin: 1;
    padding: 0;
  }

  .app-container,
  header,
  .search-wrapper,
  .print-btn {
    display: none !important;
  }

  .item {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    page-break-after: always;
  }

  .item p {
    font-size: 1.75rem;
    font-weight: 500;
    margin: 0.6rem 0;
    text-align: center;
  }

  .item img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    margin: 1rem auto;
    display: block;
  }

}