/* =========================================================
   BASE VARIABLES - PawsPals Theme
   ========================================================= */
:root {
  --accent: #ff7a59;
  --accent-2: #103252;
  --bg1: linear-gradient(180deg, #f6fbff 0%, #fffaf3 100%);
  --card: #ffffff;
  --muted: #7b8794;
  --radius: 18px;
  --container: 1200px;
}

/* =========================================================
   GLOBAL RESET
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial;
  background: var(--bg1);
  color: #10202b;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */
header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: var(--container);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 28px rgba(6, 12, 24, 0.08);
  z-index: 999;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-2);
}

.nav-links {
  flex: 1;
  margin-left: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links a {
  color: #213642;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.18s ease;
}

.nav-links a:hover {
  background: rgba(16, 50, 82, 0.04);
  transform: translateY(-3px);
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
main {
  flex: 1;
  margin-top: 80px;
  padding: 40px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* =========================================================
   CART CONTAINER
   ========================================================= */
.cart-container {
  width: 100%;
  max-width: 1100px;
}

.cart-container h2 {
  font-size: 32px;
  color: var(--accent-2);
  margin-bottom: 32px;
  font-weight: 700;
}

/* =========================================================
   CART CONTENT LAYOUT
   ========================================================= */
.cart-content {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
}

/* =========================================================
   CART ITEMS
   ========================================================= */
.cart-items {
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(10, 20, 30, 0.04);
}

.empty-cart {
  text-align: center;
  padding: 60px 24px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-cart h3 {
  font-size: 24px;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.empty-cart p {
  color: var(--muted);
  margin-bottom: 24px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(255, 122, 89, 0.14);
  transition: transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-6px);
}

/* =========================================================
   CART ITEM
   ========================================================= */
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr 120px 100px 40px;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background: #f8fbff;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(16, 50, 82, 0.06);
  transition: all 0.18s ease;
}

.cart-item:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 40, 60, 0.08);
}

.item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details h4 {
  color: var(--accent-2);
  font-size: 15px;
  margin-bottom: 6px;
}

.item-details p {
  color: var(--muted);
  font-size: 13px;
}

.item-price {
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}

/* =========================================================
   QUANTITY CONTROLS
   ========================================================= */
.item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid rgba(16, 50, 82, 0.08);
  border-radius: 8px;
  padding: 0 8px;
}

.qty-btn {
  background: none;
  border: none;
  color: var(--accent-2);
  font-weight: 700;
  cursor: pointer;
  padding: 6px;
  font-size: 16px;
  transition: all 0.18s ease;
}

.qty-btn:hover {
  color: var(--accent);
}

.item-quantity input {
  width: 40px;
  border: none;
  text-align: center;
  font-weight: 700;
  color: var(--accent-2);
  background: transparent;
  outline: none;
}

.item-total {
  font-weight: 800;
  color: var(--accent-2);
  text-align: right;
  min-width: 80px;
}

.remove-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 122, 89, 0.1);
  color: var(--accent);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.18s ease;
}

.remove-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

/* =========================================================
   CART SUMMARY
   ========================================================= */
.cart-summary {
  height: fit-content;
  position: sticky;
  top: 100px;
}

.summary-card {
  background: var(--card);
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(10, 20, 30, 0.04);
}

.summary-card h3 {
  font-size: 20px;
  color: var(--accent-2);
  margin-bottom: 20px;
  font-weight: 700;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  color: var(--muted);
}

.summary-row span:last-child {
  font-weight: 700;
  color: var(--accent-2);
}

.summary-divider {
  height: 1px;
  background: rgba(16, 50, 82, 0.08);
  margin: 16px 0;
}

.summary-row.total {
  font-size: 18px;
  padding: 16px 0;
}

.summary-row.total span:first-child {
  font-weight: 700;
  color: var(--accent-2);
}

.total-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent) !important;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.checkout-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 8px 20px rgba(255, 122, 89, 0.14);
  margin-top: 16px;
}

.checkout-btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(255, 122, 89, 0.2);
}

.continue-shopping {
  display: block;
  text-align: center;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-top: 12px;
  transition: all 0.18s ease;
}

.continue-shopping:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  margin-top: auto;
  padding: 28px;
  text-align: center;
  color: #8aa0b0;
  background: linear-gradient(
    180deg,
    rgba(16, 50, 82, 0.04),
    rgba(16, 50, 82, 0.02)
  );
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.18s ease;
}

footer a:hover {
  text-decoration: underline;
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */
@media (max-width: 768px) {
  header {
    padding: 8px 14px;
  }

  .brand {
    font-size: 0.9rem;
  }

  main {
    margin-top: 70px;
    padding: 24px 16px;
  }

  .cart-container h2 {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .cart-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cart-summary {
    position: static;
  }

  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }

  .item-quantity,
  .item-total,
  .remove-btn {
    display: none;
  }
}

@media (max-width: 480px) {
  header {
    width: calc(100% - 24px);
    padding: 8px 10px;
  }

  main {
    margin-top: 65px;
    padding: 16px 12px;
  }

  .cart-container h2 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .cart-items,
  .summary-card {
    padding: 16px;
    border-radius: 12px;
  }

  .empty-cart {
    padding: 40px 16px;
  }

  .empty-icon {
    font-size: 48px;
  }

  .empty-cart h3 {
    font-size: 18px;
  }

  .cart-item {
    padding: 12px;
    grid-template-columns: 60px 1fr;
    gap: 10px;
  }

  .item-image {
    width: 60px;
    height: 60px;
  }
}
