/* ========================================
   Minimal Product Card Styles
   ======================================== */

/* Product Item - Minimal Style */
ul.products li.product.product-minimal {
    margin-bottom: 8px;
}

.mf-product-minimal-inner {
    position: relative;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mf-product-minimal-inner:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-color: #ddd;
}

/* Thumbnail Section */
.mf-product-minimal-thumbnail {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    aspect-ratio: 1;

}

.mf-product-minimal-image {
    display: block;
    width: 100%;
    height: 100%;
}

.mf-product-minimal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mf-product-minimal-inner:hover .mf-product-minimal-image img {
    transform: scale(1.05);
}

/* Content Section */
.mf-product-minimal-content {
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Brand Name */
.mf-product-minimal-brand {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 500;
    line-height: 1;
    min-height: 14px;
}

.mf-product-minimal-brand a {
    color: #999;
    transition: color 0.3s ease;
}

.mf-product-minimal-brand a:hover {
    color: #000;
}

/* Product Title */
.mf-product-minimal-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    min-height: 53px;
}

.mf-product-minimal-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.mf-product-minimal-title a:hover {
    color: #000;
}

/* Vendor Name */
.mf-product-minimal-vendor {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
    min-height: 30px;
}

.mf-product-minimal-vendor a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mf-product-minimal-vendor a:hover {
    color: #000;
}

.mf-product-minimal-vendor .sold-by-meta {
    display: inline-block;
}

/* Price */
.mf-product-minimal-price {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin-top: auto;
}

.mf-product-minimal-price .price {
    display: block;
}

.mf-product-minimal-price del {
    font-size: 14px;
    color: #777;
    margin-right: 5px;
    font-weight: 400;
}

.mf-product-minimal-price ins {
    text-decoration: none;
    color: #000;
}

/* Add to Cart Section with Quantity */
.mf-product-minimal-cart-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    justify-content: end;
}

/* Quantity Selector */
.mf-product-minimal-quantity {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    height: 40px;
}

.mf-product-minimal-quantity button {
    width: 32px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
}

.mf-product-minimal-quantity button:hover {
    background: #e0e0e0;
    color: #000;
}

.mf-product-minimal-quantity .qty-input {
    width: 40px;
    height: 40px;
    border: none;
    background: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding: 0;
    -moz-appearance: textfield;
}

.mf-product-minimal-quantity .qty-input::-webkit-outer-spin-button,
.mf-product-minimal-quantity .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Button */
.mf-product-minimal-cart {
    display: flex;
    justify-content: end;
}

.mf-product-minimal-cart .button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    text-align: center;
    padding: 0 15px;
    background: #01341c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease;
    cursor: pointer;
}

.mf-product-minimal-cart .button:hover {
    background: #025a2f;
}

.mf-product-minimal-cart .button i {
    margin: 0;
    display: inline-block;
}

.mf-product-minimal-cart .button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.mf-product-minimal-cart .button.loading i {
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.mf-product-minimal-cart .button .add-to-cart-text {
    display: none;
}

/* When added to cart - keep same style */
.mf-product-minimal-cart .button.added {
    background: #01341c;
}

.mf-product-minimal-cart .button.added:hover {
    background: #025a2f;
}

/* Hide the "View cart" link that appears after adding to cart */
.mf-product-minimal-cart .added_to_cart {
    display: none !important;
}

/* Out of Stock */
.mf-product-minimal-cart .button.product_type_simple,
.mf-product-minimal-cart .button.product_type_variable,
.mf-product-minimal-cart .button.product_type_grouped,
.mf-product-minimal-cart .button.product_type_external {
    background: #01341c;
    color: #ffffff;
    border: 1px solid #01341c;
    padding: 0px 12px !important;
    height: 40px !important;
    width: auto !important;
}

.mf-product-minimal-cart .button.product_type_variable:hover,
.mf-product-minimal-cart .button.product_type_grouped:hover,
.mf-product-minimal-cart .button.product_type_external:hover {
    background: #012514;
    border-color: #01341c;
    padding: 0px 12px !important;
    height: 40px !important;
}

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.added::after {
    display: none !important;
    content: '' !important;
}


body.home .mf-product-minimal-cart-section {
    display: none;
}

body.home .product-inner .add_to_cart_button {
    display: none !important;
}


/* Responsive */
@media (max-width: 768px) {
    .mf-product-minimal-content {
        padding: 8px;
        gap: 6px;
    }

    .mf-product-minimal-title {
        font-size: 13px;
    }

    .mf-product-minimal-price {
        font-size: 14px;
    }

    .mf-product-minimal-cart .button {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Grid Adjustments */
ul.products li.product.product-minimal {
    padding-left: 4px;
    padding-right: 4px;
}

/* Compact Height Control */
.mf-product-minimal-inner {
    max-height: 420px;
}

@media (max-width: 768px) {
    .mf-product-minimal-inner {
        max-height: 380px;
    }
}