* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: 'Sarabun', sans-serif;
  overflow: hidden;
}

body {
  background: #050505;
  color: #fff;
}

.topbar {
  position: fixed;
  top: env(safe-area-inset-top);
  left: 0;
  right: 0;
  height: 58px;
  padding: 12px 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.brand {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.65);
  pointer-events: auto;
}

.admin-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.feed {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  background: #000;
}

.feed-item {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  position: relative;
  scroll-snap-align: start;
  overflow: hidden;
  background: #000;
}

.media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.15), rgba(0,0,0,.25)),
    linear-gradient(to right, rgba(0,0,0,.28), transparent);
  z-index: 2;
  pointer-events: none;
}

.content-box {
  position: absolute;
  left: 16px;
  right: 82px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 5;
}

.category {
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 8px;
  border-radius: 999px;
  font-size: 13px;
  color: #111;
  background: #ffd84d;
  font-weight: 500;
}

.content-box h1 {
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1.25;
  margin-bottom: 8px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}

.desc {
  font-size: 15px;
  line-height: 1.55;
  max-height: 92px;
  overflow: hidden;
  color: rgba(255,255,255,.92);
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
  margin-bottom: 8px;
}

.price {
  font-size: 22px;
  font-weight: 700;
  color: #ffdf5d;
  margin-bottom: 8px;
}

.stats {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: rgba(255,255,255,.86);
  margin-bottom: 12px;
}

.buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #ff6a00, #ffcf33);
  color: #111;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 26px rgba(255,140,0,.35);
}

.buy-btn:active {
  transform: scale(.97);
}

.right-actions {
  position: absolute;
  right: 14px;
  bottom: calc(112px + env(safe-area-inset-bottom));
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-btn {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(10px);
  font-size: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.action-btn:active {
  transform: scale(.94);
}

.empty-state {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #fff;
  background: #111;
}

@media (min-width: 768px) {
  body {
    background: #111;
  }

  .feed {
    max-width: 520px;
    margin: 0 auto;
    border-left: 1px solid rgba(255,255,255,.08);
    border-right: 1px solid rgba(255,255,255,.08);
  }

  .topbar {
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 380px) {
  .content-box {
    right: 74px;
    left: 12px;
  }

  .buy-btn {
    font-size: 14px;
    padding: 10px 15px;
  }

  .action-btn {
    width: 46px;
    height: 46px;
  }
}

.feed-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.detail-btn:active {
  transform: scale(.97);
}

@media (max-width: 380px) {
  .feed-buttons {
    gap: 6px;
  }

  .detail-btn {
    font-size: 13px;
    padding: 10px 12px;
  }
}