/* --- Grid Layout --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --- Product Card --- */
.products-grid li {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: box-shadow .2s ease, transform .2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding-bottom: 10px;
    gap: 0;
    max-width: 100%;
}

.products-grid li:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    transform: translateY(-3px);
}

/* --- Product Image --- */
.products-grid .product-image {
    display: block;
    padding: 15px;
    text-align: center;
    position: relative;
    min-height: 200px;
}

.products-grid .product-image img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}

/* --- Discount Badge --- */
.products-grid .discount-badge {
	position: absolute;
	top: 0;
	left: 0;
	background: #2F4858;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-top-left-radius: 6px;
	border-bottom-right-radius: 6px;
	border-top-right-radius: 0;
	border-bottom-left-radius: 0;
	z-index: 2;
	line-height: 1.2;
	text-transform: uppercase;
}

/* --- Product Info --- */
.products-grid .product-info {
    display: flex;
    flex-direction: column;
    flex: 1; /* let it stretch */
    padding: 0 15px 0;
}

/* --- Product Name (truncate with ellipsis) --- */
.products-grid .product-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
    color: #333;

    display: -webkit-box;
    -webkit-line-clamp: 2;   /* ✅ limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px; /* keeps uniform height for alignment */
    text-align: left;
}

.products-grid .product-name a {
    color: inherit;
    text-decoration: none;
}

.products-grid .product-name a:hover {
    color: #477E00;
}

/* --- Ratings --- */
.products-grid .ratings {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 12px;
    color: #ff9900;
}

/* --- Price Box --- */
.products-grid .price-box {
    margin: 8px 0 0;
}

/*.products-grid .price-box .price {
  background: #4CAF50;  ✅ true green background 
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}*/

.products-grid .price-box .old-price .price {
    background: none;
    color: #999;
    text-decoration: line-through;
    font-size: 13px;
    font-weight: 400;
    margin-left: 8px;
}

/* --- Action Buttons --- */
.products-grid .actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.products-grid .actions .btn-cart {
    flex: 1;
    padding: 8px;
    background: #4CAF50; /* ✅ green Add to Cart */
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s;
}

.products-grid .actions .btn-cart:hover {
    background: #388E3C; /* darker green on hover */
}

.products-grid .actions .button {
    flex: 1;
    padding: 8px;
    background: #0d6efd; /* blue View Details */
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: background .2s;
}

.products-grid .actions .button:hover {
    background: #0b5ed7;
}

/* --- Wishlist Link --- */
.products-grid .link-wishlist {
    font-size: 12px;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    text-decoration: none;
}

.products-grid .link-wishlist:hover {
    color: #0d6efd;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}


.products-grid .price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #477E00;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    margin-top: auto;   /* 👈 pushes to bottom */
    min-height: 40px;
}

.products-grid .price-row .price-value {
    font-size: 18px;
    padding-right: 10px;
    color: #fff;
}
.products-grid .price-row .price {
    color: #fff !important;
    font-weight: 700;
    font-size: 18px;
    margin: 0 6px 0 0;
}
.products-grid .price-row .inc-vat {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
}
.products-grid  .price-label {
    display: none;

}
.products-grid .price-box,
.products-grid .regular-price {
    margin: 0; /* remove default p margins */
    padding: 0;
}

@media (min-width: 768px) {
    .catalog-category-view .col-wrapper {
        width: 100%;
    }
    .block-layered-nav .block-content > dl > dt {
        font-size: 0.875rem;
        font-weight: bold;
        font-style: normal;
        line-height: 2;
        text-rendering: optimizeSpeed;
        text-transform: uppercase;
        user-select: none;
        margin-bottom: 0px;
        padding: 10px;
        border-width: 1px;
        border-style: solid;
        border-color: var(--maho-color-border);
        position: relative;
        background-color: #477E00;
        display: block;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        color: #fff;
    }
    .block-layered-nav dl dd ol > li > span, .block-layered-nav dl dd ol > li > a {
        padding: 5px 15px;
        display: block;
        color: #477E00;
        font-weight: bold;
    }
    .block-layered-nav .block-content > dl > dt:hover {
	background-color: #477E00;
}
    .catalog-category-view .special-price .price-label {
	display: block !important;
}
}

.toolbar {
    justify-content: space-between;
    align-items: center;
    display: flex;
    width: 100%;
    margin-bottom: 1.5rem;
    background: #ECECEC;
    padding: 10px;
    border-radius: 5px;
    /* color: #000; */
}
.toolbar label, .pager-no-toolbar label {
    text-transform: uppercase;
    color: #000;
    font-weight: bold;
}
.catalog-category-view .special-price .price-label {
	display: block !important;
	color: #fff;
}
.catalog-category-view .price-box .old-price,.catalog-category-view .price-box .special-price {
	display: flex;
	margin-bottom: 0;
	padding: 0;
	text-decoration: none;
	color: #fff;
	align-content: center;
	align-items: center;
}
.catalog-category-view .percentage-off {
	display: none;
}
.catalog-category-view .price-right {
	display: flex;
	align-content: center;
	align-items: center;
}