:root {
  --background: #ffffff;
  --text: #1a1a1a;
  --accent: #111111;
  --accent-alt: #5a5a5a;
  --border: #e6e6e6;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  --transition: 0.3s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f7fb;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.03));
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.main-content {
  width: min(1200px, 100%);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cart-hero {
  background: var(--background);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 40px);
  text-align: center;
}

.cart-title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 1.15;
  color: var(--text);
}

.cart-subtitle {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(34, 34, 34, 0.7);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.cart-items-section {
  background: var(--background);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cart-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cart-section-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text);
}

.item-count {
  font-size: 0.95rem;
  color: rgba(34, 34, 34, 0.65);
  font-weight: 500;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.empty-cart {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.empty-cart-icon {
  font-size: 4rem;
  opacity: 0.5;
}

.empty-cart h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text);
}

.empty-cart p {
  margin: 0;
  font-size: 1rem;
  color: rgba(34, 34, 34, 0.7);
}

.cart-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fafbff;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.cart-item:hover {
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.item-image {
  width: 120px;
  height: 120px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.12));
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.item-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.item-quantity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.quantity-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
  transform: scale(1.05);
}

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity-value {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
}

.item-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.remove-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--background);
  color: rgba(34, 34, 34, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.remove-btn:hover {
  background: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
  color: #dc3545;
}

.cart-summary {
  background: var(--background);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 32px;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cart-summary h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  color: rgba(34, 34, 34, 0.75);
}

.summary-row.total {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  padding-top: 8px;
}

.summary-value {
  font-weight: 600;
  color: var(--text);
}

.summary-row.total .summary-value {
  color: var(--accent);
  font-size: 1.4rem;
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  cursor: pointer;
  text-align: center;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #ffffff;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkout-btn {
  width: 100%;
}

.secondary-btn {
  width: 100%;
  background: var(--background);
  border-color: var(--border);
  color: var(--accent);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.secondary-btn:hover {
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 32px 20px 40px;
  margin-top: auto;
  width: 100%;
}

.footer-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(34, 34, 34, 0.78);
}

.footer-brand {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
}

.footer-links a {
  color: inherit;
  opacity: 0.75;
  transition: opacity var(--transition), color var(--transition);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  opacity: 1;
  color: var(--accent);
}

@media (max-width: 920px) {
  .page-wrapper {
    padding: 32px 16px 48px;
  }

  .cart-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cart-summary {
    position: static;
  }

  .cart-items-section {
    padding: 24px;
  }

  .cart-item {
    flex-direction: column;
  }

  .item-image {
    width: 100%;
    height: 200px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .cart-title {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
  }

  .cart-items-section {
    padding: 20px;
  }

  .cart-summary {
    padding: 24px;
  }

  .item-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-links {
    justify-content: center;
  }
}

