/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* Header */

/* Shared Menu Icon Styles */
:is(#hf-slide-block, #hf-cat-menu) :is(
  .menu-item-fence-panels,
  .menu-item-fence-posts,
  .menu-item-gates,
  .menu-item-decking,
  .menu-item-gravel-boards,
  .menu-item-railway-sleepers,
  .menu-item-timber,
  .menu-item-trellis,
  .menu-item-postmix
) > a::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background: var(--menu-img) no-repeat center / contain;
  margin-right: 0.8em;
  border-radius: 50%;
  border: 1px dotted currentColor;
  box-sizing: border-box;
}

/* Menu Item Images for Header and Category Page */
.menu-item-fence-panels { --menu-img: url('/wp-content/uploads/2026/03/hf-menu-fence-icon.jpg'); }
.menu-item-fence-posts { --menu-img: url('/wp-content/uploads/2026/03/hf-menu-post-icon.jpg'); }
.menu-item-gates { --menu-img: url('/wp-content/uploads/2026/03/hf-menu-gate-icon.jpg'); }
.menu-item-decking { --menu-img: url('/wp-content/uploads/2026/03/hf-menu-decking-icon.jpg'); }
.menu-item-gravel-boards {--menu-img: url('/wp-content/uploads/2026/03/hf-menu-gravel-icon.jpg'); }
.menu-item-railway-sleepers { --menu-img: url('/wp-content/uploads/2026/03/hf-menu-sleepers-icon.jpg'); }
.menu-item-timber { --menu-img: url('/wp-content/uploads/2026/03/hf-menu-timber-icon.jpg'); }
.menu-item-trellis { --menu-img: url('/wp-content/uploads/2026/03/hf-menu-trellis-icon.jpg'); }
.menu-item-postmix { --menu-img: url('/wp-content/uploads/2026/03/hf-menu-postmix-concrete-icon.jpg'); }


.x-slide-menu_dropdown-icon {
  margin-left: auto;
}


.brx-submenu-toggle button {
    display: none;
}

.brxe-xslidemenu .menu-item a {
  justify-content: flex-start;
}

.sub-menu{
  transition: all 0.5s ease-in-out;
  line-height: 40px;
}

.x-slide-menu_list .sub-menu{
  line-height: 30px;
}

/* Search and Close Icon and Backdrop */
#brxe-vwjvho,
#brxe-hhxowm,
#brxe-nutfzi {
  display: none !important;
}

#brxe-clpeyj {
  display: flex !important;
}

@media (max-width: 1024px) {
  #brxe-clpeyj { display: none !important; }
  #brxe-owfbpn { display: flex !important; }
  #brxe-hhxowm { display: none !important; }
  #brxe-yhidgb { display: none !important; }
  #brxe-nutfzi { display: none !important; } 

  body[search-is-active] #brxe-clpeyj { display: flex !important; }
  body[search-is-active] #brxe-owfbpn { display: none !important; }
  body[search-is-active] #brxe-hhxowm { display: flex !important; }
  body[search-is-active] #brxe-yhidgb { display: flex !important; }
  body[search-is-active] #brxe-nutfzi { display: block !important; } 
  body[search-is-active] { overflow: hidden !important; }
}


/* Header Search */

#brxe-pccnhu input[type="search"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  /* Updated SVG icon color to a slightly darker, richer slate gray (%2364748b) */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='%2364748b' d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.1-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/></svg>");
  background-repeat: no-repeat;
  background-position: 16px center; /* Shifted slightly right for a more relaxed fit */
  background-size: 18px 18px; /* Slightly larger icon */
  padding: 14px 16px 14px 46px; /* Taller input, creating a chunkier, clickable area */
  border: 1px solid #e2e8f0; /* Softer, more modern border */
  border-radius: 8px; /* Slightly rounder, friendlier corners */
  background-color: #f8fafc; /* Very subtle slate background to contrast the white header */
  color: #0f172a; /* Richer text color for better contrast */
  font-size: 16px;
  line-height: 1.5;
  transition: all 0.3s ease;
}

#brxe-pccnhu input[type="search"]::placeholder {
  color: #94a3b8; 
  font-weight: 400;
  transition: opacity 0.2s ease;
}

#brxe-pccnhu input[type="search"]:focus {
  outline: none;
  background-color: #ffffff; /* Pops to pure white on click */
  border-color: #274e3d; /* Uses your brand's forest green */
  box-shadow: 0 0 0 4px rgba(39, 78, 61, 0.1); /* Soft green modern focus ring */
}



/* Search select icon */
#hf-search-select-icon {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease-in-out;
}

.brxe-mchmtc:hover  #hf-search-select-icon {
  opacity: 1;
  transform: translateX(0);
}


/* Category Archive Page */

.hf-related-term{
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}



/* Product Card */
.hf-product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hf-product-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.hf-sort-by {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;

  padding: 8px 32px 8px 12px; /* give it real height */
  background-color: transparent;

  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
}



.hf-image-zoom {
  overflow: hidden;
  display: block;
}

.hf-image-zoom img {
  transition: transform 0.4s ease;
  will-change: transform;
}

.hf-image-zoom:hover img {
  transform: scale(1.05);
}


.expandable-text {
  position: relative;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  transition: all 0.3s ease;
}

.expandable-text::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3em;
  

  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
  
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.expandable-wrapper.is-expanded .expandable-text {
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.expandable-wrapper.is-expanded .expandable-text::after {
  opacity: 0; 
}

.hf-vat{
  font-size: var(--step--2);
  font-weight: 400;
}

.hf-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hf-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hf-add-to-cart .quantity  {
  display: none !important;
}

.underline-dotted-a a{
      text-decoration: underline dotted;
    text-underline-offset: 4px;
}


.woo-breadcrumb-nav a:hover {
    filter: brightness(5%);
}

.underline-dotted{
text-decoration: underline dotted;
text-underline-offset: 4px;
}
.underline-dotted:hover {
filter: brightness(5%);
}

.underline-dotted-checkout{
text-decoration: underline dotted !important;
text-underline-offset: 4px !important;
color: black !important;
}

.wfacp_single_shipping_method, .wc_payment_methods{
  background-color: #ffffff !important;
}

.woocommerce-table--order-details{
  display: none !important;
}

.hero-bg-gradient {
  background-color: #115c3a;

  background-image: 
    -webkit-repeating-linear-gradient(
      left,
      transparent 0px,
      transparent 76px,
      rgba(0, 0, 0, 0.15) 76px,
      rgba(0, 0, 0, 0.3) 80px
    ),
    -webkit-linear-gradient(top, #115c3a, #0a3d25);

  background-image: 
    repeating-linear-gradient(
      to right,
      transparent 0px,
      transparent 76px,
      rgba(0, 0, 0, 0.15) 76px,
      rgba(0, 0, 0, 0.3) 80px
    ),
    linear-gradient(to bottom, #115c3a, #0a3d25); 
}

/* =========================
   Hertfordshire Fencing Calculator
   ========================= */

.hf-option-unavailable {
  opacity: .45;
  position: relative;
}

.hf-option-unavailable label {
  pointer-events: none;
  cursor: not-allowed;
}

.hf-option-unavailable::after {
  content: attr(data-hf-unavailable);
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(214, 54, 56, .92);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 999px;
  pointer-events: none;
}

.hf-calc-results-wrap {
  padding: 16px;
  border: 1px solid #d8dce2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}

.hf-calc-intro {
  margin: 4px 0 12px;
  color: #556070;
  font-size: .92rem;
}

.hf-calc-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.hf-calc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f4;
  flex-wrap: wrap;
}

.hf-calc-row:last-child {
  border-bottom: 0;
}

.hf-calc-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  display: inline-block;
  background: #f3f4f6;
}

.hf-calc-thumb-placeholder {
  border: 1px solid #e5e7eb;
}

.hf-calc-name-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hf-calc-name {
  font-weight: 600;
  color: #1f2937;
}

.hf-calc-name-link {
  color: #1f2937;
  text-decoration: none;
  border-bottom: 1px dashed #86a59a;
}

.hf-calc-name-link:hover {
  color: #214f3f;
  border-bottom-color: #214f3f;
}

.hf-calc-price {
  font-size: .84rem;
  color: #556070;
}

.hf-calc-qty {
  font-weight: 700;
  color: #0f5132;
  background: #e6f4ea;
  padding: 4px 8px;
  border-radius: 999px;
}

.hf-calc-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf0f4;
}

.hf-calc-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: #f7faf8;
  border: 1px solid #dbe9e2;
  border-radius: 10px;
  padding: 10px 12px;
}

.hf-calc-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hf-calc-cta-action {
  margin-left: auto;
}

.hf-calc-total {
  font-size: 1.15rem;
  font-weight: 700;
  color: #214f3f;
  margin: 0;
  text-align: left;
}

.hf-calc-footnote {
  margin: 0;
  font-size: .85rem;
  color: #64748b;
  text-align: left;
}

.hf-purchase-now-btn {
  background: #214f3f;
  color: #fff;
  border: 1px solid #214f3f;
  padding: 10px 14px;
  font-weight: 700;
}

.hf-purchase-now-btn:hover {
  background: #1b4134;
  border-color: #1b4134;
  color: #fff;
}

.hf-purchase-now-btn.is-loading {
  opacity: .8;
  cursor: wait;
}

.hf-calc-loading {
  margin: 0;
}

.hf-calc-error {
  margin: 0;
  color: #d63638;
}

body.hf-calc-busy {
  overflow: hidden;
}

#hf-calc-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, .45);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 99999;
}

#hf-calc-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hf-calc-overlay-card {
  width: min(460px, 100%);
  background: linear-gradient(145deg, #ffffff, #f5fbf8);
  border: 1px solid #dbe9e2;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .22);
  padding: 24px 22px;
  text-align: center;
}

.hf-calc-overlay-card h4 {
  margin: 10px 0 8px;
  font-size: 1.25rem;
  line-height: 1.25;
  color: #163828;
}

.hf-calc-overlay-card p {
  margin: 0;
  color: #4b5563;
  font-size: .97rem;
}

.hf-calc-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border: 4px solid #d9efe4;
  border-top-color: #214f3f;
  border-radius: 999px;
  animation: hfCalcSpin .8s linear infinite;
}

.hf-calc-overlay-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.hf-calc-overlay-dots span {
  width: 8px;
  height: 8px;
  background: #2a6a54;
  border-radius: 999px;
  opacity: .35;
  animation: hfCalcDot 1.2s infinite ease-in-out;
}

.hf-calc-overlay-dots span:nth-child(2) {
  animation-delay: .15s;
}

.hf-calc-overlay-dots span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes hfCalcSpin {
  to { transform: rotate(360deg); }
}

@keyframes hfCalcDot {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}


/* =========================
   Bricks Nav Menu Enhancements
   ========================= */

#brxe-dmbpiv .sub-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#brxe-dmbpiv .bricks-nav-menu .menu-item-has-children.brx-open > .sub-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
    display: block !important;
}

#brxe-dmbpiv .menu-item-has-children.brx-open .menu-item-icon {
    transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
    #brxe-dmbpiv .bricks-nav-menu .menu-item-has-children:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }
}

@media (max-width: 1024px) {
    #brxe-dmbpiv .bricks-nav-menu .menu-item-has-children:not(.brx-open):hover > .sub-menu {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}