.custom-product-widget.layout-row {
    flex-direction: row;
    align-items: center;
}

.custom-product-widget.layout-row-reverse {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
}

.custom-product-widget.layout-column {
    flex-direction: column;
    align-items: center;
}

.custom-product-icon-inner {
  width: 60px; /* یا مقدار دلخواه */
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.custom-product-icon-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}


.custom-product-shortname {
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 5px;
}

.custom-product-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-top: 0;
}

.custom-product-text p {
    margin: 0 0 5px 0;
}

.custom-product-text .saddad-text {
    color: blue;
    font-size: 12px;
}

.custom-product-text .latest-version-text {
    color: gray;
    font-size: 12px;
}

.custom-product-app-button {
    display: inline-block;
    background-color: #e0e0ff;
    color: #333;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
}

.custom-product-app-button:hover {
    background-color: #ccccff;
}

/* Styles for the button */
.elementor-widget-product_add_to_cart_widget .elementor-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 15px 30px;
    font-weight: 600;
    font-size: 16px;
    font-family: 'Vazir', 'Tahoma', sans-serif !important;
    color: #ffffff !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0px; /* Remove gap for no icon */
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
    min-width: 200px;
    margin-bottom: 20px; /* Add margin to separate from variations */
    overflow: hidden; /* Ensure rounded corners work */
}

.elementor-widget-product_add_to_cart_widget .elementor-button:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40,167,69,0.4);
    border-radius: 25px !important;
}

/* Force rounded corners for all button states */
.elementor-widget-product_add_to_cart_widget .elementor-button,
.elementor-widget-product_add_to_cart_widget .elementor-button:focus,
.elementor-widget-product_add_to_cart_widget .elementor-button:active,
.elementor-widget-product_add_to_cart_widget .elementor-button:visited {
    border-radius: 25px !important;
    -webkit-border-radius: 25px !important;
    -moz-border-radius: 25px !important;
}

/* Font family for button text */
.elementor-widget-product_add_to_cart_widget .elementor-button span,
.elementor-widget-product_add_to_cart_widget .elementor-button .button-text {
    font-family: 'Vazir', 'Tahoma', sans-serif !important;
    font-weight: 600 !important;
}

/* Styles for the price display in the Add to Cart widget */
.elementor-widget-product_add_to_cart_widget .product-price {
    display: flex; /* Use flexbox to align label and value */
    flex-direction: column; /* Stack vertically */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    margin-top: 25px;
    padding: 20px; /* Add padding for better spacing */
    background: linear-gradient(135deg, #f8f9fa, #e9ecef); /* Light gradient background */
    border-radius: 15px; /* Rounded corners */
    border: 2px solid #e9ecef; /* Subtle border */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Subtle shadow */
    position: relative;
    overflow: hidden;
}

/* Add a subtle accent line for simple product price */
.elementor-widget-product_add_to_cart_widget .product-price::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
}

.elementor-widget-product_add_to_cart_widget .product-price .price-label {
    /* Styles for the price label */
    color: #ff6b35; /* Orange color for price label */
    font-size: 15px;
    font-weight: 400;
    display: block;
    margin-bottom: 8px;
    text-align: right;
}

.elementor-widget-product_add_to_cart_widget .product-price .price-value {
    /* Styles for the price value */
    color: #6c757d; /* Gray color for price value */
    font-weight: 500;
    font-size: 18px;
    display: block;
    text-align: right;
}

/* Styles for variable product price display */
.elementor-widget-product_add_to_cart_widget .product-price-variable {
    /* Flexbox styles moved from inline to CSS */
    display: flex;
    flex-direction: column; /* Stack label and price vertically */
    justify-content: center;
    align-items: center;
    margin-top: 25px; /* Add margin to separate from variations */
    padding: 20px; /* Add padding for better spacing */
    background: linear-gradient(135deg, #f8f9fa, #e9ecef); /* Light gradient background */
    border-radius: 15px; /* Rounded corners */
    border: 2px solid #e9ecef; /* Subtle border */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Subtle shadow */
    position: relative;
    overflow: hidden;
}

/* Add a subtle accent line */
.elementor-widget-product_add_to_cart_widget .product-price-variable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
}

.elementor-widget-product_add_to_cart_widget .product-price-variable .price-label {
    /* Styles for the variable price label */
    color: #ff6b35; /* Orange color for price label */
    font-size: 15px;
    font-weight: 400;
    display: block;
    margin-bottom: 8px;
    text-align: right;
}

.elementor-widget-product_add_to_cart_widget .product-price-variable .woocommerce-variation-price .amount, 
.elementor-widget-product_add_to_cart_widget .product-price-variable .woocommerce-variation-price .woocommerce-Price-amount {
    /* Styles for the variable price amount */
    color: #6c757d; /* Gray color for price value */
    font-weight: 500;
    font-size: 18px;
    display: block;
    text-align: right;
}

.elementor-widget-product_add_to_cart_widget .product-price-variable .woocommerce-variation-price .woocommerce-Price-currencySymbol {
    /* Styles for the variable currency symbol */
    color: #6c757d;
    font-weight: 500;
}

/* Styles for the variation dropdowns */
.elementor-widget-product_add_to_cart_widget .variations_form .variations {
    width: 100%; /* Ensure table takes full width */
}

.elementor-widget-product_add_to_cart_widget .variations_form select {
    width: 100%; /* Ensure dropdown takes full width */
}

/* Typography control for dropdowns will be added in PHP */

.elementor-337 .elementor-element.elementor-element-b6229d7 .product-price .price-label {
    color: #95ABC2;
    padding-left: 10px;
}

/* Variations are now always visible - removed hiding styles */

/* Styles for the variations container */
.elementor-widget-product_add_to_cart_widget .variations-container {
    display: block; /* Always visible */
    opacity: 1; /* Always visible */
    margin-top: 0; /* No top margin since button is above */
    margin-bottom: 20px; /* Add bottom margin to separate from price */
    background: transparent; /* Remove background */
    border-radius: 0; /* Remove border radius */
    padding: 0; /* Remove padding */
    border: none; /* Remove border */
}

/* Styles for variations section label */
.elementor-widget-product_add_to_cart_widget .variations-section-label {
    font-size: 15px;
    font-weight: 400;
    color: #6c757d;
    margin-top: 57px;
    margin-bottom: 22px;
    text-align: center;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    opacity: 0.8;
    position: relative;
    clear: both;
    display: block;
}

/* Add a subtle underline effect */
.elementor-widget-product_add_to_cart_widget .variations-section-label::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 1px;
}

/* Styles for variation rows */
.elementor-widget-product_add_to_cart_widget .variation-row {
    display: block;
    margin-bottom: 20px;
}

.elementor-widget-product_add_to_cart_widget .variation-row:last-child {
    margin-bottom: 0;
}

/* Hide variation labels since we have section label */
.elementor-widget-product_add_to_cart_widget .variation-label {
    display: none;
}

.elementor-widget-product_add_to_cart_widget .variation-value {
    position: relative;
}

/* Styles for radio options container */
.elementor-widget-product_add_to_cart_widget .radio-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

/* Styles for toggle option - Updated v1.1 */
.elementor-widget-product_add_to_cart_widget .toggle-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
    min-height: 45px;
}

/* Hide the actual radio input */
.elementor-widget-product_add_to_cart_widget .toggle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Toggle switch styles */
.elementor-widget-product_add_to_cart_widget .toggle-switch {
    position: relative;
    width: 35px;
    height: 20px;
    margin-right: 10px;
}

.elementor-widget-product_add_to_cart_widget .toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 30px;
    transition: 0.3s;
    cursor: pointer;
}

.elementor-widget-product_add_to_cart_widget .toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

/* Toggle switch when checked */
.elementor-widget-product_add_to_cart_widget .toggle-option input[type="radio"]:checked + .toggle-slider {
    background-color: #d4af37;
}

.elementor-widget-product_add_to_cart_widget .toggle-option input[type="radio"]:checked + .toggle-slider:before {
    transform: translateX(15px);
}

/* Option content styles */
.elementor-widget-product_add_to_cart_widget .option-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.elementor-widget-product_add_to_cart_widget .option-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: color 0.3s ease;
}

/* Icon styles */
.elementor-widget-product_add_to_cart_widget .option-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Calendar icon for all months - FORCE remove old icons completely */
.elementor-widget-product_add_to_cart_widget .icon-calendar,
.elementor-widget-product_add_to_cart_widget .icon-wallet,
.elementor-widget-product_add_to_cart_widget .icon-credit-card,
.elementor-widget-product_add_to_cart_widget .option-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 24 24'%3E%3Cpath d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    background-color: transparent !important;
}

/* FORCE remove any other icon backgrounds */
.elementor-widget-product_add_to_cart_widget .toggle-option .option-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 24 24'%3E%3Cpath d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z'/%3E%3C/svg%3E") !important;
}

/* Restore original icons - wallet and credit card */
.elementor-widget-product_add_to_cart_widget .icon-wallet {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 24 24'%3E%3Cpath d='M21 7H3C1.9 7 1 7.9 1 9v6c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H3V9h18v6z'/%3E%3C/svg%3E");
}

.elementor-widget-product_add_to_cart_widget .icon-credit-card {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z'/%3E%3C/svg%3E");
}

/* Hover effect for toggle options */
.elementor-widget-product_add_to_cart_widget .toggle-option:hover {
    border-color: #d4af37;
    background-color: #fef9e7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212,175,55,0.2);
}

/* Selected toggle option styles */
.elementor-widget-product_add_to_cart_widget .toggle-option:has(input[type="radio"]:checked) {
    border-color: #d4af37;
    background-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}

.elementor-widget-product_add_to_cart_widget .toggle-option:has(input[type="radio"]:checked) .option-text {
    color: #ffffff;
    font-weight: 600;
}

.elementor-widget-product_add_to_cart_widget .toggle-option:has(input[type="radio"]:checked) .option-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z'/%3E%3C/svg%3E");
}

/* Focus effect for toggle options */
.elementor-widget-product_add_to_cart_widget .toggle-option:focus-within {
    border-color: #8e44ad;
    box-shadow: 0 0 0 3px rgba(142,68,173,0.1);
}

/* INSTANT loading state for button */
.elementor-widget-product_add_to_cart_widget .elementor-button.loading {
    opacity: 0.9;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    transition: all 0.1s ease !important;
}

.elementor-widget-product_add_to_cart_widget .elementor-button.loading span {
    position: relative;
    display: inline-block;
}

.elementor-widget-product_add_to_cart_widget .elementor-button.loading span::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: fastSpin 0.5s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

@keyframes fastSpin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* ===========================================
   Product Terms Widget Styles - Updated v1.1
   =========================================== */

.elementor-widget-product_terms_widget .product-terms-widget {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    direction: rtl;
}

.elementor-widget-product_terms_widget .terms-title {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #28a745;
}

.elementor-widget-product_terms_widget .terms-content {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    white-space: pre-line;
}

.elementor-widget-product_terms_widget .terms-content p {
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    line-height: 1.8;
}

.elementor-widget-product_terms_widget .terms-content p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Hover effect for lines */
.elementor-widget-product_terms_widget .terms-content p:hover {
    background-color: rgba(40, 167, 69, 0.05);
    border-radius: 4px;
    padding-left: 8px;
    padding-right: 8px;
    transition: all 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .elementor-widget-product_terms_widget .product-terms-widget {
        padding: 0;
    }
    
    .elementor-widget-product_terms_widget .terms-title {
        font-size: 16px;
    }
    
    .elementor-widget-product_terms_widget .terms-content {
        font-size: 13px;
        padding: 0;
    }
}

/* Product Image and Specs Widget Styles - Removed to fix Elementor loading issue */

/* Product Image and Specs Widget Styles - Removed to fix Elementor loading issue */


