:root {
  --terracotta: #c1663c;
  --terracotta-deep: #8a4526;
  --paper: #fbf6ea;
  --plaster: #e9dcc1;
  --ink: #2c231a;
  --ink-soft: #5c4b3a;
  --gold: #d3a23e;
  --line: rgba(44, 35, 26, 0.1);
  --card: #fffdf8;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.etlap-page {
  margin: 0;
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  min-height: 100dvh;
  padding-bottom: calc(4.5rem + var(--safe-bottom));
}

.etlap-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 246, 234, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.9rem 0.55rem;
}

.etlap-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.etlap-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.etlap-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.etlap-brand-text strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.1;
  font-weight: 700;
}

.etlap-brand-text span {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.etlap-brand a.back {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--terracotta-deep);
  text-decoration: none;
  white-space: nowrap;
}

.etlap-search {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
}

.etlap-search:focus {
  border-color: rgba(193, 102, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(193, 102, 60, 0.12);
}

.etlap-cats {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.55rem 0 0.15rem;
  margin: 0 -0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.etlap-cats::-webkit-scrollbar {
  display: none;
}

.etlap-cat {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.etlap-cat.is-active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

.etlap-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0.35rem 0.75rem 1rem;
}

.etlap-section {
  padding-top: 0.85rem;
  scroll-margin-top: 10.5rem;
}

.etlap-section-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  margin: 0.4rem 0.15rem 0.65rem;
  color: var(--terracotta-deep);
}

.etlap-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 0.75rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  margin-bottom: 0.65rem;
}

.etlap-item-body {
  min-width: 0;
}

.etlap-item-name {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.etlap-item-desc {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.etlap-item-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--terracotta-deep);
}

.etlap-item-media {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.etlap-item-img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  background: var(--plaster);
  display: block;
}

.etlap-zoom-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(44, 35, 26, 0.72);
  color: #fffdf8;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.etlap-zoom-btn:active {
  transform: scale(0.94);
  background: rgba(138, 69, 38, 0.9);
}

body.etlap-lb-open {
  overflow: hidden;
}

.etlap-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(20, 14, 10, 0.92);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

.etlap-lightbox[hidden] {
  display: none;
}

.etlap-lb-close {
  position: absolute;
  top: calc(0.65rem + env(safe-area-inset-top, 0px));
  right: calc(0.65rem + env(safe-area-inset-right, 0px));
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.14);
  color: #fffdf8;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.etlap-lb-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 3.5rem 1rem 5.5rem;
  touch-action: pan-x pan-y;
}

.etlap-lb-stage.is-zoomed {
  place-items: start center;
}

.etlap-lb-stage img {
  max-width: min(100%, 720px);
  max-height: min(70dvh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transform-origin: center center;
  transition: transform 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.etlap-lb-controls {
  position: absolute;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.75rem;
}

.etlap-lb-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.16);
  color: #fffdf8;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.etlap-lb-btn:active,
.etlap-lb-close:active {
  background: rgba(193, 102, 60, 0.55);
}

.etlap-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-soft);
  display: none;
}

.etlap-empty.is-visible {
  display: block;
}

.etlap-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  background: rgba(255, 253, 248, 0.96);
  border-top: 1px solid var(--line);
  padding: 0.45rem 0.5rem calc(0.45rem + var(--safe-bottom));
  backdrop-filter: blur(10px);
}

.etlap-bottom a {
  text-align: center;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.2rem;
  border-radius: 10px;
}

.etlap-bottom a strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.1;
  margin-bottom: 0.1rem;
}

.etlap-bottom a.is-active,
.etlap-bottom a:hover {
  color: var(--terracotta-deep);
  background: rgba(193, 102, 60, 0.08);
}

.etlap-section.is-hidden,
.etlap-item.is-hidden {
  display: none;
}

@media (min-width: 520px) {
  .etlap-main {
    padding-top: 0.75rem;
  }

  .etlap-item {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .etlap-item-media {
    width: 112px;
    height: 112px;
  }
}
