.one-product-container {
  margin-left: 5px;
  margin-right: 5px;
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;

  &:hover {
    transform: translateY(-5px);
    border-color: #0081bf;
    box-shadow: 0 12px 24px rgba(0, 129, 191, 0.12);

    .product-images {
      .product-image {
        &.hover-animation {
          img {
            &:first-child {
              opacity: 0;
              visibility: hidden;
            }

            &:last-child {
              opacity: 1;
              visibility: visible;
              transform: scale(1.05);
            }
          }
        }
      }
    }

    .box-actions-hover {
      transform: translateY(0);
    }
  }

  .box-actions-hover {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    text-align: center;
    transform: translateY(100%);
    transition: all 0.3s;

    button {
      background-color: #2e2e2e;
      // color: #545454;
      color: $gray-color1;
      border: 0;
      padding: 4px 8px;
      cursor: pointer;
      font-weight: bold;
      font-size: 13px;
      border-right: 1px solid $gray-color1;

      &:first-child {
        border-radius: 4px 0 0 0;
      }

      &:last-child {
        border-right: 1px solid transparent;
        border-radius: 0 4px 0 0;
      }

      i {
        vertical-align: middle;
      }
    }

    .add-to-wishlist {
      &.active {
        color: $highlight-color-red;
      }
    }
  }

  .product-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(#fff, 0.8);
    font-weight: bold;
    color: $highlight-color-red;
    display: inline-block;
    font-size: 14px;
    padding: 3px 8px;
  }

  .product-new-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 6;
    background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 20px;
    box-shadow: 0 0 12px rgba(255, 75, 43, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    animation: badgePulseSunset 1.8s infinite alternate, fadeInBadge 0.4s ease-in-out;
  }

  .best-seller-ribbon {
    display: inline-block;
    border-right: 80px solid #a92121;
    border-left: 80px solid transparent;
    border-bottom: 80px solid transparent;
    border-top-right-radius: 15px;
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;

    .text {
      width: 80px;
      height: 80px;
      display: flex;
      justify-content: center;
      align-items: center;
      transform: rotate(45deg) translate(0, -25%);
      font-size: 13px;
      color: #fff;
      font-family: serif;
      font-weight: bold;
      position: absolute;
    }
  }

  .version-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    animation: fadeInBadge 0.4s ease-in-out;
  }

  .version-badge-premium {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .version-badge-standard {
    // Match premium badge color palette as requested
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    bottom: 50px; // Position above premium badge if both exist
  }

  .version-badge-standard.only-badge {
    bottom: 10px; // Position at bottom if only standard exists
  }

  .version-badge i {
    font-size: 0.875rem;
  }

  @keyframes fadeInBadge {
    from {
      opacity: 0;
      transform: translateY(5px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes badgePulseSunset {
    0% {
      transform: scale(1);
      box-shadow: 0 0 6px rgba(255, 75, 43, 0.5);
    }
    100% {
      transform: scale(1.05);
      box-shadow: 0 0 15px rgba(255, 75, 43, 0.9), 0 0 4px rgba(255, 65, 108, 0.5);
    }
  }

  .product-images {
    max-width: 100%;
    height: 200px;
    margin: 0;
    overflow: hidden;
    position: relative;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    flex-shrink: 0;

    .product-image {
      width: 100%;
      height: 100%;
      display: block;

      img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 12px;
        transition: all .3s;

        &:first-child {
          opacity: 1;
          visibility: visible;
          position: absolute;
          top: 0;
          left: 0;
          border-radius: 12px;
          box-shadow: none;
        }

        &:last-child {
          opacity: 0;
          visibility: visible;
          border-radius: 12px;
          position: absolute;
          top: 0;
          left: 0;
        }
      }
    }
  }

  .product-info {
    padding: 12px 10px 15px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-start;

    .product-name {
      font-size: 13px;
      font-weight: 600;
      line-height: 1.4;
      margin: 0 0 8px 0;
      height: 40px;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      text-overflow: ellipsis;

      a {
        color: #333 !important;
        text-decoration: none;
        transition: color 0.2s ease;

        &:hover {
          color: #0081bf !important;
        }
      }
    }

    .product-model {
      font-size: 11px;
      font-weight: 500;
      color: #888;
      background: #f5f6f7;
      padding: 3px 8px;
      border-radius: 4px;
      display: inline-block;
      margin: 0 auto 10px auto;
      max-width: max-content;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      line-height: 1;
    }

    .product-price {
      margin-top: auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding-top: 5px;

      .price-highlight {
        color: $highlight-color-red;
        margin-right: 5px;
      }

      .price-del {
        color: $disabled-color;
        text-decoration: line-through;
        font-size: 12px;
        margin-left: 5px;
      }

      .price-contact {
        color: #0081bf;
        font-weight: 600;
        font-size: 13px;
        background-color: rgba(0, 129, 191, 0.06);
        padding: 4px 12px;
        border-radius: 20px;
        border: 1px dashed rgba(0, 129, 191, 0.3);
      }
    }
  }
}

.one-product-container.discontinued {
  .product-images {
    .product-image {
      img {
        filter: grayscale(60%);
        opacity: 0.85;
      }
    }
  }

  .discontinued-ribbon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    z-index: 10;
    pointer-events: none;

    span {
      display: block;
      background: rgba(220, 38, 38, 0.92);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      text-align: center;
      padding: 8px 5px;
      letter-spacing: 1px;
      white-space: nowrap;
      text-transform: uppercase;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
      width: 100%;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);

      @media (max-width: 576px) {
        font-size: 9px;
        padding: 6px 5px;
      }
    }
  }
}
