/**
 * Cart page — premium, mobile-friendly layout for physical + digital items
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.gcart-page {
  --gcart-blue: #2f80ed;
  --gcart-navy: #1e3a8a;
  --gcart-ink: #0f172a;
  --gcart-muted: #64748b;
  --gcart-line: #e2e8f0;
  --gcart-bg: #f5f7fb;
  --gcart-ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(40rem 26rem at 0% -10%, rgba(47, 128, 237, 0.07), transparent 55%),
    radial-gradient(32rem 20rem at 100% 0%, rgba(30, 58, 138, 0.05), transparent 50%),
    var(--gcart-bg);
  color: var(--gcart-ink);
  min-height: 60vh;
  padding: 1.25rem 0 3.5rem;
  -webkit-font-smoothing: antialiased;
}

.gcart-wrap {
  width: 100%;
  max-width: 58rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .gcart-wrap { padding: 0 1.5rem; }
}

.gcart-hero {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.15rem;
  border-radius: 1.25rem;
  border: 1px solid #dbeafe;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(47, 128, 237, 0.12) 0%, transparent 55%),
    linear-gradient(165deg, #f8fbff 0%, #fff 72%);
  box-shadow: 0 14px 32px -24px rgba(30, 58, 138, 0.3);
}
.gcart-hero__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(145deg, #1e3a8a 0%, #2563eb 48%, #2f80ed 100%);
  box-shadow: 0 12px 22px -12px rgba(47, 128, 237, 0.7);
}
.gcart-hero__icon svg { width: 1.2rem; height: 1.2rem; }
.gcart-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gcart-blue);
}
.gcart-title {
  margin: 0.2rem 0 0;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gcart-navy);
  line-height: 1.2;
}
.gcart-lead {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--gcart-muted);
  line-height: 1.5;
}

.gcart-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid var(--gcart-line);
  background: #fff;
  box-shadow: 0 12px 30px -24px rgba(15, 23, 42, 0.2);
}
.gcart-empty__icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gcart-blue);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.gcart-empty__icon svg { width: 1.5rem; height: 1.5rem; }
.gcart-empty h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gcart-navy);
}
.gcart-empty p {
  margin: 0.45rem 0 1.25rem;
  font-size: 0.9rem;
  color: var(--gcart-muted);
}
.gcart-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.gcart-layout {
  display: grid;
  gap: 1.15rem;
}
@media (min-width: 900px) {
  .gcart-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
    align-items: start;
    gap: 1.35rem;
  }
}

.gcart-section {
  border-radius: 1.25rem;
  border: 1px solid var(--gcart-line);
  background: #fff;
  padding: 1.1rem 1.05rem 1.2rem;
  box-shadow: 0 12px 30px -24px rgba(15, 23, 42, 0.2);
}
.gcart-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}
.gcart-section__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--gcart-navy);
  letter-spacing: -0.02em;
}
.gcart-section__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--gcart-muted);
  font-weight: 600;
}

.gcart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gcart-item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: 1rem;
  border: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fbfdff 0%, #fff 100%);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.gcart-item:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 24px -20px rgba(47, 128, 237, 0.45);
}
@media (min-width: 640px) {
  .gcart-item {
    grid-template-columns: 5rem minmax(0, 1fr) auto;
    align-items: center;
  }
}

.gcart-item__thumb {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gcart-navy);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
}
@media (min-width: 640px) {
  .gcart-item__thumb { width: 5rem; height: 5rem; }
}
.gcart-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gcart-item__body { min-width: 0; }
.gcart-item__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.35;
}
.gcart-item__title a {
  color: var(--gcart-ink);
  text-decoration: none;
}
.gcart-item__title a:hover { color: var(--gcart-blue); }
.gcart-item__meta {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: var(--gcart-muted);
}
.gcart-item__badge {
  display: inline-flex;
  align-items: center;
  margin-top: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.gcart-item__price {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gcart-blue);
}

.gcart-item__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  grid-column: 1 / -1;
}
@media (min-width: 640px) {
  .gcart-item__actions {
    grid-column: auto;
    margin-top: 0;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
  }
}

.gcart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}
.gcart-qty input {
  width: 3.25rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 0.65rem;
  border: 1px solid var(--gcart-line);
  font-size: 0.88rem;
  text-align: center;
  font-family: inherit;
}
.gcart-qty input[readonly] {
  background: #f8fafc;
  color: var(--gcart-muted);
}
.gcart-qty button,
.gcart-remove {
  min-height: 2.5rem;
  min-width: 2.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid var(--gcart-line);
  background: #fff;
  color: var(--gcart-muted);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.gcart-qty button:hover {
  border-color: #bfdbfe;
  color: var(--gcart-blue);
  background: #eff6ff;
}
.gcart-remove {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff;
}
.gcart-remove:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}
.gcart-line-total {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gcart-ink);
  white-space: nowrap;
}

.gcart-summary {
  border-radius: 1.25rem;
  border: 1px solid #dbeafe;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(47, 128, 237, 0.1) 0%, transparent 55%),
    #fff;
  padding: 1.2rem 1.15rem 1.3rem;
  box-shadow: 0 16px 36px -24px rgba(30, 58, 138, 0.35);
}
@media (min-width: 900px) {
  .gcart-summary {
    position: sticky;
    top: 5.75rem;
  }
}
.gcart-summary__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gcart-navy);
  letter-spacing: -0.02em;
}
.gcart-totals {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.gcart-totals__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--gcart-muted);
}
.gcart-totals__row span:last-child {
  color: var(--gcart-ink);
  font-weight: 700;
}
.gcart-totals__row--total {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #dbeafe;
  font-size: 1.05rem;
  color: var(--gcart-navy);
  font-weight: 800;
}
.gcart-totals__row--total strong {
  font-size: 1.25rem;
  color: var(--gcart-navy);
  letter-spacing: -0.02em;
}
.gcart-summary__note {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  color: var(--gcart-muted);
  line-height: 1.45;
}

.gcart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.1rem;
}
.gcart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.7rem 1.1rem;
  border-radius: 0.9rem;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.25s var(--gcart-ease), box-shadow 0.25s ease, background 0.25s ease;
}
.gcart-btn svg { width: 1.05rem; height: 1.05rem; }
.gcart-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #1e3a8a, #2f80ed);
  box-shadow: 0 14px 26px -14px rgba(47, 128, 237, 0.75);
}
.gcart-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -14px rgba(47, 128, 237, 0.8);
}
.gcart-btn--ghost {
  color: var(--gcart-navy);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.gcart-btn--ghost:hover {
  background: #dbeafe;
  transform: translateY(-1px);
}
.gcart-btn--secondary {
  color: var(--gcart-blue);
  background: transparent;
  border: 1px solid transparent;
  font-weight: 700;
  min-height: 2.5rem;
}
.gcart-btn--secondary:hover {
  text-decoration: underline;
}

.gcart-related {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gcart-line);
}
.gcart-related h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gcart-navy);
}

@media (max-width: 639px) {
  .gcart-hero { padding: 1rem; }
  .gcart-section { padding: 1rem 0.9rem 1.1rem; }
  .gcart-item { padding: 0.75rem; gap: 0.7rem; }
  .gcart-item__actions {
    justify-content: space-between;
  }
  .gcart-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gcart-btn:hover,
  .gcart-item:hover {
    transform: none;
  }
}
