/* Product detail sheet — slides up like ecommerce PDP (no new page) */

.hw-item {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hw-item:active {
  transform: scale(0.985);
}

.hw-item-media {
  position: relative;
}

.hw-item-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(14, 33, 24, 0.18));
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.hw-item:hover .hw-item-media::after,
.hw-item:focus-visible .hw-item-media::after {
  opacity: 1;
}

.hw-pdp {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}

.hw-pdp.is-open {
  pointer-events: auto;
  visibility: visible;
}

.hw-pdp__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 33, 24, 0.55);
  opacity: 0;
  transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.hw-pdp.is-open .hw-pdp__backdrop {
  opacity: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hw-pdp__sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(92dvh, 860px);
  display: flex;
  flex-direction: column;
  border-radius: 28px 28px 0 0;
  background: var(--hw-surface, #fffdf8);
  box-shadow: 0 -24px 60px rgba(14, 33, 24, 0.28);
  transform: translate3d(0, 108%, 0);
  opacity: 0.96;
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease;
  overflow: hidden;
  will-change: transform;
}

.hw-pdp.is-open .hw-pdp__sheet {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.hw-pdp.is-dragging .hw-pdp__sheet {
  transition: none;
}

.hw-pdp__handle {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 12px 0 6px;
  cursor: grab;
  touch-action: none;
}

.hw-pdp__handle-bar {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(14, 33, 24, 0.18);
}

.hw-pdp__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(245, 241, 232, 0.92);
  color: var(--hw-dark, #0e2118);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(14, 33, 24, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hw-pdp__close:hover {
  transform: scale(1.05);
  background: #fff;
}

.hw-pdp__media {
  position: relative;
  flex: 0 0 auto;
  height: min(46vw, 280px);
  min-height: 220px;
  max-height: 320px;
  margin: 0 14px;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(186, 154, 111, 0.2), rgba(14, 33, 24, 0.12)),
    var(--hw-cream, #d1ccc1);
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.08s,
    opacity 0.45s ease 0.08s;
}

.hw-pdp.is-open .hw-pdp__media {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.hw-pdp__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.06);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s;
}

.hw-pdp.is-open .hw-pdp__media img {
  transform: scale(1);
}

.hw-pdp__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 22px 28px;
  transform: translateY(24px);
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.14s,
    opacity 0.4s ease 0.14s;
}

.hw-pdp.is-open .hw-pdp__body {
  transform: translateY(0);
  opacity: 1;
}

.hw-pdp__category {
  margin: 0 0 8px;
  font-family: Oswald, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hw-gold, #ba9a6f);
}

.hw-pdp__title {
  margin: 0;
  font-family: Oswald, sans-serif;
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--hw-dark, #0e2118);
}

.hw-pdp__desc {
  margin: 10px 0 0;
  font-family: Lato, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--hw-muted, #6b726c);
}

.hw-pdp__prices {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(14, 33, 24, 0.04);
  border: 1px solid rgba(14, 33, 24, 0.08);
  display: grid;
  gap: 8px;
}

.hw-pdp__price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: Lato, sans-serif;
}

.hw-pdp__price-label {
  font-size: 13px;
  color: var(--hw-muted, #6b726c);
}

.hw-pdp__price-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--hw-dark, #0e2118);
  white-space: nowrap;
}

.hw-pdp__note {
  margin: 14px 0 0;
  font-family: Lato, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(107, 114, 108, 0.9);
}

.hw-pdp__cta {
  flex: 0 0 auto;
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(255, 253, 248, 0), #fffdf8 28%);
  transform: translateY(20px);
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
    opacity 0.4s ease 0.2s;
}

.hw-pdp.is-open .hw-pdp__cta {
  transform: translateY(0);
  opacity: 1;
}

.hw-pdp__cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--hw-dark, #0e2118);
  color: var(--hw-light, #f5f1e8);
  font-family: Oswald, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hw-pdp__cta-btn:hover {
  background: var(--hw-gold, #ba9a6f);
  color: var(--hw-dark, #0e2118);
}

.hw-pdp__cta-btn:active {
  transform: scale(0.98);
}

body.hw-pdp-open {
  overflow: hidden;
}

body.hw-pdp-open .hw-menu-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@media (min-width: 768px) {
  body.hw-pdp-open .hw-menu-dock {
    transform: translateX(-50%) translateY(18px);
  }
}

@media (min-width: 768px) {
  .hw-pdp {
    align-items: center;
    padding: 24px;
  }

  .hw-pdp__sheet {
    border-radius: 28px;
    max-height: min(88vh, 820px);
    transform: translate3d(0, 40px, 0) scale(0.94);
    opacity: 0;
  }

  .hw-pdp.is-open .hw-pdp__sheet {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }

  .hw-pdp__media {
    height: 300px;
    max-height: 340px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-pdp__backdrop,
  .hw-pdp__sheet,
  .hw-pdp__media,
  .hw-pdp__media img,
  .hw-pdp__body,
  .hw-pdp__cta {
    transition: none !important;
  }
}
