/* Minimal modern styles (mobile-first) */
:root {
  --max-width: 1200px;
  --accent: #06b6d4; /* modern teal/cyan */
  --bg: #f7f9fb;
  --surface: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --muted-2: #94a3b8;
  --glass: rgba(255,255,255,0.6);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  color: inherit;
}
/* Logo image inside header */
.logo-img {
  height: 36px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}
.logo-text {
  display: none;
}
.nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--muted);
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.hero {
  position: relative;
  text-align: center;
  padding: 0;
  margin-bottom: 2rem;
}
.hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.hero-content {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 20%;
  color: white;
  text-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
  width: 90%;
  max-width: 600px;
}
.hero h1 {
  font-size: 1.4rem;
  margin: 0;
  line-height: 1.2;
}
.btn {
  display: inline-block;
  margin-top: 1rem;
  background: var(--accent);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
}
.featured {
  padding: 2rem 0;
  clear: both;
}
.hero-content p {
  font-size: 0.95rem;
  margin: 0.5rem 0;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, 1fr);
}
.card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(2,6,23,0.12);
}
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* Make the image link occupy the full width and be block-level */
.card-image-link {
  display: block;
}

/* Product name link */
.product-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.product-link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.card-body {
  padding: 1rem;
}
.card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
  line-height: 1.2;
}
.price {
  color: var(--accent);
  font-weight: 700;
  margin-top: 0.75rem;
}

/* Muted excerpt */
.excerpt {
  color: var(--muted-2);
  margin: 0.25rem 0 0 0;
}

/* Responsive adjustments for image height */
@media (min-width: 700px) {
  .card img { height: 260px; }
  .hero-content {
    top: 35%;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }
  .btn {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }
}
@media (min-width: 1000px) {
  .card img { height: 220px; }
  .hero-content {
    top: 40%;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Mobile: compact, horizontal card layout for better scannability and tap targets */
@media (max-width: 699px) {
  .hero {
    margin-bottom: 1.5rem;
  }
  .hero-content {
    top: 15%;
  }
  .hero h1 {
    font-size: 1.2rem;
  }
  .hero-content p {
    font-size: 0.85rem;
  }
  .btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .card {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.5rem;
    border-radius: 10px;
  }

  .card-image-link img {
    width: 40%;
    height: auto;
    border-radius: 8px;
    display: block;
  }

  .card-body {
    padding: 0.25rem 0 0.25rem 0;
    flex: 1 1 auto;
    min-width: 0; /* allow text truncation */
  }

  .card h3 {
    font-size: 1rem;
    margin: 0 0 0.4rem 0;
  }

  .product-link {
    display: inline-block;
    padding: 6px 4px; /* increase tap area */
  }

  .excerpt {
    font-size: 0. ninerem;
    margin: 0 0 0.4rem 0;
  }

  .price {
    margin-top: 0.4rem;
    font-size: 0.95rem;
  }
}

/* Very small screens: stack image above content for readability */
@media (max-width: 420px) {
  .card {
    flex-direction: column;
    padding: 0;
  }
  .card-image-link img {
    width: 100%;
    height: 200px;
    border-radius: 10px 10px 0 0;
  }
  .card-body {
    padding: 0.75rem;
  }
  .excerpt { font-size: 0.92rem; }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #07101a;
    --card: #07101a;
    --text: #e6eef6;
    --muted: #9fb0c8;
    --muted-2: #7f95ab;
    --glass: rgba(255,255,255,0.04);
    --accent: #7dd3fc;
  }
  body { background: var(--bg); color: var(--text); }
  .site-header { background: var(--surface); border-bottom-color: rgba(255,255,255,0.03); }
  .card { background: var(--card); box-shadow: 0 6px 30px rgba(2,6,23,0.6); }
  .nav a { color: var(--muted); }
}
.site-footer {
  padding: 1.25rem 0;
  text-align: center;
  color: var(--muted);
}
.product-detail {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.gallery img {
  width: 100%;
  border-radius: 12px;
}
.details {
  padding: 0;
}
.price-large {
  font-size: 1.5rem;
  color: var(--accent);
}

/* Larger screens */
@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-detail {
    grid-template-columns: 1fr 380px;
  }
}
@media (min-width: 1000px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-content {
    top: 40%;
  }
}

/* Search + Filter */
.product-controls {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}
.product-controls input,
.product-controls select {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  width: 100%;
  max-width: 220px;
}

/* Fade animation */
.fade-in {
  animation: fade 0.4s ease-out;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}
.fade-page {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.fade-page.loaded {
  opacity: 1;
}
