:root {
  --bg: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #059669;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

main {
  flex: 1;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
}

header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1rem 1.5rem;
  color: white;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
}

@media (width >= 640px) {
  header {
    flex-direction: row;
    gap: 0.75rem;
    justify-content: center;
    padding: 0;
    text-align: left;
  }
}

header a {
  display: inline-block;
  flex-shrink: 0;
}

header img {
  display: block;
  width: 128px;
  height: 128px;
}

@media (width >= 640px) {
  header img {
    width: 196px;
    height: 196px;
  }
}

.header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 0;
}

@media (width >= 640px) {
  .header-text {
    margin-left: 0.5rem;
  }
}

.header-text h1 {
  margin: -0.75rem 0 0;
  font-size: 2.5rem;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.header-text p {
  margin: 0.35rem 0;
  font-size: 1.1rem;
  font-style: italic;
  color: rgb(255 255 255 / 80%);
}

.container {
  max-width: 1100px;
  padding: 1.25rem;
  margin: 0 auto;
}

.intro {
  max-width: 860px;
  padding: 0 0.25rem;
  margin: 1rem auto 2rem;
  color: var(--muted);
  text-align: left;
}

.intro h2 {
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
}

.intro p {
  margin: 0.25rem 0 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
}

.trust-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.trust-indicators span {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--muted);
}

.trust-indicators span::before {
  font-size: 1.1em;
  font-weight: bold;
  color: #059669; /* green checkmark */
  content: "✓";
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  justify-content: flex-start;
  margin: 1.5rem 0;
}

.categories-label {
  margin-right: 0.25rem;
  font-weight: 600;
  color: var(--muted);
}

.categories a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.categories a:hover {
  background: #e5e7eb;
}

.categories a.active {
  color: #fff;
  background: #374151;
  border-color: #374151;
}

@media (width <= 640px) {
  .categories {
    justify-content: center;
  }

  .categories-label {
    display: block;
    width: 100%;
    margin-bottom: 0.25rem;
    text-align: center;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

@media (width >= 900px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Square card styles */
.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  font-family: "SQ Market", Helvetica, Arial, sans-serif;
  background: #fff;
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 6%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.item:hover {
  box-shadow: 0 4px 10px rgb(0 0 0 / 10%);
  transform: translateY(-2px);
}

/* Media scroller */
.media {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.scroller {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.scroller::-webkit-scrollbar {
  height: 8px;
}

.scroller::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 8px;
}

.scroller > img {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1; /* keep cards square */
  scroll-snap-align: start;
  object-fit: cover;
  background: #f3f4f6; /* placeholder while loading */
}

.nav-btn {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  cursor: pointer;
  user-select: none;
  background: rgb(255 255 255 / 90%);
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 999px;
  transform: translateY(-50%);
}

.nav-btn:hover {
  background: #fff;
}

.nav-prev {
  left: 8px;
}

.nav-next {
  right: 8px;
}

.dots {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 0 8px;
}

.dot {
  width: 8px;
  height: 8px;
  background: rgb(255 255 255 / 65%);
  border: 1px solid rgb(0 0 0 / 15%);
  border-radius: 999px;
}

.dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

.item-content {
  box-sizing: border-box;
  width: 100%;
  padding: 16px;
  text-align: center;
}

.item-content p {
  margin: 0.4rem 0;
  font-size: 16px;
  line-height: 20px;
}

.item-content p.price {
  font-weight: 600;
}

.buy-button {
  display: inline-block;
  min-width: 180px;
  height: 44px;
  font-size: 16px;
  line-height: 44px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(
    180deg,
    var(--accent) 0%,
    var(--accent-hover) 100%
  );
  border: none;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 10%) inset;
  transition: background 0.2s;
}

.buy-button:hover {
  background-color: #0050cc;
}

footer {
  padding: 1rem;
  margin-top: auto;
  color: white;
  text-align: center;
  background: #1f2937;
}

footer .footer-content {
  max-width: 1100px;
  margin: 0 auto;
}

footer .footer-content p {
  margin: 0.5rem 0;
}

footer .footer-meta {
  color: #9ca3af;
}

footer a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: #93c5fd;
}
