.products.cols-1,
.products.cols-2,
.products.cols-3,
.products.cols-4,
.products-container,
main.products-main {
    width: 100% !important;
    max-width: 100% !important;
}
body main {
    padding: 0 !important;
}

/* Base Layout */
.woocommerce-archive {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1366px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    padding: 30px 3%;
}

header.category-header {
    width: 100%;
    text-align: center;
}

.product-toolbar {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    align-items: center;
}

.toolbar-left {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    height: 100%;
}

/* Grid Switcher */
#grid-switcher {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

#grid-switcher ul {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#grid-switcher button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #6A90A5;
    background: #fff;
    color: #6A90A5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#grid-switcher button.active {
    background: #6A90A5;
    color: #fff;
}

/* Products Grid */
ul.products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 20px 0;
}

ul.products::before {
    display: none !important;
    content: none !important;
}

/* Default Responsive Grid */
@media (max-width: 767px) {
    ul.products > li.product-card,
    ul.products > li.product.type-product {
        width: 47% !important; /* 2 columns */
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    ul.products > li.product-card,
    ul.products > li.product.type-product {
        width: 31% !important; /* 3 columns */
    }
}

@media (min-width: 1024px) {
    ul.products > li.product-card,
    ul.products > li.product.type-product {
        width: 23% !important; /* 4 columns */
    }
}

/* Manual Column Selection */
ul.products.cols-1 > li { width: 95% !important; }
ul.products.cols-2 > li { width: 47% !important; }
ul.products.cols-3 > li { width: 31% !important; }
ul.products.cols-4 > li { width: 23% !important; }

/* Product Card Layout */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    margin: 0 0 0em 0% !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* Filter Buttons */
button#open-filters {
    background: #ddd;
    border-radius: 5px;
    color: #6A90A5;
    border: 2px solid #6A90A5;
    width: 15%;
    text-align: center;
    margin-left: 3%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    font-weight: 550;
    letter-spacing: 0.6px;
    height: 100%;
    box-shadow: 0px 4px 16px rgb(138 145 153 / 40%);
}

/* Active Filters */
.active-filters {
    width: 100%;
    flex-direction: row;
    align-content: center;
    align-items: center;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
    margin: 25px 0px;
    height: auto !important;
}

/* Filter Pills */
button.filter-pill {
    border-radius: 10px;
    border: 1.5px solid #666;
    color: #666;
    font-size: 16px;
    padding: 7px 25px;
    font-weight: 500;
    white-space: nowrap;
    margin: 0px 5px;
    gap: 10px;
}

button.filter-pill.remove-price-range {
    background: #f1f1f1;
}

button.filter-pill.reset-all {
    background: #f4d5d5;
    color: #ff0000;
    font-weight: bold;
    font-size: 17px;
    border: 1.5px solid #ff0000;
}

.active-filters-block.attributes {
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.active-filters-block.attributes,
.active-filters-block.reset,
.active-filters-block.price-range {
    padding: 5px;
}

button.filter-pill.remove-filter {
    background: none;
    display: flex;
    flex-wrap: nowrap;
}

ul.products.cols-1,
ul.products.cols-2,
ul.products.cols-3,
ul.products.cols-4{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    align-content: center;
    width: 100%;
    max-width: 100%;
    padding: 2%;
    margin: 20px 0px;
}

ul.products::before {
  display: none !important;
  content: none !important;
}

ul.products.cols > li.product-card {
  margin: 0 !important;
  padding: 0 !important;
}

/* Columns */
ul.products.cols-1 > li.product-card,
ul.products.cols-1 > li.product.type-product {
  width: 95%;
}

ul.products.cols-2 > li.product-card,
ul.products.cols-2 > li.product.type-product {
  width: 47%;
}

ul.products.cols-3 > li.product-card,
ul.products.cols-3 > li.product.type-product {
  width: 31%;
}

ul.products.cols-4 > li.product-card,
ul.products.cols-4 > li.product.type-product {
  width: 23%;
}


/* === Grid Setup === */
ul.products {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.products li.product {
  width: calc(25% - 20px);
  box-sizing: border-box;
}

/* === Card === */
.product-card,
.product {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 16px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.product-card:hover,
.product:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* === Image === */
.product-thumbnail-wrapper {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.product-thumbnail-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* === Badges === */
.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #0070f3;
  text-transform: uppercase;
}

.badge.sale { background: #e60023; }
.badge.hot { background: #f59e0b; }

/* === Hover Actions === */
.product-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transition: 0.3s ease;
  z-index: 3;
}

.product:hover .product-actions {
  opacity: 1;
}

.action-btn {
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  
}

.action-btn i {
  font-size: 16px;
  color: #333;
}

/* === Info === */
.product-info {
  margin-top: 14px;
  text-align: start;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}

.product-title a {
  color: #111;
  text-decoration: none;
}

.product-title a:hover {
  text-decoration: underline;
}

/* === Rating === */
.product-rating {
  font-size: 14px;
  color: #ffb703;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-count {
  color: #666;
  font-size: 13px;
}

/* === Pricing === */
.product-pricing {
  margin-top: 8px;
}

.regular-price {
  text-decoration: line-through;
  color: #999;
  margin-right: 6px;
  font-size: 14px;
}

.sale-price {
  color: #e60023;
  font-weight: 600;
  font-size: 15px;
}

/* === Bottom Action (×›×¤×ª×•×¨ ×”×•×¡×¤×” ×œ×¡×œ / ×’×“×œ×™× ×•×›×•') === */
.product-actions-bottom {
  margin-top: 14px;
}

.woocommerce .button,
.select-size {
  background: #111827;
  color: #fff;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  width: 100%;
  text-align: center;
  display: inline-block;
  text-decoration: none;
}

.woocommerce .button:hover,
.select-size:hover {
  background: #1f2937;
}

/* === Responsive === */
/* Responsive Grid - × ×ž×—×§ */
@media (max-width: 1024px) {
  ul.products li.product {
    width: calc(33.333% - 20px);
  }
}

@media (max-width: 768px) {
  ul.products li.product {
    width: calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  ul.products li.product {
    width: 100%;
  }
}

/* Products Grid Classes - ×œ×”×—×–×™×¨ ××ª ×”×§×•×“ ×”×™×©×Ÿ */
ul.products.cols-1 > li { width: calc(100% - 20px) !important; }
ul.products.cols-2 > li { width: calc(50% - 20px) !important; }
ul.products.cols-3 > li { width: calc(33.333% - 20px) !important; }
ul.products.cols-4 > li { width: calc(25% - 20px) !important; }

/* Grid Columns - Specific Selectors - ×œ×”×—×–×™×¨ ××ª ×”×§×•×“ ×”×™×©×Ÿ */
.woocommerce-archive .products.cols-1 > li.product-card.product.type-product { width: 95% !important; }
.woocommerce-archive .products.cols-2 > li.product-card.product.type-product { width: 47% !important; }
.woocommerce-archive .products.cols-3 > li.product-card.product.type-product { width: 31% !important; }
.woocommerce-archive .products.cols-4 > li.product-card.product.type-product { width: 23% !important; }

/* ×œ×ž×—×•×§ ××ª ×”×¡×œ×§×˜×•×¨×™× ×”×›×¤×•×œ×™× */
ul.products li.product {
  box-sizing: border-box;
}

/* Pagination Styling */
.woocommerce-pagination {
    width: 100%;
    margin: 30px 0;
    text-align: center;
}

.woocommerce-pagination ul {
    display: flex !important;
    justify-content: center !important;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    float: none !important;
}

.woocommerce-pagination li {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: inline-block !important;
    padding: 8px 16px !important;
    border: 2px solid #6A90A5 !important;
    border-radius: 8px !important;
    color: #6A90A5 !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
    float: none !important;
    min-width: 40px !important;
}

.woocommerce-pagination span.current {
    background: #6A90A5 !important;
    color: white !important;
}

.woocommerce-pagination a:hover {
    background: #6A90A5 !important;
    color: white !important;
}

/* ×ž×—×™×§×ª ×”×¡×™×‘×•×‘ ×©×œ ×”×›×¤×ª×•×¨×™× */
.woocommerce-pagination .prev,
.woocommerce-pagination .next {
    transform: none !important;
}

/* ×ž×—×™×§×ª ×”×’×“×¨×•×ª ×”×œ×•×“×¨ ×”×™×©×Ÿ */
/* Loader Styling */
.loader-overlay,
.loader,
.ajax-filter-loader-overlay,
.ajax-filter-loader {
    display: none;
}

/* Simple Ajax Filter Loader */
.ajax-filter-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 999999;
    display: none;
}

.ajax-filter-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #6A90A5;
    border-radius: 50%;
    animation: ajax-filter-spin 1s linear infinite;
}

@keyframes ajax-filter-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ×›×©×”×œ×•×“×¨ ×¤×¢×™×œ */
.ajax-filter-loader-overlay.active {
    display: flex;
}

/* Ajax Filter Loader Styling */
.ajax-filter-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.ajax-filter-loader {
    width: 50px;
    height: 50px;
    position: relative;
}

.ajax-filter-loader:before {
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #6A90A5;
    border-right-color: #6A90A5;
    position: absolute;
    animation: filter-spin 0.8s ease infinite;
}

.ajax-filter-loader:after {
    content: '';
    width: 70%;
    height: 70%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #6A90A5;
    border-right-color: #6A90A5;
    position: absolute;
    top: 15%;
    left: 15%;
    animation: filter-spin 0.5s ease infinite;
}

@keyframes filter-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ajax-filter-loader-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.ajax-filter-loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ×ž×—×™×§×ª ×›×œ ×”×”×’×“×¨×•×ª ×”×§×•×“×ž×•×ª ×©×œ ×”×œ×•×“×¨ */
.loader-overlay,
.loader,
.ajax-filter-loader-overlay,
.ajax-filter-loader {
    display: none;
}

/* ×”×’×“×¨×” ×—×“×©×” ×•×¤×©×•×˜×” ×œ×œ×•×“×¨ */
.mas-filter-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(3px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mas-filter-loader {
    width: 80px;
    height: 80px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6A90A5;
    border-radius: 50%;
    animation: mas-spin 1s linear infinite;
}

@keyframes mas-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mas-filter-loader-overlay.active {
    display: flex;
}