/* Appily Fiftythree — Seed Tray cart UI */

.af-cart {
  --afc-ink: var(--ts-ink, #15202B);
  --afc-paper: #fff;
  --afc-mist: var(--ts-paper, #F3F5F8);
  --afc-copper: var(--ts-wine, #B85C38);
  --afc-teal: var(--ts-grove, #2A6F7A);
  --afc-line: var(--ts-line, #CDD4DE);
  --afc-muted: var(--ts-muted, #5E6B7A);
  --afc-ease: var(--ease-out, cubic-bezier(.22, 1, .36, 1));
}

@keyframes afc-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes afc-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: .4; }
}
@keyframes afc-cell {
  0%, 100% { opacity: .35; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1); }
}

/* Hero */
.afc-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 56px;
  color: #F4F7FA;
  background: linear-gradient(125deg, #15202B 0%, #1B2430 48%, #1A4A52 100%);
}
.afc-hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 88% 18%, rgba(184, 92, 56, .28), transparent 55%),
    repeating-linear-gradient(-14deg, transparent 0 28px, rgba(255,255,255,.03) 28px 29px);
  pointer-events: none;
}
.afc-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 28px;
  align-items: end;
  animation: afc-rise .65s var(--afc-ease) both;
}
.afc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #E8C4B4;
}
.afc-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #7DCFB6;
  animation: afc-pulse 1.8s ease-out infinite;
}
.afc-hero-copy h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.afc-hero-copy h1 em {
  font-style: italic;
  font-weight: 500;
  color: #F0D2C4;
}
.afc-lede {
  margin: 0;
  max-width: 42ch;
  color: rgba(244, 247, 250, .72);
  font-size: 15px;
  line-height: 1.65;
}
.afc-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.afc-hero-stats div {
  padding: 16px 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  display: grid;
  gap: 4px;
}
.afc-hero-stats strong {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.1;
}
.afc-hero-stats span {
  font-size: 11px;
  color: rgba(244, 247, 250, .55);
}

/* Stage */
.afc-stage {
  padding: 0 0 80px;
  margin-top: -28px;
  position: relative;
  z-index: 2;
}

/* Empty */
.afc-empty {
  text-align: center;
  padding: 56px 28px;
  background: var(--afc-paper);
  border: 1px solid var(--afc-line);
  box-shadow: var(--shadow);
  animation: afc-rise .55s var(--afc-ease) both;
}
.afc-empty-visual {
  width: min(280px, 80%);
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.afc-empty-cell {
  aspect-ratio: 1;
  background: var(--afc-mist);
  border: 1px dashed var(--afc-line);
  animation: afc-cell 2.4s ease-in-out infinite;
}
.afc-empty-cell:nth-child(2) { animation-delay: .2s; }
.afc-empty-cell:nth-child(3) { animation-delay: .4s; }
.afc-empty-cell:nth-child(5) { animation-delay: .3s; }
.afc-empty-cell:nth-child(6) { animation-delay: .5s; }
.afc-empty-cell.is-gap {
  background: transparent;
  border-style: solid;
  border-color: rgba(184, 92, 56, .35);
  box-shadow: inset 0 0 0 1px rgba(184, 92, 56, .12);
}
.afc-empty h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
}
.afc-empty p {
  margin: 0 auto 24px;
  max-width: 38ch;
  color: var(--afc-muted);
  line-height: 1.6;
}

/* Layout */
.afc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr);
  gap: 16px;
  align-items: start;
  animation: afc-rise .55s var(--afc-ease) both;
}

.afc-tray {
  background: var(--afc-paper);
  border: 1px solid var(--afc-line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.afc-tray-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-bottom: 1px solid var(--afc-line);
  background:
    linear-gradient(90deg, rgba(42, 111, 122, .07), transparent 55%),
    var(--afc-mist);
}
.afc-tray-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--afc-copper);
}
.afc-tray-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
}
.afc-tray-hint {
  margin: 0;
  font-size: 12px;
  color: var(--afc-muted);
  max-width: 28ch;
}

.afc-rows { display: grid; }
.afc-row {
  display: grid;
  grid-template-columns: 40px 96px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--afc-line);
  transition: background .2s;
}
.afc-row:last-child { border-bottom: 0; }
.afc-row:hover { background: rgba(184, 92, 56, .03); }
.afc-row-ix {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--afc-copper);
}
.afc-thumb {
  display: block;
  width: 96px;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--afc-mist);
  border: 1px solid var(--afc-line);
  position: relative;
}
.afc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--afc-ease);
}
.afc-row:hover .afc-thumb img { transform: scale(1.06); }
.afc-thumb-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--afc-copper);
  background: var(--afc-mist);
}
.afc-aisle {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--afc-teal);
}
.afc-info h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}
.afc-info h3 a:hover { color: var(--afc-copper); }
.afc-meta {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--afc-muted);
}
.afc-unit {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.afc-unit span {
  font-weight: 500;
  color: var(--afc-muted);
  font-size: 11px;
}

.afc-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--afc-line);
  background: var(--afc-mist);
}
.afc-qty-btn {
  width: 36px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--afc-ink);
  font-size: 18px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.afc-qty-btn:hover {
  background: var(--afc-ink);
  color: #fff;
}
.afc-qty input {
  width: 48px;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--afc-line);
  border-right: 1px solid var(--afc-line);
  background: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  -moz-appearance: textfield;
}
.afc-qty input::-webkit-outer-spin-button,
.afc-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.afc-line {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 5.5ch;
  text-align: right;
}

.afc-tray-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px 22px;
  border-top: 1px solid var(--afc-line);
  background: var(--afc-mist);
}

/* Tally */
.afc-tally {
  position: sticky;
  top: 96px;
}
.afc-tally-card {
  padding: 28px 24px;
  background:
    linear-gradient(165deg, #1B2430 0%, #1A4A52 100%);
  color: #F4F7FA;
  box-shadow: var(--shadow);
}
.afc-tally-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #E8C4B4;
}
.afc-tally-card h2 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
}
.afc-tally-rows {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.afc-tally-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: rgba(244, 247, 250, .72);
}
.afc-tally-row strong { color: #fff; }
.afc-tally-grand {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 16px 0;
  margin-bottom: 14px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.afc-tally-grand span {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(244, 247, 250, .55);
}
.afc-tally-grand strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
}
.afc-ship-note {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(244, 247, 250, .68);
}
.afc-ship-note em {
  font-style: normal;
  color: #7DCFB6;
  font-weight: 700;
}
.afc-seal {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(244, 247, 250, .75);
}
.afc-seal span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #7DCFB6;
  box-shadow: 0 0 0 4px rgba(125, 207, 182, .18);
}

/* Buttons */
.afc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, transform .25s;
}
.afc-btn:hover { transform: translateY(-2px); }
.afc-btn-primary {
  background: var(--afc-copper);
  color: #fff;
  border-color: var(--afc-copper);
}
.afc-btn-primary:hover {
  background: #fff;
  color: var(--afc-ink);
  border-color: #fff;
}
.afc-tally .afc-btn-primary:hover {
  background: #fff;
  color: var(--afc-ink);
}
.afc-btn-soft {
  background: var(--afc-ink);
  color: #fff;
  border-color: var(--afc-ink);
}
.afc-btn-soft:hover {
  background: var(--afc-copper);
  border-color: var(--afc-copper);
}
.afc-btn-ghost {
  background: transparent;
  color: var(--afc-ink);
  border-color: var(--afc-ink);
}
.afc-btn-ghost:hover {
  background: var(--afc-ink);
  color: #fff;
}
.afc-tally .afc-btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
}
.afc-tally .afc-btn-ghost:hover {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
}
.afc-btn-block {
  width: 100%;
  margin-bottom: 10px;
}
.afc-btn-block:last-child { margin-bottom: 0; }

@media (max-width: 980px) {
  .afc-hero-grid,
  .afc-layout { grid-template-columns: 1fr; }
  .afc-tally { position: static; }
  .afc-row {
    grid-template-columns: 32px 72px minmax(0, 1fr);
    grid-template-areas:
      "ix thumb info"
      ". qty line";
    gap: 12px 14px;
  }
  .afc-row-ix { grid-area: ix; }
  .afc-thumb { grid-area: thumb; width: 72px; }
  .afc-info { grid-area: info; }
  .afc-qty { grid-area: qty; justify-self: start; }
  .afc-line { grid-area: line; justify-self: end; }
}

@media (max-width: 640px) {
  .afc-hero { padding: 36px 0 48px; }
  .afc-hero-stats { grid-template-columns: 1fr; }
  .afc-tray-head,
  .afc-tray-foot,
  .afc-row { padding-left: 14px; padding-right: 14px; }
  .afc-tally-card { padding: 22px 18px; }
  .afc-tray-foot .afc-btn { flex: 1 1 100%; }
}
