@font-face {
  font-family: "KeepCalm";
  src: url("fonts/KeepCalm-Medium.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KeepCalm";
  src: url("fonts/KeepCalm-Medium.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("fonts/Raleway-Medium.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-1: #2f1740;
  --bg-2: #0d1020;
  --bg-3: #050608;
  --card: rgba(18, 16, 32, 0.76);
  --card-strong: rgba(28, 23, 42, 0.88);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f6efe4;
  --muted: #c9bbab;
  --accent: #ffb703;
  --accent-2: #f4c95d;
  --accent-3: #d5a853;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 183, 3, 0.14), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(255, 183, 3, 0.08), transparent 24%),
    linear-gradient(180deg, #2e1841 0%, #140f23 46%, #050608 100%);
}

.buy-page {
  position: relative;
}

.buy-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 28px 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.14), transparent 78%);
  opacity: 0.35;
}

.page-shell {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 22px 0 44px;
  display: grid;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.hero,
.catalogue,
.basket-panel {
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  border-radius: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 42px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -35% auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 183, 3, 0.22), transparent 68%);
  pointer-events: none;
}

.brand-lockup {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: center;
}

.brand-mark {
  width: min(280px, 68vw);
  max-width: 280px;
  height: auto;
  display: block;
  justify-self: start;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.34));
}

.brand-copy {
  min-width: 0;
}

.eyebrow,
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.74rem;
  color: var(--accent-2);
  font-weight: 800;
}

.hero h1 {
  font-family: "KeepCalm", Georgia, serif;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 0.95;
  margin: 0.35rem 0 1rem;
  max-width: 14ch;
}

.lede {
  max-width: 60ch;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 1rem;
}

.series-hint {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.primary-btn,
.ghost-btn,
.quantity-btn,
.cart-remove {
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.primary-btn {
  background: linear-gradient(180deg, #ffd978 0%, #ffb703 100%);
  color: #1d1303;
  padding: 0.95rem 1.35rem;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(255, 183, 3, 0.22);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0.95rem 1.25rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.quantity-btn:hover,
.cart-remove:hover {
  transform: translateY(-1px);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 20px;
  align-items: start;
}

.catalogue,
.basket-panel {
  padding: 24px;
}

.catalogue {
  position: relative;
}

.catalogue::before,
.basket-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.product-grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.product-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--card-strong);
  position: relative;
  overflow: hidden;
}

.product-card::before,
.basket-item::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 183, 3, 0.08);
  pointer-events: none;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 183, 3, 0.1);
}

.product-name {
  margin: 0;
  font-family: "KeepCalm", Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.15;
}

.product-copy {
  margin: 0.5rem 0 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.product-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 183, 3, 0.08);
  color: #ffe1a3;
  font-size: 0.78rem;
  font-weight: 800;
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.34rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.quantity-btn {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.96);
  color: #1d1303;
  font-weight: 900;
  font-size: 1rem;
}

.quantity-value {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
}

.basket-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  min-height: 220px;
}

.basket-empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.basket-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.basket-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.basket-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.basket-item p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.basket-item strong {
  color: #fff;
}

.basket-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cart-remove {
  background: rgba(255, 183, 3, 0.12);
  color: #ffe6aa;
  padding: 0.5rem 0.85rem;
  font-weight: 800;
  border: 1px solid rgba(255, 183, 3, 0.12);
}

.basket-summary {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.summary-row.total {
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.08rem;
}

.checkout-btn {
  width: 100%;
  margin-top: 16px;
}

.basket-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.checkout-message {
  min-height: 1.5em;
  margin: 2px 4px 0;
  color: var(--accent-2);
  font-weight: 800;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label::before,
.section-label::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 183, 3, 0.34);
  background: rgba(255, 183, 3, 0.08);
}

@media (max-width: 980px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .brand-lockup {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    justify-self: center;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 14px, 1180px);
    padding-top: 12px;
  }

  .hero,
  .catalogue,
  .basket-panel {
    border-radius: 22px;
  }

  .catalogue,
  .basket-panel {
    padding: 18px;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    margin-top: 18px;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: min(68vw, 240px);
  }

  .hero h1 {
    font-size: clamp(1.95rem, 11vw, 2.8rem);
  }

  .lede {
    line-height: 1.65;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .product-actions {
    align-items: stretch;
  }

  .quantity-control {
    width: fit-content;
  }

}
