/* -------------------------------- */
/* 1. Hide Unwanted Blog Posts in Shop Page */
/* -------------------------------- */

.archive .post, 
.archive .entry-footer {
    display: none !important;
}

/* -------------------------------- */
/* 2. Improve Product Grid Layout */
/* -------------------------------- */

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Bigger Product Cards */
    gap: 20px; /* Spacing Between Products */
    justify-content: center;
    align-items: stretch;
}

/* Product Container */
.woocommerce ul.products li.product {
    background: #ffffff;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    max-width: 280px; /* Balanced Width */
}

.woocommerce ul.products li.product:hover {
    transform: scale(1.03);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.1);
}

/* Product Image */
.woocommerce ul.products li.product img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Product Title */
.woocommerce ul.products li.product h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 8px 0;
}

/* Price Styling */
.woocommerce ul.products li.product .price {
    font-size: 14px;
    font-weight: bold;
    color: #0073aa;
}

/* Add to Cart & Select Options Button */
.woocommerce ul.products li.product .button {
    width: 100%;
    height: 36px;
    font-size: 13px;
    background-color: #0073aa;
    color: #ffffff;
    border-radius: 6px;
    transition: background 0.2s ease-in-out;
}

.woocommerce ul.products li.product .button:hover {
    background-color: #005880;
}

/* -------------------------------- */
/* 3. Mobile Optimization */
/* -------------------------------- */

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Smaller Cards for Mobile */
        gap: 15px;
    }

    .woocommerce ul.products li.product {
        max-width: 200px;
        padding: 10px;
    }

    .woocommerce ul.products li.product h2 {
        font-size: 14px;
    }

    .woocommerce ul.products li.product .price {
        font-size: 13px;
    }

    .woocommerce ul.products li.product .button {
        font-size: 12px;
        height: 32px;
    }
}

/* -------------------------------- */
/* 4. Sorting Fix - Show Newest First */
/* -------------------------------- */

.woocommerce ul.products {
    flex-direction: column-reverse;
}