.fme_cpffw_front_feilds_design {
    width: 80%;
    margin-top: 15px;
}

.modal {
    z-index: 12345 !important;
}

.fme_cpffw_front_small_fields {
    width: 62%;
    margin-top: 15px;
}

* {
    /*box-sizing: border-box;*/
}

.required,
.fme_fields_labels .required,
.fme_cpffw_storefront .required {
	color: #e2401c;
}
.fme-cpffw-file{
    display: flex;
}

.fme_fields_labels {
	font-weight: bold;
}

.fme_cpffw_small_price {
	font-size: 0.6em !important;
}

.fme_cpffw_div_class {
	margin-bottom: 20px;
}

.fme-cpffw-selection-limit-counter {
	margin: 4px 0 8px;
	font-size: 0.9em;
	opacity: 0.85;
}

.fme_cpffw_swatch_tile input[type="checkbox"]:disabled + img,
.fme_cpffw_swatch_tile input[type="radio"]:disabled + img,
.fme_cpffw_swatch_tile input[type="checkbox"]:disabled + .fme_cpffw_color_swatch,
.fme_cpffw_swatch_tile input[type="radio"]:disabled + .fme_cpffw_color_swatch {
	opacity: 0.45;
	cursor: not-allowed;
}

.fme_cpffw_swatch_tile input[type="checkbox"]:disabled ~ span,
.fme_cpffw_swatch_tile input[type="radio"]:disabled ~ span,
.fme_cpffw_swatch_tile input[type="radio"]:disabled ~ label {
	opacity: 0.65;
}

.fme-cpffw-field-label-row {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.fme-cpffw-field-clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px;
	border: 0;
	background: transparent;
	color: #666;
	cursor: pointer;
	vertical-align: middle;
	line-height: 1;
}

.fme-cpffw-field-clear:hover,
.fme-cpffw-field-clear:focus {
	color: #111;
	outline: none;
}

.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile {
	position: relative;
	vertical-align: top;
	cursor: pointer;
}

.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="checkbox"],
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="checkbox"].fme_cpffw_front_feilds,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"].fme_cpffw_front_feilds {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	opacity: 0 !important;
	cursor: pointer !important;
	z-index: 2 !important;
}

/* Image/color swatches (checkbox + radio) — clear selected state */
.fme_cpffw_swatch_grid {
	--fme-swatch-selected: #0056b3;
	--fme-swatch-selected-ring: rgba(0, 86, 179, 0.28);
	--fme-swatch-border: #c3c4c7;
}

.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="checkbox"] + img,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"] + img,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="checkbox"] + .fme_cpffw_color_swatch,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"] + .fme_cpffw_color_swatch {
	box-sizing: border-box;
	border: 2px solid var(--fme-swatch-border);
	border-radius: 4px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="checkbox"]:checked + img,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"]:checked + img,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="checkbox"]:checked + .fme_cpffw_color_swatch,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"]:checked + .fme_cpffw_color_swatch {
	outline: none;
	border-color: var(--fme-swatch-selected);
	box-shadow:
		0 0 0 2px var(--fme-swatch-selected-ring),
		inset 0 0 0 999px rgba(0, 86, 179, 0.08);
}

.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile:has(> input[type="checkbox"]:checked)::after,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile:has(> input[type="radio"]:checked)::after {
	content: "";
	position: absolute;
	top: 5px;
	right: 5px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background-color: var(--fme-swatch-selected);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-size: 13px 13px;
	background-position: center;
	background-repeat: no-repeat;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
	z-index: 3;
	pointer-events: none;
}

.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="checkbox"]:checked ~ span:not(.fme_cpffw_color_swatch),
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"]:checked ~ span:not(.fme_cpffw_color_swatch),
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"]:checked ~ label {
	font-weight: 600;
	color: var(--fme-swatch-selected);
}

.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="checkbox"]:focus-visible + img,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"]:focus-visible + img,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="checkbox"]:focus-visible + .fme_cpffw_color_swatch,
.fme_cpffw_swatch_grid .fme_cpffw_swatch_tile > input[type="radio"]:focus-visible + .fme_cpffw_color_swatch {
	box-shadow:
		0 0 0 2px #fff,
		0 0 0 4px var(--fme-swatch-selected);
}

.fme_cpffw_custom_main {
	width: 100%;
    clear: both;
    margin-bottom: 20px;
}

form.cart .single_add_to_cart_button:disabled,
form.cart button[name="add-to-cart"]:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

#product_total_price {
    font-size: 20px;
    font-weight: 600;
}

/* Live price breakdown — polished card matching storefront reference design */
#product_total_price .fme-cpffw-pb-calc-sync {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

#product_total_price.fme-cpffw-price-breakdown-wrap {
	--fme-pb-text: #333333;
	--fme-pb-muted: #666666;
	--fme-pb-heading: #888888;
	--fme-pb-border: #e0e0e0;
	--fme-pb-total: #0056b3;
	position: relative;
	clear: both;
	width: 100%;
	box-sizing: border-box;
	/* Clear gap below ATC/qty (below placement) and above options (above/sticky). */
	margin: 2em 0 !important;
	padding: 20px !important;
	background: #ffffff;
	border: 1px solid var(--fme-pb-border);
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--fme-pb-text);
}

#product_total_price.fme-cpffw-price-breakdown-wrap > br {
	display: none;
}

#product_total_price .fme-cpffw-price-breakdown-host {
	font-size: inherit;
	font-weight: 400;
	line-height: inherit;
	width: 100%;
}

#product_total_price .fme-cpffw-price-breakdown {
	width: 100%;
}

#product_total_price .fme-cpffw-pb-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100%;
}

#product_total_price .fme-cpffw-pb-row {
	display: flex !important;
	justify-content: space-between !important;
	align-items: baseline;
	gap: 1em;
	margin: 0 !important;
	padding: 0.35em 0 !important;
	list-style: none !important;
	border: 0 !important;
	background: transparent !important;
}

#product_total_price .fme-cpffw-pb-row--base {
	padding: 0 0 0.85em !important;
	margin: 0 0 0.35em !important;
	border-bottom: 1px solid var(--fme-pb-border) !important;
	font-weight: 700;
	color: var(--fme-pb-text);
}

#product_total_price .fme-cpffw-pb-row--base .fme-cpffw-pb-label,
#product_total_price .fme-cpffw-pb-row--base .fme-cpffw-pb-amount {
	font-weight: 700;
	color: var(--fme-pb-text);
}

#product_total_price .fme-cpffw-pb-row--heading {
	margin-top: 0.55em !important;
	padding-top: 0.15em !important;
	padding-bottom: 0.2em !important;
	font-size: 0.82em;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--fme-pb-heading);
}

#product_total_price .fme-cpffw-pb-row--heading .fme-cpffw-pb-label {
	font-weight: 500;
	color: var(--fme-pb-heading);
}

#product_total_price .fme-cpffw-pb-row--option {
	font-size: 0.95em;
	font-weight: 400;
	color: var(--fme-pb-muted);
	padding: 0.28em 0 !important;
}

#product_total_price .fme-cpffw-pb-row--option .fme-cpffw-pb-label,
#product_total_price .fme-cpffw-pb-row--option .fme-cpffw-pb-amount {
	font-weight: 400;
	color: var(--fme-pb-muted);
}

#product_total_price .fme-cpffw-pb-row--options-total {
	margin-top: 0.55em !important;
	padding-top: 0.85em !important;
	border-top: 1px dashed #c5c5c5 !important;
	font-weight: 700;
	color: var(--fme-pb-text);
}

#product_total_price .fme-cpffw-pb-row--options-total .fme-cpffw-pb-label,
#product_total_price .fme-cpffw-pb-row--options-total .fme-cpffw-pb-amount {
	font-weight: 700;
	color: var(--fme-pb-text);
}

#product_total_price .fme-cpffw-pb-row--total {
	margin-top: 0.65em !important;
	padding-top: 0.95em !important;
	border-top: 2px solid #2a2a2a !important;
	font-weight: 700;
	font-size: 1.12em;
	color: var(--fme-pb-text);
}

#product_total_price .fme-cpffw-pb-row--total .fme-cpffw-pb-label {
	font-weight: 700;
	font-size: 1.05em;
	color: var(--fme-pb-text);
}

#product_total_price .fme-cpffw-pb-row--total .fme-cpffw-pb-amount {
	font-weight: 700;
	font-size: 1.28em;
	color: var(--fme-pb-total);
}

#product_total_price .fme-cpffw-pb-label {
	flex: 1 1 auto;
	min-width: 0;
	word-break: break-word;
}

#product_total_price .fme-cpffw-pb-amount {
	flex: 0 0 auto;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

/*
 * Sticky: keep breakdown visible while scrolling the product form.
 * Themes often set .product { overflow: hidden } and #page { overflow-y: auto }
 * even when they are not real scrollports — both break position:sticky.
 * JS marks those ancestors with .fme-cpffw-sticky-overflow-fix.
 *
 * Above placement: position:sticky;top (card sits above options when sticky on).
 * Below placement: JS docks with position:fixed at viewport bottom while form.cart
 * is on screen — CSS sticky alone has no stick range when the card is last in the form.
 */
.fme-cpffw-sticky-overflow-fix {
	overflow: visible !important;
}

.fme-cpffw-pb-sticky-placeholder {
	display: block;
	width: 100%;
	box-sizing: border-box;
	visibility: hidden;
	pointer-events: none;
}

#product_total_price.fme-cpffw-price-breakdown--sticky.fme-cpffw-price-breakdown--sticky-top {
	position: sticky !important;
	top: 12px;
	z-index: 100;
	align-self: flex-start;
	width: 100%;
	/* Opaque card so scrolling options do not bleed through */
	background: #ffffff;
}

body.admin-bar #product_total_price.fme-cpffw-price-breakdown--sticky.fme-cpffw-price-breakdown--sticky-top {
	top: 46px;
}

@media screen and (min-width: 783px) {
	body.admin-bar #product_total_price.fme-cpffw-price-breakdown--sticky.fme-cpffw-price-breakdown--sticky-top {
		top: 32px;
	}
}

#product_total_price.fme-cpffw-price-breakdown--sticky.fme-cpffw-price-breakdown--sticky-below {
	/* In-flow below ATC until JS docks; keep opaque card. */
	z-index: 100;
	background: #ffffff;
}

#product_total_price.fme-cpffw-price-breakdown--sticky-docked {
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}


.fme_table_images {
/*    width:  100% !important;
max-width:  100% !important;*/
}
.fme_table_images td{
    background: transparent !important;
}
.fme_file_im_name {
    width: 10px ;
    max-width: 170px;
}

.fme_file_im_icon {
    width: 25px;
    min-width: 20px;
    max-width: 30px;
}

.fme_file_im_icon img {
    width: 80px !important;
    /*min-width: 20px;*/
    max-width: 80px !important;
}

.fme_file_im_icon a {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.fme-cpffw-view-file {
	font-size: 0.9em;
	text-decoration: underline;
}



@media only screen and (max-width: 350px) {
    .fme_file_im_name {
        width: 10px ;
        max-width: 160px;
    }

    .fme_file_im_icon {
        width: 25px;
        min-width: 20px;
        max-width: 30px;
    }

    .fme_file_im_icon img {
        width: 25px;
        min-width: 20px;
        max-width: 30px;
    } 
}



@media only screen and (max-width: 330px) {
    .fme_file_im_name {
        width: 10px ;
        max-width: 100px;
    }

    .fme_file_im_icon {
        width: 25px;
        min-width: 20px;
        max-width: 30px;
    }

    .fme_file_im_icon img {
        width: 25px;
        min-width: 20px;
        max-width: 30px;
    } 
}

.fme_file_im_name{
width :50%;
}
.fme_table_images td{
box-shadow: none !important;
border-bottom: none;
}
.shop_table dd, .shop_table dt{
  display: block !important;
  /* font-weight: bold !important; */
}
.fme_table_images tr{
justify-content:left !important;
}
.fme-addon-product {
        border: 1px solid #ddd;
        padding: 15px;
        margin: 10px 0;
        background: #f9f9f9;
        border-radius: 5px;
    }
    .fme-addon-product img {
        max-width: 50px;
        height: auto;
        margin-right: 10px;
    }
    .fme-addon-product h4 {
        margin: 0 0 5px;
        font-size: 16px;
    }
    .fme-addon-product p {
        margin: 0;
        font-size: 14px;
    }
    .fme-addon-product select {
        width: 100%;
        margin-bottom: 10px;
    }
/* Task 4: sections on storefront */
.fme_cpffw_custom_main > .fme_cpffw_div_class + .fme_cpffw_div_class {
	border-top: 1px solid #dcdcde;
	padding-top: 0.85em;
	margin-top: 0.85em;
}

.fme-cpffw-section-front {
	margin: 1.5em 0 0;
	padding: 0;
}

.fme-cpffw-section-front:first-child {
	margin-top: 0;
}

.fme-cpffw-section-header {
	margin: 0 0 0.65em;
	padding: 0;
}

.fme-cpffw-section-title {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: #2c3338;
	line-height: 1.3;
}

.fme-cpffw-section-description {
	margin: 0;
	font-size: 0.95em;
	color: #50575e;
	line-height: 1.5;
}

.fme-cpffw-section-front .fme-cpffw-section-fields {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.fme-cpffw-section-description--no-title {
	margin: 0 0 0.65em;
}

.fme-cpffw-section-fields > .fme_cpffw_div_class {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	clear: both;
}

.fme-cpffw-section-fields > .fme_cpffw_div_class + .fme_cpffw_div_class {
	margin-top: 0.85em;
}
/* Match .fme_cpffw_front_small_fields; survives Select2 init while section is display:none */
.fme_cpffw_select2_cat + .select2-container {
	width: 62% !important;
	max-width: 100%;
	box-sizing: border-box;
}

/* Cart file field: filename + price on one line, preview underneath */
.fme-cpffw-cart-file {
	display: block;
	margin-bottom: 0.5em;
}
.fme-cpffw-cart-file-name {
	display: block;
	word-break: break-word;
}
.fme-cpffw-cart-file-preview {
	display: block;
	margin-top: 4px;
}
.fme-cpffw-cart-file-preview a {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}
.fme-cpffw-cart-file-preview img {
	width: 80px !important;
	max-width: 80px !important;
	height: auto;
}
.fme-cpffw-cart-field-price {
	white-space: nowrap;
}

.fme_cpffw_variation-hidden {
	display: none !important;
}
