/* Appily twentythree — Fruité Picking Crate cart */

.page-picking-crate {
  --pc-gold: #c9a227;
  --pc-gold-dark: #a8861e;
  --pc-gold-pale: #f5ecd4;
  --pc-wood: #8b7355;
  --pc-wood-dark: #6d5a42;
  --pc-wood-pale: #f0ebe4;
  --pc-cream: #fdfbf7;
  --pc-charcoal: #1c1c1c;
  --pc-ink: #2c2c2c;
  --pc-muted: #7a7a7a;
  --pc-line: #e8e6e2;
  --pc-white: #ffffff;
  --pc-ok: #5a9e6f;
  --pc-ok-pale: #e6f4eb;
  background: var(--pc-cream);
}

/* ── Wooden dock hero ── */
.pc-dock {
  position: relative;
  background: var(--pc-wood-dark);
  color: #fff;
  padding: 52px 0 48px;
  overflow: hidden;
}

.pc-slats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 48px,
    rgba(0, 0, 0, 0.08) 48px,
    rgba(0, 0, 0, 0.08) 50px
  );
  opacity: 0.6;
}

.pc-dock-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(200px, 0.75fr);
  gap: 40px;
  align-items: center;
}

.pc-kicker {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pc-gold);
}

.pc-dock-copy h1 {
  margin: 0 0 14px;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 600;
  line-height: 1.12;
}

.pc-dock-copy h1 em {
  font-style: italic;
  color: var(--pc-gold-pale);
}

.pc-lede {
  margin: 0;
  max-width: 48ch;
  font-size: 0.94rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

/* Stacked crate layers meter */
.pc-stack-meter {
  text-align: center;
}

.pc-crate-stack {
  --pc-fill: 8;
  position: relative;
  width: 140px;
  height: 100px;
  margin: 0 auto 16px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  justify-content: flex-start;
}

.pc-layer {
  display: block;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(201, 162, 39, 0.35);
  border-radius: 2px;
  transition: background 0.4s, border-color 0.4s, opacity 0.4s;
}

.pc-layer-1 {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.55), rgba(201, 162, 39, 0.35));
  border-color: var(--pc-gold);
}

.pc-layer-2,
.pc-layer-3,
.pc-layer-4 {
  opacity: 0.2;
}

.pc-crate-stack .pc-layer-2,
.pc-crate-stack .pc-layer-3,
.pc-crate-stack .pc-layer-4 {
  opacity: clamp(0.2, calc((var(--pc-fill) - 15) / 85), 1);
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.45), rgba(201, 162, 39, 0.25));
  border-color: rgba(201, 162, 39, 0.6);
}

.pc-crate-stack .pc-layer-3 {
  opacity: clamp(0.15, calc((var(--pc-fill) - 40) / 60), 1);
}

.pc-crate-stack .pc-layer-4 {
  opacity: clamp(0.1, calc((var(--pc-fill) - 65) / 35), 1);
}

.pc-meter-count {
  display: block;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.pc-meter-label {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}

.pc-meter-total {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pc-gold);
  margin-bottom: 8px;
}

.pc-meter-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  color: var(--pc-gold-pale);
}

/* ── Market floor ── */
.pc-market {
  padding: 28px 0 64px;
}

.pc-trail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--pc-muted);
  margin-bottom: 28px;
}

.pc-trail a {
  color: var(--pc-ink);
  font-weight: 600;
}

.pc-trail a:hover {
  color: var(--pc-gold-dark);
}

/* ── Empty state ── */
.pc-empty {
  text-align: center;
  padding: 56px 24px 64px;
  background: var(--pc-white);
  border: 2px dashed var(--pc-wood);
  opacity: 0.9;
}

.pc-empty-crate {
  position: relative;
  width: 140px;
  height: 80px;
  margin: 0 auto 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-end;
}

.pc-empty-slat {
  display: block;
  height: 14px;
  background: var(--pc-wood-pale);
  border: 2px dashed var(--pc-wood);
  border-radius: 2px;
}

.pc-empty-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pc-muted);
  white-space: nowrap;
}

.pc-empty h2 {
  margin: 0 0 10px;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 1.5rem;
}

.pc-empty p {
  margin: 0 0 24px;
  color: var(--pc-muted);
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

/* ── Layout ── */
.pc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

/* ── Pick list form ── */
.pc-form {
  background: var(--pc-white);
  border: 1px solid var(--pc-line);
  box-shadow: 0 4px 20px rgba(28, 28, 28, 0.05);
}

.pc-form-head {
  padding: 20px 24px;
  background: var(--pc-wood-pale);
  border-bottom: 3px solid var(--pc-wood);
}

.pc-form-stamp {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--pc-wood-dark);
  margin-bottom: 4px;
}

.pc-form-meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--pc-muted);
}

.pc-slots {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pc-slot {
  position: relative;
  border-bottom: 1px solid var(--pc-line);
}

.pc-slot:last-child {
  border-bottom: 0;
}

.pc-slot-num {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pc-gold-dark);
  opacity: 0.5;
  z-index: 1;
}

.pc-slot-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 20px 24px 20px 40px;
  background: linear-gradient(90deg, var(--pc-gold-pale) 0%, transparent 8%);
}

.pc-slot-thumb {
  width: 76px;
  height: 76px;
  background: var(--pc-cream);
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 2px solid var(--pc-line);
}

.pc-slot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-slot-fallback {
  font-size: 1.4rem;
  color: var(--pc-gold);
  opacity: 0.5;
}

.pc-slot-aisle {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pc-wood);
  margin-bottom: 4px;
}

.pc-slot-body h2 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.35;
}

.pc-slot-body h2 a:hover {
  color: var(--pc-gold-dark);
}

.pc-slot-pack {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--pc-muted);
}

.pc-slot-sku {
  font-size: 0.68rem;
  font-family: ui-monospace, monospace;
  color: var(--pc-muted);
}

.pc-slot-unit,
.pc-slot-qty,
.pc-slot-line {
  text-align: center;
  min-width: 72px;
}

.pc-slot-unit span,
.pc-slot-qty span,
.pc-slot-line span {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-muted);
  margin-bottom: 4px;
}

.pc-slot-unit strong,
.pc-slot-line strong {
  font-size: 0.95rem;
  color: var(--pc-ink);
}

.pc-stepper {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--pc-wood);
  overflow: hidden;
  background: var(--pc-cream);
}

.pc-step-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  color: var(--pc-wood-dark);
  cursor: pointer;
  transition: background 0.2s;
}

.pc-step-btn:hover {
  background: var(--pc-gold-pale);
}

.pc-stepper input {
  width: 40px;
  border: 0;
  border-left: 1px solid var(--pc-line);
  border-right: 1px solid var(--pc-line);
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 6px 0;
  background: var(--pc-white);
  -moz-appearance: textfield;
}

.pc-stepper input::-webkit-outer-spin-button,
.pc-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pc-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 24px;
  background: var(--pc-cream);
  border-top: 1px solid var(--pc-line);
}

/* ── Buttons ── */
.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 0.86rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.pc-btn-primary {
  background: var(--pc-gold);
  color: var(--pc-charcoal);
}

.pc-btn-primary:hover {
  background: var(--pc-gold-dark);
  color: #fff;
  transform: translateY(-2px);
}

.pc-btn-soft {
  background: var(--pc-gold-pale);
  color: var(--pc-charcoal);
  border-color: var(--pc-gold);
}

.pc-btn-soft:hover {
  background: var(--pc-gold);
}

.pc-btn-ghost {
  background: transparent;
  border-color: var(--pc-line);
  color: var(--pc-ink);
}

.pc-btn-ghost:hover {
  border-color: var(--pc-gold);
  color: var(--pc-gold-dark);
}

.pc-btn-block {
  width: 100%;
}

/* ── Aside ── */
.pc-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 120px;
}

.pc-nudge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--pc-white);
  border: 1px solid var(--pc-line);
  border-left: 4px solid var(--pc-gold);
  transition: box-shadow 0.2s;
}

.pc-nudge:hover {
  box-shadow: 0 4px 16px rgba(28, 28, 28, 0.08);
}

.pc-nudge img {
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.pc-nudge-copy span {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-muted);
}

.pc-nudge-copy strong {
  font-size: 0.9rem;
  color: var(--pc-ink);
}

/* Weighing scale tag */
.pc-scale-tag {
  position: relative;
  background: var(--pc-gold-pale);
  border: 2px solid var(--pc-gold);
  padding: 28px 22px 32px;
  margin-top: 12px;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.15);
}

.pc-scale-hook {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 14px;
  border: 3px solid var(--pc-wood);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: transparent;
}

.pc-scale-hook::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 10px;
  background: var(--pc-wood);
}

.pc-scale-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pc-gold-dark);
  margin-bottom: 4px;
}

.pc-scale-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.pc-scale-head p {
  margin: 0 0 18px;
  font-size: 0.75rem;
  color: var(--pc-muted);
}

.pc-scale-rows {
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}

.pc-scale-rows div {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
}

.pc-scale-rows dt {
  color: var(--pc-muted);
}

.pc-scale-rows dd {
  margin: 0;
  font-weight: 700;
}

.pc-scale-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-top: 2px solid var(--pc-gold);
  margin-bottom: 18px;
}

.pc-scale-total span {
  font-size: 0.88rem;
  font-weight: 600;
}

.pc-scale-total strong {
  font-size: 1.35rem;
  color: var(--pc-charcoal);
}

.pc-scale-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pc-scale-stamp {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--pc-wood);
  border: 2px solid var(--pc-wood);
  padding: 4px 10px;
  transform: rotate(-8deg);
  opacity: 0.4;
  pointer-events: none;
}

.pc-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pc-notes li {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--pc-white);
  border-left: 3px solid var(--pc-gold);
  font-size: 0.82rem;
}

.pc-note-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.pc-notes strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 2px;
}

.pc-notes p {
  margin: 0;
  color: var(--pc-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pc-layout {
    grid-template-columns: 1fr;
  }

  .pc-aside {
    position: static;
  }

  .pc-slot-card {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto auto;
    gap: 12px;
  }

  .pc-slot-unit,
  .pc-slot-qty,
  .pc-slot-line {
    grid-column: 2;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .pc-slot-unit span,
  .pc-slot-qty span,
  .pc-slot-line span {
    margin: 0;
    min-width: 40px;
  }
}

@media (max-width: 768px) {
  .pc-dock-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pc-lede {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .pc-slot-card {
    padding: 16px 16px 16px 32px;
  }

  .pc-form-actions {
    flex-direction: column;
  }

  .pc-form-actions .pc-btn {
    width: 100%;
  }
}
