/* ============================================================
   МИР ЭЛЬДОРИИ — стили страниц «Скачать» и «Магазин»
   Дополняет css/style.css (не изменяет её). Префикс: shop-
   Подключать ПОСЛЕ style.css.
   ============================================================ */

/* ---------- Превью в карточках (обе страницы) ---------- */
.shop-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 36, .5);
  margin-bottom: 1.1rem;
  overflow: hidden;
}
.shop-preview svg { width: 100%; height: auto; }

/* ---------- Карточка товара ---------- */
.shop-product { position: relative; display: flex; flex-direction: column; }
.shop-product h3 { margin-bottom: .5rem; }
.shop-product p { flex: 1; }
.shop-price {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--gold-300);
  margin: 1.1rem 0 .9rem;
}
.shop-price small { font-size: 1rem; }
.shop-price .old-price { font-size: 1rem; margin-right: 0; }
.shop-product .btn { align-self: flex-start; }

/* ---------- Примечания под сетками ---------- */
.shop-note { margin-top: 1.6rem; }

/* ---------- Корзина ---------- */
.shop-cart-empty { text-align: center; padding: 2rem 1rem; }
.shop-cart-empty p { color: var(--muted); margin-bottom: 1.3rem; }

.shop-cart-table { width: 100%; border-collapse: collapse; }
.shop-cart-table th,
.shop-cart-table td {
  padding: .9rem .8rem;
  border-bottom: 1px solid rgba(212, 175, 55, .14);
  text-align: left;
  font-size: .97rem;
  vertical-align: middle;
}
.shop-cart-table th { color: var(--muted); font-weight: 400; }
.shop-cart-table td.shop-cart-name { color: var(--text); }
.shop-cart-table .shop-num { white-space: nowrap; text-align: right; }
.shop-cart-table tfoot td {
  border-bottom: none;
  padding-top: 1.1rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--gold-300);
}

.shop-qty {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .15rem;
}
.shop-qty button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(212, 175, 55, .12);
  color: var(--gold-300);
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.shop-qty button:hover { background: rgba(212, 175, 55, .28); }
.shop-qty span { min-width: 2ch; text-align: center; font-weight: 700; }

.shop-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: .88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.shop-remove:hover { color: var(--gold-300); }

.shop-cart-delivery { margin-top: 1.2rem; }

/* ---------- Оформление заказа ---------- */
.shop-checkout { max-width: 760px; margin-inline: auto; }
.shop-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.shop-form label { display: block; font-size: .92rem; color: var(--muted); margin-bottom: 1.1rem; }
.shop-form label > .input { margin-top: .45rem; }
.shop-form textarea.input { border-radius: 18px; min-height: 96px; resize: vertical; }
.shop-form select.input {
  border-radius: 18px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9B0CC' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.6rem;
  cursor: pointer;
}
.shop-form select.input option { background: var(--navy-800); color: var(--text); }
.shop-form .btn { margin-top: .3rem; }
.shop-checkout .form-success { margin-top: .4rem; }

/* ---------- Адаптив ---------- */
@media (max-width: 720px) {
  .shop-form__row { grid-template-columns: 1fr; gap: 0; }

  /* таблица корзины складывается в карточки */
  .shop-cart-table thead { display: none; }
  .shop-cart-table tbody tr {
    display: block;
    border-bottom: 1px solid rgba(212, 175, 55, .18);
    padding: .8rem 0;
  }
  .shop-cart-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: none;
    padding: .35rem 0;
  }
  .shop-cart-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .88rem;
  }
  .shop-cart-table tbody td.shop-cart-name { font-weight: 700; }
  .shop-cart-table tfoot tr {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
  }
  .shop-cart-table tfoot td { padding: 1rem 0 0; }
}
