/* =========================================
   1. THEME CLEANUP (THE KILLER SECTION)
   ========================================= */

/* 1. BLOCKSY FIX: Hide the 'figure' tag. 
   Blocksy puts the old image and the Yellow Sale badge inside this tag. 
   Hiding this kills both instantly. */
.woocommerce ul.products li.product > figure {
    display: none !important;
}

/* 2. Hide standard OnSale badge just in case */
.woocommerce span.onsale, 
.woocommerce ul.products li.product .onsale,
.woocommerce ul.products li.product .ct-badges {
    display: none !important;
}

/* 3. Hide other default theme elements */
.woocommerce ul.products li.product > a:not(.wc-mechuno-product-wrapper),
.woocommerce ul.products li.product > .button,
.woocommerce ul.products li.product > .price,
.woocommerce ul.products li.product .entry-meta,
.woocommerce ul.products li.product .star-rating {
    display: none !important;
}

/* 4. Reset Container Spacing */
.woocommerce ul.products li.product {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 30px !important;
}

/* =========================================
   2. MECHUNO CARD DESIGN
   ========================================= */
.wc-mechuno-product-wrapper {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-top: 0 !important;
}

.wc-mechuno-product-wrapper:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #ccc;
    transform: translateY(-3px);
}

/* Image Area */
.wc-thumb-wrapper {
    position: relative;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #f9f9f9;
    background: #fff;
}

.wc-product-thumb img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Red Badge */
.wc-product-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wc-label-discount {
    background: #e4404d; /* Red */
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.wc-label-sale {
    background: #333;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Info Area */
.wc-details-wrapper {
    padding: 15px;
    text-align: left;
    flex-grow: 1;
}

.wc-product-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wc-product-name a {
    color: #333;
    text-decoration: none;
}

.wc-product-price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.wc-product-price ins {
    color: #e4404d;
    text-decoration: none;
    margin-left: 5px;
}

.wc-product-price del {
    color: #aaa;
    font-size: 13px;
    font-weight: 400;
}

/* Features */
.wc-product-features {
    font-size: 11px;
    color: #777;
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.wc-product-features li {
    margin-bottom: 3px;
}

.wc-checked {
    color: #49a02e;
    font-weight: bold;
    margin-right: 4px;
}

/* Add to Cart Button */
.wc-cart-wrapper {
    padding: 0 15px 15px;
}

.wc-mechuno-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #49a02e; /* Green */
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    padding: 12px 0;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
    cursor: pointer;
}

.wc-mechuno-btn:hover {
    background: #3b8424;
}

/* Loading spinner for Ajax */
.wc-mechuno-btn.loading {
    opacity: 0.7;
    cursor: wait;
}
.wc-mechuno-btn.added::after {
    content: " \f00c"; /* FontAwesome Check */
    font-family: FontAwesome;
    margin-left: 5px;
}

/* =========================================
   3. CATEGORIES
   ========================================= */
.wc-mechuno-cat-card {
    background: #fff;
    border: 1px solid #f1f1f1;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    height: 100%;
}
.wc-mechuno-cat-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: #49a02e;
}
.wc-mechuno-cat-card a { text-decoration: none; color: inherit; display: block; }
.wc-cat-img-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
}
.wc-cat-img-container img { width: 100%; height: 100%; object-fit: contain; }
.wc-cat-count {
    position: absolute; top: -5px; right: -5px;
    background: #f5f5f5; font-size: 10px; padding: 2px 6px; border-radius: 10px; font-weight: bold; color: #333;
}
.wc-cat-title { font-weight: 600; font-size: 13px; display: block; }

/* Force default blocksy categories to hide */
.woocommerce ul.products li.product-category > figure,
.woocommerce ul.products li.product-category .woocommerce-loop-category__title,
.woocommerce ul.products li.product-category mark {
    display: none !important;
}

/* =========================================
   4. MOBILE OPTIMIZATION (2 COLUMNS)
   ========================================= */
@media (max-width: 767px) {
    .woocommerce ul.products {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .woocommerce ul.products li.product {
        width: calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
        flex: 0 0 calc(50% - 5px) !important;
        margin: 0 0 10px 0 !important;
        padding: 0 !important;
        clear: none !important;
    }

    .wc-product-thumb img { height: 120px; }
    .wc-details-wrapper { padding: 10px; }
    .wc-product-name { font-size: 13px; height: 38px; }
    .wc-product-features { display: none; }
    .wc-mechuno-btn { padding: 8px 0; font-size: 12px; }
    .wc-cart-wrapper { padding: 0 10px 10px; }
    .wc-label-discount { font-size: 10px; padding: 2px 5px; }
}

/* =========================================
   5. SLIDER
   ========================================= */
.wc-mechuno-row.wc-slider-mode {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 20px;
}
.wc-slider-mode .wc-mechuno-product-wrapper {
    width: 240px;
    flex-shrink: 0;
}