/* Layout */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* Clickable Cards */
.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  cursor: pointer;
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--v-color-background-primary);
  border-top: 1px solid var(--v-color-border-ornament);
  padding: 24px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
}

.cookie-banner.show {
  display: block;
}

/* Cookie consent required notice (shown when trying to open a market without consent) */
.cookie-consent-notice {
  margin-top: 12px;
  padding: 12px 12px 12px 44px;
  border: 1px solid var(--v-color-border-accent);
  border-left-width: 4px;
  border-radius: 10px;
  background: var(--v-color-background-secondary);
  color: var(--v-color-text-primary);
  font-weight: 600;
  line-height: 1.4;
  position: relative;
}

.cookie-consent-notice::before {
  content: "!";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--v-color-background-primary);
  border: 1px solid var(--v-color-border-accent);
  font-weight: 700;
}

.cookie-consent-notice--active {
  animation: cookie-consent-notice-pulse 600ms ease-out;
}

@keyframes cookie-consent-notice-pulse {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
  55% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* Market Grid (markets.html) */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

@media (min-width: 48rem) {
  .market-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

.market-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--v-color-background-primary);
  border: 1px solid var(--v-color-border-ornament);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.market-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--v-color-border-accent);
}

.market-flag {
  font-size: 2rem;
  flex-shrink: 0;
}

.market-name {
  font-size: 1rem;
  font-weight: 500;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--v-color-text-secondary);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--v-color-text-primary);
}

/* FAQ (storekeeper.html) */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--v-color-background-primary);
  border: 1px solid var(--v-color-border-ornament);
  border-radius: 12px;
  overflow: clip;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--v-color-text-primary);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--v-color-text-secondary);
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--v-color-border-ornament);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item summary:hover {
  background: var(--v-color-background-secondary);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--v-color-border-accent);
  outline-offset: 2px;
}

.faq-answer {
  padding: 16px 24px 20px;
}

.faq-answer ul {
  margin: 12px 0 0 18px;
}

.faq-answer li {
  margin: 6px 0;
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--v-color-border-ornament);
  margin: 40px 0;
}

.section-divider-with-border {
  border: 1px solid #616161;
  height: 1px;
  background: var(--v-color-border-ornament);
  margin: 40px 0;
}

/* How to Get Started (storekeeper.html) */
.getting-started-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card {
  background: var(--v-color-background-primary);
  border: 1px solid var(--v-color-border-ornament);
  border-radius: 12px;
  padding: 20px 24px;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--v-color-text-primary);
  background: var(--v-color-background-secondary);
  border: 1px solid var(--v-color-border-ornament);
  flex: 0 0 auto;
}

.step-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 48rem) {
  .step-images {
    grid-template-columns: repeat(2, 1fr);
  }
}

.image-card {
  background: var(--v-color-background-primary);
  border: 1px solid var(--v-color-border-ornament);
  border-radius: 12px;
  overflow: clip;
}

.image-zoom {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  width: 100%;
  cursor: pointer;
  display: block;
}

/* Auto lightbox triggers (added by app.js) */
img.lightbox-trigger-image {
  cursor: pointer;
}

img.lightbox-trigger-image:focus-visible {
  outline: 2px solid var(--v-color-border-accent);
  outline-offset: 2px;
}

.image-zoom:focus-visible {
  outline: 2px solid var(--v-color-border-accent);
  outline-offset: 2px;
}

.image-card img {
  display: block;
  width: 100%;
  height: auto;
}

.image-card figcaption {
  padding: 12px 16px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  width: min(1100px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--v-color-background-primary);
  border: 1px solid var(--v-color-border-ornament);
  border-radius: 12px;
  padding: 16px;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.lightbox-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--v-color-border-ornament);
}
