/* Shared storefront shell — cached via /static/css/storefront-base.css */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--vi-surface, var(--theme-surface, #ffffff));
  color: var(--vi-text, var(--theme-text, #1f2937));
  font-family: var(--vi-font, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
  line-height: 1.5;
}

a { color: var(--vi-primary, var(--theme-primary, #3b82f6)); }

.store-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.store-header {
  border-bottom: 1px solid var(--vi-border, var(--theme-border, #e5e7eb));
  background: var(--vi-surface-alt, var(--theme-surface-alt, #f8fafc));
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.menu a,
.quick-links a {
  text-decoration: none;
  border: 1px solid var(--vi-border, var(--theme-border, #e5e7eb));
  background: var(--vi-surface, var(--theme-surface, #fff));
  color: var(--vi-text, var(--theme-text, #1f2937));
  border-radius: var(--vi-radius, var(--theme-radius, 10px));
  padding: 0.35rem 0.7rem;
  font-size: 0.92rem;
}

.quick-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.store-main { flex: 1; }

.default-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.store-card {
  border: 1px solid var(--vi-border, var(--theme-border, #e5e7eb));
  background: var(--vi-surface-alt, var(--theme-surface-alt, #f8fafc));
  border-radius: var(--vi-radius, var(--theme-radius, 10px));
  padding: 1rem;
  margin-bottom: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.product-card {
  border: 1px solid var(--vi-border, var(--theme-border, #e5e7eb));
  border-radius: var(--vi-radius, var(--theme-radius, 10px));
  overflow: hidden;
  background: var(--vi-surface, var(--theme-surface, #fff));
}

.product-image {
  height: 180px;
  background: var(--vi-surface-alt, var(--theme-surface-alt, #f8fafc));
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body { padding: 0.9rem; }

.product-price {
  margin: 0.5rem 0;
  font-weight: 700;
}

.store-footer {
  border-top: 1px solid var(--vi-border, var(--theme-border, #e5e7eb));
  background: var(--vi-surface-alt, var(--theme-surface-alt, #f8fafc));
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.muted { color: var(--vi-muted, var(--theme-muted, #6b7280)); }

.store-pager {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.store-pager a,
.store-pager span {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--vi-border, var(--theme-border, #e5e7eb));
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
}

.store-pager .current {
  background: var(--vi-primary, var(--theme-primary, #3b82f6));
  color: #fff;
  border-color: transparent;
}

img[loading="lazy"] { content-visibility: auto; }

@media (max-width: 720px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-links {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
}
