@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #E8E4DC;
  --white: #FFFFFF;
  --black: #0F0F0F;
  --red: #E8001C;
  --border: 2px solid #0F0F0F;
  --border-thin: 1px solid #0F0F0F;
  --border-light: 1px solid #D5D2CB;
  --gray-text: #666;
  --gray-bg: #F0EEE9;
  --font: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

body {
  background-color: #D8D3C8;
  background-image: radial-gradient(circle, #0F0F0F28 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--black);
  font-family: var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Visually hidden but readable by search engines and screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── HEADER ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-icon {
  flex-shrink: 0;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.5px;
  line-height: 1;
}

.tagline {
  font-size: 0.78rem;
  color: var(--gray-text);
  font-weight: 400;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  border: var(--border);
  border-radius: 100px;
  padding: 10px 22px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--red);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 3px 3px 0 #8B0010;
  transform: translate(-1px, -1px);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--black);
  border: var(--border);
  border-radius: 100px;
  padding: 10px 22px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--black);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.btn-secondary:hover {
  background: var(--black);
  color: var(--white);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--black);
}

/* ── MAIN ── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 32px 64px;
}

/* ── STATS BAR ── */
.stats-bar {
  display: flex;
  align-items: stretch;
  border: var(--border);
  border-radius: 10px;
  background: var(--white);
  margin-bottom: 40px;
  box-shadow: 5px 5px 0 var(--black);
  overflow: hidden;
}

.stat-item {
  flex: 1;
  padding: 20px 20px;
  font-size: 0.82rem;
  color: var(--gray-text);
  border-right: var(--border);
  text-align: center;
}

.stat-item:last-child { border-right: none; }

.stat-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-item:first-child strong { color: var(--red); }

/* ── CATEGORY SECTION ── */
.category-section { margin-bottom: 52px; }

.category-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: var(--border);
}

.category-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.category-count {
  font-size: 0.75rem;
  color: var(--gray-text);
  font-weight: 500;
}

/* ── STORE GRID ── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ── STORE CARD ── */
.store-card {
  background: var(--white);
  border: none;
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.store-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--black);
}

.store-card.status-last-days:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--red);
}

.store-card.status-closing-soon:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 #C96B0A;
}

.store-card:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* ── BADGES ── */
.badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 4px 10px;
  text-transform: uppercase;
  border-radius: 100px;
  border: none;
  white-space: nowrap;
  line-height: 1.4;
}

.badge-category {
  background: var(--black);
  color: var(--white);
}

.badge-closing-soon {
  background: #C96B0A;
  color: #FFFFFF;
}

.badge-last-days {
  background: var(--red);
  color: #FFFFFF;
}

.badge-closed {
  background: #444;
  color: var(--white);
}

.badge-uncertain {
  background: #4338CA;
  color: #FFFFFF;
}

/* Card text */
.store-name {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.3;
}

.store-location {
  font-size: 0.8rem;
  color: var(--gray-text);
  margin-bottom: 3px;
}

.store-closing {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 8px;
}

.store-description {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: auto;
  padding-top: 10px;
  border-top: var(--border-light);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border: none;
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 8px 0 var(--black);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
}

.modal-store-name {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

.modal-close {
  background: none;
  border: var(--border);
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font);
  color: var(--black);
  transition: background 0.12s, color 0.12s;
}

.modal-close:hover {
  background: var(--black);
  color: var(--white);
}

.modal-body {
  padding: 24px;
  flex: 1;
}

.modal-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Modal info grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: var(--border);
  margin-bottom: 20px;
}

.info-cell {
  padding: 12px 16px;
  border-right: var(--border-thin);
  border-bottom: var(--border-thin);
}

.info-cell:nth-child(even) { border-right: none; }
.info-cell:nth-last-child(-n+2) { border-bottom: none; }

.info-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-text);
  margin-bottom: 4px;
}

.info-value {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.45;
}

.modal-section { margin-bottom: 18px; }

.modal-section-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-text);
  margin-bottom: 5px;
}

.modal-section-value {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--black);
}

.modal-divider {
  border: none;
  border-top: var(--border-light);
  margin: 18px 0;
}

.modal-meta {
  font-size: 0.78rem;
  color: var(--gray-text);
  line-height: 1.7;
  padding: 14px 16px;
  background: var(--cream);
  border: var(--border-light);
}

.modal-meta strong { color: var(--black); }

.verified-yes {
  color: #059669;
  font-weight: 600;
}

.verified-no { color: var(--gray-text); }

.modal-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn-link {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 16px;
  border: 2px solid var(--black);
  border-radius: 100px;
  text-decoration: none;
  color: var(--black);
  display: inline-block;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--black);
  transition: background 0.12s, color 0.12s, transform 0.12s, box-shadow 0.12s;
}

.btn-link:hover {
  background: var(--black);
  color: var(--white);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--black);
}

/* ── FOOTER ── */
footer {
  border-top: var(--border);
  background: var(--white);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--gray-text);
  gap: 16px;
}

footer a {
  color: var(--black);
  font-weight: 600;
  text-decoration: underline;
}

footer a:hover { color: var(--red); }

/* ── SUBMIT PAGE ── */
.page-header {
  padding: 40px 32px 0;
  max-width: 720px;
  margin: 0 auto;
  border-bottom: var(--border-light);
  padding-bottom: 24px;
  margin-bottom: 0;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--gray-text);
  font-size: 0.9rem;
}

.submit-container {
  max-width: 720px;
  margin: 32px auto;
  padding: 0 32px 64px;
}

.removal-notice {
  border: var(--border-thin);
  background: var(--white);
  padding: 18px 20px;
  font-size: 0.84rem;
  color: #444;
  line-height: 1.7;
}

.removal-notice strong { color: var(--black); }

.removal-notice a {
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .store-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  header { padding: 12px 16px; }
  .logo { font-size: 1.2rem; }
  main { padding: 24px 16px 48px; }

  .store-grid { grid-template-columns: 1fr; }

  .stats-bar { flex-direction: column; }
  .stat-item {
    border-right: none;
    border-bottom: var(--border-thin);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .stat-item:last-child { border-bottom: none; }
  .stat-item strong {
    display: inline;
    font-size: 1.1rem;
  }

  footer {
    flex-direction: column;
    text-align: center;
    padding: 16px;
    gap: 8px;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-height: 92vh;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .info-grid { grid-template-columns: 1fr; }
  .info-cell { border-right: none !important; border-bottom: var(--border-thin) !important; }
  .info-cell:last-child { border-bottom: none !important; }

  .page-header { padding: 24px 16px 20px; }
  .submit-container { padding: 0 16px 48px; }
}
