﻿:root {
  --bg: #fff9fb;
  --bg-2: #f6fbff;
  --bg-3: #f5fff7;
  --card: #edf6fa;
  --text: #5a3e2d;
  --muted: #85766a;
  --accent: #7d0101;
  --accent-soft: #f0be83;
  --border: #73543c;
  --success: #2f9e78;
  --error: #dd4f78;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Nunito", "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 10% 12%, #ffe6ef 0%, transparent 28%),
    radial-gradient(circle at 88% 16%, #dff1ff 0%, transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 50%, var(--bg-3));
}

.hero {
  border-bottom: 1px solid #ead9c8;
  background: linear-gradient(120deg, #ffd9e8 0%, #dff0ff 55%, #e4ffe9 100%);
}

.hero-inner {
  width: min(1100px, 94%);
  margin: 0 auto;
  padding: 1.4rem 0 1.6rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
}

.hero p {
  margin: 0.35rem 0 0.8rem;
  color: #675f85;
}

.toolbar {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar input {
  min-width: 280px;
  width: 100%;
  max-width: 560px;
  border: 1px solid #e7d6ee;
  border-radius: 12px;
  padding: 0.72rem 0.95rem;
  color: #563f59;
  background: #ffffffcf;
}

.toolbar input:focus,
.checkout input:focus {
  outline: 2px solid #f8b6d0;
  border-color: #f4b2cd;
}

.results-count {
  font-size: 0.94rem;
  color: #756f92;
}

.layout {
  width: min(1000px, 94%);
  margin: 1.1rem auto 2rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.page-btn {
  border: 1px solid #e8d8f1;
  background: #fff6fb;
  color: #6d628d;
  border-radius: 10px;
  padding: 0.35rem 0.62rem;
  cursor: pointer;
}

.page-btn.active {
  border-color: #f7a9c8;
  background: linear-gradient(120deg, #ffc1d9, #ffd7ea);
  color: #4f4869;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

.card {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 0.9rem;
  align-items: center;
  min-height: 150px;
  border-radius: 22px;
  border: 4px solid var(--border);
  background: linear-gradient(165deg, #e8f3f7 0%, #dce8ee 100%);
  padding: 0.8rem;
}

.card-media-wrap {
  border: 5px solid #d7dc2c;
  border-radius: 16px;
  background: #edf7fb;
  padding: 0.3rem;
  height: 120px;
}

.card-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 11px;
  background: #eef6fb;
}

.card-content h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
  color: #8b531e;
}

.meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.price {
  margin-top: 0.25rem;
  font-weight: 800;
  font-size: 1rem;
  color: #5a3e2d;
}

.stock {
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.stock-ok {
  color: #148a3c;
}

.stock-out {
  color: #dd4f78;
}

.stock-unlimited {
  color: #7a7593;
}

.card button {
  margin-top: 0.45rem;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 0.48rem 0.9rem;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
}

.card button:hover {
  filter: brightness(1.08);
}

.card button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  background: #9b9090;
}

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.hidden {
  display: none;
}

.checkout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 29, 45, 0.5);
}

.checkout {
  background: #ffffff;
  border: 2px solid #e8d2f0;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.checkout-popup {
  position: relative;
  width: min(440px, 92%);
  margin: 8vh auto 0;
  z-index: 45;
}

.checkout-close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  color: #6f648d;
  font-size: 1.7rem;
  cursor: pointer;
}

.checkout h2 {
  margin-top: 0;
}

.checkout label {
  display: block;
  margin-bottom: 0.35rem;
  color: #6f648d;
}

.checkout input {
  width: 100%;
  border: 1px solid #e7d6ee;
  border-radius: 11px;
  padding: 0.65rem;
  margin-bottom: 0.75rem;
}

.selected-item {
  border: 1px dashed #e8d2f0;
  border-radius: 12px;
  padding: 0.7rem;
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
  background: linear-gradient(120deg, #fff8fc, #f7fbff);
}

.muted {
  color: #7a7593;
}

.status {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  color: var(--success);
}

.status.error {
  color: var(--error);
}

.empty {
  grid-column: 1 / -1;
  background: #ffffffde;
  border: 1px dashed #e6d9ef;
  border-radius: 14px;
  padding: 1rem;
  color: #7a7593;
}

@media (max-width: 720px) {
  .card {
    grid-template-columns: 110px 1fr;
    min-height: 126px;
    border-width: 3px;
  }

  .card-media-wrap {
    height: 96px;
  }

  .card-content h3 {
    font-size: 1.05rem;
  }

  .stock {
    font-size: 0.9rem;
  }
}
