/* Shop, checkout and payment confirmation */

/* Product grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.product {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.product:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.product__visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-soft);
}

.product__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}

.product:hover .product__visual img {
  transform: scale(1.04);
}

.product__placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
}

.product__placeholder span {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
}

.product__index {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.3rem 0.55rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.product__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.product__name {
  margin: 0 0 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.1;
}

.product__text {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.product__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.product__price {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
}

.product__soon {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.shop-empty {
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.shop-note {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Steps */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.steps__item {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.steps__item span {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.steps__item + .steps__item::before {
  width: 1.5rem;
  height: 1px;
  margin-right: 0.5rem;
  background: var(--line-strong);
  content: "";
}

.steps__item.is-current {
  color: var(--ink);
}

.steps__item.is-current span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.steps__item.is-done span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* Checkout */
.checkout-head .page-head__title {
  font-size: var(--step-3);
}

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding-top: clamp(2rem, 5vw, 3rem);
}

.checkout fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.checkout legend {
  float: none;
  width: auto;
  margin-bottom: 1.25rem;
}

.checkout .form-control {
  padding: 0.8rem 0.9rem;
}

.checkout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
  margin-top: 2rem;
}

.checkout__aside {
  padding: clamp(1.5rem, 4vw, 2rem);
  background: var(--surface-soft);
}

.checkout__how {
  margin: 1.25rem 0 1.5rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.checkout__how li + li {
  margin-top: 0.75rem;
}

.checkout__how li::marker {
  color: var(--accent);
  font-family: var(--font-mono);
}

.trust {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
  list-style: none;
}

.trust i {
  width: 1.25rem;
  color: var(--accent);
}

/* Success */
.success {
  max-width: 760px;
  margin: 0 auto;
  padding-top: clamp(2rem, 6vw, 4rem);
}

.success__check {
  display: block;
  width: 4rem;
  height: 4rem;
  margin-top: 2.5rem;
  color: var(--success);
}

.success__check circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 700ms var(--ease) forwards;
}

.success__check path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 500ms var(--ease) 500ms forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.success__next {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface-soft);
}

.success__next ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
  margin-top: 2rem;
}

@media (max-width: 991.98px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkout {
    grid-template-columns: 1fr;
  }
}

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

  .steps__item + .steps__item::before {
    display: none;
  }
}
