:root {
  --background: #f4f8fb;
  --surface: #ffffff;
  --text: #152238;
  --soft-text: #526174;
  --line: #cbd6e2;
  --blue: #2563eb;
  --green: #16a34a;
  --yellow: #facc15;
  --shadow: 0 16px 40px rgba(21, 34, 56, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.banner {
  background: var(--blue);
  color: #ffffff;
  padding: 36px 20px;
  text-align: center;
}

.banner h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin: 0 0 10px;
}

.banner p {
  font-size: 1.15rem;
  margin: 0;
}

.tabs {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 14px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tabs a {
  border: 2px solid var(--blue);
  border-radius: 8px;
  color: var(--blue);
  font-weight: 800;
  padding: 10px 18px;
}

main {
  margin: 0 auto;
  max-width: 1100px;
  padding: 24px 18px 56px;
}

.example-summary,
.shop-section,
.cart-section,
.checkout-section {
  margin: 0 0 28px;
}

.example-summary {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.example-summary > div,
.cart-box,
form,
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.example-summary > div {
  padding: 22px;
}

.example-picture {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(250, 204, 21, 0.2)),
    #ffffff;
  display: flex;
  justify-content: center;
  min-height: 220px;
}

.example-picture span,
.product-photo span {
  color: var(--soft-text);
  font-weight: 900;
}

.label {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 10px;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

p {
  color: var(--soft-text);
  line-height: 1.5;
}

.section-heading {
  margin-bottom: 16px;
}

.product-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.product-photo {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: #eaf1fb;
  border: 2px dashed var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.product-photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-photo img + span {
  display: none;
}

.product-photo.missing-image img {
  display: none;
}

.product-photo.missing-image span {
  display: inline;
}

.price {
  background: var(--yellow);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-weight: 900;
  padding: 7px 12px;
  width: fit-content;
}

.quantity-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 44px 1fr 44px;
}

.quantity-row button {
  aspect-ratio: 1;
  background: var(--blue);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 900;
}

.quantity-row span {
  background: #eef4fb;
  border-radius: 8px;
  font-weight: 900;
  padding: 10px;
  text-align: center;
}

.cart-box,
form {
  padding: 18px;
}

.cart-box ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.cart-box li,
.total-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.total-row {
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
  padding-top: 14px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  font-weight: 800;
  gap: 6px;
}

input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.main-button {
  background: var(--green);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  padding: 13px 16px;
}

.main-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.success {
  color: var(--green);
  font-weight: 900;
  margin: 0;
}

@media (max-width: 800px) {
  .tabs {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs a {
    text-align: center;
  }

  .example-summary,
  .product-grid {
    grid-template-columns: 1fr;
  }
}
