/* blog.css - Styles specific to blog posts */

/* ========================================= */
/* BLOG POST LAYOUT */
/* ========================================= */

.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
}

/* Breadcrumb navigation */
.blog-breadcrumb {
  font-size: 0.875rem;
  color: var(--ink);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-link {
  color: var(--ink);
  text-decoration: none;
  text-transform: lowercase;
  font-weight: 500;
  transition: opacity 0.2s ease;
  cursor: default;
}

.breadcrumb-link:hover {
  opacity: 0.7;
}

.breadcrumb-separator {
  color: var(--ink);
  opacity: 0.5;
  user-select: none;
}

/* ========================================= */
/* BLOG HEADER - Title, Date, Instagram */
/* ========================================= */

.blog-header {
  margin-bottom: 32px;
}

.blog-title-bar {
  width: 100%;
  height: 4px;
  background: var(--ink);
  margin-bottom: 24px;
}

.blog-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px 0;
  color: var(--ink);
  text-align: left;
}

.blog-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 20px 0;
  color: var(--muted-text);
  text-align: left;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.blog-date {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
}

.blog-instagram-link {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-instagram-link:hover {
  color: var(--accent);
}

.blog-instagram-link svg {
  width: 20px;
  height: 20px;
}

/* ========================================= */
/* BLOG COVER IMAGE */
/* ========================================= */

.blog-cover-image-container {
  width: 100%;
  margin: 0 0 32px 0;
  border-radius: 8px;
  overflow: hidden;
}

.blog-cover-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ========================================= */
/* BLOG AUTHOR BLURB */
/* ========================================= */

.blog-author-blurb {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.blog-author-blurb p {
  margin: 0 0 8px 0;
  color: var(--ink);
  line-height: 1.6;
  font-size: 0.95rem;
}

.blog-author-blurb p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.blog-author-blurb strong {
  color: var(--ink);
  font-weight: 600;
}

/* ========================================= */
/* BLOG CONTENT */
/* ========================================= */

.blog-content {
  line-height: 1.7;
}

/* Blog post h3 headings (product names) */
.about-section h3 {
  font-size: 1.4rem;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--ink);
}

.about-section h3:first-of-type {
  margin-top: 0;
}

.about-section h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.about-section h3 a:hover {
  color: var(--accent);
}

/* Blog hat card - container for each hat section */
.blog-hat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0, 27, 46, 0.04);
}

/* Hat card title - spans full width at top */
.blog-hat-card > h3 {
  margin: 0 0 20px 0;
  text-align: left;
  font-size: 1.5rem;
}

/* Blog hat card body - grid container for image and content */
.blog-hat-card-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

/* Blog post hat images - left column */
.blog-hat-image-container {
  width: 100%;
}

.blog-hat-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: block;
}

/* Blog hat content - right column */
.blog-hat-content {
  display: flex;
  flex-direction: column;
}

/* Hat card description text */
.blog-hat-content > p {
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 16px;
}

/* Blog hat features component */
.blog-hat-features {
  margin: 0 0 16px 0;
  padding: 16px;
  background: #f8f9fa;
  border-left: 3px solid var(--yellow);
  border-radius: 4px;
}

.blog-hat-features p {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink);
}

.blog-hat-features p:last-child {
  margin-bottom: 0;
}

.blog-hat-features strong {
  color: var(--ink);
  font-weight: 600;
}

/* Blog post lists */
.about-section ul {
  margin: 16px 0;
  padding-left: 0;
  list-style: none;
}

.about-section ul li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 12px;
}

.about-section ul li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--accent);
  font-weight: bold;
}

/* Blog hat button container - separate section at bottom */
.blog-hat-button-container {
  margin-top: 24px;
  padding-top: 24px;
  text-align: center;
  width: 100%;
}

/* Subtle dotted divider above button */
.blog-hat-button-divider {
  width: 100%;
  height: 1px;
  border-top: 2px dotted var(--ink);
  margin-bottom: 20px;
  opacity: 0.4;
}

/* Blog post button spacing */
.blog-hat-content .btn {
  margin: 0;
  display: inline-block;
  width: 100%;
  max-width: 250px;
}

/* Yellow button for CTA section */
.btn--yellow {
  background: var(--yellow);
  color: var(--ink);
  border: none;
}

.btn--yellow:hover {
  background: #ffc720;
  transform: translateY(-1px);
}

/* Yellow bar below CTA section */
.blog-yellow-bar {
  width: 100%;
  height: 10px;
  background: var(--yellow);
  border-radius: 4px;
  margin-top: 32px;
}

/* Responsive adjustments for blog posts */
@media (max-width: 768px) {
  .blog-title {
    font-size: 2rem;
  }
  
  .blog-subtitle {
    font-size: 1.1rem;
  }
  
  .blog-meta {
    flex-wrap: wrap;
  }
  
  .blog-hat-card {
    padding: 20px;
    margin-bottom: 24px;
  }
  
  .blog-hat-card > h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }
  
  .blog-hat-card-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .blog-hat-image-container {
    width: 100%;
    max-width: 100%;
  }
  
  .blog-hat-image {
    height: auto;
    max-height: 300px;
  }
  
  .blog-cover-image-container {
    margin-left: -24px;
    margin-right: -24px;
    width: calc(100% + 48px);
    border-radius: 0;
  }
}

/* ========================================= */
/* BLOG PAGE CART FIXES */
/* ========================================= */

/* Hide cart button on blog pages - targets the cart icon button in header */
body:has(.blog-post) .header-actions .icon-btn[title="Cart"],
body:has(.blog-post) .header-actions .icon-btn[aria-label="Cart"],
body:has(.blog-post) .header-actions button[onclick*="toggleCart"],
body:has(.blog-post) .header-actions button[onclick*="toggle-cart"] {
  display: none !important;
}

/* Prevent drawer overlay from showing on blog pages - this fixes the greyed/highlighted effect */
/* Target both with and without Alpine.js inline styles - use multiple selectors for maximum compatibility */
body:has(.blog-post) .drawer-overlay,
body:has(.blog-post) .drawer-overlay[style],
body:has(.blog-post) [x-show].drawer-overlay {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  /* Force override any inline styles from Alpine.js x-show */
  background: transparent !important;
}

/* Also hide the drawer itself on blog pages to prevent any cart functionality */
body:has(.blog-post) .drawer {
  display: none !important;
  visibility: hidden !important;
}

