/* extras.css */

/* Reading progress bar global */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  z-index: 200;
  transition: transform 80ms linear;
}

/* Command palette */
.cmdk-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,10,25,0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: grid;
  place-items: start center;
  padding-top: 12vh;
  animation: fade-in 200ms var(--ease);
}
.cmdk {
  width: min(640px, 92vw);
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 40px 100px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: pop-in 280ms var(--ease);
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.cmdk-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
}
.cmdk-input input {
  flex: 1;
  border: none;
  background: transparent;
  font: 16px var(--font-body);
  color: var(--ink);
  outline: none;
}
.cmdk-input kbd {
  font: 11px var(--font-mono);
  padding: 3px 7px;
  background: var(--bg-soft);
  border-radius: 4px;
  color: var(--ink-muted);
}
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmdk-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  color: var(--ink);
  cursor: none;
  transition: background var(--dur-fast) var(--ease);
}
.cmdk-item:hover { background: var(--accent-soft); color: var(--accent); }
.cmdk-kind {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-align: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.cmdk-title { font-size: 14px; font-weight: 500; }
.cmdk-sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.cmdk-empty { padding: 32px; text-align: center; color: var(--ink-muted); font-style: italic; }
.cmdk-footer {
  display: flex;
  gap: 18px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-muted);
  background: var(--bg-soft);
}
.cmdk-footer kbd {
  font: 10px var(--font-mono);
  padding: 2px 6px;
  background: var(--bg-elevated);
  border-radius: 4px;
  margin-right: 4px;
}

/* Cart */
.cart-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: none;
  transition: all var(--dur-fast) var(--ease);
}
.cart-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: grid;
  place-items: center;
}

.cart-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,10,25,0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1090;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease);
}
.cart-backdrop.open { opacity: 1; pointer-events: auto; }

.cart {
  position: fixed;
  top: 0; right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: var(--bg-elevated);
  border-left: 1px solid var(--line);
  z-index: 1095;
  transform: translateX(100%);
  transition: transform var(--dur-mid) var(--ease);
  display: flex;
  flex-direction: column;
}
.cart.open { transform: translateX(0); }
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.cart-head h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
}
.cart-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: none;
}
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cart-empty {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--ink-muted);
}
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.cart-thumb {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  padding: 12px;
  background: var(--accent-soft);
}
.cart-thumb.bg-pink { background: var(--pink-soft); }
.cart-thumb.bg-purple { background: var(--purple-soft); }
.cart-thumb.bg-blush { background: var(--blush); }
.cart-info h4 { font-size: 14px; font-weight: 500; font-family: var(--font-body); margin-bottom: 4px; }
.cart-tag { font-size: 11px; color: var(--ink-muted); }
.cart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.cart-qty { font-size: 12px; color: var(--ink-muted); }
.cart-price { font-weight: 500; flex: 1; }
.cart-row button {
  background: transparent;
  border: none;
  color: var(--ink-muted);
  cursor: none;
}
.cart-row button:hover { color: var(--accent); }
.cart-foot {
  padding: 24px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.cart-total .big {
  font-family: var(--font-display);
  font-size: 32px;
  font-style: italic;
  color: var(--accent);
}
.cart-clear {
  width: 100%;
  background: transparent;
  border: none;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 12px;
  cursor: none;
  padding: 8px;
}
.cart-clear:hover { color: var(--accent); }

/* Modal overlay shared */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,10,25,0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 1080;
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  animation: fade-in 300ms var(--ease);
}
.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: none;
  z-index: 5;
}

/* Post detail */
.post-detail {
  position: relative;
  background: var(--bg-elevated);
  width: min(820px, 100%);
  height: min(92vh, 1000px);
  border-radius: var(--r-xl);
  overflow: hidden;
  animation: pop-in 320ms var(--ease);
}
.post-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform-origin: left;
  z-index: 4;
  transition: transform 80ms linear;
}
.post-scroll {
  height: 100%;
  overflow-y: auto;
}
.post-hero {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-soft);
}
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-content {
  padding: clamp(32px, 5vw, 64px);
  max-width: 680px;
  margin: 0 auto;
}
.post-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 24px;
}
.post-meta .cat { color: var(--accent); font-weight: 600; }
.post-content h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.post-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.post-content p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.post-share {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}
.post-share a { color: var(--accent); }

/* Recipe detail */
.recipe-detail {
  position: relative;
  background: var(--bg-elevated);
  width: min(900px, 100%);
  max-height: 92vh;
  border-radius: var(--r-xl);
  overflow-y: auto;
  animation: pop-in 320ms var(--ease);
}
.recipe-hero {
  aspect-ratio: 21/9;
  overflow: hidden;
  background: var(--bg-soft);
}
.recipe-hero img { width: 100%; height: 100%; object-fit: cover; }
.recipe-content { padding: clamp(28px, 4vw, 56px); }
.recipe-content .badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-pill);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 16px;
}
.recipe-content h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 32px;
}
.recipe-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.recipe-stats > div { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.recipe-stats .num {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  color: var(--accent);
}
.recipe-stats .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}
.recipe-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 32px;
}
@media (max-width: 700px) { .recipe-grid-2 { grid-template-columns: 1fr; gap: 32px; } }
.recipe-grid-2 h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 16px;
}
.recipe-ing { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.recipe-ing li {
  font-size: 15px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 12px;
}
.recipe-ing .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.recipe-steps { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.recipe-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.recipe-steps .step-num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-size: 20px;
}
.recipe-actions { display: flex; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }

/* Now widget */
.now-widget {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 12px;
}
.now-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
}
.now-pulse::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  animation: pulse-ring 1.6s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}
.now-text { display: flex; flex-direction: column; line-height: 1.2; }
.now-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}
.now-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
}

/* About image with widget */
.about-image { position: relative; }

/* Quick add button on products */
.product .quick {
  border: none;
  font: inherit;
  cursor: none;
  font-family: var(--font-body);
}

/* Fade-in keyframe */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Easter egg chicken */
.chicken {
  position: fixed;
  left: -100px;
  z-index: 50;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: chicken-walk 6s linear forwards;
}
.chicken-cluck {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-size: 13px;
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
}
@keyframes chicken-walk {
  to { transform: translateX(calc(100vw + 200px)); }
}
