/* =========================================================
   GOLDEN HOUSE CART PAGE
   FULL CSS
========================================================= */

:root {
  --gh-cart-white: #ffffff;
  --gh-cart-cream: #fbf9f5;
  --gh-cart-black: #111111;
  --gh-cart-text: #383838;
  --gh-cart-muted: #737373;
  --gh-cart-gold: #bd8a34;
  --gh-cart-gold-dark: #93671f;
  --gh-cart-border: #e8e3dc;
  --gh-cart-error: #a73a3a;

  --gh-cart-heading-font: "Playfair Display", serif;
  --gh-cart-body-font: "DM Sans", sans-serif;
}


/* =========================================================
   PAGE RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

.gh-cart-page {
  width: 100%;

  background: var(--gh-cart-white);
  color: var(--gh-cart-black);

  font-family: var(--gh-cart-body-font);
}

a {
  color: inherit;
  text-decoration: none;
}

.gh-cart-page button {
  cursor: pointer;
  font: inherit;
}


/* =========================================================
   BACK LINK
========================================================= */

.gh-cart-back-link {
  width: fit-content;
  margin: 0 auto 22px;

  color: var(--gh-cart-muted);

  display: inline-flex;
  align-items: center;
  gap: 9px;

  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  transition: color 0.2s ease;
}

.gh-cart-back-link:hover {
  color: var(--gh-cart-gold-dark);
}


/* =========================================================
   HERO
========================================================= */

.gh-cart-hero {
  width: 100%;
  padding: 70px 5vw 40px;

  background:
    radial-gradient(
      circle at 50% 0%,
      #fdfbf8 0%,
      #ffffff 60%
    );

  text-align: center;
}

.gh-cart-eyebrow {
  margin: 0;

  color: var(--gh-cart-gold-dark);

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.gh-cart-hero h1 {
  margin: 14px 0 0;

  color: var(--gh-cart-black);

  font-family: var(--gh-cart-heading-font);
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  text-transform: uppercase;
}

.gh-cart-hero-line {
  width: 46px;
  height: 1px;
  margin: 20px auto 0;

  display: block;

  background: var(--gh-cart-gold);
}


/* =========================================================
   SECTION + LAYOUT
========================================================= */

.gh-cart-section {
  width: 100%;
  padding: 20px 5vw 90px;

  background: var(--gh-cart-white);
}

.gh-cart-layout {
  width: min(100%, 1300px);
  margin: 0 auto;

  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.95fr);
  align-items: start;
  gap: 30px;
}


/* =========================================================
   ITEMS PANEL
========================================================= */

.gh-cart-items-panel {
  padding: 8px 0 0;
}

.gh-cart-items-heading {
  margin-bottom: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--gh-cart-border);

  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.gh-cart-items-heading h2 {
  margin: 0;

  font-family: var(--gh-cart-heading-font);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
}

.gh-cart-items-heading span {
  color: var(--gh-cart-muted);

  font-size: 0.78rem;
}

.gh-cart-items-list {
  display: flex;
  flex-direction: column;
}


/* =========================================================
   CART ITEM ROW
========================================================= */

.gh-cart-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--gh-cart-border);

  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 20px;

  animation: ghCartItemReveal 0.3s ease;
}

.gh-cart-item-image {
  width: 80px;
  height: 88px;
  border-radius: 6px;

  background: var(--gh-cart-cream);
  color: #c7c0b4;

  display: grid;
  place-items: center;

  font-size: 1.4rem;
}

.gh-cart-item-details {
  min-width: 0;
}

.gh-cart-item-category {
  margin: 0 0 4px;

  color: var(--gh-cart-gold-dark);

  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gh-cart-item-details h3 {
  margin: 0;

  color: var(--gh-cart-black);

  font-size: 0.95rem;
  font-weight: 700;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gh-cart-item-variant {
  margin: 4px 0 0;

  color: var(--gh-cart-muted);

  font-size: 0.76rem;
}

.gh-cart-item-price-row {
  margin-top: 8px;

  display: flex;
  align-items: baseline;
  gap: 8px;
}

.gh-cart-item-price {
  color: var(--gh-cart-black);

  font-size: 0.84rem;
  font-weight: 700;
}

.gh-cart-item-original-price {
  color: var(--gh-cart-muted);

  font-size: 0.74rem;
  text-decoration: line-through;
}

.gh-cart-item-quantity {
  border: 1px solid var(--gh-cart-border);
  border-radius: 999px;

  display: flex;
  align-items: center;
  gap: 2px;
}

.gh-cart-qty-button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;

  background: transparent;
  color: var(--gh-cart-black);

  display: grid;
  place-items: center;

  font-size: 0.9rem;
  line-height: 1;

  transition: background-color 0.2s ease;
}

.gh-cart-qty-button:hover {
  background: var(--gh-cart-cream);
}

.gh-cart-qty-value {
  min-width: 26px;

  text-align: center;

  font-size: 0.82rem;
  font-weight: 700;
}

.gh-cart-item-total {
  min-width: 80px;

  color: var(--gh-cart-black);

  text-align: right;

  font-size: 0.9rem;
  font-weight: 700;
}

.gh-cart-remove-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;

  background: transparent;
  color: var(--gh-cart-muted);

  display: grid;
  place-items: center;

  font-size: 0.85rem;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.gh-cart-remove-button:hover {
  background: rgba(167, 58, 58, 0.1);
  color: var(--gh-cart-error);
}

.gh-cart-continue-link {
  width: fit-content;
  margin-top: 26px;

  color: var(--gh-cart-gold-dark);

  display: inline-flex;
  align-items: center;
  gap: 10px;

  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  transition: color 0.2s ease;
}

.gh-cart-continue-link:hover {
  color: var(--gh-cart-black);
}


/* =========================================================
   SUMMARY PANEL
========================================================= */

.gh-cart-summary-panel {
  padding: 32px 30px;
  border-radius: 8px;

  position: sticky;
  top: 130px;

  background: var(--gh-cart-cream);
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.gh-cart-summary-panel h2 {
  margin: 0 0 20px;

  font-family: var(--gh-cart-heading-font);
  font-size: 1.35rem;
  font-weight: 600;
  text-transform: uppercase;
}

.gh-cart-summary-row {
  margin-bottom: 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  color: var(--gh-cart-text);

  font-size: 0.84rem;
}

.gh-cart-summary-divider {
  height: 1px;
  margin: 6px 0 16px;

  display: block;

  background: var(--gh-cart-border);
}

.gh-cart-summary-total {
  margin-bottom: 22px;

  color: var(--gh-cart-black);

  font-size: 1rem;
  font-weight: 700;
}

.gh-cart-summary-total span:last-child {
  color: var(--gh-cart-gold-dark);

  font-family: var(--gh-cart-heading-font);
  font-size: 1.3rem;
}

.gh-cart-checkout-button {
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 1px solid var(--gh-cart-black);
  border-radius: 2px;

  background: var(--gh-cart-black);
  color: var(--gh-cart-white);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.gh-cart-checkout-button i {
  color: var(--gh-cart-gold);

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.gh-cart-checkout-button:hover {
  background: var(--gh-cart-gold-dark);
  border-color: var(--gh-cart-gold-dark);
}

.gh-cart-checkout-button:hover i {
  transform: translateX(4px);
}

.gh-cart-secure-note {
  margin: 16px 0 0;

  color: var(--gh-cart-muted);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  font-size: 0.7rem;
}

.gh-cart-secure-note i {
  color: var(--gh-cart-gold);
}


/* =========================================================
   EMPTY STATE
========================================================= */

.gh-cart-empty {
  width: min(100%, 460px);
  margin: 40px auto 0;

  display: none;
  flex-direction: column;
  align-items: center;

  text-align: center;
}

.gh-cart-section.is-empty .gh-cart-layout {
  display: none;
}

.gh-cart-section.is-empty .gh-cart-empty {
  display: flex;
}

.gh-cart-empty-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin-bottom: 22px;

  background: var(--gh-cart-cream);
  color: var(--gh-cart-gold);

  display: grid;
  place-items: center;
}

.gh-cart-empty-icon svg {
  width: 34px;
  height: 34px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gh-cart-empty h2 {
  margin: 0;

  font-family: var(--gh-cart-heading-font);
  font-size: 1.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.gh-cart-empty p {
  max-width: 360px;
  margin: 14px 0 0;

  color: var(--gh-cart-muted);

  font-size: 0.88rem;
  line-height: 1.75;
}

.gh-cart-empty-button {
  min-width: 200px;
  min-height: 56px;
  margin-top: 26px;
  padding: 0 26px;
  border: 1px solid var(--gh-cart-black);

  background: var(--gh-cart-black);
  color: var(--gh-cart-white);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.gh-cart-empty-button:hover {
  background: var(--gh-cart-gold-dark);
  border-color: var(--gh-cart-gold-dark);
}


/* =========================================================
   KEYFRAMES
========================================================= */

@keyframes ghCartItemReveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {
  .gh-cart-hero {
    padding: 60px 32px 34px;
  }

  .gh-cart-section {
    padding: 15px 32px 70px;
  }

  .gh-cart-layout {
    grid-template-columns: 1fr;
  }

  .gh-cart-summary-panel {
    position: static;
  }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {
  .gh-cart-hero {
    padding: 55px 20px 30px;
  }

  .gh-cart-hero h1 {
    font-size: 2.2rem;
  }

  .gh-cart-section {
    padding: 10px 20px 55px;
  }

  .gh-cart-item {
    grid-template-columns: 60px 1fr auto auto;
    grid-template-areas:
      "image details details details"
      "image quantity total remove";
    row-gap: 10px;
    column-gap: 12px;
  }

  .gh-cart-item-image {
    width: 60px;
    height: 68px;

    grid-area: image;
  }

  .gh-cart-item-details {
    grid-area: details;
  }

  .gh-cart-item-quantity {
    grid-area: quantity;
    justify-self: start;
  }

  .gh-cart-item-total {
    grid-area: total;
    justify-self: end;

    white-space: nowrap;
  }

  .gh-cart-remove-button {
    grid-area: remove;
    justify-self: end;
  }

  .gh-cart-summary-panel {
    padding: 26px 22px;
  }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .gh-cart-item {
    animation: none;
  }
}
