/* ==========================================================================
   GREENMANGO INTEGRATION LAYER
   Everything the static design did not need but the live site does: the
   category dropdown in the nav, admin-authored CMS page content, the search
   dialog, and the handful of places where a static element became a link.
   Loaded after style.css and pages.css.
   ========================================================================== */

/* ---- logo comes from the CDN at an arbitrary aspect ratio ---- */
.navbar-brand img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

/* ==========================================================================
   NAV: PRODUCT CATEGORY DROPDOWN
   The category list is admin-driven, so the nav needs a dropdown the static
   design never had. Themed to match .main-nav rather than Bootstrap default.
   ========================================================================== */
.main-nav .dropdown-toggle::after {
  margin-left: 0.4rem;
  vertical-align: 0.13em;
  border-top-width: 0.28em;
  opacity: 0.6;
}
.main-nav .dropdown-menu {
  --bs-dropdown-min-width: 15rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 0.5rem;
  margin-top: 0.35rem;
  box-shadow: 0 18px 44px rgba(11, 61, 46, 0.14);
  background-color: var(--white);
}
.main-nav .dropdown-item {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: 5px;
  padding: 0.55rem 0.8rem;
  white-space: normal;
  transition: var(--transition);
}
.main-nav .dropdown-item:hover,
.main-nav .dropdown-item:focus {
  background-color: var(--cream);
  color: var(--primary);
}

@media (min-width: 992px) {
  /* open on hover, the way the rest of the nav behaves */
  .main-nav .nav-item.dropdown:hover > .dropdown-menu { display: block; }
}

@media (max-width: 991.98px) {
  /* inside the drawer the menu is a plain indented list, not a popover */
  .main-nav .dropdown-menu {
    border: none;
    box-shadow: none;
    padding: 0 0 0.75rem 0.75rem;
    margin: 0;
    background: transparent;
  }
  .main-nav .dropdown-item { padding: 0.6rem 0; }
  .main-nav .dropdown-item:hover { background: transparent; }
}

/* ==========================================================================
   SEARCH DIALOG
   ========================================================================== */
#searchModal .modal-content {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background-color: var(--white);
}
#searchModal .modal-header { border-bottom: 1px solid var(--border-soft); }
#searchModal .modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
}
#searchModal .form-control {
  font-family: var(--font-body);
  font-size: 15px;
  border: 1px solid var(--border);
  padding: 0.75rem 0.9rem;
}
#searchModal .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(241, 98, 33, 0.12);
}
#searchModal .btn-primary-fill { margin-top: 0; border-radius: 0 6px 6px 0; }

/* ==========================================================================
   FILTER CHIPS
   Server-side category links, so they render as <a> where the design used
   <button> — restore the button-ish box model.
   ========================================================================== */
a.filter-chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1.4;
}
a.filter-chip.is-active,
a.filter-chip.is-active:hover { color: var(--white); }

/* ==========================================================================
   PAGINATION
   The design marked the current/disabled boxes on <a>; disabled ones are now
   inert <span> so they cannot be clicked.
   ========================================================================== */
span.page-link-box {
  cursor: default;
  pointer-events: none;
}

/* ==========================================================================
   PRODUCT CARDS
   Equal-height cards in the carousel and the grid, whatever the title length.
   ========================================================================== */
.products-swiper .swiper-slide { height: auto; }
.products-swiper .product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.products-swiper .product-card-body,
.product-grid .product-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.product-card .product-actions { margin-top: auto; }

.grid-empty a { color: var(--primary); font-weight: 600; }

/* ==========================================================================
   CMS PAGE CONTENT
   About, Vision, Terms and friends are authored in the admin panel, so their
   markup is whatever the editor produced. Give it the theme's typography.
   ========================================================================== */
.cms-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.cms-content > *:first-child { margin-top: 0; }
.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4,
.cms-content h5,
.cms-content h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin: 2.25rem 0 0.9rem;
}
.cms-content h1 { font-size: 2.4rem; }
.cms-content h2 { font-size: 2rem; }
.cms-content h3 { font-size: 1.45rem; }
.cms-content h4 { font-size: 1.2rem; }
.cms-content p { margin-bottom: 1.15rem; }
.cms-content a { color: var(--primary); font-weight: 500; }
.cms-content a:hover { color: var(--secondary); text-decoration: underline; }

.cms-content ul,
.cms-content ol {
  list-style: revert;
  padding-left: 1.4rem;
  margin-bottom: 1.25rem;
}
.cms-content li { margin-bottom: 0.5rem; }

.cms-content img {
  border-radius: 8px;
  margin: 1.25rem 0;
  height: auto;
}
.cms-content blockquote {
  border-left: 3px solid var(--spice-gold);
  padding: 0.35rem 0 0.35rem 1.25rem;
  margin: 1.75rem 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-primary);
}
.cms-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.cms-content th,
.cms-content td {
  border: 1px solid var(--border-soft);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 15px;
}
.cms-content th {
  background-color: var(--cream);
  font-weight: 600;
  color: var(--text-primary);
}
/* editor content routinely carries fixed-width tables and wide images */
.cms-content { overflow-wrap: break-word; }
.cms-content .table-scroll,
.cms-content figure { overflow-x: auto; }

/* ==========================================================================
   ADMIN PREVIEW
   The admin shell renders the page without the site header/footer.
   ========================================================================== */
.form-wrapper .enquiry-form { margin-top: 0; }
