/* Appily Twentyseven — Picking Loom cart */

.cr27-loom {
  --cr27-wine: var(--ts-wine, #8B2942);
  --cr27-gold: var(--ts-gold, #C4A77D);
  --cr27-ink: var(--ts-ink, #111);
  --cr27-paper: var(--ts-paper, #fff);
  --cr27-surface: var(--ts-surface, #f5f5f5);
  --cr27-pale: var(--ts-gold-pale, #f3ede4);
  background: var(--cr27-paper);
}

/* Hero */
.cr27-banner {
  background: var(--cr27-ink);
  color: var(--cr27-paper);
  padding: 42px 0 54px;
  position: relative;
  overflow: hidden;
}
.cr27-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 24px,
      rgba(196, 167, 125, .05) 24px,
      rgba(196, 167, 125, .05) 25px
    );
  pointer-events: none;
}
.cr27-banner-inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}
.cr27-kicker {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cr27-gold);
  margin: 0 0 10px;
}
.cr27-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.65rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  max-width: 14ch;
}
.cr27-title em {
  font-style: italic;
  color: var(--cr27-gold);
}
.cr27-lede {
  margin: 14px 0 0;
  max-width: 44ch;
  font-size: .92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .68);
}
.cr27-stamp {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 14px 18px;
  border: 1px dashed rgba(196, 167, 125, .45);
  color: var(--cr27-gold);
  text-align: right;
  line-height: 1.65;
}

/* Stage */
.cr27-stage {
  padding: 0 0 72px;
}

/* Empty loom */
.cr27-empty {
  margin-top: -24px;
  position: relative;
  z-index: 2;
  border: 1px solid var(--ts-line);
  background: var(--cr27-pale);
  padding: 48px 32px;
  text-align: center;
}
.cr27-empty-loom {
  width: min(320px, 80%);
  height: 8px;
  margin: 0 auto 28px;
  background: repeating-linear-gradient(
    90deg,
    var(--cr27-wine) 0,
    var(--cr27-wine) 12px,
    transparent 12px,
    transparent 20px
  );
  opacity: .35;
  position: relative;
}
.cr27-empty-loom::before,
.cr27-empty-loom::after {
  content: '';
  position: absolute;
  top: -18px;
  width: 3px;
  height: 44px;
  background: var(--cr27-gold);
  opacity: .5;
}
.cr27-empty-loom::before { left: 0; }
.cr27-empty-loom::after { right: 0; }
.cr27-empty h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 10px;
}
.cr27-empty p {
  margin: 0;
  color: var(--ts-muted);
  font-size: .92rem;
  max-width: 38ch;
  margin-inline: auto;
  line-height: 1.55;
}

/* Layout grid */
.cr27-layout {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(260px, 320px);
  gap: 0;
  margin-top: -28px;
  position: relative;
  z-index: 2;
  align-items: start;
}

/* Cold chain rail */
.cr27-cold-rail {
  background: linear-gradient(180deg, #1a1a1a 0%, var(--cr27-wine) 45%, #1a1a1a 100%);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  position: sticky;
  top: 88px;
}
.cr27-temp-badge {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: ui-monospace, Consolas, monospace;
  font-size: .62rem;
  letter-spacing: .2em;
  color: var(--cr27-gold);
  padding: 12px 0;
  border-top: 1px dashed rgba(196, 167, 125, .4);
  border-bottom: 1px dashed rgba(196, 167, 125, .4);
  margin-bottom: 20px;
}
.cr27-cold-ticks {
  flex: 1;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--cr27-gold) 0%,
    rgba(196, 167, 125, .3) 60%,
    rgba(196, 167, 125, .15) 100%
  );
  border-radius: 2px;
  position: relative;
  min-height: 120px;
}
.cr27-cold-ticks::after {
  content: '';
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 8px rgba(125, 211, 252, .6);
}
.cr27-lot-count {
  margin-top: 20px;
  text-align: center;
  color: var(--cr27-paper);
  padding: 0 6px;
}
.cr27-lot-count strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--cr27-gold);
}
.cr27-lot-count span {
  display: block;
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .65;
  margin-top: 4px;
}

/* Loom bands */
.cr27-loom {
  border: 1px solid var(--ts-line);
  border-left: 0;
  background: var(--cr27-paper);
}
.cr27-loom-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--ts-line);
  background: var(--cr27-surface);
}
.cr27-loom-head h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
}
.cr27-loom-head span {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ts-muted);
}
.cr27-bands {
  display: grid;
}
.cr27-band {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px dashed var(--ts-line);
  position: relative;
}
.cr27-band::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cr27-wine);
  opacity: 0;
  transition: opacity .2s;
}
.cr27-band:hover::before {
  opacity: 1;
}
.cr27-band:nth-child(even) {
  background: rgba(245, 245, 245, .45);
}
.cr27-lot {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--cr27-wine);
  font-weight: 700;
  text-align: center;
}
.cr27-product {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.cr27-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border: 1px solid var(--ts-line);
  background: var(--cr27-surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cr27-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cr27-thumb-placeholder {
  font-size: 1.2rem;
  opacity: .35;
}
.cr27-product-info {
  min-width: 0;
}
.cr27-product-info h3 {
  font-family: var(--font-display);
  font-size: .98rem;
  margin: 0 0 4px;
  font-weight: 600;
  line-height: 1.25;
}
.cr27-product-info h3 a {
  color: inherit;
  text-decoration: none;
}
.cr27-product-info h3 a:hover {
  color: var(--cr27-wine);
}
.cr27-meta {
  font-size: .78rem;
  color: var(--ts-muted);
  margin: 0;
}
.cr27-unit-price {
  font-size: .82rem;
  color: var(--ts-muted);
  white-space: nowrap;
}
.cr27-qty-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--ts-line);
  background: var(--cr27-paper);
}
.cr27-qty-btn {
  width: 32px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  color: var(--cr27-ink);
  transition: .15s;
}
.cr27-qty-btn:hover {
  background: var(--cr27-pale);
  color: var(--cr27-wine);
}
.cr27-qty-wrap input[type="number"] {
  width: 44px;
  height: 36px;
  border: 0;
  border-left: 1px solid var(--ts-line);
  border-right: 1px solid var(--ts-line);
  text-align: center;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  -moz-appearance: textfield;
}
.cr27-qty-wrap input[type="number"]::-webkit-outer-spin-button,
.cr27-qty-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cr27-line-total {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  min-width: 72px;
  text-align: right;
}

.cr27-loom-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 24px;
  border-top: 1px solid var(--ts-line);
  background: var(--cr27-surface);
}

/* Settlement shuttle */
.cr27-shuttle {
  border: 1px solid var(--ts-line);
  border-left: 0;
  background: var(--cr27-pale);
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
}
.cr27-shuttle-perf {
  height: 12px;
  background:
    radial-gradient(circle at 6px 0, var(--cr27-paper) 5px, transparent 5px);
  background-size: 12px 12px;
  background-position: 0 0;
  margin-bottom: -1px;
}
.cr27-shuttle-body {
  padding: 24px 22px 28px;
  flex: 1;
}
.cr27-shuttle-kicker {
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cr27-wine);
  font-weight: 700;
  margin: 0 0 6px;
}
.cr27-shuttle-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 20px;
  font-weight: 600;
}
.cr27-settle-rows {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.cr27-settle-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: .88rem;
  color: var(--ts-muted);
}
.cr27-settle-row strong {
  color: var(--cr27-ink);
  font-weight: 600;
}
.cr27-settle-divider {
  border: 0;
  border-top: 1px dashed rgba(139, 41, 66, .35);
  margin: 4px 0 14px;
}
.cr27-settle-grand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
}
.cr27-settle-grand span {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cr27-wine);
}
.cr27-settle-grand strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--cr27-ink);
}
.cr27-ship-note {
  font-size: .78rem;
  color: var(--ts-muted);
  line-height: 1.5;
  margin: 0 0 20px;
  padding: 10px 12px;
  background: var(--cr27-paper);
  border: 1px solid var(--ts-line);
}
.cr27-ship-note em {
  font-style: normal;
  color: var(--cr27-wine);
  font-weight: 600;
}

/* Buttons */
.cr27-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border: 2px solid var(--cr27-ink);
  background: var(--cr27-ink);
  color: var(--cr27-paper);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: .2s;
  text-decoration: none;
  font-family: inherit;
}
.cr27-btn:hover {
  background: var(--cr27-wine);
  border-color: var(--cr27-wine);
}
.cr27-btn-soft {
  background: var(--cr27-paper);
  color: var(--cr27-ink);
  border-color: var(--ts-line);
}
.cr27-btn-soft:hover {
  background: var(--cr27-pale);
  border-color: var(--cr27-wine);
  color: var(--cr27-wine);
}
.cr27-btn-outline {
  background: transparent;
  color: var(--cr27-ink);
  border-color: var(--cr27-ink);
}
.cr27-btn-outline:hover {
  background: var(--cr27-ink);
  color: var(--cr27-paper);
}
.cr27-btn-block {
  width: 100%;
  margin-bottom: 10px;
}
.cr27-btn-wine {
  background: var(--cr27-wine);
  border-color: var(--cr27-wine);
}
.cr27-btn-wine:hover {
  background: var(--cr27-ink);
  border-color: var(--cr27-ink);
}

@media (max-width: 960px) {
  .cr27-layout {
    grid-template-columns: 1fr;
    margin-top: 0;
  }
  .cr27-cold-rail {
    flex-direction: row;
    padding: 14px 20px;
    gap: 16px;
    min-height: auto;
    position: static;
  }
  .cr27-temp-badge {
    writing-mode: horizontal-tb;
    transform: none;
    border: 0;
    padding: 0;
    margin: 0;
  }
  .cr27-cold-ticks {
    width: 80px;
    height: 4px;
    min-height: 0;
    flex: none;
  }
  .cr27-cold-ticks::after {
    top: 50%;
    left: 12%;
    transform: translate(-50%, -50%);
  }
  .cr27-lot-count {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
  }
  .cr27-lot-count strong {
    font-size: 1.1rem;
  }
  .cr27-lot-count span {
    margin: 0;
  }
  .cr27-loom {
    border-left: 1px solid var(--ts-line);
  }
  .cr27-shuttle {
    border-left: 1px solid var(--ts-line);
    position: static;
  }
}

@media (max-width: 640px) {
  .cr27-band {
    grid-template-columns: 36px 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 10px 12px;
  }
  .cr27-lot {
    grid-row: 1 / 4;
    align-self: start;
    padding-top: 4px;
  }
  .cr27-product {
    grid-column: 2 / 4;
  }
  .cr27-unit-price {
    grid-column: 2;
  }
  .cr27-qty-wrap {
    grid-column: 3;
    justify-self: end;
  }
  .cr27-line-total {
    grid-column: 2 / 4;
    text-align: right;
    padding-top: 2px;
    border-top: 1px dashed var(--ts-line);
    margin-top: 4px;
    padding-top: 10px;
  }
  .cr27-loom-head,
  .cr27-band,
  .cr27-loom-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .cr27-shuttle-body {
    padding: 20px 16px 24px;
  }
}
