/*
Theme Name: HydroFire Core Theme
Theme URI: https://hydrofire.bg/
Author: HydroFire
Description: Independent test theme for HydroFire.bg. Activate ONLY on staging.
Version: 0.2.6
Requires PHP: 7.4
Text Domain: hydrofire-core
*/
:root{--hf-navy:#102b49;--hf-orange:#ff6b13;--hf-border:#e1e8f0}*{box-sizing:border-box}body{margin:0;color:var(--hf-navy);font-family:Arial,Helvetica,sans-serif;background:#fff}a{color:inherit}img{max-width:100%;height:auto}.hf-core-main{min-height:55vh}.hf-core-wrap{width:min(1200px,calc(100% - 36px));margin:auto}.hf-core-section{padding:44px 0 70px}.hf-core-title{font-size:clamp(28px,3.5vw,44px);margin:0 0 24px}.hf-core-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.hf-core-product{border:1px solid var(--hf-border);border-radius:14px;padding:15px;display:flex;flex-direction:column;gap:12px;text-decoration:none;background:#fff}.hf-core-product img{width:100%;aspect-ratio:1;object-fit:contain}.hf-core-product h2{font-size:16px;margin:0;line-height:1.45}.hf-core-price{margin-top:auto;font-weight:700;color:var(--hf-navy)}.hf-core-search{display:flex;max-width:620px;gap:8px;margin:0 0 24px}.hf-core-search input{flex:1;min-width:0;border:1px solid var(--hf-border);padding:13px;border-radius:8px;font-size:16px}.hf-core-search button{background:var(--hf-orange);border:0;border-radius:8px;color:#fff;padding:12px 22px;cursor:pointer}.hf-core-footer-fallback{background:var(--hf-navy);color:#fff;text-align:center;padding:30px}.hf-core-content{line-height:1.7}.hf-core-content img{height:auto}.hf-core-notice{background:#f4f8fc;border:1px solid var(--hf-border);padding:18px;border-radius:10px}.hf-core-pagination{margin-top:28px}.hf-core-pagination .page-numbers{margin-right:12px}.woocommerce .hf-core-wrap{max-width:1200px}@media(max-width:900px){.hf-core-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.hf-core-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hf-core-section{padding:24px 0 45px}.hf-core-product{padding:10px}.hf-core-product h2{font-size:14px}}

/* v0.1.4: promotions-only mobile header; desktop retains sitewide Global Header. */
.hf-core-promotions-mobile-header{display:none!important}
@media(max-width:1024px){
  .hf-core-promotions-mobile-header{display:block!important;position:relative;z-index:100}
  .hf-core-promotions-mobile-header>.hfg-preview{display:block!important;position:relative!important}
  .hf-core-promotions-mobile-header .hfg-header{display:grid!important}
  .hf-core-promotions-mobile-header .hfg-desktop{display:none!important}
}

/* Defensive desktop guard: never show the Promotions-only mobile bridge on desktop. */
@media (min-width:1025px){html body .hf-core-promotions-mobile-header[data-hf-core-promotions-header="1"]{display:none!important}}


/* HydroFire v0.1.6 — presentation-only enhancements for search and account forms.
   Scoped to avoid affecting checkout, cart, product details, or HydroFire+ logic. */
body.search .woocommerce-ordering select,
body.search .woocommerce .woocommerce-ordering select,
body.search select.orderby {
  appearance:none;-webkit-appearance:none;
  min-height:46px;max-width:100%;border:1px solid #cbd9e8;border-radius:12px;
  padding:11px 44px 11px 16px;background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23ff6b13' stroke-width='2.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;
  color:#102b49;font:700 14px Arial,Helvetica,sans-serif;box-shadow:0 4px 16px rgba(16,43,73,.06);cursor:pointer;
}
body.search .woocommerce-ordering select:focus-visible,
body.search select.orderby:focus-visible {outline:2px solid #ff6b13;outline-offset:2px}
/* Search filter reset buttons: support common filter plugins without touching product buttons. */
body.search .berocket_aapf_reset_button,
body.search .wpfClearButton,
body.search .wpfFilterButton.wpfClearButton,
body.search .prdctfltr_reset,
body.search .woof_reset_search_form,
body.search .jet-smart-filters-remove-filters,
body.search button[class*="clear-all"],
body.search a[class*="clear-all"],
body.search button[class*="clear_all"],
body.search a[class*="clear_all"] {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:10px 18px!important;border:1px solid #ff6b13!important;
  border-radius:12px!important;background:#fff!important;color:#102b49!important;
  font-weight:700!important;text-decoration:none!important;box-shadow:0 4px 16px rgba(16,43,73,.05);cursor:pointer;
  transition:background .2s,border-color .2s,transform .2s;
}
body.search .berocket_aapf_reset_button:hover,
body.search .wpfClearButton:hover,
body.search .prdctfltr_reset:hover,
body.search .woof_reset_search_form:hover,
body.search .jet-smart-filters-remove-filters:hover,
body.search button[class*="clear-all"]:hover,
body.search a[class*="clear-all"]:hover {background:#fff3e9!important;transform:translateY(-1px)}
body.search .woocommerce-result-count {color:#516781;font-size:14px;font-weight:600}
body.search .woocommerce .products li.product {border-radius:16px}

/* Theme My Login renders /login/ and /lost-password/ on this installation.
   Only style those existing form containers; no login/reset behavior is changed. */
body.page .tml,
body.page .tml-login,
body.page .tml-lostpassword,
body.page .tml-lost-password,
body.page .tml-resetpass {
  width:min(100% - 32px,520px);margin:54px auto 72px;padding:36px;
  border:1px solid #e1e8f0;border-radius:22px;background:#fff;
  box-shadow:0 16px 48px rgba(16,43,73,.10);color:#102b49;
}
body.page:has(.tml-login),body.page:has(.tml-lostpassword),
body.page:has(.tml-lost-password),body.page:has(.tml-resetpass){background:#f3f8fd}
body.page .tml label {display:block;margin:0 0 8px;font-size:14px;font-weight:700;color:#102b49}
body.page .tml input[type="text"],body.page .tml input[type="email"],
body.page .tml input[type="password"]{
  display:block;width:100%;min-height:48px;padding:12px 15px;border:1px solid #cbd9e8;
  border-radius:11px;background:#fff;color:#102b49;font:inherit;
}
body.page .tml input:focus {outline:2px solid rgba(255,107,19,.45);border-color:#ff6b13}
body.page .tml .tml-field-wrap {margin-bottom:20px}
body.page .tml input[type="submit"],body.page .tml button[type="submit"]{
  display:inline-flex;justify-content:center;align-items:center;min-height:48px;
  padding:12px 25px;border:0;border-radius:11px;background:#ff6b13;
  color:#fff;font:700 15px Arial,Helvetica,sans-serif;cursor:pointer;
  box-shadow:0 6px 18px rgba(255,107,19,.20)
}
body.page .tml input[type="submit"]:hover,body.page .tml button[type="submit"]:hover{background:#e75b08}
body.page .tml .tml-links{list-style:none;padding:0;margin:22px 0 0;display:flex;gap:18px;flex-wrap:wrap}
body.page .tml .tml-links a{color:#0869b6;text-decoration:none;font-weight:700}
body.page .tml .tml-links a:hover{text-decoration:underline}
body.page .tml .tml-rememberme-wrap{display:flex;align-items:center;gap:8px}
body.page .tml .tml-rememberme-wrap label{margin:0}
@media(max-width:600px){body.page .tml,body.page .tml-login,body.page .tml-lostpassword,body.page .tml-lost-password,body.page .tml-resetpass{padding:24px 18px;margin:24px auto 45px}body.search .woocommerce-ordering select{max-width:100%}}

/* v0.1.7: Search results presentation. Scoped to search pages only. */
body.search .hf-core-section,body.search .woocommerce.hf-core-section{background:#f6f9fd}
body.search .hf-core-title{color:#102f56;letter-spacing:-.025em}
body.search .woocommerce-result-count{font-weight:700;color:#516982;margin:0 0 20px}
body.search .hf-search-clear-btn,
body.search .hf-search-clear-btn[type=button],
body.search .hf-search-clear-btn[type=submit],
body.search a.hf-search-clear-btn{
 appearance:none!important;display:inline-flex!important;align-items:center;justify-content:center;
 padding:11px 17px!important;min-height:44px!important;background:#fff!important;
 color:#103258!important;border:1.5px solid #ff711a!important;border-radius:12px!important;
 box-shadow:0 5px 15px rgba(16,43,73,.07)!important;font:700 14px Arial,sans-serif!important;
 text-decoration:none!important;cursor:pointer;transition:background .2s,box-shadow .2s
}
body.search .hf-search-clear-btn:hover{background:#fff2e8!important;box-shadow:0 6px 18px rgba(255,107,19,.14)!important}
body.search .hf-search-clear-btn:focus-visible{outline:3px solid rgba(255,107,19,.35);outline-offset:2px}
body.search .hf-search-filter-chip{display:inline-flex;align-items:center;gap:5px;background:#eaf3ff;
 color:#123b66;border:1px solid #d4e6f8;border-radius:30px;padding:7px 12px;margin:0 6px 10px 0;font-size:14px}
body.search .woocommerce-ordering{margin-bottom:20px}
body.search .woocommerce-ordering select,body.search select.orderby{min-width:210px;background-color:#fff}
/* Product tiles, only in the native WooCommerce search grid. */
body.search .woocommerce ul.products{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:22px 0 36px;padding:0}
body.search .woocommerce ul.products::before,body.search .woocommerce ul.products::after{display:none}
body.search .woocommerce ul.products li.product{float:none!important;width:auto!important;margin:0!important;
 padding:18px!important;border:1px solid #e3ebf4!important;border-radius:20px!important;
 background:#fff!important;box-shadow:0 8px 24px rgba(16,43,73,.05);min-width:0}
body.search .woocommerce ul.products li.product img{object-fit:contain;max-height:250px;width:100%;height:auto}
body.search .woocommerce ul.products li.product .woocommerce-loop-product__title{color:#102f56;font-weight:700;line-height:1.45}
body.search .woocommerce ul.products li.product .price{color:#ff6b13;font-weight:700}
body.search .woocommerce ul.products li.product .button{background:#ff6b13;color:white;border-radius:11px;padding:12px 16px;font-weight:700}
body.search .woocommerce ul.products li.product .button:hover{background:#e65c0a}
@media(max-width:900px){body.search .woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}}
@media(max-width:550px){body.search .woocommerce ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}body.search .woocommerce ul.products li.product{padding:10px!important;border-radius:13px!important}body.search .woocommerce-ordering{float:none!important}body.search .woocommerce-ordering select{width:100%}}

/* v0.1.8: search-results only. Keep product data and WooCommerce pricing untouched. */
body.search .woocommerce ul.products li.product .price,
body.search .woocommerce ul.products li.product .price *,
body.search .woocommerce ul.products li.product .woocommerce-Price-amount,
body.search .woocommerce ul.products li.product .woocommerce-Price-currencySymbol,
body.search ul.products li.product .price,
body.search ul.products li.product .price * {color:#ff6b13!important;}
body.search .woocommerce ul.products li.product .price {font-weight:700!important;}
body.search .hf-search-clear-btn {display:none!important;}

/* v0.1.9: keep the filter reset hidden when plugin adds it dynamically. */
body.search .hf-search-clear-btn {display:none!important;}

/* v0.2.0: Five search-result products per desktop row. */
@media (min-width: 1201px) {
  body.search .woocommerce ul.products { grid-template-columns: repeat(5, minmax(0,1fr)) !important; gap: 14px !important; }
  body.search .hf-core-grid { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; }
  body.search .woocommerce ul.products li.product { min-width: 0; }
  body.search .woocommerce ul.products li.product img { max-height: 205px; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  body.search .woocommerce ul.products { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
}

/* v0.2.1: WooCommerce search markup may not have a .woocommerce wrapper.
   Override both the UL layout and WooCommerce float/width/clear column rules. */
@media (min-width: 1201px) {
 body.search ul.products,
 body.search .products[class*="columns-"],
 body.search .woocommerce ul.products,
 body.search .woocommerce-page ul.products {
   display:grid!important;
   grid-template-columns:repeat(5,minmax(0,1fr))!important;
   gap:16px!important;
   width:100%!important;
 }
 body.search ul.products > li.product,
 body.search .woocommerce ul.products > li.product,
 body.search .woocommerce-page ul.products > li.product {
   float:none!important;clear:none!important;
   width:auto!important;max-width:none!important;
   margin:0!important;min-width:0!important;
 }
 body.search ul.products > li.product.first,
 body.search ul.products > li.product.last,
 body.search ul.products > li.product:nth-child(3n+1),
 body.search ul.products > li.product:nth-child(4n+1) {clear:none!important;}
 body.search ul.products > li.product img {max-height:190px;object-fit:contain;}
}
@media (min-width: 901px) and (max-width:1200px) {
 body.search ul.products {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;}
 body.search ul.products > li.product {float:none!important;clear:none!important;width:auto!important;margin:0!important;}
}
@media (max-width:900px) {
 body.search ul.products {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 body.search ul.products > li.product {float:none!important;clear:none!important;width:auto!important;margin:0!important;}
}

/* v0.2.2: Force the actual WooCommerce results list to five columns on desktop.
   Target search result pages only; preserve catalog and other layouts. */
@media screen and (min-width: 1201px) {
  html body.search ul.products,
  html body.search .woocommerce ul.products,
  html body.search .woocommerce-page ul.products,
  html body.search ul.products.columns-3,
  html body.search ul.products.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    column-gap: 14px !important;
    row-gap: 22px !important;
  }
  html body.search ul.products > li.product,
  html body.search .woocommerce ul.products > li.product {
    float: none !important; clear: none !important;
    width: 100% !important; max-width: 100% !important;
    min-width: 0 !important; margin: 0 !important;
    grid-column: auto !important;
  }
  html body.search ul.products > li.product:nth-child(n) { clear: none !important; }
  html body.search ul.products > li.product img { height: auto; max-height: 190px; object-fit: contain; }
}

/* v0.2.3: WooCommerce inserts clearfix pseudo-elements in ul.products.
   They were occupying grid cells and shifting product tiles to the right.
   Restrict the fix to product search results. */
body.search ul.products::before,
body.search ul.products::after,
body.search .woocommerce ul.products::before,
body.search .woocommerce ul.products::after {
  content: none !important;
  display: none !important;
}
@media (min-width: 1201px) {
  body.search ul.products.columns-3,
  body.search ul.products[class*="columns-"],
  body.search ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
  body.search ul.products > li.product {
    float: none !important;
    clear: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    grid-column: auto !important;
  }
}

/* v0.2.4 — align search-result action buttons across each product row.
   Only the visual layout changes; WooCommerce buttons and handlers remain intact. */
body.search ul.products > li.product {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  min-width: 0;
}
body.search ul.products > li.product > .button,
body.search ul.products > li.product > a.button,
body.search ul.products > li.product > a.add_to_cart_button,
body.search ul.products > li.product > a.product_type_variable {
  margin-top: auto !important;
  align-self: flex-start;
}
body.search ul.products > li.product > .price {
  margin-bottom: 16px !important;
}
/* Preserve the price-to-button gap even for product cards with short names. */
body.search ul.products > li.product > .button {
  position: relative;
}

/* v0.2.6 — legacy footer sections from shortcode-powered pages.
   Scoped to the global-footer-active body class so legacy footers remain
   available if the global footer plugin is ever deactivated. */
body.hf-global-footer-active footer.hf-home-footer,
body.hf-global-footer-active footer.hf-products-footer,
body.hf-global-footer-active footer.hfp-footer,
body.hf-global-footer-active footer.hfp-contact-footer {
    display: none !important;
}
