/* ============================================================
   shaolin_organic — Minimal Overrides
   template.css + preset1.css provide 95% of styling.
   This file only:
   1. Neutralizes Cassiopeia chrome that breaks Helix skeleton
   2. Provides HikaShop homepage product grid
   3. Fixes BS5/BS2 conflicts
   ============================================================ */

/* --- Kill Cassiopeia header/brand/page chrome --- */
body.bg #top,
header.header.container-header,
header .grid-child,
header .navbar-brand,
header .container-nav,
header .container-search,
header .site-description,
.site-grid,
.grid-child.container-component,
.grid-child.container-sidebar-right {
  all: unset;
}

body.bg {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 22px;
  color: #666;
  background: #fff;
}

/* Hide Cassiopeia's default page-header "Home" title + breadcrumbs on homepage */
body.homepage .page-header,
body.homepage .blog-featured .page-header,
body.homepage #sp-subheader-wrapper {
  display: none;
}

/* ============================================================
   FEATURE ICONS — FA6 <i> needs the old img-circle box styles
   (template.css only styles .feature-img-wrapper img)
   ============================================================ */
#sp-feature-wrapper {
  padding: 60px 0 40px;
}
#sp-feature-wrapper .feature-img-wrapper i {
  display: inline-block;
  width: 76px;
  height: 76px;
  line-height: 72px;
  font-size: 30px;
  text-align: center;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 100%;
  background: transparent;
  transition: all 200ms;
}
/* neutralize preset1 hover rule aimed at i:before */
#sp-feature-wrapper .sp-feature-item-wrapper:hover .feature-img-wrapper i:before {
  border: none;
  background: transparent;
}
#sp-feature-wrapper .sp-feature-item-wrapper:hover .feature-img-wrapper i {
  border-color: #4c832f;
  background: #579536;
}

/* ============================================================
   SECTION HEADINGS (h3.header from sp_xhtml chrome)
   ============================================================ */
body.homepage #sp-featured-products-wrapper h3.header {
  display: block;
  text-align: center;
  margin-bottom: 55px;
}

/* ============================================================
   NEWSLETTER FORM
   ============================================================ */
#sp-news-letter-wrapper .newsletter-field .acyfield_email input {
  max-width: 420px;
  float: right;
  width: 100%;
  height: 34px;
  padding: 8px 12px;
  border: 2px solid #fff;
  background: transparent !important;
  color: rgba(255,255,255,.6);
  border-radius: 0 !important;
  font-size: 14px;
  box-sizing: border-box;
}
#sp-news-letter-wrapper .acymailing_form {
  overflow: hidden;
}

/* ============================================================
   BOTTOM COLS content helpers (also covers modules without sfx)
   ============================================================ */
#sp-bottom-wrapper ul.ft-links {
  margin: 0;
  list-style: none;
}
#sp-bottom-wrapper ul.ft-links li {
  list-style: none;
  margin-bottom: 8px;
}
#sp-bottom-wrapper .gallery-thumbs a {
  float: left;
  position: relative;
  overflow: hidden;
  margin: 3px;
}
#sp-bottom-wrapper .gallery-thumbs a img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  transition: all 300ms;
}
#sp-bottom-wrapper .gallery-thumbs a:hover img {
  transform: scale(1.2);
}

/* --- Homepage HikaShop Product Grid --- */
.homepage .hikashop_products .hk-row-fluid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding-top: 55px;
}

.homepage .hikashop_product .hikashop_subcontainer {
  border: 1px solid #efefef;
  border-radius: 2px;
  padding: 1rem;
  background: #fff;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  height: 100%;
  text-align: center;
}

.homepage .hikashop_product:hover .hikashop_subcontainer {
  border-color: #62a83d;
  box-shadow: 0 8px 20px rgba(98,168,61,.16);
  transform: translateY(-3px);
}

.homepage .hikashop_product_image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hikashop_product_name { display: block; margin-top: .5rem; }
.hikashop_product_name a { color: #666; font-weight: 700; text-decoration: none; }
.hikashop_product_name a:hover { color: #62a83d; }
.hikashop_product_price_full { display: block; margin-top: .35rem; }
.hikashop_product_price { color: #62a83d; font-weight: 800; font-size: 16px; }

.homepage button.hikacart,
.hikashop_product button.hikabtn {
  background: #62a83d;
  border: none;
  color: #fff;
  border-radius: 2px;
  padding: 5px 14px;
  margin-top: .6rem;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  transition: background .2s;
}

.homepage button.hikacart:hover,
.hikashop_product button.hikabtn:hover {
  background: #7bc256;
}

/* Hide inline clear divs from HikaShop */
.hikashop_products_listing div[style*="clear"] { display: none; }

/* --- Sidebar module headers (sp_xhtml chrome) --- */
.module .mod-wrapper h3.header {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #000;
  margin-bottom: 19px;
  border-bottom: 3px solid #62a83d;
  padding-bottom: 8px;
}

/* --- Subpage main body layout override ---
   On subpages, #sp-main-body-wrapper uses BS2 grid.
   The right sidebar uses #sp-right. */
body.subpage #sp-main-body-wrapper .span9 {
  padding-right: 30px;
}
body.subpage #sp-main-body-wrapper .span3 {
  padding-left: 15px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  .homepage .hikashop_products .hk-row-fluid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px) {
  .homepage .hikashop_products .hk-row-fluid {
    grid-template-columns: 1fr;
  }
}

/* --- Optimized CTA background (WebP instead of 11MB PNG) --- */
#sp-call-to-action-wrapper {
  background: url('../images/call-to-action-bg.webp') no-repeat 0 0;
  background-size: cover;
}
