<div class="{{ block.settings.visibility }}"
  {{ block.shopify_attributes }}
  style="--margin-top: {{ block.settings.margin_top | divided_by: 10.0 }}rem;--margin-bottom: {{ block.settings.margin_bottom | divided_by: 10.0 }}rem;"
>
<div id="custom-product-description" class="custom-product-description">
  {% if block.settings.heading != blank %}
    <h4 class="custom-description-heading custom-description-heading--{{ block.id }}">

      {% if block.settings.enable_heading_icon and block.settings.icon_position == 'before' %}
        {% if block.settings.icon_type == 'google' %}
          <span class="material-symbols-rounded custom-heading-icon custom-heading-icon--{{ block.id }}">{{ block.settings.google_icon_name }}</span>
        {% elsif block.settings.icon_type == 'custom' and block.settings.custom_icon != blank %}
          <img src="{{ block.settings.custom_icon | image_url }}" alt="" class="custom-heading-icon custom-heading-icon--img custom-heading-icon--{{ block.id }}" aria-hidden="true">
        {% endif %}
      {% endif %}

      {{ block.settings.heading }}

      {% if block.settings.enable_heading_icon and block.settings.icon_position == 'after' %}
        {% if block.settings.icon_type == 'google' %}
          <span class="material-symbols-rounded custom-heading-icon custom-heading-icon--{{ block.id }}">{{ block.settings.google_icon_name }}</span>
        {% elsif block.settings.icon_type == 'custom' and block.settings.custom_icon != blank %}
          <img src="{{ block.settings.custom_icon | image_url }}" alt="" class="custom-heading-icon custom-heading-icon--img custom-heading-icon--{{ block.id }}" aria-hidden="true">
        {% endif %}
      {% endif %}

    </h4>
  {% endif %}

  {% if block.settings.description_text != blank %}
    <p class="custom-description-text">
      {{ block.settings.description_text }}
    </p>
  {% endif %}

  <ul role="list" class="custom-list {% if block.settings.two_per_row %}two-per-row-desktop{% endif %} {% if block.settings.two_per_row_mobile %}two-per-row-mobile{% endif %}">
    {% assign checkmarks = '' %}
    {% if block.settings.checkmark1 != blank %}{% assign checkmarks = checkmarks | append: block.settings.checkmark1 | append: '||' %}{% endif %}
    {% if block.settings.checkmark2 != blank %}{% assign checkmarks = checkmarks | append: block.settings.checkmark2 | append: '||' %}{% endif %}
    {% if block.settings.checkmark3 != blank %}{% assign checkmarks = checkmarks | append: block.settings.checkmark3 | append: '||' %}{% endif %}
    {% if block.settings.checkmark4 != blank %}{% assign checkmarks = checkmarks | append: block.settings.checkmark4 | append: '||' %}{% endif %}
    {% if block.settings.checkmark5 != blank %}{% assign checkmarks = checkmarks | append: block.settings.checkmark5 | append: '||' %}{% endif %}
    {% if block.settings.checkmark6 != blank %}{% assign checkmarks = checkmarks | append: block.settings.checkmark6 | append: '||' %}{% endif %}

    {% assign checkmarks_array = checkmarks | split: '||' %}
    {% for checkmark in checkmarks_array %}
      {% if checkmark != '' %}
      <li class="custom-list-item">
        <i class="fa-{{ block.settings.filledincheckmark }} fa-circle-check custom-checkmark-icon" style="color:{{ block.settings.checkmarkcolor }}"></i>
        <div class="custom-list-item-text"><strong>{{ checkmark }}</strong></div>
      </li>
      {% endif %}
    {% endfor %}
  </ul>
</div>
</div>

{% if block.settings.enable_heading_icon and block.settings.icon_type == 'google' %}
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
{% endif %}

<style>
  .custom-product-description {
    background-color: {{ block.settings.customdescriptionbackground }};
    padding: 20px;
    border-radius: {{ block.settings.borderradius }}px;
    margin-top: 20px;
    padding-top: {{ block.settings.padding }}px;
    padding-bottom: {{ block.settings.padding }}px;
  }
  .custom-description-heading--{{ block.id }} {
    font-size: {{ block.settings.headingfontsize }}px;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .custom-description-text {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: {{ block.settings.description_textfontsize }}px;
  }
  .custom-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .custom-list-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  .custom-checkmark-icon {
    width: 15px;
    height: 15px;
    margin-right: 10px;
  }
  .custom-list-item-text strong {
    font-size: {{ block.settings.description_checkmarkfontsize }}px;
    color: #333333;
    line-height: 1.2;
  }

  {% if block.settings.enable_heading_icon %}
    {% if block.settings.icon_type == 'google' %}
      .custom-heading-icon--{{ block.id }}.material-symbols-rounded {
        font-size: {{ block.settings.icon_size }}px;
        color: {{ block.settings.google_icon_color }};
        font-variation-settings: 'FILL' {{ block.settings.google_icon_fill }}, 'wght' 400, 'GRAD' 0, 'opsz' 24;
        line-height: 1;
        flex-shrink: 0;
      }
    {% elsif block.settings.icon_type == 'custom' %}
      .custom-heading-icon--img.custom-heading-icon--{{ block.id }} {
        width: {{ block.settings.icon_size }}px;
        height: {{ block.settings.icon_size }}px;
        object-fit: contain;
        flex-shrink: 0;
      }
    {% endif %}
  {% endif %}

  /* Two per row styling for mobile */
  @media screen and (max-width: 767px) {
    .custom-list.two-per-row-mobile {
      display: flex;
      flex-wrap: wrap;
    }
    .custom-list.two-per-row-mobile .custom-list-item {
      width: 50%;
      box-sizing: border-box;
      padding-right: 15px;
    }
  }

  /* Two per row styling for desktop */
  @media screen and (min-width: 768px) {
    .custom-list.two-per-row-desktop {
      display: flex;
      flex-wrap: wrap;
    }
    .custom-list.two-per-row-desktop .custom-list-item {
      width: 50%;
      box-sizing: border-box;
      padding-right: 15px;
    }
  }
</style>
