/* ===============================
   Base reset + typography
================================*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  background: #f7f7f7;
  color: #222;
  margin: 0;
  /* padding-top: 80px; match header height */
}



/* ===============================
   Layout containers
================================*/
/* .container {
  width: min(100% - 2rem, 900px);
  margin-inline: auto;
} */
.site-container {
  width: min(100% - 2rem, 900px);
  margin-inline: auto;
}

/* ===============================
   Header / Navigation
================================*/
#main-navigation {
    position: sticky;
  top: 0;
  z-index: 1000;

  background-color: #fff;
  padding: 1rem 2rem;

  display: flex;
  justify-content: space-between;
  align-items: center;

  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#main-navigation h1,
#main-navigation nav a {
  color: #222;
  text-decoration: none;
}

#main-navigation nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

#main-navigation nav a {
  padding: 0.25rem 0.5rem;
}

/* Mobile nav collapse */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.75rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  #main-navigation nav {
    display: none;
    flex-direction: column;
    margin-top: 0.75rem;
  }

  #main-navigation nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-block;
    margin-left: auto;
  }
}

/* ===============================
   Post Cards (home + all posts)
================================*/
.posts {
  margin-top: 2rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  transition: transform .15s;
}

.post-card:hover {
  transform: scale(1.02);
}

.post-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.post-card h3 {
  margin-bottom: 0.5rem;
}

.post-card a {
  text-decoration: none;
  color: #333;
}

.blog-card-img{
  width: 100%;
  height: auto;   
  object-fit: cover;
}

.card-body{
  display: flex;
  flex-direction: column;
}

.card-body a{
  margin-top: auto;
}
/* ===============================
   Blog excerpts (card view)
================================ */

/* Constrain images inside excerpts */
.blog-excerpt img {
  max-width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  display: block;
  margin: 0.5rem auto;
  border-radius: 6px;
}

/* CKEditor figures inside excerpts */
.blog-excerpt figure {
  margin: 0.5rem 0;
}

/* Prevent float-based layouts in cards */
.blog-excerpt figure.image-style-align-right,
.blog-excerpt figure.image-style-align-left,
.blog-excerpt figure.image-style-side,
.blog-excerpt figure.image-style-wrapText {
  float: none;
  max-width: 100%;
  margin: 0.5rem 0;
}


/* ===============================
   Footer
================================*/
footer {
  text-align: center;
  padding: 1.5rem;
  margin-top: 2rem;
  background: #e8e8e8;
}
.footer-logo {
  max-width: 160px;
  height: auto;
}


/* ===============================
   Product Page Styles
================================*/
.gallery-thumb {
    cursor: pointer;
    height: 80px;
    object-fit: cover;
    transition: transform 0.2s ease, border 0.2s ease;
}

.gallery-thumb:hover {
    transform: scale(1.05);
    border: 2px solid #ff8800;
}

.locked {
    pointer-events: none;
    opacity: 0.6;
}

.out-of-stock {
    opacity: 0.6;
    cursor: not-allowed;
}

.product-item[data-out-of-stock="true"] {
    border-left: 4px solid #ffc107;
    background: #fffbea;
}
/* ===============================
   Product Detail – CKEditor content
================================ */
.product-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* CKEditor often wraps images in <figure class="image ..."> */
.product-body figure.image {
  margin: 1rem 0;
}

/* Common CKEditor 5 alignment classes (what you're seeing in DevTools) */
.product-body figure.image-style-align-right {
  float: right;
  max-width: 45%;
  margin: 0 0 1rem 1.5rem;
}

.product-body figure.image-style-align-left {
  float: left;
  max-width: 45%;
  margin: 0 1.5rem 1rem 0;
}

/* If you also use the “side/wrap/break/inline” styles */
.product-body figure.image-style-side {
  float: right;
  max-width: 45%;
  margin: 0 0 1rem 1.5rem;
}

.product-body figure.image-style-wrapText {
  float: left;
  max-width: 45%;
  margin: 0 1.5rem 1rem 0;
}

.product-body figure.image-style-breakText {
  float: none;
  max-width: 100%;
  margin: 1.25rem 0;
}

.product-body figure.image-style-inline {
  display: inline-block;
  max-width: 300px;
  margin: 0 0.75rem;
}

/* Make the actual <img> fill its figure box */
.product-body figure.image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Clear floats */
.product-body::after {
  content: "";
  display: block;
  clear: both;
}

/* Mobile: disable floats */
@media (max-width: 768px) {
  .product-body figure.image-style-align-right,
  .product-body figure.image-style-align-left,
  .product-body figure.image-style-side,
  .product-body figure.image-style-wrapText {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }
}

/* ===============================
   CK styling
================================ */

.ck-content p { margin-bottom: 0.75rem; }
.ck-content ul, .ck-content ol { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.ck-content li { margin-bottom: 0.25rem; }
.ck-content h2, .ck-content h3, .ck-content h4 { margin-top: 1rem; }

/* Make CKEditor images responsive inside FAQ */
.ck-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Optional: nicer spacing */
.ck-content figure {
  margin: 0.75rem 0;
}

.ck-content figcaption {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

/* Prevent huge images from stretching accordion */
.accordion-body {
  overflow-wrap: anywhere;
}

/* Optional: limit very tall images so the accordion doesn't become enormous */
.ck-content img {
  max-height: 700px;       /* adjust or remove */
  object-fit: contain;
}
/* ===============================
   Search Container
================================ */


.search-container {
    position: relative;
}



#product-results {
    position: absolute;
    top: 100%;              /* directly below input */
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #ddd;
    z-index: 2000;          /* higher than navbar */
    max-height: 360px;      /* IMPORTANT */
    overflow-y: auto;       /* scroll instead of pushing */
}

.search-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.search-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

.search-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.search-item:hover {
    background: #f8f9fa;
}


/* ===============================
   Post Detail Page
================================*/
/* Featured image only (top image field) */
.post-detail .featured-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 10px;
  margin: 1.5rem auto;
  display: block;
}


.post-detail h1 {
  margin-bottom: 1rem;
  line-height: 1.3;
}

/* --- CKEditor content wrapper --- */
/* CKEditor figure container */
.post-body figure.image {
  display: block;
  margin: 1rem 0;
}

/* Align right */
.post-body figure.image-style-align-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

/* Align left */
.post-body figure.image-style-align-left {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

/* Keep CKEditor "resize" width working, but prevent huge images */
.post-body figure.image.image_resized {
  max-width: 45%;
}

/* Image itself */
.post-body figure.image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Clear floats */
.post-body::after {
  content: "";
  display: block;
  clear: both;
}

/* Mobile: remove floats */
@media (max-width: 768px) {
  .post-body figure.image-style-align-right,
  .post-body figure.image-style-align-left,
  .post-body figure.image.image_resized {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }
}

/*Checkout mobile view*/
.checkout-card {
  max-width: 500px;
  width: 100%;
  border-radius: 20px;
}

.paypal-button-center {
  display: flex;
  justify-content: center;
}

.paypal-button-center #paypal-button-container {
  width: 100%;
  max-width: 320px;
}

@media (min-width: 768px) {
  .paypal-button-center #paypal-button-container {
    max-width: 460px;
  }
}

html, body {
  overflow-x: hidden;
}

/*Saved for later inside cart page */
/* Fix Saved-for-later title overlay on mobile */
.saved-for-later-title {
    position: static !important;
    display: block;
    margin-left: 0 !important;
    margin-top: 0.25rem;
    white-space: normal;
    word-break: break-word;
}

.saved-for-later-title {
    line-height: 1.2;
}

/* Store cards */
.store-card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

/* Cart */
.cart-item-img {
  width: 100%;
  max-width: 180px;
  height: 180px;
  object-fit: cover;
}
