
/* ============================================================
   Shop public page v33d
   Hybrid shell animation:
   - same card element
   - details fade/clip out first
   - card shell animates left/top/width/height
   - cleanup happens after shell reaches source card
   ============================================================ */

.shop-page {
  --shop-paper: #fcf7e7;
  --shop-cream: #fff9ef;
  --shop-ink: #282119;
  --shop-muted: #675a4e;
  --shop-line: rgba(75,55,40,.16);
  --shop-sage: #71815f;
  --shop-clay: #a85f3f;
  --shop-gold: #c7b880;
  --shop-shadow: 0 28px 92px rgba(54,43,30,.25);
  --shop-soft-shadow: 0 12px 34px rgba(54,43,30,.14);
  --shop-shell-duration: 650ms;
  --shop-shell-ease: cubic-bezier(.2,.84,.18,1);
  position: relative;
}

.shop-page .shop-hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.2rem);
}

.shop-page .shop-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(280px, .48fr);
  gap: clamp(1.25rem, 3vw, 2.6rem);
  align-items: center;
}

.shop-page .shop-hero-copy h1 {
  font-size: clamp(3rem, 5vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -.045em;
  max-width: 760px;
}

.shop-page .shop-hero-copy .lead {
  max-width: 720px;
}

.shop-page .shop-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.35rem;
}

.shop-page .shop-pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--shop-line);
  background: rgba(255,249,239,.66);
  color: var(--shop-ink);
  text-decoration: none;
  font-weight: 800;
  padding: .72rem 1rem;
  box-shadow: 0 10px 24px rgba(64,43,29,.08);
}

.shop-page .shop-pill-link.primary {
  background: var(--shop-ink);
  color: var(--shop-paper);
}

.shop-page .shop-hero-art {
  border: 1px solid var(--shop-line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 24%, rgba(199,184,128,.16), transparent 12rem),
    rgba(255,249,239,.62);
  box-shadow: var(--shop-soft-shadow);
  padding: .75rem;
  overflow: hidden;
  max-width: 520px;
  justify-self: end;
}

.shop-page .shop-hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 22px;
  background: #fcf7e7;
}

.shop-page .shop-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
  padding: 1rem 0 clamp(2rem, 5vw, 4.6rem);
}

.shop-page .shop-menu {
  position: sticky;
  top: 96px;
  border: 1px solid var(--shop-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 30% 0%, rgba(199,184,128,.16), transparent 12rem),
    rgba(255,249,239,.76);
  box-shadow: var(--shop-soft-shadow);
  padding: .9rem;
}

.shop-page .shop-menu h2 {
  font-size: 1.65rem;
  padding: .45rem .65rem .65rem;
}

.shop-page .shop-filter {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--shop-muted);
  font-weight: 800;
  padding: .7rem .75rem;
  border-radius: 16px;
  cursor: pointer;
}

.shop-page .shop-filter:hover,
.shop-page .shop-filter.active {
  color: var(--shop-ink);
  background: rgba(255,255,255,.64);
  box-shadow: inset 0 0 0 1px var(--shop-line);
}

.shop-page .shop-menu-note {
  margin-top: .85rem;
  padding: .85rem;
  border-radius: 18px;
  background: rgba(113,129,95,.10);
  color: var(--shop-muted);
  font-size: .95rem;
}

.shop-page .wrapper.shop-grid {
  width: 100%;
  height: auto;
  position: relative;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.95rem, 1.8vw, 1.35rem);
  align-items: start;
}

.shop-page .card-placeholder {
  visibility: hidden;
  border-radius: 26px;
}

.shop-page .item {
  cursor: pointer;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shop-soft-shadow);
  width: 100%;
  background: #f9f6eb;
  position: relative;
  border: 1px solid var(--shop-line);
  min-height: 360px;
  transition:
    box-shadow .22s ease,
    border-color .22s ease,
    transform .22s ease;
}

.shop-page .item:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 60px rgba(54,43,30,.15);
  border-color: rgba(75,55,40,.25);
}

/* Shell state: animate the card rectangle itself, not a scale transform.
   Opening now uses the close shell path in reverse: compact shell first, details reveal after expansion. */
.shop-page .item.is-fixed {
  position: fixed;
  z-index: 999;
  margin: 0;
  overflow: hidden;
  box-shadow: var(--shop-shadow);
  border-radius: 34px;
  transform: none !important;
  transition:
    left var(--shop-shell-duration) var(--shop-shell-ease),
    top var(--shop-shell-duration) var(--shop-shell-ease),
    width var(--shop-shell-duration) var(--shop-shell-ease),
    height var(--shop-shell-duration) var(--shop-shell-ease),
    max-height var(--shop-shell-duration) var(--shop-shell-ease),
    border-radius var(--shop-shell-duration) var(--shop-shell-ease),
    box-shadow var(--shop-shell-duration) var(--shop-shell-ease);
  will-change: left, top, width, height;
}


.shop-page .item.is-fixed:hover {
  transform: none !important;
}

.shop-page .item span.close {
  position: absolute;
  top: 10px;
  right: -46px;
  transition: all .24s ease;
  z-index: 9;
  font-weight: 800;
}

.shop-page .item span.close::before {
  content: "×";
  background: #fff9ef;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-weight: 300;
  font-size: 1.35rem;
  border: 1px solid var(--shop-line);
  box-shadow: 0 8px 18px rgba(54,43,30,.10);
}

.shop-page .item.is-expanded span.close {
  right: 10px;
  transition-delay: .22s;
}

.shop-page .item .graphic {
  position: relative;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  overflow: hidden;
  height: 240px;
  min-height: 240px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,249,239,.92) 0 23%, transparent 24%),
    radial-gradient(circle at 50% 48%, rgba(119,133,101,.58), transparent 35%),
    linear-gradient(145deg, rgba(199,184,128,.24), rgba(184,121,88,.18));
  transition:
    height .24s ease,
    min-height .24s ease,
    border-radius .24s ease;
}

.shop-page .item .graphic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fcf7e7;
  padding: .25rem;
}

.shop-page .item.is-expanded .graphic {
  height: 300px;
  min-height: 300px;
  border-radius: 0;
}

.shop-page .item.is-closing .graphic,
.shop-page .item.is-shell-only .graphic {
  height: 240px;
  min-height: 240px;
  border-radius: 0;
}

.shop-page .item .graphic span {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 2em;
  color: #fff;
  text-transform: uppercase;
  font-weight: 800;
  max-width: 52%;
  line-height: 30px;
  text-shadow: 0 2px 12px rgba(48,40,31,.35);
}

.shop-page .item .brief {
  margin-top: -4px;
  position: relative;
  display: flex;
  background: linear-gradient(to right, rgba(113,129,95,.95), rgba(199,184,128,.78), rgba(168,95,63,.62));
  padding: 10px 10px;
  border-bottom-left-radius: 26px;
  border-bottom-right-radius: 26px;
  min-height: 64px;
  align-items: center;
  transition: border-radius .24s ease;
}

.shop-page .item.is-expanded .brief,
.shop-page .item.is-closing .brief,
.shop-page .item.is-shell-only .brief {
  border-radius: 0;
}

.shop-page .item .brief .icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 48% 48%, rgba(255,249,239,.92) 0 30%, transparent 31%),
    radial-gradient(circle at 50% 50%, transparent 0 48%, rgba(255,249,239,.74) 49% 56%, transparent 57%),
    rgba(255,249,239,.22);
  border: 1px solid rgba(255,249,239,.30);
  flex: 0 0 40px;
}

.shop-page .item .brief .typo {
  margin-left: 20px;
}

.shop-page .item .brief .typo span {
  color: #fff;
  font-size: 13px;
  display: block;
}

.shop-page .item .brief .typo span:first-child {
  font-size: 15px;
  font-weight: 800;
}

.shop-page .item .sub {
  position: absolute;
  padding: 20px 40px 34px;
  background: #fff9ef;
  opacity: 0;
  transform: none;
  max-height: 0;
  overflow: hidden;
  transition: opacity .18s ease;
}

.shop-page .item.is-expanded .sub {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  max-height: 520px;
}

.shop-page .item.is-closing .sub,
.shop-page .item.is-shell-only .sub {
  position: relative;
  opacity: 0;
  transform: none;
  max-height: 0;
  overflow: hidden;
}

.shop-page .item .sub p.header {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3em;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--shop-ink);
  letter-spacing: -.035em;
  line-height: 1.02;
}

.shop-page .item .sub p.story {
  line-height: 25px;
  color: var(--shop-muted);
  margin-bottom: 1rem;
}

.shop-page .item .sub ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.2rem;
  color: #3f372e;
  display: grid;
  gap: .45rem;
}

.shop-page .item .sub li {
  position: relative;
  padding-left: 1.15rem;
  line-height: 1.42;
}

.shop-page .item .sub li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--shop-sage);
  font-weight: 900;
}

.shop-page .item .sub .actions {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(75,55,40,.10);
}

.shop-page .button {
  border: 1px solid var(--shop-line);
  border-radius: 999px;
  padding: .72rem .95rem;
  font-weight: 850;
  text-decoration: none;
  background: var(--shop-ink);
  color: var(--shop-paper);
  font: inherit;
  line-height: 1;
  width: fit-content;
  cursor: pointer;
}

.shop-page .button.secondary {
  background: rgba(255,255,255,.55);
  color: var(--shop-ink);
}

.shop-page .screen-dim {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(48,40,31,.30);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.shop-page .screen-dim.active {
  opacity: 1;
  pointer-events: auto;
}

.shop-page .shop-empty-message {
  display: none;
  border: 1px solid var(--shop-line);
  border-radius: 24px;
  background: rgba(255,249,239,.72);
  padding: 1.25rem;
  color: var(--shop-muted);
  margin-top: 1rem;
}

.shop-page .shop-ethics {
  padding: clamp(2.2rem, 5vw, 4.5rem) 0;
}

.shop-page .shop-ethics-grid {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(280px, .45fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: center;
  border: 1px solid var(--shop-line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 0%, rgba(113,129,95,.12), transparent 18rem),
    rgba(255,249,239,.65);
  box-shadow: var(--shop-soft-shadow);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.shop-page .shop-ethics h2 {
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  margin-bottom: 1rem;
}

.shop-page .shop-ethics-list {
  list-style: none;
  display: grid;
  gap: .7rem;
  padding: 0;
  margin: 1rem 0 0;
}

.shop-page .shop-ethics-list li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--shop-muted);
  line-height: 1.45;
}

.shop-page .shop-ethics-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--shop-sage);
  font-weight: 900;
}

.shop-page .shop-ethics-art {
  border-radius: 28px;
  overflow: hidden;
  background: #fcf7e7;
}

.shop-page .shop-ethics-art img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fcf7e7;
}



/* v33j: during opening, internal content is already in final expanded layout.
   It is only hidden by opacity so there is no final layout shift after the shell opens. */
.shop-page .item.is-opening .sub {
  position: relative;
  opacity: 0;
  transform: none;
  max-height: 520px;
  overflow: hidden;
  transition: opacity .18s ease;
}

.shop-page .item.is-opening .graphic {
  height: 300px;
  min-height: 300px;
  border-radius: 0;
}

.shop-page .item.is-opening .brief {
  border-radius: 0;
}

.shop-page .item.is-expanded:not(.is-opening) .sub {
  transform: none;
}

@media (max-width: 1100px) {
  .shop-page .wrapper.shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .shop-page .shop-hero-grid,
  .shop-page .shop-layout,
  .shop-page .shop-ethics-grid {
    grid-template-columns: 1fr;
  }

  .shop-page .shop-menu {
    position: static;
  }

  .shop-page .shop-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
  }

  .shop-page .shop-filter {
    width: auto;
  }
}

@media (max-width: 640px) {
  .shop-page .wrapper.shop-grid {
    grid-template-columns: 1fr;
  }

  .shop-page .item .sub {
    padding: 20px;
  }

  .shop-page .item .sub p.header {
    font-size: 2.35em;
  }
}
