/* WooCommerce Product Card Styling
  ---------------------------------
  This CSS will style your WooCommerce product items on category/shop pages 
  to match the provided design. It uses a combination of standard WooCommerce 
  classes and your custom 'markex' classes.
*/

/* General Product Grid Layout */
ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Main Product Card ('li' element) */
ul.products li.product {
    list-style: none;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(44, 62, 80, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(44, 62, 80, 0.12);
}

/* Top Section with Image/SKU */
ul.products li.product a.woocommerce-LoopProduct-link {
    display: block;
    text-decoration: none;
}

ul.products li.product .woocommerce-loop-product__title {
    padding: 20px 20px 0; /* Add padding to title */
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

/* We'll use the image link wrapper for the grey background */
ul.products li.product a img {
    display: block;
    width: 100%;
    height: auto;
    background-color: #f0f2f5; /* Light grey background for the image area */
    min-height: 150px; /* Ensures a consistent height if there's no image */
    object-fit: cover;
}

/* Add a placeholder style if you want to show text like the screenshot */
/* You might need custom PHP to output SKUs here instead of an image */
.product-image-placeholder {
    background-color: #f0f2f5;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    font-size: 2rem;
    font-weight: bold;
    color: #4a5568;
    padding: 40px 20px;
}


/* Product Info Wrapper */
.woocommerce-loop-product__link + .price + .add_to_cart_button {
    /* This targets the elements after the main link */
    padding: 0 20px 20px;
}

/* You may need to wrap your product details in a container div */
.product-info-wrap {
    padding: 20px;
    text-align: left;
}

/* Category Text (Assuming you have this element) */
.product-category {
    font-size: 11px;
    font-weight: 600;
    color: #8d99ae;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* Product Title */
h2.woocommerce-loop-product__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    padding: 0 !important; /* Override default padding */
}

/* Price */
.price {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

/* Minimum Order Quantity Text (Assuming you have this element) */
.min-order-qty {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

/* Form Elements Styling (using your classes)
  -------------------------------------------
*/

/* Wrapper for all quick shop elements */
.markex-qs-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Make children full width */
    margin-top: 12px;
}

/* Variation Dropdown */
.markex-variation-select select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 12px;
    font-size: 16px;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232c3e50' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Wrapper for quantity and add-to-cart button */
.actions-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Quantity Selector */
.markex-quantity-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

/* Quantity Buttons (-, +) */
.markex-qty-btn {
    width: 40px;
    height: 48px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    font-weight: 400;
    color: #4a5568;
    transition: background-color 0.2s ease;
}

.markex-qty-btn:hover {
    background-color: #f0f2f5;
}

/* Quantity Input */
.markex-qty-input {
    width: 50px;
    height: 48px;
    border: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    background: #fff;
    -moz-appearance: textfield;
}

.markex-qty-input::-webkit-outer-spin-button,
.markex-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Button */
.markex-add-to-cart,
.actions-wrapper .single_add_to_cart_button { /* Target your button and WooCommerce's */
    flex-grow: 1; /* Allow button to fill available space */
    text-align: center;
    height: 50px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 8px;
    background: #2c3e50;
    color: #fff;
    border: none;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
    cursor: pointer;
}

.markex-add-to-cart:hover,
.actions-wrapper .single_add_to_cart_button:hover {
    background: #1a252f;
}
