=== Jeet Tile & Flooring Box Calculator ===
Contributors: jeetsanwal
Tags: flooring, tiles, calculator, boxes, area
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Calculate whole tile or flooring boxes from area, coverage and a wastage allowance.

== Description ==

Help visitors estimate how many whole boxes of one flooring or tile product they need. Enter a total area or one rectangular room's length and width, coverage per box and a wastage allowance. An optional box price produces an estimated material cost.

* Native Flooring Box Calculator block with editable defaults, or shortcode.
* Square metres (room sides in metres) or square feet (sides in feet).
* Whole-box round-up using exact decimal arithmetic, including room dimensions.
* Optional price per box and currency label. No currency conversion or tax calculation.
* Multiple independent calculators on the same page.
* Accessible labelled inputs, announced results and useful error messages.
* Small local JS and CSS loaded when a calculator is rendered.
* No visitor measurement storage, network calculator, ads, signup, premium tier or frontend credit.

Formula: boxes = ceiling(area × (1 + wastage / 100) / coverage per box).

The calculator does not change WooCommerce cart quantities, reserve stock or calculate shipping. It works without WooCommerce and can be placed in a product description or other shortcode-enabled content.

== Installation ==

1. Install the individual ZIP via Plugins > Add New > Upload Plugin.
2. Add the Flooring Box Calculator block to a page and set defaults in its sidebar.
3. Alternatively add [jeet_flooring_calculator coverage="1.44" waste="10" unit="sqm"] in a Shortcode block.
4. Preview the public page and test your product's actual coverage values.

Tools > Flooring Calculator contains instructions and shortcode examples.

== Shortcode attributes ==

coverage: area covered by one box, default 1.44. Up to four decimal places.
waste: percentage from 0 to 50, default 10. Up to two decimal places.
unit: sqm or sqft. Default sqm. Units do not convert existing values.
price: optional price per box, up to two decimal places. Default blank.
currency: three uppercase letters, default USD. Example INR or GBP.
heading: plain text heading, default Flooring box calculator.

Example: [jeet_flooring_calculator coverage="15.5" waste="7.5" unit="sqft" price="39.95" currency="USD"]

== Frequently Asked Questions ==

= How accurate is the estimate? =
The arithmetic uses exact fixed decimals and whole-box rounding. The result still depends on your measurements and the correct box coverage. Pattern cuts, installation direction and uneven rooms may need a different allowance. Check quantities with your installer.

= Does it convert feet to metres? =
No. One calculator uses its configured unit throughout. For sqm, enter sides in metres and coverage in square metres. For sqft, enter sides in feet and coverage in square feet. Use a separate calculator for a different unit or box type.

= What are the limits? =
Area: up to 1,000,000 square units. Room sides: up to 10,000 units each, with the same total-area cap. Coverage: 0.0001–100,000 square units per box. Wastage: 0–50%. Output: up to 1,000,000,000 boxes. Price: 0–100,000,000 currency units per box. Enter decimal points, with at most four places for area/sides/coverage and two for waste/price.

= Does estimated cost include tax or installation? =
It only multiplies whole boxes by the entered box price. Delivery, labour, adhesives and taxes not already in that price are excluded. No rates are fetched and no currency conversion is performed.

= Does it send measurements to a server? =
No. Calculations run locally in a modern browser with BigInt support. Buttons stay disabled if the script cannot initialize. The plugin stores no calculations or settings; block attributes remain part of the page content. Normal host/theme analytics are outside this plugin.

= What happens on uninstall? =
No custom tables, options or visitor data exist to delete. Blocks and shortcodes remain in page content for reinstall. Remove them from pages if you no longer want a calculator there.

== Changelog ==

= 1.0.1 =
* Bound custom headings by characters so long Hindi text and emoji retain valid UTF-8.
* Rechecked decimal input bounds, whole-box rounding and optional box-cost calculations.

= 1.0.0 =
* Initial release with a configurable block, shortcode, exact box calculations and optional cost estimate.
