/* A.Z TRADERS — storefront styles */

.page-shop {
  --orbit-cap-height: 0px;
}

.page-shop .page-main {
  --sh-display: Syne, "Bricolage Grotesque", system-ui, sans-serif;
  --sh-body: "Manrope", system-ui, sans-serif;
  --sh-teal: #0B5E5E;
  --sh-teal-deep: #042F2F;
  --sh-coral: #FF5E3A;
  --sh-gold: #E8C547;
  --sh-ink: #0F1A1A;
  --sh-muted: #5C7575;
  --sh-paper: #FAFAF8;
  --sh-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sh-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sh-fluid-sm: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
  --sh-fluid-md: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --sh-fluid-lg: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  padding: 0 !important;
  background: #EDEAE3;
}

.page-shop .a57-orbit-cap {
  display: none;
}

.af57-sh-lookbook {
  min-height: 100%;
  font-family: var(--sh-body);
  color: var(--sh-ink);
}

/* ── Masthead ── */
.af57-sh-masthead {
  position: relative;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem);
  overflow: hidden;
  color: #FAFAF8;
}

.af57-sh-masthead-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--sh-teal-deep) 0%, #0a4848 50%, #1a3530 100%);
  pointer-events: none;
}

.af57-sh-masthead-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 100% 0%, rgba(255, 94, 58, 0.2), transparent 55%),
    radial-gradient(ellipse 40% 60% at 0% 100%, rgba(232, 197, 71, 0.12), transparent 50%);
}

.af57-sh-masthead-grid {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: end;
}

.af57-sh-crumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.af57-sh-crumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.af57-sh-crumb a:hover { color: var(--sh-gold); }

.af57-sh-eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--sh-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sh-coral);
}

.af57-sh-title {
  margin: 0 0 0.65rem;
  font-family: var(--sh-display);
  font-size: var(--sh-fluid-lg);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.af57-sh-title span {
  background: linear-gradient(120deg, var(--sh-gold), var(--sh-coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.af57-sh-dek {
  margin: 0 0 1.25rem;
  max-width: 44ch;
  font-size: var(--sh-fluid-sm);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
}

.af57-sh-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  max-width: 440px;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.af57-sh-search:focus-within {
  border-color: var(--sh-coral);
  box-shadow: 0 0 0 4px rgba(255, 94, 58, 0.22);
}

.af57-sh-search input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0.7rem 1rem;
  font: inherit;
  font-size: var(--sh-fluid-sm);
  color: #fff;
  min-width: 0;
}

.af57-sh-search input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.af57-sh-search button {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  background: linear-gradient(135deg, var(--sh-coral), #ff7a5c);
  color: #fff;
  font-family: var(--sh-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s var(--sh-spring);
}

.af57-sh-search button:hover {
  transform: scale(1.04);
}

.af57-sh-masthead-stats {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.af57-sh-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.af57-sh-stat strong {
  font-family: var(--sh-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sh-gold);
  line-height: 1;
}

.af57-sh-stat span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.af57-sh-stat-accent strong { color: var(--sh-coral); }

/* ── Chapter index (editorial TOC) ── */
.af57-sh-chapters {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  gap: 0.65rem;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  max-width: 100%;
  background: color-mix(in srgb, var(--sh-paper) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(11, 94, 94, 0.1);
  box-shadow: 0 8px 32px rgba(4, 47, 47, 0.06);
}

.af57-sh-chapters::-webkit-scrollbar { display: none; }

.af57-sh-chapter {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.15rem 0.65rem;
  min-width: 160px;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 2px solid rgba(11, 94, 94, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s var(--sh-spring), box-shadow 0.35s, border-color 0.3s;
}

.af57-sh-chapter:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(4, 47, 47, 0.1);
  border-color: color-mix(in srgb, var(--ch-hue, var(--sh-teal)) 40%, transparent);
}

.af57-sh-chapter.is-active {
  border-color: var(--ch-hue, var(--sh-teal));
  background: color-mix(in srgb, var(--ch-hue, var(--sh-teal)) 8%, white);
  box-shadow:
    0 4px 0 color-mix(in srgb, var(--ch-hue, var(--sh-teal)) 20%, transparent),
    0 16px 40px color-mix(in srgb, var(--ch-hue, var(--sh-teal)) 15%, transparent);
}

.af57-sh-chapter-glyph {
  grid-row: span 2;
  align-self: center;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 0.5rem;
  background: var(--ch-hue, var(--sh-teal));
  color: #fff;
  font-family: var(--sh-display);
  font-size: 0.75rem;
  font-weight: 800;
}

.af57-sh-chapter-num {
  font-family: var(--sh-display);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ch-hue, var(--sh-teal));
}

.af57-sh-chapter-name {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
}

/* ── Stage ── */
.af57-sh-stage {
  max-width: 1140px;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 4.5rem);
}

.af57-sh-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed rgba(11, 94, 94, 0.15);
}

.af57-sh-meta-tag {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--sh-teal);
  color: #fff;
  font-family: var(--sh-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.af57-sh-meta-clear {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sh-muted);
  text-decoration: none;
}

.af57-sh-meta-clear:hover { color: var(--sh-coral); }

.af57-sh-meta-count {
  margin: 0 0 0 auto;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sh-muted);
}

/* ── Spotlight split ── */
.af57-sh-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 0;
  margin-bottom: 1.5rem;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 2px 0 rgba(11, 94, 94, 0.06),
    0 24px 64px rgba(4, 47, 47, 0.12);
  transition: transform 0.4s var(--sh-ease);
}

.af57-sh-spotlight-visual {
  position: relative;
  display: block;
  min-height: 320px;
  overflow: hidden;
}

.af57-sh-spotlight-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--sh-ease);
}

.af57-sh-spotlight:hover .af57-sh-spotlight-visual img {
  transform: scale(1.04);
}

.af57-sh-spotlight-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--sh-coral);
  color: #fff;
  font-family: var(--sh-display);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.af57-sh-spotlight-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.af57-sh-spotlight-lane {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sh-teal);
  margin-bottom: 0.35rem;
}

.af57-sh-spotlight-copy h2 {
  margin: 0 0 0.65rem;
  font-family: var(--sh-display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.1;
}

.af57-sh-spotlight-copy p {
  margin: 0 0 1rem;
  font-size: var(--sh-fluid-sm);
  line-height: 1.65;
  color: var(--sh-muted);
}

.af57-sh-spotlight-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.af57-sh-spotlight-row strong {
  font-family: var(--sh-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sh-teal);
}

.af57-sh-spotlight-row em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sh-muted);
}

/* ── Staggered lookbook stream ── */
.af57-sh-stream {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  grid-auto-flow: dense;
}

.af57-sh-piece {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.55s var(--sh-ease),
    transform 0.55s var(--sh-ease);
  transition-delay: calc(var(--piece-i, 0) * 45ms);
}

.af57-sh-piece.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes sh-piece-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.af57-sh-span-7 { grid-column: span 7; }
.af57-sh-span-5 { grid-column: span 5; }
.af57-sh-span-4 { grid-column: span 4; }

.af57-sh-piece-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(11, 94, 94, 0.08);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 28px rgba(4, 47, 47, 0.06);
  transition: transform 0.4s var(--sh-spring), box-shadow 0.4s;
}

.af57-sh-piece-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(4, 47, 47, 0.12);
}

.af57-sh-span-7 .af57-sh-piece-frame { aspect-ratio: 16 / 10; }
.af57-sh-span-5 .af57-sh-piece-frame { aspect-ratio: 4 / 5; }
.af57-sh-span-4 .af57-sh-piece-frame { aspect-ratio: 1; }

.af57-sh-piece-frame {
  position: relative;
  overflow: hidden;
  background: #F3F0EA;
}

.af57-sh-piece-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--sh-ease), filter 0.4s;
}

.af57-sh-piece-link:hover .af57-sh-piece-frame img {
  transform: scale(1.07);
  filter: saturate(1.08);
}

.af57-sh-piece-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(4, 47, 47, 0.55) 100%);
  opacity: 0;
  transition: opacity 0.35s;
}

.af57-sh-piece-link:hover .af57-sh-piece-shade { opacity: 1; }

.af57-sh-piece-cta {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%) translateY(12px);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  font-family: var(--sh-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--sh-teal);
  opacity: 0;
  transition: opacity 0.3s, transform 0.35s var(--sh-spring);
}

.af57-sh-piece-link:hover .af57-sh-piece-cta {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.af57-sh-piece-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--sh-gold);
  color: var(--sh-teal-deep);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.af57-sh-piece-info {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.af57-sh-piece-lane {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sh-muted);
}

.af57-sh-piece-info h3 {
  margin: 0;
  font-family: var(--sh-display);
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  font-weight: 800;
  line-height: 1.3;
  transition: color 0.25s;
}

.af57-sh-piece-link:hover .af57-sh-piece-info h3 { color: var(--sh-teal); }

.af57-sh-span-7 .af57-sh-piece-info h3 {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.af57-sh-piece-info footer {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(11, 94, 94, 0.08);
}

.af57-sh-piece-info footer strong {
  font-family: var(--sh-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--sh-teal);
  transition: color 0.25s;
}

.af57-sh-piece-link:hover footer strong { color: var(--sh-coral); }

.af57-sh-piece-info footer em {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sh-muted);
}

/* Buttons */
.af57-sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-family: var(--sh-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.3s var(--sh-spring), box-shadow 0.3s;
}

.af57-sh-btn-fill {
  background: linear-gradient(135deg, var(--sh-coral), #ff7a5c);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 94, 58, 0.35);
}

.af57-sh-btn-fill:hover {
  transform: translateY(-2px);
}

/* Empty */
.af57-sh-empty {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  border-radius: 1.5rem;
  background: #fff;
  border: 2px dashed rgba(11, 94, 94, 0.15);
}

.af57-sh-empty-icon {
  display: block;
  font-size: 2.5rem;
  opacity: 0.35;
  margin-bottom: 1rem;
}

.af57-sh-empty h2 {
  margin: 0 0 0.5rem;
  font-family: var(--sh-display);
}

.af57-sh-empty p {
  margin: 0 0 1.25rem;
  color: var(--sh-muted);
}

/* Pagination */
.af57-sh-pages {
  margin-top: 2.5rem;
}

.page-shop .af57-sh-pages .catalog-pagination {
  margin: 0;
}

.page-shop .af57-sh-pages .pagination-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.15rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(11, 94, 94, 0.1);
  box-shadow: 0 8px 28px rgba(4, 47, 47, 0.06);
}

.page-shop .af57-sh-pages .pagination-pages {
  display: flex;
  gap: 0.25rem;
}

.page-shop .af57-sh-pages .pagination-btn,
.page-shop .af57-sh-pages .pagination-num {
  min-width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0 0.65rem;
  border-radius: 0.65rem;
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: var(--sh-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sh-muted) !important;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.25s var(--sh-spring);
}

.page-shop .af57-sh-pages .pagination-num.is-active,
.page-shop .af57-sh-pages .pagination-btn:not(.is-disabled):hover {
  background: var(--sh-teal) !important;
  color: #fff !important;
  transform: translateY(-2px);
}

.page-shop .af57-sh-pages .pagination-btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.page-shop .af57-sh-pages .pagination-ellipsis {
  padding: 0 0.35rem;
  color: var(--sh-muted);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .af57-sh-masthead-grid {
    grid-template-columns: 1fr;
  }

  .af57-sh-masthead-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .af57-sh-stat {
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 120px;
  }

  .af57-sh-spotlight {
    grid-template-columns: 1fr;
  }

  .af57-sh-spotlight-visual {
    min-height: 260px;
  }

  .af57-sh-span-7,
  .af57-sh-span-5,
  .af57-sh-span-4 {
    grid-column: span 6;
  }

  .af57-sh-span-5 .af57-sh-piece-frame,
  .af57-sh-span-7 .af57-sh-piece-frame {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  .af57-sh-masthead {
    padding-bottom: 1.5rem;
  }

  .af57-sh-search {
    flex-direction: column;
    border-radius: 1rem;
    padding: 0.5rem;
  }

  .af57-sh-search input {
    padding: 0.75rem 1rem;
  }

  .af57-sh-search button {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
  }

  .af57-sh-stat {
    flex: 1 1 calc(50% - 0.35rem);
  }

  .af57-sh-stream {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .af57-sh-span-7,
  .af57-sh-span-5,
  .af57-sh-span-4 {
    grid-column: span 1;
  }

  .af57-sh-span-7 .af57-sh-piece-frame,
  .af57-sh-span-5 .af57-sh-piece-frame,
  .af57-sh-span-4 .af57-sh-piece-frame {
    aspect-ratio: 4 / 3;
  }

  .af57-sh-chapter {
    min-width: 132px;
  }

  .af57-sh-meta-count {
    width: 100%;
    margin-left: 0;
  }

  .af57-sh-spotlight-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-shop .af57-sh-stage {
    padding-bottom: calc(clamp(3rem, 6vw, 4.5rem) + var(--dock-h, 64px));
  }

  .page-shop .af57-sh-pages .pagination-inner {
    gap: 0.25rem;
    padding: 0.65rem;
  }

  .page-shop .af57-sh-pages .pagination-btn {
    font-size: 0.68rem;
    min-width: auto;
    padding: 0 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .af57-sh-piece {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
