@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Jura:wght@600;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #fff;
}

.nav-logo img {
  max-width: 65px;
  width: auto;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

section .header {
  margin-bottom: 0.75rem;
  color: #fff;
  text-align: center;
  font-size: 2.25rem;
  font-weight: 600;
}

.sub-header {
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
  color: #a1a1aa;
  line-height: 1.55;
}

.cart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.cart-panel {
  padding: 1.35rem;
  background: linear-gradient(160deg, #2c2c30 0%, #27272a 55%, #232326 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}

.cart-panel__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.15rem;
  font-family: "Jura", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cart-panel__title i {
  color: var(--bibrik-accent, #cc1c39);
  font-size: 1.35rem;
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 2.5rem 1rem;
  text-align: center;
  color: #a1a1aa;
}

.cart-empty i {
  font-size: 2.5rem;
  color: rgba(204, 28, 57, 0.55);
}

.cart-empty a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  color: #fff;
  font-weight: 600;
}

.cart-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.22s ease, background 0.22s ease;
}

.cart-item:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(204, 28, 57, 0.22);
}

.cart-item__media {
  width: 88px;
  height: 66px;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item__body {
  min-width: 0;
}

.cart-item__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.cart-item__price {
  margin: 0;
  font-size: 0.88rem;
  color: #a1a1aa;
}

.cart-item__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.cart-item__sum {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.qty button {
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.qty button:hover {
  background: rgba(204, 28, 57, 0.35);
}

.qty input {
  width: 44px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0;
  line-height: 34px;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item__remove {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cart-item__remove:hover {
  background: rgba(204, 28, 57, 0.18);
  border-color: rgba(204, 28, 57, 0.4);
  color: #fff;
}

.cart-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cart-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  font-family: "Jura", sans-serif;
}

.cart-form input,
.cart-form textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-form input::placeholder,
.cart-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.cart-form input:focus,
.cart-form textarea:focus {
  outline: none;
  border-color: rgba(204, 28, 57, 0.45);
  box-shadow: 0 0 0 3px rgba(204, 28, 57, 0.2);
}

.cart-form input.field-error,
.cart-form textarea.field-error {
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.25);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(204, 28, 57, 0.12);
  border: 1px solid rgba(204, 28, 57, 0.28);
}

.cart-total span:first-child {
  font-family: "Jura", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.cart-total span:last-child {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.cart-checkout {
  width: 100%;
  margin-top: 0.25rem;
}

.cart-checkout:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cart-loading {
  padding: 2rem 1rem;
  text-align: center;
  color: #a1a1aa;
}

.site-footer__social a i {
  font-size: 1.35rem;
  color: #fff;
}

@media (width < 900px) {
  .cart-grid {
    grid-template-columns: 1fr;
  }
}

@media (width < 640px) {
  .container {
    padding: 2.5rem 1rem 3rem;
  }

  .cart-item {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .cart-item__media {
    width: 72px;
    height: 54px;
    grid-row: 1 / span 2;
  }

  .cart-item__actions {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}
