<?php 

	$pr_agency_custom_css = '';

	
	/*----------------Width Layout -------------------*/
    $pr_agency_theme_lay = get_theme_mod( 'pr_agency_width_options','Full Width');
    if($pr_agency_theme_lay == 'Full Width'){
		$pr_agency_custom_css .='body{';
			$pr_agency_custom_css .='max-width: 100%;';
		$pr_agency_custom_css .='}';
	}else if($pr_agency_theme_lay == 'Contained Width'){
		$pr_agency_custom_css .='body{';
			$pr_agency_custom_css .='width: 100%;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;';
		$pr_agency_custom_css .='}';
	}else if($pr_agency_theme_lay == 'Boxed Width'){
		$pr_agency_custom_css .='body{';
			$pr_agency_custom_css .='max-width: 1140px; width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto;';
		$pr_agency_custom_css .='}';
	}

	//site logo css
	$pr_agency_logo_size = get_theme_mod('pr_agency_logo_size'); // This value should be a percentage (e.g., 50 for 50%)
	if ($pr_agency_logo_size) {
		$pr_agency_logo_width_px = (350 * $pr_agency_logo_size) / 100; // Calculate the pixel width based on the percentage
		$pr_agency_custom_css .= '.site-logo img {';
		$pr_agency_custom_css .= 'width: '.esc_attr($pr_agency_logo_width_px).'px !important;';
		$pr_agency_custom_css .= '}';
	}

    //Submenu Dropdown Effect
	$pr_agency_dropdown_anim = get_theme_mod('pr_agency_dropdown_anim');
	$pr_agency_custom_css .='.primary-navigation ul ul{';
		$pr_agency_custom_css .='animation: '.esc_attr($pr_agency_dropdown_anim).' 1s ease;';
	$pr_agency_custom_css .='}';

	// Banner section CSS
	$pr_agency_banner_heading_size = get_theme_mod( 'pr_agency_banner_heading_size' );
	if ( $pr_agency_banner_heading_size ) {
		$pr_agency_custom_css .= '#pr-banner .pr-banner-heading{';
			$pr_agency_custom_css .= 'font-size: ' . absint( $pr_agency_banner_heading_size ) . 'px;';
		$pr_agency_custom_css .= '}';
	}

	$pr_agency_banner_desc_size = get_theme_mod( 'pr_agency_banner_desc_size' );
	if ( $pr_agency_banner_desc_size ) {
		$pr_agency_custom_css .= '#pr-banner .pr-banner-desc{';
			$pr_agency_custom_css .= 'font-size: ' . absint( $pr_agency_banner_desc_size ) . 'px;';
		$pr_agency_custom_css .= '}';
	}

	// Featured packages section css
	$pr_agency_packages_heading_color = get_theme_mod('pr_agency_packages_heading_color');
	if ( $pr_agency_packages_heading_color ) {
		$pr_agency_custom_css .= '#feature-section .packages-title{';
			$pr_agency_custom_css .= 'color: ' . esc_attr( $pr_agency_packages_heading_color ) . ';';
			$pr_agency_custom_css .= 'text-decoration-color: ' . esc_attr( $pr_agency_packages_heading_color ) . ';';
		$pr_agency_custom_css .= '}';
	}

	$pr_agency_packages_desc_color = get_theme_mod('pr_agency_packages_desc_color');
	if ( $pr_agency_packages_desc_color ) {
		$pr_agency_custom_css .= '#feature-section .packages-desc{';
			$pr_agency_custom_css .= 'color: ' . esc_attr( $pr_agency_packages_desc_color ) . ';';
		$pr_agency_custom_css .= '}';
	}

	$pr_agency_packages_name_color = get_theme_mod('pr_agency_packages_name_color');
	if ( $pr_agency_packages_name_color ) {
		$pr_agency_custom_css .= '#feature-section .package-name{';
			$pr_agency_custom_css .= 'color: ' . esc_attr( $pr_agency_packages_name_color ) . ';';
		$pr_agency_custom_css .= '}';
	}

	$pr_agency_packages_price_color = get_theme_mod('pr_agency_packages_price_color');
	if ( $pr_agency_packages_price_color ) {
		$pr_agency_custom_css .= '#feature-section .package-price, #feature-section .package-desc{';
			$pr_agency_custom_css .= 'color: ' . esc_attr( $pr_agency_packages_price_color ) . ';';
		$pr_agency_custom_css .= '}';
	}

	$pr_agency_packages_btn_color  = get_theme_mod('pr_agency_packages_btn_color');
	$pr_agency_packages_btnbg_color = get_theme_mod('pr_agency_packages_btnbg_color');
	if ( $pr_agency_packages_btn_color || $pr_agency_packages_btnbg_color ) {
		$pr_agency_custom_css .= '#feature-section .package-btn{';
		if ( $pr_agency_packages_btn_color ) {
			$pr_agency_custom_css .= 'color: ' . esc_attr( $pr_agency_packages_btn_color ) . ';';
		}
		if ( $pr_agency_packages_btnbg_color ) {
			/* Only apply background if explicitly set — new design is text-link style */
			$pr_agency_custom_css .= 'background: ' . esc_attr( $pr_agency_packages_btnbg_color ) . ';';
			$pr_agency_custom_css .= 'padding: 8px 18px; border-radius: 6px;';
		}
		$pr_agency_custom_css .= '}';
	}

	//Product section css
	$pr_agency_products_section_title_font_size = get_theme_mod('pr_agency_products_section_title_font_size');
	$pr_agency_custom_css .=' #special-product strong{';
		$pr_agency_custom_css .='font-size: '.esc_attr($pr_agency_products_section_title_font_size).'px;';
	$pr_agency_custom_css .='}';

	$pr_agency_products_section_text_font_size = get_theme_mod('pr_agency_products_section_text_font_size');
	$pr_agency_custom_css .=' #special-product .product-head p{';
		$pr_agency_custom_css .='font-size: '.esc_attr($pr_agency_products_section_text_font_size).'px;';
	$pr_agency_custom_css .='}';

	$pr_agency_special_products_btn_color = get_theme_mod('pr_agency_special_products_btn_color');
	$pr_agency_special_products_btnbg_color = get_theme_mod('pr_agency_special_products_btnbg_color');
	$pr_agency_custom_css .=' .wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button{';
		$pr_agency_custom_css .='color: '.esc_attr($pr_agency_special_products_btn_color).'; background: '.esc_attr($pr_agency_special_products_btnbg_color).';';
	$pr_agency_custom_css .='}';

	//Footer css
	$pr_agency_footer_copy_font_size = get_theme_mod('pr_agency_footer_copy_font_size');
	$pr_agency_custom_css .=' .copyright p{';
		$pr_agency_custom_css .='font-size: '.esc_attr($pr_agency_footer_copy_font_size).'px;';
	$pr_agency_custom_css .='}';