/*
 * Front‑end styles for Enerlight Pix Discount plugin.
 *
 * These rules customise the appearance of the custom price wrapper,
 * the Add to Cart button and the quantity controls on single product pages.
 * Adjust colours and sizing here to match your brand or the reference design.
 */

/* Price wrapper styles */
.single-product .el-price-wrapper {
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.single-product .el-price-wrapper .el-regular-price {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.single-product .el-price-wrapper .el-discount-off {
    background-color: #f5b01d;
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}
.single-product .el-price-wrapper .el-pix-price {
    font-size: 2rem;
    font-weight: 700;
    color: #0077c0;
    margin-bottom: 0.25rem;
}
.single-product .el-price-wrapper .el-pix-label {
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}
.single-product .el-price-wrapper .el-installment {
    color: #333;
    font-size: 0.9rem;
}

/* Add to cart button styling */
.single-product .single_add_to_cart_button {
    background-color: #0077c0;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
}
.single-product .single_add_to_cart_button:hover {
    background-color: #005c97;
    color: #ffffff;
}

/* Quantity controls styling */
.single-product .quantity {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
}
.single-product .quantity input.qty {
    width: 3rem;
    text-align: center;
    height: 2.5rem;
    border: 1px solid #d9d9d9;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}
.single-product .quantity .minus,
.single-product .quantity .plus {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #d9d9d9;
    border-left: none;
    background-color: #ffffff;
    color: #0077c0;
    font-size: 1.25rem;
    cursor: pointer;
}
.single-product .quantity .plus {
    border-radius: 0 4px 4px 0;
}
.single-product .quantity .minus {
    border-radius: 4px 0 0 4px;
}
.single-product .quantity .minus:hover,
.single-product .quantity .plus:hover {
    background-color: #0077c0;
    color: #ffffff;
}

/* Hide the original WooCommerce price when our discount is enabled. We rely on
   the `el-pix-discount-enabled` class added to the body by the plugin. */
.el-pix-discount-enabled.single-product .summary .price {
    display: none !important;
}

/*
 * Boxed layout adjustments for single product pages.
 * These rules constrain the width of the main container and align the
 * product gallery and summary side by side. They also add box styling to
 * shipping and parcelamento sections to match the Dimensional layout.
 */
.single-product .ast-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.single-product .ast-container .product {
    display: flex;
    flex-wrap: wrap;
}
.single-product .ast-container .product .woocommerce-product-gallery,
.single-product .ast-container .product .summary {
    flex: 1 1 50%;
    box-sizing: border-box;
}

/* Ensure price and cart form stretch full width */
.single-product .el-price-wrapper,
.single-product form.cart {
    width: 100%;
}

/*
 * Parcelamento table styling: present installment options in two columns with
 * subtle borders and spacing. This targets any table inside the product
 * summary that lists installment options. Adjust selectors if your
 * parcelamento table has a specific class.
 */
.single-product .summary table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.single-product .summary table tr {
    display: flex;
    flex-wrap: wrap;
}
.single-product .summary table th,
.single-product .summary table td {
    flex: 1 1 50%;
    border: 1px solid #e0e0e0;
    padding: 0.5rem;
    box-sizing: border-box;
}