/* ==========================================
   PUMPKIN DUKE — CART PAGE
   Loads after master.css + master-wc.css. Tablet/mobile stack at 999px.
   Self-contained where global classes are unconfirmed (summary card, full-width
   buttons, section headings are all styled here, scoped). Depends only on the
   confirmed globals: .container .section .products-grid .btn* .divider
   .section-eyebrow .pd-icon and the master design tokens.
   ========================================== */

/* ------------------------------------------
   PAGE HEAD
   ------------------------------------------ */
.cart-page-head {
  margin-bottom: var(--space-6);
  text-align: center;
}
.cart-page-title {
  font-family: var(--font-display);
  font-size: var(--text-h2, 2.25rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-white);
  margin: 0 0 var(--space-2);
}
.cart-page-sub {
  max-width: 60ch;
  margin: 0 auto;
  font-size: var(--text-small);
  line-height: 1.6;
  color: var(--color-gray);
}

/* ------------------------------------------
   LAYOUT  (items | summary)
   ------------------------------------------ */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: var(--space-6);
  align-items: start;
}
.cart-layout--empty {
  display: block;
}

/* ------------------------------------------
   CART ITEMS
   ------------------------------------------ */
.pd-cart-items {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}
.pd-cart-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}
.pd-cart-item-thumb {
  display: block;
  width: 96px;
  height: 96px;
  line-height: 0;
}
.pd-cart-item-thumb img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.pd-cart-item-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.pd-cart-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.pd-cart-item-name {
  font-family: var(--font-display);
  font-size: var(--text-h5);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--color-white);
  transition: color var(--t-base);
}
a.pd-cart-item-name:hover {
  color: var(--color-primary);
}
.pd-cart-item-remove {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--color-gray-dark);
  line-height: 0;
  transition: color var(--t-base);
}
.pd-cart-item-remove .pd-icon {
  width: 18px;
  height: 18px;
}
.pd-cart-item-remove:hover {
  color: var(--color-danger-text);
}

/* item meta — variations + addons + size + gift (Woo's <dl class="variation">) */
.woocommerce-cart .pd-cart-item-meta {
  margin: 0;
}
.woocommerce-cart .pd-cart-item-meta .variation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px var(--space-2);
  margin: 0;
  font-size: var(--text-micro);
  line-height: 1.5;
}
.woocommerce-cart .pd-cart-item-meta .variation dt {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-gray-dark);
}
.woocommerce-cart .pd-cart-item-meta .variation dd {
  margin: 0;
  color: var(--color-gray);
}
.woocommerce-cart .pd-cart-item-meta .variation dd p {
  margin: 0;
}

.pd-cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.pd-cart-item-unit {
  font-size: var(--text-small);
  color: var(--color-gray);
}
.pd-cart-item-line {
  margin-left: auto;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-white);
}

/* ------------------------------------------
   QUANTITY STEPPER
   ------------------------------------------ */
.pd-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  overflow: hidden;
  background-color: var(--color-surface-1);
}
.pd-qty-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--color-gray);
  background: none;
  cursor: pointer;
  transition: color var(--t-base), background-color var(--t-base);
}
.pd-qty-btn:hover {
  color: #0d0d0d;
  background-color: var(--color-primary);
}
.pd-qty-input {
  width: 44px;
  height: 36px;
  text-align: center;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-white);
  background: none;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  -moz-appearance: textfield;
  appearance: textfield;
}
.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pd-qty-input:focus {
  outline: none;
}

/* ------------------------------------------
   ORDER SUMMARY
   ------------------------------------------ */
.pd-cart-summary {
  position: sticky;
  top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  background-color: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.pd-cart-summary-title {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-white);
  margin: 0;
}
.pd-cart-summary .divider {
  margin: 0;
}
.pd-summary-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.pd-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}
.pd-summary-label {
  font-size: var(--text-small);
  letter-spacing: 0.02em;
  color: var(--color-gray);
}
.pd-summary-value {
  font-size: var(--text-body);
  color: var(--color-white);
}
.pd-summary-row--shipping {
  align-items: flex-start;
}
.pd-summary-note {
  max-width: 60%;
  font-size: var(--text-micro);
  line-height: 1.5;
  text-align: right;
  color: var(--color-gray-dark);
}
.pd-summary-row--total .pd-summary-label {
  font-family: var(--font-display);
  font-size: var(--text-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-white);
}
.pd-summary-total {
  font-size: var(--text-h5);
  font-weight: 700;
  color: var(--color-primary);
}
/* full-width CTAs regardless of whether a global .btn-full exists */
.pd-summary-action,
.pd-summary-continue {
  width: 100%;
  text-align: center;
}
.pd-summary-secure {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-micro);
  line-height: 1.4;
  color: var(--color-gray-dark);
  margin: 0;
}
.pd-summary-secure .pd-icon {
  width: 15px;
  height: 15px;
  color: var(--color-success-text);
}
.pd-summary-trust {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-1) 0 0;
  padding: var(--space-4) 0 0;
  list-style: none;
  border-top: 1px solid var(--color-border);
}
.pd-summary-trust li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-small);
  color: var(--color-gray);
}
.pd-summary-trust .pd-icon {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ------------------------------------------
   EMPTY STATE
   ------------------------------------------ */
.pd-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  max-width: 520px;
  margin: 0 auto;
  padding: var(--space-7, 4rem) var(--space-4);
}
.pd-cart-empty-img {
  width: 220px;
  max-width: 60%;
  height: auto;
  opacity: 0.9;
}
.pd-cart-empty-title {
  font-family: var(--font-display);
  font-size: var(--text-h3, 1.75rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-white);
  margin: 0;
}
.pd-cart-empty-text {
  font-size: var(--text-small);
  line-height: 1.65;
  color: var(--color-gray);
  margin: 0;
}
.pd-cart-empty .btn {
  margin-top: var(--space-2);
}

/* ------------------------------------------
   SHARED SECTION HEADINGS (scoped — no global dependency)
   ------------------------------------------ */
.pd-cart-related,
.pd-cart-testimonials {
  margin-top: var(--space-7, 4rem);
}
.pd-cart-related .section-head,
.pd-cart-testimonials .section-head {
  text-align: center;
  margin-bottom: var(--space-6);
}
.pd-cart-related .section-title,
.pd-cart-testimonials .section-title {
  font-family: var(--font-display);
  font-size: var(--text-h3, 1.75rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-white);
  margin: var(--space-2) 0 0;
}

/* ------------------------------------------
   BUSY (AJAX in flight)
   ------------------------------------------ */
[data-cart-content].is-busy {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity var(--t-base);
}

/* ------------------------------------------
   RESPONSIVE
   ------------------------------------------ */
@media (max-width: 999px) {
  .cart-layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .pd-cart-summary {
    position: static;
  }
}

@media (max-width: 560px) {
  .pd-cart-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: var(--space-3);
  }
  .pd-cart-item-thumb,
  .pd-cart-item-thumb img {
    width: 72px;
    height: 72px;
  }
  .pd-cart-item-bottom {
    gap: var(--space-2);
  }
  .pd-summary-note {
    max-width: 55%;
  }
}