/* ===== Global Reset ===== */
:root {
  --brand-primary: #1A4FFF;
  --brand-accent: #FF9900;
  --bg-light: #F7F7F7;
  --bg-dark: #121212;
  --card-light: #FFFFFF;
  --card-dark: #1E1E1E;
  --text-light: #222222;
  --text-dark: #E6E6E6;
  --border: #E5E5E5;
}

/* Auto Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: var(--bg-dark);
    --text-light: var(--text-dark);
    --card-light: var(--card-dark);
    --border: #333333;
  }
}

/* Pinterest-optimized tall images */
.pin-image {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  background: #fafafa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f7f7f7;
  color: #222;
  line-height: 1.6;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

/* ===== Grid Layout ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* ===== Card Style ===== */
.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding-bottom: 10px;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #fafafa;
}

.card h2 {
  font-size: 1.1rem;
  margin: 12px;
  color: #333;
}

.card .date {
  font-size: 0.85rem;
  color: #777;
  margin: 0 12px 8px;
}

.card p {
  margin: 0 12px 10px;
  color: #444;
}

.details-link {
  color: #0078ff;
  font-weight: 600;
  text-decoration: none;
}

.details-link:hover {
  text-decoration: underline;
}

/* ===== Product Page ===== */
.product {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  margin-top: 20px;
}

.product h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.product .date {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
}

.product-image {
  width: 100%;
  max-width: 600px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: block;
}

.product .content {
  margin-bottom: 25px;
  font-size: 1rem;
  color: #333;
}

/* ===== Affiliate Button ===== */
.affiliate {
  display: inline-block;
  background: #ff9900;
  color: #111;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.affiliate:hover {
  background: #e68a00;
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .product {
    padding: 15px;
  }
}

.sdf-card {
  position: relative;
}

/* Make sure the card can position the ribbon */
.sdf-card {
  position: relative;
  overflow: hidden; /* keeps the ribbon edges clean */
}

/* Ensure card can position the ribbon */
.sdf-card {
  position: relative;
  overflow: hidden;
}

/* Ensure card can position the ribbon */
.sdf-card {
  position: relative;
  overflow: hidden;
}
