.tea-product {
  max-width: 1520px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 65px) 4.2%;
  animation: tea-product-in 0.55s var(--ease-tea) both;
}

.tea-product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 80px);
}

.tea-gallery {
  min-width: 0;
}

.tea-stage {
  display: grid;
  place-items: center;
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  aspect-ratio: 1.42;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.tea-stage img {
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.65s var(--ease-tea);
}

.tea-stage:hover img {
  transform: scale(1.025);
}

.tea-stage img.is-switching {
  animation: tea-photo-in 0.38s var(--ease-tea) both;
}

.tea-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 2px 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tea-thumbs a {
  display: block;
  border: 1px solid var(--line);
  flex: 0 0 58px;
  padding: 3px;
  border-radius: 6px;
  opacity: 0.72;
  transition: opacity 0.25s var(--ease-tea), border-color 0.25s var(--ease-tea), transform 0.25s var(--ease-tea);
}

.tea-thumbs a:hover {
  opacity: 0.95;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tea-thumbs a[aria-current] {
  opacity: 1;
  border-color: var(--accent);
}

.tea-thumbs img {
  display: block;
  width: 100%;
  height: 44px;
  object-fit: cover;
  border-radius: 3px;
}

.tea-category {
  display: inline-block;
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tea-category:hover {
  color: var(--accent-hover);
}

.tea-name,
.tea-drawer .tea-name {
  font: 400 clamp(2rem, 3.2vw, 3.6rem) / 1.07 Georgia, serif;
  letter-spacing: -0.035em;
  margin: 0.55rem 0 0.85rem;
  overflow-wrap: anywhere;
}

.tea-taste {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
  margin: 0;
}

.tea-taste::first-letter {
  text-transform: uppercase;
}

.tea-states {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1rem;
  gap: 0.55rem 1.05rem;
}

.tea-states a {
  color: var(--text);
  border-bottom: 1px solid #666;
  padding-bottom: 1px;
  font-size: 0.9rem;
}

.tea-states a:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
}

.tea-purchase {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1.15rem;
}

.tea-options {
  border: 0;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tea-options legend,
.tea-weight-label > span:first-child,
.tea-cost > span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.tea-option {
  display: grid;
  position: relative;
}

.tea-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.tea-option span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.25s var(--ease-tea), color 0.25s var(--ease-tea), background-color 0.25s var(--ease-tea), transform 0.25s var(--ease-tea);
}

.tea-option:hover span {
  border-color: var(--accent);
}

.tea-option input:checked + span {
  border-color: var(--accent);
  color: var(--accent-hover);
  background: transparent;
}

.tea-option input:disabled + span {
  color: var(--muted);
  border-style: dashed;
  opacity: 0.65;
  cursor: default;
}

.tea-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tea-single legend,
.tea-single input {
  display: none;
}

.tea-single .tea-option span {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: default;
  color: var(--muted);
}

.tea-selection {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 0 0 1.1rem;
}

.tea-weight-label {
  display: block;
}

.tea-counter {
  display: inline-flex;
  align-items: center;
  height: 48px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.24s var(--ease-tea), box-shadow 0.24s var(--ease-tea);
}

.tea-counter:focus-within {
  border-color: var(--accent);
}

.tea-counter button {
  border: 0;
  background: transparent;
  width: 42px;
  height: 44px;
  padding: 0;
  font-size: 1.15rem;
  border-radius: 4px;
}

.tea-counter button:hover:not(:disabled) {
  background: #252525;
}

.tea-counter button:disabled {
  cursor: default;
  opacity: 0.35;
}

.tea-counter input {
  width: 4.6ch;
  padding: 0;
  text-align: right;
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  background: transparent;
  border: 0;
  border-radius: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.tea-counter input::-webkit-inner-spin-button,
.tea-counter input::-webkit-outer-spin-button {
  appearance: none;
}

.tea-counter input:focus-visible {
  outline: none;
}

.tea-counter:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tea-unit {
  color: var(--muted);
  padding: 0 0.35rem;
  white-space: nowrap;
}

.tea-cost {
  text-align: right;
}

.tea-cost output {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 48px;
  font: 400 clamp(1.35rem, 2.3vw, 2rem) / 1 Georgia, serif;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.tea-submit {
  position: relative;
  overflow: hidden;
  border: 0;
  background: var(--accent);
  color: #101010;
  width: 100%;
  padding: 0.92rem 1.1rem;
  font-weight: 550;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.tea-submit:hover {
  background: var(--accent-hover);
  color: #101010;
  transform: translateY(-1px);
}

.tea-submit:active {
  transform: translateY(0) scale(0.99);
}

.tea-product-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.95rem;
}

.tea-product-links a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.24rem;
  font-size: 0.9rem;
}

.tea-product-links a:hover {
  color: var(--accent-hover);
}

.tea-receipt:not(:empty) {
  border-left: 2px solid var(--accent);
  background: var(--panel);
  border-radius: 0 6px 6px 0;
  padding: 0.55rem 0.9rem;
  margin-top: 1rem;
  color: var(--text);
  animation: tea-notice-fade 0.32s var(--ease-tea) both;
}

.tea-notes {
  max-width: 75ch;
  margin-top: clamp(32px, 5vw, 68px);
}

.tea-notes h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.7rem);
  margin-bottom: 1rem;
}

.tea-notes h3 {
  font-size: 1.25rem;
  margin: 1.65rem 0 0.65rem;
  color: var(--accent-hover);
}

.tea-notes p {
  white-space: pre-line;
  line-height: 1.68;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.tea-fact {
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.85fr) minmax(0, 2fr);
  gap: 1rem;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
  line-height: 1.5;
  border-radius: 4px;
  transition: background-color 0.22s var(--ease-tea);
}

.tea-fact:hover {
  background: var(--panel);
}

.tea-fact span:first-child {
  color: var(--muted);
}

.tea-sku {
  display: inline-block;
  margin-top: 1.1rem;
  color: var(--muted);
}

.tea-sold {
  color: var(--muted);
}

/* Slide-Over Product Drawer */
dialog.tea-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(620px, 94vw);
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.65);
}

.tea-drawer[open] {
  animation: tea-slide 0.36s var(--ease-tea) both;
}

.tea-drawer::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.tea-drawer[open]::backdrop {
  animation: tea-backdrop 0.32s ease-out both;
}

html:has(.tea-drawer[open]) {
  overflow: hidden;
}

.tea-drawer-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tea-drawer .tea-product {
  padding: 0;
  animation: none;
}

.tea-drawer .tea-product-layout {
  display: block;
}

.tea-drawer .tea-stage {
  border-radius: 0;
  aspect-ratio: 1.95;
  box-shadow: none;
}

.tea-drawer .tea-thumbs {
  padding-left: clamp(20px, 4vw, 42px);
  padding-right: clamp(20px, 4vw, 42px);
}

.tea-drawer .tea-information {
  padding: 1.35rem clamp(20px, 4vw, 42px) 0;
}

.tea-drawer .tea-name {
  font-size: clamp(1.7rem, 2.6vw, 2.55rem);
  padding: 0;
}

.tea-drawer .tea-notes {
  border-top: 1px solid var(--line);
  margin: 2rem clamp(20px, 4vw, 42px) 0;
  padding: 1.5rem 0 0;
}

.tea-drawer .tea-sku {
  margin: 1rem clamp(20px, 4vw, 42px) max(2rem, env(safe-area-inset-bottom));
}

.tea-drawer .tea-close {
  position: absolute;
  z-index: 2;
  right: max(14px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top));
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #777;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 16, 16, .92);
  backdrop-filter: blur(6px);
  color: var(--text);
  transition: border-color 0.25s var(--ease-tea), color 0.25s var(--ease-tea), transform 0.3s var(--ease-tea);
}

.tea-drawer .tea-close:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: rotate(90deg);
}

.tea-close svg {
  display: block;
  width: 18px;
  height: 18px;
}

.tea-loading {
  padding: 3rem 1.5rem;
  color: var(--muted);
}

.tea-notice {
  position: absolute;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 2rem);
  width: max-content;
  padding: 0.7rem 1.05rem;
  background: var(--accent);
  color: #101010;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
  border-radius: 7px;
  pointer-events: none;
  font-size: 0.9rem;
  text-align: center;
  animation: tea-notice-slide 0.3s var(--ease-tea) both;
}

@keyframes tea-product-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tea-photo-in {
  from {
    opacity: 0.25;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes tea-slide {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes tea-backdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tea-notice-slide {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes tea-notice-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 730px) {
  .tea-product-layout {
    grid-template-columns: 1fr;
  }
  .tea-product {
    padding-inline: 5%;
  }
  .tea-stage {
    aspect-ratio: 1.6;
  }
}

@media (max-width: 540px) {
  dialog.tea-drawer {
    width: 100%;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tea-drawer[open],
  .tea-drawer[open]::backdrop,
  .tea-product,
  .tea-stage img.is-switching,
  .tea-notice {
    animation: none;
  }
}
