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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #233142;
  background: #fff;
  line-height: 1.6;
}

a {
  color: #0ba6d6;
  text-decoration: none;
}

a:hover {
  color: #00c3eb;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */
.site-header {
  background: #fff;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-logo img {
  height: 40px;
  display: block;
}

.header-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.header-nav a {
  color: #233142;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: #00c3eb;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, rgba(11,166,214,0.85) 0%, rgba(26,26,46,0.8) 100%), url(img-hero.png) center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 5rem 1.5rem;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Section */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 700;
}

/* Blog cards grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

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

.blog-card-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
}

.blog-card-img.grad-1 { background: linear-gradient(135deg, #0ba6d6, #6c5ce7); }
.blog-card-img.grad-2 { background: linear-gradient(135deg, #e17055, #d63031); }
.blog-card-img.grad-3 { background: linear-gradient(135deg, #00b894, #00cec9); }
.blog-card-img.grad-4 { background: linear-gradient(135deg, #fdcb6e, #e17055); }
.blog-card-img.grad-5 { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }

.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-card-body p {
  font-size: 0.92rem;
  color: #555;
  flex: 1;
  margin-bottom: 1rem;
}

.read-more {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0ba6d6;
  transition: color 0.2s;
}

.read-more:hover {
  color: #00c3eb;
}

/* Blog post page */
.post-header {
  background: linear-gradient(135deg, #0ba6d6 0%, #1a1a2e 100%);
  color: #fff;
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.post-header h1 {
  font-size: 2rem;
  max-width: 800px;
  margin: 0 auto;
  font-weight: 800;
}

.post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.post-content p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.post-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  font-weight: 700;
}

/* Product cards */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

.product-card {
  display: flex;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.product-card > img {
  width: 220px;
  min-height: 200px;
  object-fit: contain;
  background: #f8f9fa;
  padding: 1rem;
  flex-shrink: 0;
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-info h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.product-brand {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.product-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #233142;
}

.btn-buy {
  display: inline-block;
  background: #0ba6d6;
  color: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn-buy:hover {
  background: #00c3eb;
  color: #fff;
  transform: scale(1.03);
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: #1a1a2e;
  color: #999;
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: #ccc;
  margin: 0 0.5rem;
}

.site-footer a:hover {
  color: #00c3eb;
}

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

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .product-card {
    flex-direction: column;
  }

  .product-card > img {
    width: 100%;
    min-height: 180px;
    max-height: 220px;
  }

  .header-nav {
    gap: 1rem;
  }

  .header-nav a {
    font-size: 0.85rem;
  }

  .post-header h1 {
    font-size: 1.5rem;
  }
}

/* Post hero images */
.post-hero {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
  border-radius: 12px;
  margin: -1rem auto 2rem;
  max-width: 900px;
  padding: 0 1rem;
  box-sizing: border-box;
}
.post-hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Blog card images on index */
.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  display: block;
}
