/* ============================================
   JORUVA INDUSTRIAL - OWS CATEGORY PAGE
   Module: 12-ows.css
   Page ID: 1848 (Oil-Water Separators)
   
   Forces dark theme on OWS landing page
   Overrides Astra theme light defaults
   ============================================ */

/* ==== NUCLEAR OPTION: Force Dark on Everything ==== */
body.page-id-1848 {
  background: #0a0a0a !important;
  background-color: #0a0a0a !important;
}

/* ---- Hide Gutenberg Page Title Block ---- */
body.page-id-1848 .entry-title,
body.page-id-1848 .ast-archive-description,
body.page-id-1848 .page-header,
body.page-id-1848 h1.entry-title,
body.page-id-1848 .ast-title-heading-wrap,
body.page-id-1848 header.entry-header,
body.page-id-1848 .ast-single-post-order h1,
body.page-id-1848 .ast-the-title,
body.page-id-1848 .page-title {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---- Force Dark Background EVERYWHERE ---- */
body.page-id-1848,
body.page-id-1848 #page,
body.page-id-1848 #content,
body.page-id-1848 .site,
body.page-id-1848 .site-content,
body.page-id-1848 .ast-container,
body.page-id-1848 .entry-content,
body.page-id-1848 .ast-single-post,
body.page-id-1848 article,
body.page-id-1848 article.page,
body.page-id-1848 article.type-page,
body.page-id-1848 main,
body.page-id-1848 main#main,
body.page-id-1848 .site-main,
body.page-id-1848 #primary,
body.page-id-1848 .content-area,
body.page-id-1848 .ast-separate-container,
body.page-id-1848 .ast-plain-container,
body.page-id-1848 .ast-page-builder-template,
body.page-id-1848 .ast-article-single,
body.page-id-1848 .ast-article-post {
  background: #0a0a0a !important;
  background-color: #0a0a0a !important;
}

/* ---- Astra Plain Container Specific ---- */
body.ast-plain-container.page-id-1848 .site-content,
body.ast-plain-container.page-id-1848 .ast-container,
body.ast-plain-container.page-id-1848 #primary,
body.ast-plain-container.page-id-1848 .site-main {
  background: #0a0a0a !important;
  background-color: #0a0a0a !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* ---- Remove Theme Wrapper Padding/Margins ---- */
body.page-id-1848 .entry-content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  background: transparent !important;
}

body.page-id-1848 .ast-container {
  max-width: 100% !important;
  padding: 0 !important;
  width: 100% !important;
}

body.page-id-1848 .site-content > .ast-container {
  padding: 0 !important;
  max-width: 100% !important;
}

body.page-id-1848 #primary {
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 100% !important;
  width: 100% !important;
  background: #0a0a0a !important;
}

/* ---- Content Area Full Width ---- */
body.page-id-1848 .ast-separate-container .ast-article-single,
body.page-id-1848 .ast-separate-container .ast-article-post,
body.page-id-1848 .ast-plain-container .ast-article-single,
body.page-id-1848 .ast-plain-container .ast-article-post {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.page-id-1848 .ast-separate-container #primary,
body.page-id-1848 .ast-plain-container #primary {
  background: #0a0a0a !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.page-id-1848 article.post,
body.page-id-1848 article.page,
body.page-id-1848 article.type-page {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ---- Typography Enforcement ---- */
body.page-id-1848 {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  color: #ffffff !important;
}

body.page-id-1848 h1,
body.page-id-1848 h2,
body.page-id-1848 h3,
body.page-id-1848 h4,
body.page-id-1848 h5,
body.page-id-1848 h6 {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body.page-id-1848 p,
body.page-id-1848 span,
body.page-id-1848 li,
body.page-id-1848 td,
body.page-id-1848 th {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* ---- Breadcrumb Hide or Dark Theme ---- */
body.page-id-1848 .ast-breadcrumbs,
body.page-id-1848 nav.ast-breadcrumbs,
body.page-id-1848 .ast-breadcrumbs-wrapper {
  display: none !important;
}

/* ---- Remove Any Box Shadows / Borders from Theme ---- */
body.page-id-1848 .ast-separate-container .ast-article-single,
body.page-id-1848 .ast-separate-container #primary,
body.page-id-1848 .ast-plain-container .ast-article-single,
body.page-id-1848 .ast-plain-container #primary,
body.page-id-1848 article {
  box-shadow: none !important;
  border: none !important;
}

/* ---- Fix for Astra's White Space at Top ---- */
body.page-id-1848 .site-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.page-id-1848 #content {
  padding-top: 0 !important;
}

/* ---- Override Astra's Default Content Styling ---- */
body.page-id-1848 .ast-single-post {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---- Ensure Links Are Visible ---- */
body.page-id-1848 a {
  color: inherit;
}

body.page-id-1848 a:hover {
  color: inherit;
  opacity: 0.9;
}

/* ---- Override Any Inline White Backgrounds from WP ---- */
body.page-id-1848 .wp-block-group,
body.page-id-1848 .wp-block-cover,
body.page-id-1848 .wp-block-columns {
  background: transparent !important;
}

/* ============================================
   PRODUCT CARD GRID FIX
   WordPress inserts <p> tags between inline divs,
   breaking CSS Grid. These rules force proper grid
   behavior regardless of wrapper elements.
   ============================================ */

/* ---- Kill WordPress Auto-P Tags in Grid Containers ---- */
body.page-id-1848 .entry-content > div[style*="display: grid"] > p,
body.page-id-1848 .entry-content div[style*="display: grid"] > p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---- Product Card Grid - 3 Column (Standard Models) ---- */
body.page-id-1848 .ows-product-grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  width: 100% !important;
}

body.page-id-1848 .ows-product-grid-3 > * {
  min-width: 0 !important;
}

/* ---- Product Card Grid - 2 Column (IBC Models) ---- */
body.page-id-1848 .ows-product-grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
  width: 100% !important;
}

/* ---- Service Kit Grid - 3 Column ---- */
body.page-id-1848 .ows-servkit-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  width: 100% !important;
}

/* ---- Product Card Consistent Heights ---- */
body.page-id-1848 .ows-product-card {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 12px !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 280px !important;
}

body.page-id-1848 .ows-product-card-content {
  flex-grow: 1 !important;
}

body.page-id-1848 .ows-product-card .ows-card-cta {
  margin-top: auto !important;
}

/* ---- IBC Card Styling ---- */
body.page-id-1848 .ows-ibc-card {
  background: rgba(126,197,95,0.05) !important;
  border: 1px solid rgba(126,197,95,0.2) !important;
  border-radius: 12px !important;
  padding: 28px !important;
  display: grid !important;
  grid-template-columns: 1fr 140px !important;
  gap: 20px !important;
  align-items: center !important;
}

/* ---- Service Kit Card Styling ---- */
body.page-id-1848 .ows-servkit-card {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 12px !important;
  padding: 24px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 140px !important;
}

/* ---- Force Grid on Inline Style Containers ---- */
body.page-id-1848 .entry-content div[style*="grid-template-columns: repeat(3, 1fr)"] {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
}

body.page-id-1848 .entry-content div[style*="grid-template-columns: repeat(2, 1fr)"] {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 992px) {
  /* Tablet: 3-col becomes 2-col */
  body.page-id-1848 .ows-product-grid-3,
  body.page-id-1848 .ows-servkit-grid,
  body.page-id-1848 .entry-content div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* IBC cards stack */
  body.page-id-1848 .ows-ibc-card {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }
  
  body.page-id-1848 .ows-ibc-card img {
    max-width: 200px !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 600px) {
  /* Mobile: Everything single column */
  body.page-id-1848 .ows-product-grid-3,
  body.page-id-1848 .ows-product-grid-2,
  body.page-id-1848 .ows-servkit-grid,
  body.page-id-1848 .entry-content div[style*="grid-template-columns: repeat(3, 1fr)"],
  body.page-id-1848 .entry-content div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  
  body.page-id-1848 .ows-product-card {
    min-height: auto !important;
  }
}
