/* SCREEN 04 cart presentation. Cart state and pricing behavior remain in app.js. */

body:has(#cart.active) {
  background:
    radial-gradient(circle at 50% 0, rgba(210, 167, 104, .12), transparent 38rem),
    #33281f;
  color: #20150f;
}

body:has(#cart.active) .site-header .primary-nav button,
body:has(#cart.active) .site-header .header-category-nav button {
  color: rgba(255, 249, 238, .95);
  font-size: 10px;
  font-weight: 680;
}
body:has(#cart.active) .site-header .primary-nav button:hover,
body:has(#cart.active) .site-header .primary-nav button.is-active { color: #f1bd61; }

body:has(#cart.active) #cart {
  width: min(1340px, calc(100% - 16px));
  margin: 0 auto 34px;
  padding: 0;
  overflow: clip;
  border-radius: 0 0 17px 17px;
  background: linear-gradient(108deg, #fffaf2, #f7efe3 70%, #fffaf3);
  box-shadow: 0 28px 70px rgba(10, 6, 4, .24);
}

body:has(#cart.active) #cart > .narrow-shell {
  width: 100%;
  max-width: none;
  padding: 25px 28px 42px;
}

body:has(#cart.active) .cart-page > .narrow-shell > .breadcrumb,
body:has(#cart.active) .cart-page-heading .eyebrow,
body:has(#cart.active) .cart-page-heading p,
body:has(#cart.active) .checkout-progress { display: none; }

body:has(#cart.active) .cart-page-heading { margin: 0 0 18px; }
body:has(#cart.active) .cart-page-heading h1 {
  margin: 0;
  color: #17100c;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.15;
  font-weight: 760;
  letter-spacing: -.025em;
}
body:has(#cart.active) #cartPageCount { font-size: .58em; font-weight: 600; letter-spacing: 0; }

body:has(#cart.active) .cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

body:has(#cart.active) .cart-items { display: grid; gap: 12px; }
body:has(#cart.active) .cart-line {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 176px;
  gap: 15px;
  align-items: center;
  min-height: 132px;
  padding: 13px 15px;
  border: 1px solid rgba(116, 84, 55, .14);
  border-radius: 8px;
  background: rgba(255, 253, 249, .76);
  box-shadow: 0 7px 22px rgba(54, 36, 23, .05);
}
body:has(#cart.active) .cart-line img,
body:has(#cart.active) .cart-line-placeholder {
  display: block;
  width: 104px;
  height: 104px;
  border-radius: 6px;
  background: #eee5da;
  object-fit: cover;
}
body:has(#cart.active) .cart-line-info { min-width: 0; padding-right: 10px; }
body:has(#cart.active) .cart-line-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: #201711;
  font-size: 15px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -.012em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
body:has(#cart.active) .cart-line-info span {
  margin-top: 5px;
  color: #6a5848;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
}
body:has(#cart.active) .cart-line-info small {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: #574b42;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 550;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
body:has(#cart.active) .cart-line-actions {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 13px;
  padding-right: 4px;
}
body:has(#cart.active) .cart-line-price {
  color: #17100c;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1;
  font-weight: 780;
}
body:has(#cart.active) .cart-quantity {
  display: grid;
  grid-template-columns: 31px 42px 31px;
  border: 1px solid #d5c7b6;
  border-radius: 5px;
  overflow: hidden;
  background: #fffdf9;
}
body:has(#cart.active) .cart-quantity button {
  width: 31px;
  min-height: 32px;
  padding: 0;
  color: #271d16;
  background: #fffdf9;
  font-size: 15px;
  font-weight: 650;
}
body:has(#cart.active) .cart-quantity button:hover { background: #f3eadf; }
body:has(#cart.active) .cart-quantity input {
  width: 42px;
  min-height: 32px;
  padding: 3px;
  border: 0;
  border-inline: 1px solid #d5c7b6;
  border-radius: 0;
  color: #211811;
  background: #fffdf9;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  appearance: textfield;
}
body:has(#cart.active) .remove-line {
  position: absolute;
  top: 12px;
  right: 13px;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #17110d;
  background: transparent;
  font-size: 0;
  text-decoration: none;
}
body:has(#cart.active) .remove-line svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body:has(#cart.active) .remove-line:hover { color: #000; background: #eee6dc; border-radius: 50%; }

body:has(#cart.active) .cart-summary {
  position: sticky;
  top: 82px;
  display: block;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(116, 84, 55, .16);
  border-radius: 8px;
  background: rgba(255, 250, 243, .9);
  box-shadow: 0 10px 30px rgba(54, 36, 23, .07);
}
body:has(#cart.active) .cart-summary h2 {
  margin: 0 0 14px;
  color: #201711;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 760;
}
body:has(#cart.active) .cart-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 5px 0;
  color: #55483e;
  font-size: 11px;
  font-weight: 560;
}
body:has(#cart.active) .cart-summary > div strong { color: #2a2019; font-size: 12px; font-weight: 700; }
body:has(#cart.active) .cart-summary > .grand-total {
  margin-top: 8px;
  padding: 13px 0 3px;
  border-top: 1px solid rgba(116, 84, 55, .18);
  color: #211711;
  font-size: 14px;
  font-weight: 760;
}
body:has(#cart.active) .cart-summary > .grand-total strong { color: #17100c; font-size: 21px; font-weight: 800; }
body:has(#cart.active) .cart-summary button { width: 100%; }
body:has(#cart.active) #checkoutOpen {
  min-height: 44px;
  margin-top: 16px;
  border-radius: 5px;
  color: #fff;
  background: #1b130e;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}
body:has(#cart.active) #checkoutOpen:hover { background: #39271c; }
body:has(#cart.active) .cart-summary > .secondary {
  min-height: 32px;
  margin-top: 7px;
  padding: 5px;
  border: 0;
  color: #55483e;
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body:has(#cart.active) .cart-summary > small {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 64px;
  margin-top: 13px;
  padding: 13px 12px 11px 50px;
  border-radius: 6px;
  color: #5c4e42;
  background: #f8ead6;
  font-size: 9px;
  line-height: 1.38;
  font-weight: 520;
}
body:has(#cart.active) .cart-summary > small::before {
  content: "▣";
  position: absolute;
  left: 17px;
  top: 18px;
  color: #ae7427;
  font-size: 22px;
}
body:has(#cart.active) .cart-summary > small strong { color: #33261d; font-size: 10px; font-weight: 750; }
body:has(#cart.active) .cart-summary > small span { display: block; }

body:has(#cart.active) .empty-state {
  min-height: 300px;
  padding: 52px 28px;
  border: 1px dashed #cdbda7;
  border-radius: 8px;
  background: rgba(255, 253, 249, .72);
  box-shadow: none;
}
body:has(#cart.active) .empty-state h2 { color: #211711; font-size: 21px; font-weight: 750; }
body:has(#cart.active) .empty-state p { color: #62564c; font-weight: 520; }
body:has(#cart.active) .empty-state .primary { border-radius: 5px; font-weight: 700; }

body:has(#cart.active) .cart-line :focus-visible,
body:has(#cart.active) .cart-summary button:focus-visible { outline: 2px solid #b87c2d; outline-offset: 2px; }

@media (max-width: 1024px) {
  body:has(#cart.active) .cart-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
  body:has(#cart.active) .cart-line { grid-template-columns: 88px minmax(0, 1fr) 138px; min-height: 116px; }
  body:has(#cart.active) .cart-line img,
  body:has(#cart.active) .cart-line-placeholder { width: 88px; height: 88px; }
}

@media (max-width: 820px) {
  body:has(#cart.active) #cart { width: calc(100% - 12px); }
  body:has(#cart.active) #cart > .narrow-shell { padding: 20px 18px 34px; }
  body:has(#cart.active) .cart-layout { grid-template-columns: 1fr; }
  body:has(#cart.active) .cart-summary { position: static; }
}

@media (max-width: 600px) {
  body:has(#cart.active) #cart { width: calc(100% - 10px); margin-bottom: 16px; border-radius: 0 0 9px 9px; }
  body:has(#cart.active) #cart > .narrow-shell { padding: 15px 12px 24px; }
  body:has(#cart.active) .cart-page-heading { margin-bottom: 13px; }
  body:has(#cart.active) .cart-page-heading h1 { font-size: 21px; }
  body:has(#cart.active) .cart-items { gap: 9px; }
  body:has(#cart.active) .cart-line {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    min-height: 124px;
    padding: 10px;
  }
  body:has(#cart.active) .cart-line img,
  body:has(#cart.active) .cart-line-placeholder { width: 74px; height: 74px; }
  body:has(#cart.active) .cart-line-info { padding-right: 26px; }
  body:has(#cart.active) .cart-line-info strong { font-size: 12px; line-height: 1.3; }
  body:has(#cart.active) .cart-line-info span,
  body:has(#cart.active) .cart-line-info small { margin-top: 3px; font-size: 9px; }
  body:has(#cart.active) .cart-line-actions {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-right: 0;
  }
  body:has(#cart.active) .cart-line-price { font-size: 14px; }
  body:has(#cart.active) .cart-quantity { grid-template-columns: 27px 37px 27px; }
  body:has(#cart.active) .cart-quantity button { width: 27px; min-height: 29px; }
  body:has(#cart.active) .cart-quantity input { width: 37px; min-height: 29px; font-size: 10px; }
  body:has(#cart.active) .remove-line { top: 7px; right: 7px; }
  body:has(#cart.active) .cart-summary { padding: 15px 5px 4px; border: 0; background: transparent; box-shadow: none; }
  body:has(#cart.active) .cart-summary h2 { font-size: 14px; }
  body:has(#cart.active) .cart-summary > .grand-total strong { font-size: 20px; }
  body:has(#cart.active) #checkoutOpen { min-height: 43px; }
  body:has(#cart.active) .cart-summary > small { margin-top: 12px; }
}
