/* Zomato Style Button Wrapper */
.zomato-btn-wrapper-a5da2c03 {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 40px;
    background: #ffffff;
    border: 1.5px solid #e23744; /* Zomato Red */
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(226, 55, 68, 0.12);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
    margin: 12px auto !important; /* Centered layout */
}

/* Force block display and center everything inside WooCommerce product item */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product,
.products .product,
.woocommerce ul.products li.product-category,
.woocommerce-page ul.products li.product-category {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* Force product card anchor wrapper (image, title) to center content */
.woocommerce ul.products li.product > a,
.woocommerce-page ul.products li.product > a,
.products .product > a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 8px !important;
}

/* Force image centering */
.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img,
.products .product img {
    margin: 0 auto !important;
    display: block !important;
    float: none !important;
}

/* Centering Titles */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h3,
.products .product .woocommerce-loop-product__title {
    text-align: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

/* Center Star Ratings */
.woocommerce ul.products li.product .star-rating,
.products .product .star-rating {
    margin: 0 auto 10px auto !important;
    display: block !important;
    float: none !important;
}

/* Push button wrapper to center container margin */
.woocommerce ul.products li.product .zomato-btn-wrapper-a5da2c03,
.woocommerce-page ul.products li.product .zomato-btn-wrapper-a5da2c03,
.products .product .zomato-btn-wrapper-a5da2c03 {
    margin: 12px auto !important;
    display: inline-flex !important;
}

/* Ensure price layout doesn't break alignment */
.woocommerce ul.products li.product .price,
.products .product .price {
    font-family: inherit !important;
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 15px !important;
    display: block !important;
    margin: 0 auto 12px auto !important;
    text-align: center !important;
    width: 100% !important;
}

.zomato-btn-wrapper-a5da2c03:hover {
    box-shadow: 0 4px 12px rgba(226, 55, 68, 0.2);
}

/* Loading overlay */
.zomato-btn-wrapper-a5da2c03.loading {
    opacity: 0.85;
}

/* Trigger ADD button */
.zomato-add-trigger-a5da2c03 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    color: #e23744;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    cursor: pointer;
    outline: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.zomato-add-trigger-a5da2c03 .zomato-plus-icon {
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

/* Quantity Controls Box */
.zomato-qty-controls-a5da2c03 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e23744; /* Fills to solid red when quantity is active */
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Action button changes state */
.zomato-btn-wrapper-a5da2c03.zomato-active {
    border-color: #e23744;
    background: #e23744;
}

.zomato-btn-wrapper-a5da2c03.zomato-active .zomato-add-trigger-a5da2c03 {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
}

.zomato-btn-wrapper-a5da2c03.zomato-active .zomato-qty-controls-a5da2c03 {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* Quantity individual items */
.zomato-qty-btn-a5da2c03 {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    width: 40px;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: background 0.15s ease;
}

.zomato-qty-btn-a5da2c03:hover {
    background: rgba(255, 255, 255, 0.15);
}

.zomato-qty-value-a5da2c03 {
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    pointer-events: none;
    min-width: 18px;
    text-align: center;
}
