/* Himawari Portfolio Manager Frontend */
.hpm-portfolio-wrap,
.hpm-portfolio-wrap * {
  box-sizing: border-box;
}

.hpm-portfolio-wrap {
  width: 100%;
  font-family: "Inter", Arial, sans-serif;
  color: #0f172a;
}

.hpm-empty {
  font-family: "Inter", Arial, sans-serif;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.hpm-portfolio-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.hpm-portfolio-grid.hpm-cols-1 { grid-template-columns: 1fr; }
.hpm-portfolio-grid.hpm-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hpm-portfolio-grid.hpm-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hpm-portfolio-grid.hpm-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.hpm-card {
  min-width: 0;
  border: 1px solid #e6ded0;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: none;
}

.hpm-card-shell {
  appearance: none;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
}

.hpm-card-shell:hover,
.hpm-card-shell:focus,
.hpm-card-shell:active {
  text-decoration: none;
  color: inherit;
  outline: none;
  background: transparent;
}

.hpm-card-image {
  position: relative;
  display: block;
  width: 100%;
  height: 290px;
  overflow: hidden;
  background: #ebe5d8;
}

.hpm-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hpm-card-badge {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  min-height: 26px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #020617;
  color: #ffffff;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.hpm-card-body {
  display: block;
  padding: 22px 24px 24px;
  background: #ffffff;
}

.hpm-card-cat {
  display: block;
  margin: 0 0 8px;
  color: #8c6e49;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hpm-card-title {
  display: block;
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 700;
  color: #020617;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hpm-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  margin: 12px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
}

.hpm-card-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
  color: #8c6e49;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  text-decoration: none;
}

/* Fallback artwork */
.hpm-card-art {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: #eae4da;
}

.hpm-art-shape,
.hpm-art-award-base,
.hpm-art-award,
.hpm-art-box,
.hpm-art-ribbon,
.hpm-art-globe,
.hpm-art-pin,
.hpm-art-line,
.hpm-art-truck-body,
.hpm-art-truck-cab,
.hpm-art-wheel,
.hpm-art-road {
  position: absolute;
  display: block;
}

.hpm-art-navy { background:#1e293b; }
.hpm-art-stone { background:#78716c; }
.hpm-art-gold { background:#a3845b; opacity:.72; }
.hpm-art-blue { background:#374151; }

.hpm-art-rect { border-radius: 6px; }
.hpm-art-pill { border-radius: 999px; }
.hpm-art-bar { border-radius: 6px; }

.hpm-art-onboarding .hpm-art-rect.hpm-art-navy { left: 15%; top: 31%; width: 23%; height: 43%; }
.hpm-art-onboarding .hpm-art-pill { left: 45%; top: 24%; width: 18%; height: 50%; }
.hpm-art-onboarding .hpm-art-rect.hpm-art-gold { left: 70%; top: 35%; width: 20%; height: 37%; }

.hpm-art-awards .hpm-art-award-base { left: 30%; top: 80%; width: 40%; height: 9%; background:#1e293b; }
.hpm-art-awards .hpm-art-award-left { left: 38%; top: 20%; width: 16%; height: 62%; clip-path: polygon(100% 0, 0 100%, 100% 100%); background:#baa380; opacity:.9; }
.hpm-art-awards .hpm-art-award-right { left: 52%; top: 20%; width: 16%; height: 62%; clip-path: polygon(0 0, 0 100%, 100% 100%); background:#baa380; opacity:.72; }

.hpm-art-events .hpm-art-bar.hpm-art-blue { left: 23%; top: 37%; width: 15%; height: 30%; }
.hpm-art-events .hpm-art-bar.hpm-art-gold { left: 48%; top: 31%; width: 15%; height: 36%; }
.hpm-art-events .hpm-art-bar.hpm-art-navy { left: 73%; top: 41%; width: 15%; height: 26%; }

.hpm-art-packaging .hpm-art-box-back { left: 24%; top: 35%; width: 31%; height: 30%; border-radius: 10px; background:#6f5539; opacity:.75; }
.hpm-art-packaging .hpm-art-box-front { left: 46%; top: 42%; width: 31%; height: 30%; border-radius: 10px; background:#a3845b; opacity:.86; }
.hpm-art-packaging .hpm-art-ribbon { left: 53%; top: 42%; width: 5%; height: 30%; background:#d2c3aa; box-shadow: -31px 22px 0 -16px #d2c3aa, 31px 22px 0 -16px #d2c3aa; }

.hpm-art-sourcing .hpm-art-globe { left: 35%; top: 25%; width: 30%; height: 42%; border-radius: 50%; border: 12px solid #1e293b; }
.hpm-art-sourcing .hpm-art-pin-one { left: 26%; top: 31%; width: 16px; height: 16px; border-radius: 50%; background:#a3845b; }
.hpm-art-sourcing .hpm-art-pin-two { left: 68%; top: 55%; width: 14px; height: 14px; border-radius: 50%; background:#a3845b; }
.hpm-art-sourcing .hpm-art-line-one { left: 30%; top: 39%; width: 42%; height: 2px; background:#a3845b; transform: rotate(15deg); }
.hpm-art-sourcing .hpm-art-line-two { left: 38%; top: 58%; width: 32%; height: 2px; background:#a3845b; transform: rotate(-18deg); }

.hpm-art-delivery .hpm-art-truck-body { left: 24%; top: 41%; width: 38%; height: 23%; border-radius: 6px; background:#1e293b; }
.hpm-art-delivery .hpm-art-truck-cab { left: 62%; top: 47%; width: 16%; height: 17%; border-radius: 5px; background:#a3845b; }
.hpm-art-delivery .hpm-art-wheel-one { left: 33%; top: 66%; width: 18px; height: 18px; border-radius: 50%; background:#020617; }
.hpm-art-delivery .hpm-art-wheel-two { left: 66%; top: 66%; width: 18px; height: 18px; border-radius: 50%; background:#020617; }
.hpm-art-delivery .hpm-art-road { left: 20%; top: 76%; width: 60%; height: 3px; background:#d2c3aa; }

/* Popup */
.hpm-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

.hpm-modal.is-open {
  display: block;
}

.hpm-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.82);
}

.hpm-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(100% - 36px, 520px);
  margin: 7vh auto 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(2,6,23,0.28);
}

.hpm-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.hpm-modal-content {
  padding: 42px 32px 32px;
}

.hpm-modal-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 38px 12px 0;
}

.hpm-modal-categories span {
  color: #8c6e49;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hpm-modal-title {
  margin: 0 34px 14px 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  line-height: 1.14;
  font-weight: 700;
  color: #020617;
}

.hpm-modal-description {
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.65;
}

.hpm-modal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  min-height: 46px;
  padding: 14px 22px;
  border-radius: 8px;
  background: #020617;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.hpm-modal-active { overflow: hidden; }

@media (max-width: 900px) {
  .hpm-portfolio-grid,
  .hpm-portfolio-grid.hpm-cols-3,
  .hpm-portfolio-grid.hpm-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .hpm-card-image { height: 250px; }
}

@media (max-width: 600px) {
  .hpm-portfolio-grid,
  .hpm-portfolio-grid.hpm-cols-2,
  .hpm-portfolio-grid.hpm-cols-3,
  .hpm-portfolio-grid.hpm-cols-4 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hpm-card-image { height: 250px; }
  .hpm-card-body { padding: 20px; }
  .hpm-card-title { font-size: 20px; }
  .hpm-modal-dialog { width: min(100% - 28px, 520px); margin-top: 5vh; }
  .hpm-modal-content { padding: 38px 24px 28px; }
  .hpm-modal-title { font-size: 24px; }
  .hpm-modal-description { font-size: 14px; }
}
