/**
 * Hookarish Got Webbed - Product Grid Styles
 * 
 * Custom styles for the product grid and cards with RTL support
 */

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.hgw-grid-wrapper {
  width: 100%;
  padding: 20px 0;
  direction: rtl;
}

.hgw-grid-container {
  display: flex;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Filters Sidebar - 25% width */
.hgw-filters-sidebar {
  width: 25%;
  flex-shrink: 0;
}

.hgw-filters-inner {
  position: sticky;
  top: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-height: 80vh;
  overflow-y: auto;
}

.hgw-filters-inner::-webkit-scrollbar {
  width: 8px;
}

.hgw-filters-inner::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.hgw-filters-inner::-webkit-scrollbar-thumb {
  background: #b88114;
  border-radius: 4px;
}

.hgw-filters-inner::-webkit-scrollbar-thumb:hover {
  background: #9a6d10;
}

.hgw-filters-container {
  width: 100%;
}

.hgw-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.hgw-filters-title {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.hgw-filter-group {
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.hgw-filter-group:last-child {
  border-bottom: none;
}

.hgw-filter-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

/* Filter Header - No toggle behavior */
.hgw-filter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.hgw-filter-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.hgw-filter-content {
  padding: 10px 0 0 0;
}

.hgw-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hgw-category-tab {
  flex: 1 1 45%;
  min-width: 120px;
  cursor: pointer;
}

.hgw-category-tab input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hgw-category-tab span {
  display: block;
  padding: 9px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #444;
  font-size: 13px;
  text-align: center;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.hgw-category-tab:hover span,
.hgw-category-tab.is-active span {
  border-color: #b88114;
  background: rgba(184, 129, 20, 0.12);
  color: #8a5b08;
}

.hgw-category-tab small {
  color: #999;
}

.hgw-filter-category-hint {
  margin: -6px 0 18px;
  color: #777;
  font-size: 13px;
}

.hgw-filters-container .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hidden items for show more functionality */
.hgw-hidden-item {
  display: none !important;
}

.hgw-hidden-item.hgw-show-all {
  display: flex !important;
}

/* Checkbox Filters */
.hgw-filter-checkboxes .hgw-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  user-select: none;
}

.hgw-filter-checkboxes input[type='checkbox'] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #b88114;
}

.hgw-checkbox-text {
  flex: 1;
  font-size: 14px;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hgw-term-count {
  font-size: 12px;
  color: #999;
  font-weight: normal;
}

/* Sorting Filter */
.hgw-sorting-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.hgw-sorting-select:focus {
  outline: none;
  border-color: #b88114;
  box-shadow: 0 0 0 3px rgba(184, 129, 20, 0.1);
}

/* Price Range Filter */
.hgw-filter-price-range .hgw-filter-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.hgw-price-inputs {
  display: flex;
  gap: 10px;
}

.hgw-price-input-wrapper {
  flex: 1;
}

.hgw-price-input-wrapper label {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  color: #666;
  font-weight: normal;
}

.hgw-price-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.hgw-price-input:focus {
  outline: none;
  border-color: #b88114;
}

.hgw-price-slider-wrapper {
  position: relative;
  height: 24px;
  padding: 0 5px;
}

.hgw-price-slider {
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.hgw-price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #b88114;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.hgw-price-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #b88114;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.hgw-price-slider::-webkit-slider-runnable-track {
  height: 6px;
  background: #ddd;
  border-radius: 3px;
}

.hgw-price-slider::-moz-range-track {
  height: 6px;
  background: #ddd;
  border-radius: 3px;
}

/* Brands Filter with Search */
.hgw-filter-brands .hgw-brand-search {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 10px;
}

.hgw-filter-brands .hgw-brand-search:focus {
  outline: none;
  border-color: #b88114;
}

.hgw-brands-list {
  max-height: none;
  overflow-y: visible;
}

.hgw-filter-brands .hgw-checkbox-label {
  display: grid;
  grid-template-columns: 32px 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
}

.hgw-filter-brands img.hgw-brand-img,
.hgw-filter-brands .hgw-brand-img--empty {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
  border-radius: 4px;
}

.hgw-filter-brands .hgw-brand-img--empty {
  background: #f2f2f2;
}

.hgw-brands-list::-webkit-scrollbar {
  width: 6px;
}

.hgw-brands-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.hgw-brands-list::-webkit-scrollbar-thumb {
  background: #b88114;
  border-radius: 3px;
}

/* Show More Button */
button.hgw-show-more-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: transparent;
  color: black !important;
  border: none;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button.hgw-show-more-btn:hover {
  color: #b88114;
}

button.hgw-show-more-btn.hgw-showing-all {
  display: none;
}

/* Mobile Filter Actions */
.hgw-mobile-filter-actions {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #eee;
}

button.hgw-apply-filters-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px !important;
  background:
    linear-gradient(#b88114, #b88114) padding-box,
    linear-gradient(90deg, rgba(184, 133, 3, 1) 10%, rgba(0, 0, 0, 1) 100%)
      border-box !important;
  border: 4px solid transparent !important;
  background-size: 200% 200%;
  border-radius: 50px !important;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none;
  color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 600;
  line-height: 1.4;
  overflow: visible;
  font-size: 16px;
}

button.hgw-apply-filters-btn:hover {
  background:
    linear-gradient(#9a6d10, #9a6d10) padding-box,
    linear-gradient(90deg, rgba(184, 133, 3, 1) 10%, rgba(0, 0, 0, 1) 100%)
      border-box !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(184, 129, 20, 0.3) !important;
}

.hgw-search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.hgw-search-input:focus {
  outline: none;
  border-color: #b88114;
  box-shadow: 0 0 0 3px rgba(184, 129, 20, 0.1);
}

button.hgw-clear-filters {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px !important;
  background:
    linear-gradient(#e74c3c, #e74c3c) padding-box,
    linear-gradient(90deg, rgba(231, 76, 60, 1) 10%, rgba(192, 57, 43, 1) 100%)
      border-box !important;
  border: 2px solid transparent !important;
  background-size: 200% 200%;
  border-radius: 50px !important;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none;
  color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 600;
  line-height: 1.4;
  overflow: visible;
  font-size: 14px;
  margin-bottom: 20px;
}

button.hgw-clear-filters:hover {
  background:
    linear-gradient(#c0392b, #c0392b) padding-box,
    linear-gradient(90deg, rgba(231, 76, 60, 1) 10%, rgba(192, 57, 43, 1) 100%)
      border-box !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3) !important;
}

/* Products Area - 75% width */
.hgw-products-area {
  width: 75%;
  flex-grow: 1;
  position: relative;
}

/* AJAX Loader Overlay */
.hgw-ajax-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.hgw-loader-logo {
  width: 150px;
  height: auto;
  animation: spinX 2s linear infinite;
}

@keyframes spinX {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

.hgw-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

/* ==========================================================================
   Product Card
   ========================================================================== */

.hgw-product-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.hgw-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Labels Container */
.hgw-labels-con {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
}

.hgw-bogo-label {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  padding: 3px 2px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  text-align: center;
  line-height: 1.2;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  font-family: 'Polin', sans-serif;
}

.hgw-bogo-label__phase {
  display: block;
  transition: opacity 0.15s ease;
}

.hgw-bogo-label__phase--second {
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hgw-bulk-sale,
.hgw-blanket-sale,
.hgw-label-item {
  background: linear-gradient(135deg, #ffce6e 0%, #ffa600 100%);
  color: black;
  padding: 3px 2px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  display: flex;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  text-align: center;
  line-height: 1.2;
  justify-content: center;
  align-items: center;
}

.hgw-blanket-sale {
  background: linear-gradient(135deg, #ffedd5 0%, #fdba74 100%);
  color: #9a3412;
  position: relative;
  overflow: hidden;
}

.hgw-blanket-sale__phase {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  white-space: nowrap;
  line-height: 1;
  font-weight: 700;
  animation-duration: 4s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.hgw-blanket-sale__phase--discount {
  animation-name: hgwBlanketPhaseDiscount;
}

.hgw-blanket-sale__phase--text {
  animation-name: hgwBlanketPhaseText;
}

@keyframes hgwBlanketPhaseDiscount {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  45% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
}

@keyframes hgwBlanketPhaseText {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
  50% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  95% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
  }
}

.hgw-custom-labels {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Status Labels */
.hgw-out-of-stock-label,
.hgw-backorder-label {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #e74c3c;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  z-index: 10;
}

.hgw-backorder-label {
  background: #000000;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

/* Variations Trigger Button */
.hgw-variations-trigger-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  right: auto;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.3s ease;
}

.hgw-variations-trigger-btn:hover {
  transform: scale(1.1);
}

.hgw-variations-trigger-btn svg {
  width: 100%;
  height: 100%;
}

.hgw-product-card .hgw-variation-panel {
  position: absolute;
  top: 52px;
  left: 15px;
  right: auto;
  width: 180px;
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  z-index: 20;
  padding: 8px;
  display: none;
}

.hgw-product-card.hgw-variations-open .hgw-variation-panel {
  display: block;
}

.hgw-product-card .hgw-variation-panel .variable-items-wrapper,
.hgw-product-card .hgw-variation-panel .variable-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hgw-product-card .hgw-variation-panel .variable-item {
  width: 100%;
  margin: 0 !important;
}

.hgw-product-card .hgw-variation-panel::-webkit-scrollbar {
  width: 6px;
}

.hgw-product-card .hgw-variation-panel::-webkit-scrollbar-thumb {
  background: #b88114;
  border-radius: 4px;
}

/* Product Image */
.hgw-product-img {
  position: relative;
  margin-bottom: 0;
}

.hgw-product-img figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hgw-product-img figure a {
  display: block;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hgw-product-img img {
  width: 100%;
  height: 350px !important;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.hgw-product-card:hover .hgw-product-img img {
  transform: scale(1.05);
}

.hgw-product-title {
  margin-top: 4px;
}

.hgw-product-title h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.hgw-product-title h3 a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.hgw-product-title h3 a:hover {
  color: #b88114;
}

/* Discount Badge */
.hgw-discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  border-radius: 50px;
  z-index: 5;
}

.hgw-sale-circle {
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: spinCircle 12s linear infinite;
}

@keyframes spinCircle {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hgw-sale-center {
  position: absolute;
  text-align: center;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.hgw-discount-percent {
  display: block;
  font-size: 14px;
  font-weight: bold;
  line-height: 18px;
}

.hgw-discount-label {
  display: block;
  font-size: 14px;
  line-height: 14px;
  font-weight: bold;
}

/* Price */
.hgw-product-price {
  margin: auto 0 10px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.hgw-product-price .woocommerce-Price-amount {
  color: #b88114;
}

.hgw-product-taste-wrap {
  margin-top: 8px;
  margin-bottom: 6px;
  text-align: center;
}

.hgw-product-taste-title {
  font-size: 12px;
  line-height: 1.4;
  color: #707070;
  font-weight: 500;
  overflow: hidden;
  max-height: 1.4em;
  transition: max-height 0.3s ease;
}

.hgw-product-taste-title.is-expanded {
  max-height: 220px;
}

.hgw-product-taste-text {
  display: block;
}

button.hgw-product-taste-toggle {
  margin-top: 3px;
  border: none;
  background: transparent;
  color: #b88114;
  font-size: 11px;
  line-height: 1.2;
  padding: 0;
  cursor: pointer;
}

button.hgw-product-taste-toggle:hover,
button.hgw-product-taste-toggle:focus {
  background: transparent;
  color: #8a620f;
  text-decoration: underline;
}

/* Add to Cart Buttons */
.hgw-atc,
a.hgw-atc.button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 8px !important;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, rgba(184, 133, 3, 1) 10%, rgba(0, 0, 0, 1) 100%)
      border-box !important;
  border: 4px solid transparent !important;
  background-size: 200% 200%;
  border-radius: 50px !important;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 10px;
  text-decoration: none;
  color: #333 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 600;
  line-height: 1.4;
  overflow: visible;
}

.hgw-atc:hover,
a.hgw-atc.button:hover {
  background:
    linear-gradient(#f8f8f8, #f8f8f8) padding-box,
    linear-gradient(90deg, rgba(184, 133, 3, 1) 10%, rgba(0, 0, 0, 1) 100%)
      border-box !important;
  color: #333 !important;
}

.hgw-atc.added,
a.hgw-atc.button.added {
  background:
    linear-gradient(#d4edda, #d4edda) padding-box,
    linear-gradient(90deg, rgba(184, 133, 3, 1) 10%, rgba(0, 0, 0, 1) 100%)
      border-box !important;
}

.hgw-atc.added .hgw-atc-icon,
a.hgw-atc.button.added .hgw-atc-icon,
.hgw-atc-icon.is-added {
  color: #17692b;
}

.hgw-atc-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: #333;
  display: block;
}

.hgw-atc span {
  font-size: 14px;
  color: #333;
  font-weight: 600;
}

.hgw-variations-atc {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 4px 8px !important;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, rgba(184, 133, 3, 1) 10%, rgba(0, 0, 0, 1) 100%)
      border-box !important;
  border: 4px solid transparent !important;
  background-size: 200% 200%;
  border-radius: 50px !important;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 10px;
  text-decoration: none;
  color: #333 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 600;
  line-height: 1.4;
  overflow: visible;
}

.hgw-variations-atc:hover {
  background:
    linear-gradient(#f8f8f8, #f8f8f8) padding-box,
    linear-gradient(90deg, rgba(184, 133, 3, 1) 10%, rgba(0, 0, 0, 1) 100%)
      border-box !important;
  color: #333 !important;
  transform: none;
  box-shadow: none !important;
}

.hgw-variations-atc .hgw-atc-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.hgw-variations-atc span {
  font-size: 14px;
  color: #333;
  font-weight: 600;
}

/* Let Me Know */
button.hgw-let-me-know {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #000000;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 10px;
  border: none;
}

button.hgw-let-me-know:hover,
button.hgw-let-me-know:focus {
  background: #eee;
  color: black !important;
  border: none;
}

.hgw-let-me-know figure {
  margin: 0;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.hgw-let-me-know img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   Loading & No Products
   ========================================================================== */

.hgw-loading {
  text-align: center;
  padding: 40px 20px;
  color: white;
}

.hgw-spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #b88114;
  border-radius: 50%;
  animation: hgw-spin 1s linear infinite;
}

@keyframes hgw-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hgw-no-products {
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: white;
}

.hgw-load-more-trigger {
  height: 10px;
  visibility: hidden;
}
/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Desktop: 1024px and above - 3 columns */
@media (min-width: 1024px) {
  .hgw-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  button.hgw-open-filters-mobile {
    display: none !important;
  }
}

/* Mobile: up to 1023px - 2 columns */
@media (max-width: 1023px) {
  .hgw-grid-container {
    flex-direction: column;
    padding: 0;
  }

  .hgw-atc span {
    font-size: 13px;
  }

  /* Mobile Filter Styles */
  .hgw-filters-sidebar,
  .hgw-products-area {
    width: 100%;
  }

  button.hgw-open-filters-mobile {
    display: flex !important;
  }

  .hgw-filters-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
  }

  .hgw-filters-sidebar.hgw-mobile-active {
    right: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .hgw-filters-inner {
    position: static;
    box-shadow: none;
    padding: 15px;
    border-radius: 0;
    max-height: 90vh;
  }
  button.hgw-apply-filters-btn {
    transform: translateY(0);
    padding: 4px 8px !important;
  }

  .hgw-mobile-filter-actions {
    display: block;
  }

  /* Backdrop Overlay */
  body.hgw-filters-modal-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  body.hgw-filters-modal-open {
    overflow: hidden;
  }
  /* Close Button */
  .hgw-filters-sidebar.hgw-mobile-active .hgw-filters-header::before {
    content: '×';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    z-index: 10;
  }

  .hgw-filters-header {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .hgw-products-area {
    order: 1;
  }

  .hgw-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .hgw-product-card {
    padding: 4px;
  }

  .hgw-product-img figure img {
    height: 140px;
  }

  .hgw-product-card:hover {
    transform: translateY(0);
  }

  .hgw-product-img img {
    height: 210px !important;
    object-fit: contain;
  }

  .hgw-product-title h3 {
    font-size: 12px;
    text-align: center;
  }

  .hgw-product-price {
    font-size: 12px;
    font-weight: 400;
    color: #333;
    text-align: center;
    margin-top: auto;
  }

  .hgw-labels-con {
    top: 6px;
    right: 6px;
  }

  .hgw-bulk-sale,
  .hgw-blanket-sale,
  .hgw-label-item {
    max-width: 30px;
    height: 32px;
    padding: 4px 2px;
    font-size: 10px;
    font-weight: 100 !important;
    min-height: 32px;
  }

  .hgw-out-of-stock-label,
  .hgw-backorder-label {
    top: 15px;
    left: 29%;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 400;
  }

  .hgw-atc,
  a.hgw-atc.button,
  .hgw-variations-atc {
    font-size: 12px;
    width: 100%;
    min-height: 38px;
    gap: 5px;
    padding: 4px 6px !important;
    border-width: 3px !important;
    line-height: 1.1;
    white-space: nowrap;
  }

  .hgw-atc-icon {
    width: 20px;
    height: 20px;
  }

  .hgw-atc span,
  a.hgw-atc.button span,
  .hgw-variations-atc span {
    font-size: clamp(12px, 3.4vw, 16px);
    line-height: 1;
    min-width: 0;
  }

  .hgw-let-me-know figure {
    width: 24px;
    height: 24px;
  }

  button.hgw-let-me-know {
    font-size: 9px;
  }

  .hgw-discount-badge {
    width: 60px;
    height: 60px;
    top: 4px;
    left: 4px;
  }

  .hgw-sale-center {
    top: 16px;
  }

  .hgw-discount-percent {
    font-size: 10px;
    line-height: 18px;
  }

  .hgw-discount-label {
    font-size: 10px;
    line-height: 6px;
  }
}

/* Mobile Filter Toggle Button (Add to your template) */
button.hgw-open-filters-mobile {
  margin-bottom: 12px;
  background: transparent !important;
  border: 4px solid transparent !important;
  background-size: 200% 200%;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  gap: 4px;
}

button.hgw-open-filters-mobile svg {
  width: 24px;
  height: 24px;
}

button.hgw-open-filters-mobile:hover {
  background:
    linear-gradient(#9a6d10, #9a6d10) padding-box,
    linear-gradient(90deg, rgba(184, 133, 3, 1) 10%, rgba(0, 0, 0, 1) 100%)
      border-box !important;
  transform: scale(1.1);
}

@media (max-width: 1023px) {
  button.hgw-open-filters-mobile {
    display: flex;
  }
}
