/*!
Theme Name: Hello Elementor Child
Theme URI: https://elementor.com/hello-theme/?utm_source=wp-themes&utm_campaign=theme-uri&utm_medium=wp-dash
Description: A plain-vanilla & lightweight theme for Elementor page builder
Author: Elementor Team
Author URI: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
Template: hello-elementor
Version: 1.0.0
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: hello-elementor
*/

/*  
 * 
 * 
function wc_products_table_shortcode() {
    ob_start();
    ?>
    <table id="wc-products-table">
        <thead>
            <tr>
                <th><input type="checkbox" id="select-all"></th>
                <th>Product</th>
                <th>Price</th>
            </tr>
        </thead>
        <tbody>
        <?php
        $args = array(
            'post_type' => 'product',
            'posts_per_page' => -1,
            'meta_key' => '_price',
            'orderby' => 'meta_value_num',
            'order' => 'ASC'
        );
        $products = new WP_Query( $args );
        if ( $products->have_posts() ) {
            while ( $products->have_posts() ) {
                $products->the_post();
                $product = wc_get_product( get_the_ID() );
                $price = $product->get_price();
                ?>
                <tr>
                    <td><input type="checkbox" name="product-ids[]" value="<?php the_ID(); ?>"></td>
                    <td><?php the_title(); ?></td>
                    <td><?php echo wc_price( $price ); ?></td>
                </tr>
                <?php
            }
        }
        wp_reset_postdata();
        ?>
        </tbody>
    </table>
    <button id="add-to-cart-button">Add to Cart</button>
    <?php
    return ob_get_clean();
}
add_shortcode( 'wc_products_table', 'wc_products_table_shortcode' );

function wc_add_to_cart_button_script() {
    ?>
    <script>
    jQuery(document).ready(function($) {
        $('#add-to-cart-button').click(function() {
            var productIds = [];
            $('input[name="product-ids[]"]:checked').each(function() {
                productIds.push($(this).val());
            });
            if (productIds.length > 0) {
                $.ajax({
                    type: 'POST',
                    url: wc_add_to_cart_params.ajax_url,
                    data: {
                        action: 'woocommerce_ajax_add_products',
                        product_ids: productIds,
                        security: wc_add_to_cart_params.add_to_cart_nonce
                    },
                    success: function(response) {
                        console.log(response);
                        alert('Products added to cart!');
                    }
                });
            }
        });
    });
    </script>
    <?php
}
// add_action( 'wp_enqueue_scripts', 'wc_add_to_cart_button_script' );
 * 
 * */




/* =========================================================
   MATERIAL DESIGN 3 – DESIGN SYSTEM
   Brand: آماده پک | AMADEH PACK
   Platform: WordPress + Elementor
   Nature / Eco / Kraft Packaging
========================================================= */

/* ===============================
   1. DESIGN TOKENS (ROOT)
================================ */
:root {

	      --primary:#2563EB;
      --text:#0F172A;
      --muted:#64748B;
      --bg:#F8FAFC;
      --surface:#FFFFFF;
      --surface-2:#F1F5F9;
      --outline:#E2E8F0;
      --shadow:0 10px 30px rgba(15,23,42,0.08);
      --shadow-soft:0 6px 18px rgba(15,23,42,0.06);
	--radius:16px;


	
	
  /* 🌿 Primary */
  --md-primary: #1F3D2B;
  --md-on-primary: #FAFAF7;
  --md-primary-container: #DCE7DF;

  /* 🟠 Secondary / Accent */
  --md-secondary: #D97A2B;
  --md-on-secondary: #FFFFFF;
  --md-secondary-container: #F3E6D8;

  /* 🌾 Neutral */
  --md-background: #FFFFFF;
  --md-surface: #F8F7F4;
  --md-outline: #D6D3CE;

  --md-text-primary: #1E1E1E;
  --md-text-secondary: #5F5F5F;
  --md-text-disabled: #9E9E9E;

  /* ❌ Error */
  --md-error: #D32F2F;

  /* 📐 Radius */
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* 📏 Spacing (8px Grid) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* 🌫 Elevation */
  --shadow-1: 0 2px 6px rgba(0,0,0,0.06);
  --shadow-2: 0 6px 16px rgba(0,0,0,0.08);

  /* ⏱ Motion */
  --md-transition: 0.15s cubic-bezier(0.2, 0, 0, 1);
}
.shadow { box-shadow: var(--shadow-soft);
	
}

.add-text{
	color:white;
	font-family:Estedad;
	text-align:center;
	    display:block;

}
/* Hero Slider */

.hero-slider{
position:relative;
max-width:1280px;
height:400px;
margin:auto;
overflow:hidden;
z-index:1;
}

.hero-slide{
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
opacity:0;
transition:opacity .8s ease;
z-index:1;
pointer-events:none;
}

.hero-slide.active{
opacity:1;
z-index:2;
pointer-events:auto;
}

.hero-slide a{
display:block;
width:100%;
height:100%;
position:relative;
z-index:2;
}

.hero-slide img{
width:100%;
height:100%;
object-fit:cover;
display:block;
}

.hero-text{
position:absolute;
bottom:40px;
left:40px;
background:rgba(0,0,0,0.4);
color:#fff;
padding:10px 20px;
font-size:26px;
z-index:3;
}

/* arrows */

.hero-prev,
.hero-next{
position:absolute;
top:50%;
transform:translateY(-50%);
background:rgba(0,0,0,0.5);
color:#fff;
border:none;
font-size:28px;
width:40px;
height:40px;
cursor:pointer;
z-index:5;
}

.hero-prev{ left:10px; }
.hero-next{ right:10px; }

/* dots */

.hero-dots{
position:absolute;
bottom:15px;
left:50%;
transform:translateX(-50%);
display:flex;
gap:8px;
z-index:5;
}

.hero-dot{
width:10px;
height:10px;
background:#ccc;
border-radius:50%;
cursor:pointer;
}

.hero-dot.active{
background:#fff;
}

/* mobile */

@media(max-width:768px){

.hero-slider{
height:220px;
}

.hero-text{
font-size:16px;
bottom:20px;
left:20px;
}

}



/* =========================================================
   MATERIAL DESIGN 3 – DESIGN SYSTEM
   Brand: آماده پک | AMADEH PACK
   Platform: WordPress + Elementor
   Nature / Eco / Kraft Packaging
========================================================= */

/* ===============================
   1. DESIGN TOKENS (ROOT)
================================ */
