.categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  alight-items: center;
  justify-content: center;
  margin-top: 18px;
}

.categories::-webkit-scrollbar {
  display: none;
}

.category {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  color: #d3d7ff;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.category:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.category.active {
  border-bottom-color: #4d7cff;
  color: #fff;
}

.shop-card {
  border-radius: 16x;
  background: rgba(10, 12, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: blur(20px);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.product-card {
  border-radius: 4px;
  background: radial-gradient(circle at top, rgba(77, 124, 255, 0.12), rgba(10, 12, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
  border-color: rgba(129, 140, 248, 0.9);
}

.product-image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0 4px;
}

.product-image img {;
  max-width: 126px;
  height: auto;
  display: block;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.product-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-amount {
  font-size: 17px;
  font-weight: 700;
}

.product-name {
  font-size: 14px;
  font-weight: 400;
}

.product-buy {
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  color: #f9fafb;
}

.product-buy:active {
  transform: translateY(1px);
  opacity: 0.85;
}


body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;

  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(420px, 100%);
  border-radius: 16px;
  background: rgba(10,12,20,.96);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
  position: relative;
  padding: 18px;

  transform: scale(.95) translateY(10px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.modal-backdrop.is-open .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(177, 70, 51, 0.42);
  color: #fff;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(255,255,255,0.10);
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.modal-image {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.modal-image img {
  max-width: 220px;
  height: auto;
  display: block;
}

.modal-title {
  font-size: 32px;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

.modal-price {
  font-size: 18px;
  font-weight: 800;
  color: #dbeafe;
}

.modal-actions {
  width: 100%;
  margin-top: 6px;
}

.modal-pay {
  width: 100%;
  padding: 12px 14px;
  border-radius: 4px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  color: #f9fafb;
}

.modal-pay:active {
  transform: translateY(1px);
  opacity: 0.9;
}

.modal-description {
  font-size: 16px;
  color: #c0c0c0ff;
}

.modal-description a {
  text-decoration: none;
}

.modal-message {
  display: none;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 24px;
  text-align: center;
}

.modal-message.ok {
  display: block;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.35);
  color: #bbf7d0;
}

.modal-message.err {
  display: block;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.35);
  color: #fecaca;
}